From a915739887477b28d924ecc8417ee107d125bd6c Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 6 Sep 2009 18:48:27 +0000 Subject: Switched to xorg-server-1.6.99.900.tar.gz --- xorg-server/COPYING | 225 +- xorg-server/ChangeLog | 17397 ++++++++++-- xorg-server/Makefile.am | 14 +- xorg-server/Makefile.in | 60 +- xorg-server/Xext/Makefile.am | 7 + xorg-server/Xext/Makefile.in | 75 +- xorg-server/Xext/bigreq.c | 7 +- xorg-server/Xext/dpms.c | 108 +- xorg-server/Xext/dpmsproc.h | 2 - xorg-server/Xext/dpmsstubs.c | 5 - xorg-server/Xext/geext.c | 192 +- xorg-server/Xext/geext.h | 61 +- xorg-server/Xext/geint.h | 13 +- xorg-server/Xext/mbuf.c | 62 +- xorg-server/Xext/mbufbf.c | 7 +- xorg-server/Xext/mbufpx.c | 8 +- xorg-server/Xext/panoramiX.c | 34 +- xorg-server/Xext/panoramiX.h | 5 +- xorg-server/Xext/panoramiXprocs.c | 717 +- xorg-server/Xext/panoramiXsrv.h | 38 +- xorg-server/Xext/saver.c | 164 +- xorg-server/Xext/security.c | 33 +- xorg-server/Xext/shape.c | 211 +- xorg-server/Xext/shm.c | 58 +- xorg-server/Xext/shmint.h | 38 +- xorg-server/Xext/sleepuntil.c | 33 +- xorg-server/Xext/sync.c | 713 +- xorg-server/Xext/syncsrv.h | 176 + xorg-server/Xext/xace.c | 159 +- xorg-server/Xext/xace.h | 23 +- xorg-server/Xext/xacestr.h | 2 +- xorg-server/Xext/xcalibrate.c | 2 - xorg-server/Xext/xcmisc.c | 28 +- xorg-server/Xext/xf86bigfont.c | 32 +- xorg-server/Xext/xres.c | 6 +- xorg-server/Xext/xselinux.c | 60 +- xorg-server/Xext/xselinux.h | 394 +- xorg-server/Xext/xtest.c | 253 +- xorg-server/Xext/xvdisp.c | 336 +- xorg-server/Xext/xvdix.h | 106 +- xorg-server/Xext/xvmain.c | 76 +- xorg-server/Xext/xvmc.c | 71 +- xorg-server/Xext/xvmcext.h | 13 +- xorg-server/Xi/Makefile.am | 28 +- xorg-server/Xi/Makefile.in | 82 +- xorg-server/Xi/allowev.c | 14 +- xorg-server/Xi/chgdctl.c | 12 +- xorg-server/Xi/chgfctl.c | 16 +- xorg-server/Xi/chgkbd.c | 2 - xorg-server/Xi/chgkmap.c | 4 +- xorg-server/Xi/chgprop.c | 4 +- xorg-server/Xi/chgptr.c | 2 - xorg-server/Xi/closedev.c | 2 - xorg-server/Xi/devbell.c | 2 - xorg-server/Xi/exevents.c | 1411 +- xorg-server/Xi/exglobals.h | 27 +- xorg-server/Xi/extinit.c | 534 +- xorg-server/Xi/getbmap.c | 4 +- xorg-server/Xi/getdctl.c | 4 +- xorg-server/Xi/getfctl.c | 4 +- xorg-server/Xi/getfocus.c | 2 - xorg-server/Xi/getkmap.c | 31 +- xorg-server/Xi/getmmap.c | 30 +- xorg-server/Xi/getprop.c | 4 +- xorg-server/Xi/getselev.c | 4 +- xorg-server/Xi/getvers.c | 16 +- xorg-server/Xi/grabdev.c | 20 +- xorg-server/Xi/grabdevb.c | 26 +- xorg-server/Xi/grabdevk.c | 25 +- xorg-server/Xi/gtmotion.c | 4 +- xorg-server/Xi/listdev.c | 121 +- xorg-server/Xi/listdev.h | 11 - xorg-server/Xi/opendev.c | 9 +- xorg-server/Xi/queryst.c | 11 +- xorg-server/Xi/selectev.c | 18 +- xorg-server/Xi/sendexev.c | 10 +- xorg-server/Xi/setbmap.c | 34 +- xorg-server/Xi/setdval.c | 4 +- xorg-server/Xi/setfocus.c | 2 - xorg-server/Xi/setmmap.c | 33 +- xorg-server/Xi/setmode.c | 2 - xorg-server/Xi/stubs.c | 3 +- xorg-server/Xi/ungrdev.c | 4 +- xorg-server/Xi/ungrdevb.c | 3 +- xorg-server/Xi/ungrdevk.c | 9 +- xorg-server/Xi/xiallowev.c | 103 + xorg-server/Xi/xiallowev.h | 36 + xorg-server/Xi/xichangecursor.c | 113 + xorg-server/Xi/xichangecursor.h | 36 + xorg-server/Xi/xichangehierarchy.c | 454 + xorg-server/Xi/xichangehierarchy.h | 44 + xorg-server/Xi/xigetclientpointer.c | 106 + xorg-server/Xi/xigetclientpointer.h | 38 + xorg-server/Xi/xigrabdev.c | 161 + xorg-server/Xi/xigrabdev.h | 41 + xorg-server/Xi/xipassivegrab.c | 313 + xorg-server/Xi/xipassivegrab.h | 39 + xorg-server/Xi/xiproperty.c | 836 +- xorg-server/Xi/xiproperty.h | 25 +- xorg-server/Xi/xiquerydevice.c | 487 + xorg-server/Xi/xiquerydevice.h | 45 + xorg-server/Xi/xiquerypointer.c | 228 + xorg-server/Xi/xiquerypointer.h | 39 + xorg-server/Xi/xiqueryversion.c | 128 + xorg-server/Xi/xiqueryversion.h | 40 + xorg-server/Xi/xiselectev.c | 299 + xorg-server/Xi/xiselectev.h | 40 + xorg-server/Xi/xisetclientpointer.c | 109 + xorg-server/Xi/xisetclientpointer.h | 36 + xorg-server/Xi/xisetdevfocus.c | 130 + xorg-server/Xi/xisetdevfocus.h | 40 + xorg-server/Xi/xiwarppointer.c | 201 + xorg-server/Xi/xiwarppointer.h | 36 + xorg-server/aclocal.m4 | 8051 +----- xorg-server/composite/Makefile.am | 4 + xorg-server/composite/Makefile.in | 102 +- xorg-server/composite/compalloc.c | 43 +- xorg-server/composite/compext.c | 136 +- xorg-server/composite/compinit.c | 55 +- xorg-server/composite/compint.h | 45 +- xorg-server/composite/compositeext.h | 38 + xorg-server/composite/compoverlay.c | 45 +- xorg-server/composite/compwindow.c | 41 +- xorg-server/config.guess | 58 +- xorg-server/config.sub | 15 +- xorg-server/config/Makefile.am | 10 +- xorg-server/config/Makefile.in | 93 +- xorg-server/config/config.c | 4 +- xorg-server/config/dbus-core.c | 1 - xorg-server/config/dbus.c | 2 +- xorg-server/configure | 27181 +++++++++++++------ xorg-server/configure.ac | 310 +- xorg-server/damageext/Makefile.in | 35 +- xorg-server/damageext/damageextint.h | 10 +- xorg-server/dbe/Makefile.in | 35 +- xorg-server/dbe/dbe.c | 36 +- xorg-server/dbe/dbestruct.h | 18 +- xorg-server/dbe/midbe.c | 2 - xorg-server/dix/Makefile.am | 12 +- xorg-server/dix/Makefile.in | 66 +- xorg-server/dix/atom.c | 23 +- xorg-server/dix/colormap.c | 77 +- xorg-server/dix/cursor.c | 13 +- xorg-server/dix/deprecated.c | 27 +- xorg-server/dix/devices.c | 1185 +- xorg-server/dix/dispatch.c | 579 +- xorg-server/dix/dixfonts.c | 130 +- xorg-server/dix/dixutils.c | 55 +- xorg-server/dix/enterleave.c | 194 +- xorg-server/dix/enterleave.h | 6 +- xorg-server/dix/eventconvert.c | 718 + xorg-server/dix/events.c | 3183 +-- xorg-server/dix/extension.c | 28 +- xorg-server/dix/gc.c | 42 +- xorg-server/dix/getevents.c | 614 +- xorg-server/dix/globals.c | 61 +- xorg-server/dix/grabs.c | 152 +- xorg-server/dix/inpututils.c | 334 + xorg-server/dix/main.c | 383 +- xorg-server/dix/pixmap.c | 8 +- xorg-server/dix/privates.c | 22 +- xorg-server/dix/property.c | 84 +- xorg-server/dix/protocol.txt | 30 + xorg-server/dix/ptrveloc.c | 995 +- xorg-server/dix/registry.c | 2 +- xorg-server/dix/resource.c | 76 +- xorg-server/dix/selection.c | 6 +- xorg-server/dix/swaprep.c | 44 +- xorg-server/dix/swapreq.c | 11 +- xorg-server/dix/tables.c | 4 +- xorg-server/dix/window.c | 249 +- xorg-server/doc/Makefile.in | 35 +- xorg-server/doc/Xserver.man.pre | 10 +- xorg-server/exa/Makefile.am | 7 +- xorg-server/exa/Makefile.in | 52 +- xorg-server/exa/exa.c | 978 +- xorg-server/exa/exa.h | 115 +- xorg-server/exa/exa_accel.c | 340 +- xorg-server/exa/exa_classic.c | 258 + xorg-server/exa/exa_driver.c | 214 + xorg-server/exa/exa_glyphs.c | 319 +- xorg-server/exa/exa_migration_classic.c | 720 + xorg-server/exa/exa_migration_mixed.c | 194 + xorg-server/exa/exa_mixed.c | 251 + xorg-server/exa/exa_offscreen.c | 249 +- xorg-server/exa/exa_priv.h | 228 +- xorg-server/exa/exa_render.c | 276 +- xorg-server/exa/exa_unaccel.c | 286 +- xorg-server/fb/Makefile.am | 2 +- xorg-server/fb/Makefile.in | 39 +- xorg-server/fb/fb.h | 379 +- xorg-server/fb/fbcmap.c | 6 +- xorg-server/fb/fbcopy.c | 364 +- xorg-server/fb/fboverlay.c | 2 +- xorg-server/fb/fboverlay.h | 24 +- xorg-server/fb/fbpict.c | 131 +- xorg-server/fb/fbpict.h | 16 +- xorg-server/fb/fbrop.h | 14 +- xorg-server/fb/fbscreen.c | 8 - xorg-server/fb/fbtrap.c | 4 +- xorg-server/fb/fbwindow.c | 4 +- xorg-server/glx/Makefile.am | 1 + xorg-server/glx/Makefile.in | 36 +- xorg-server/glx/extension_string.c | 2 +- xorg-server/glx/glapi.c | 5 +- xorg-server/glx/glthread.c | 9 +- xorg-server/glx/glxcmds.c | 281 +- xorg-server/glx/glxcmdsswap.c | 2 - xorg-server/glx/glxdrawable.h | 5 +- xorg-server/glx/glxdri.c | 18 +- xorg-server/glx/glxdri2.c | 15 +- xorg-server/glx/glxdriswrast.c | 12 +- xorg-server/glx/glxext.c | 24 +- xorg-server/glx/glxscreens.c | 40 +- xorg-server/glx/glxscreens.h | 1 + xorg-server/glx/glxserver.h | 6 +- xorg-server/glx/indirect_dispatch.c | 2 +- xorg-server/glx/indirect_dispatch_swap.c | 2 +- xorg-server/glx/indirect_program.c | 3 +- xorg-server/glx/indirect_reqsize.c | 4 +- xorg-server/glx/indirect_texture_compression.c | 1 - xorg-server/glx/indirect_util.c | 4 +- xorg-server/glx/render2.c | 6 - xorg-server/glx/render2swap.c | 6 - xorg-server/glx/renderpix.c | 1 - xorg-server/glx/renderpixswap.c | 1 - xorg-server/glx/rensize.c | 2 +- xorg-server/glx/single2.c | 4 +- xorg-server/glx/single2swap.c | 1 - xorg-server/glx/singlepix.c | 2 +- xorg-server/glx/singlepixswap.c | 2 +- xorg-server/glx/swap_interval.c | 1 - xorg-server/glx/xfont.c | 16 +- xorg-server/hw/Makefile.in | 35 +- xorg-server/hw/dmx/Makefile.am | 6 +- xorg-server/hw/dmx/Makefile.in | 45 +- xorg-server/hw/dmx/config/Makefile.am | 2 - xorg-server/hw/dmx/config/Makefile.in | 37 +- xorg-server/hw/dmx/config/parser.c | 387 +- xorg-server/hw/dmx/config/parser.h | 44 +- xorg-server/hw/dmx/config/scanner.c | 18 +- xorg-server/hw/dmx/dmx.c | 21 +- xorg-server/hw/dmx/dmx.h | 6 +- xorg-server/hw/dmx/dmxcb.c | 6 - xorg-server/hw/dmx/dmxclient.h | 11 +- xorg-server/hw/dmx/dmxcursor.c | 1 + xorg-server/hw/dmx/dmxextension.c | 20 +- xorg-server/hw/dmx/dmxfont.c | 10 +- xorg-server/hw/dmx/dmxpict.c | 6 - xorg-server/hw/dmx/dmxscrinit.c | 8 +- xorg-server/hw/dmx/doc/Makefile.in | 35 +- xorg-server/hw/dmx/examples/Makefile.in | 35 +- xorg-server/hw/dmx/glxProxy/Makefile.am | 3 - xorg-server/hw/dmx/glxProxy/Makefile.in | 38 +- xorg-server/hw/dmx/glxProxy/g_renderswap.c | 1 - xorg-server/hw/dmx/glxProxy/global.c | 1 - xorg-server/hw/dmx/glxProxy/glxcmds.c | 2 - xorg-server/hw/dmx/glxProxy/glxcmdsswap.c | 2 - xorg-server/hw/dmx/glxProxy/glxext.c | 1 - xorg-server/hw/dmx/glxProxy/glxsingle.c | 3 +- xorg-server/hw/dmx/glxProxy/glxutil.c | 19 +- xorg-server/hw/dmx/glxProxy/glxvendor.c | 1 - xorg-server/hw/dmx/glxProxy/glxvisuals.c | 7 +- xorg-server/hw/dmx/glxProxy/render2swap.c | 1 - xorg-server/hw/dmx/glxProxy/renderpixswap.c | 1 - xorg-server/hw/dmx/input/ChkNotMaskEv.c | 1 - xorg-server/hw/dmx/input/Makefile.am | 2 - xorg-server/hw/dmx/input/Makefile.in | 37 +- xorg-server/hw/dmx/input/atKeynames.h | 1 - xorg-server/hw/dmx/input/dmxcommon.c | 6 - xorg-server/hw/dmx/input/dmxcommon.h | 4 - xorg-server/hw/dmx/input/dmxdummy.c | 2 - xorg-server/hw/dmx/input/dmxeq.c | 1 - xorg-server/hw/dmx/input/dmxevents.c | 12 +- xorg-server/hw/dmx/input/dmxinputinit.c | 154 +- xorg-server/hw/dmx/input/dmxinputinit.h | 2 - xorg-server/hw/dmx/input/dmxxinput.c | 1 - xorg-server/hw/dmx/input/lnx-keyboard.c | 2 +- xorg-server/hw/dmx/input/usb-keyboard.c | 4 +- xorg-server/hw/kdrive/Makefile.in | 35 +- xorg-server/hw/kdrive/ephyr/Makefile.am | 22 +- xorg-server/hw/kdrive/ephyr/Makefile.in | 180 +- xorg-server/hw/kdrive/ephyr/XF86dri.c | 47 +- xorg-server/hw/kdrive/ephyr/Xephyr.man.pre | 6 +- xorg-server/hw/kdrive/ephyr/ephyr.c | 41 +- xorg-server/hw/kdrive/ephyr/ephyrdriext.c | 60 +- xorg-server/hw/kdrive/ephyr/ephyrhostglx.c | 2 +- xorg-server/hw/kdrive/ephyr/ephyrinit.c | 35 + xorg-server/hw/kdrive/ephyr/ephyrvideo.c | 2 +- xorg-server/hw/kdrive/ephyr/hostx.c | 60 +- xorg-server/hw/kdrive/ephyr/hostx.h | 3 + xorg-server/hw/kdrive/fake/Makefile.am | 10 +- xorg-server/hw/kdrive/fake/Makefile.in | 90 +- xorg-server/hw/kdrive/fake/mouse.c | 1 - xorg-server/hw/kdrive/fbdev/Makefile.am | 8 +- xorg-server/hw/kdrive/fbdev/Makefile.in | 81 +- xorg-server/hw/kdrive/linux/Makefile.am | 8 +- xorg-server/hw/kdrive/linux/Makefile.in | 115 +- xorg-server/hw/kdrive/linux/bus.c | 3 +- xorg-server/hw/kdrive/linux/evdev.c | 22 +- xorg-server/hw/kdrive/linux/keyboard.c | 290 +- xorg-server/hw/kdrive/linux/linux.c | 4 +- xorg-server/hw/kdrive/linux/mouse.c | 9 +- xorg-server/hw/kdrive/linux/ms.c | 5 +- xorg-server/hw/kdrive/linux/ps2.c | 5 +- xorg-server/hw/kdrive/linux/tslib.c | 5 +- xorg-server/hw/kdrive/sdl/Makefile.in | 35 +- xorg-server/hw/kdrive/src/Makefile.am | 14 +- xorg-server/hw/kdrive/src/Makefile.in | 171 +- xorg-server/hw/kdrive/src/kcmap.c | 3 +- xorg-server/hw/kdrive/src/kdrive.c | 81 +- xorg-server/hw/kdrive/src/kdrive.h | 20 +- xorg-server/hw/kdrive/src/kinfo.c | 2 +- xorg-server/hw/kdrive/src/kinput.c | 343 +- xorg-server/hw/vfb/InitInput.c | 237 +- xorg-server/hw/vfb/InitOutput.c | 23 +- xorg-server/hw/vfb/Makefile.am | 1 + xorg-server/hw/vfb/Makefile.in | 39 +- xorg-server/hw/xfree86/Makefile.am | 84 +- xorg-server/hw/xfree86/Makefile.in | 212 +- xorg-server/hw/xfree86/common/Makefile.am | 38 +- xorg-server/hw/xfree86/common/Makefile.in | 159 +- xorg-server/hw/xfree86/common/compiler.h | 813 +- xorg-server/hw/xfree86/common/modeline2c.awk | 3 - xorg-server/hw/xfree86/common/vidmodeproc.h | 77 + xorg-server/hw/xfree86/common/xf86.h | 401 +- xorg-server/hw/xfree86/common/xf86AutoConfig.c | 145 +- xorg-server/hw/xfree86/common/xf86Bus.c | 2160 +- xorg-server/hw/xfree86/common/xf86Bus.h | 74 +- xorg-server/hw/xfree86/common/xf86Config.c | 135 +- xorg-server/hw/xfree86/common/xf86Config.h | 4 +- xorg-server/hw/xfree86/common/xf86Configure.c | 260 +- xorg-server/hw/xfree86/common/xf86Cursor.c | 5 +- xorg-server/hw/xfree86/common/xf86DGA.c | 271 +- xorg-server/hw/xfree86/common/xf86DPMS.c | 76 +- xorg-server/hw/xfree86/common/xf86Events.c | 213 +- xorg-server/hw/xfree86/common/xf86Globals.c | 21 +- xorg-server/hw/xfree86/common/xf86Helper.c | 426 +- xorg-server/hw/xfree86/common/xf86Init.c | 350 +- xorg-server/hw/xfree86/common/xf86Mode.c | 142 +- xorg-server/hw/xfree86/common/xf86Module.h | 40 +- xorg-server/hw/xfree86/common/xf86Opt.h | 82 +- xorg-server/hw/xfree86/common/xf86Option.c | 84 +- xorg-server/hw/xfree86/common/xf86PM.c | 11 +- xorg-server/hw/xfree86/common/xf86Priv.h | 161 +- xorg-server/hw/xfree86/common/xf86Privstr.h | 11 +- xorg-server/hw/xfree86/common/xf86RandR.c | 5 +- xorg-server/hw/xfree86/common/xf86ShowOpts.c | 3 +- xorg-server/hw/xfree86/common/xf86VGAarbiter.c | 1157 + xorg-server/hw/xfree86/common/xf86VGAarbiter.h | 48 + xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h | 266 + xorg-server/hw/xfree86/common/xf86VidMode.c | 76 +- xorg-server/hw/xfree86/common/xf86Xinput.c | 369 +- xorg-server/hw/xfree86/common/xf86Xinput.h | 76 +- xorg-server/hw/xfree86/common/xf86cmap.c | 75 +- xorg-server/hw/xfree86/common/xf86cmap.h | 10 +- xorg-server/hw/xfree86/common/xf86fbBus.c | 22 +- xorg-server/hw/xfree86/common/xf86fbman.c | 70 +- xorg-server/hw/xfree86/common/xf86fbman.h | 34 +- xorg-server/hw/xfree86/common/xf86noBus.c | 13 +- xorg-server/hw/xfree86/common/xf86pciBus.c | 601 +- xorg-server/hw/xfree86/common/xf86pciBus.h | 36 - xorg-server/hw/xfree86/common/xf86sbusBus.c | 48 +- xorg-server/hw/xfree86/common/xf86sbusBus.h | 53 +- xorg-server/hw/xfree86/common/xf86str.h | 187 +- xorg-server/hw/xfree86/common/xf86xv.c | 28 +- xorg-server/hw/xfree86/common/xf86xv.h | 31 +- xorg-server/hw/xfree86/common/xf86xvmc.c | 9 +- xorg-server/hw/xfree86/common/xf86xvmc.h | 9 +- xorg-server/hw/xfree86/common/xf86xvpriv.h | 3 +- xorg-server/hw/xfree86/common/xisb.c | 12 +- xorg-server/hw/xfree86/common/xisb.h | 12 +- xorg-server/hw/xfree86/common/xorgHelper.c | 2 +- xorg-server/hw/xfree86/ddc/Makefile.am | 7 +- xorg-server/hw/xfree86/ddc/Makefile.in | 91 +- xorg-server/hw/xfree86/ddc/ddc.c | 507 + xorg-server/hw/xfree86/ddc/ddcProperty.c | 53 +- xorg-server/hw/xfree86/ddc/edid.h | 17 +- xorg-server/hw/xfree86/ddc/interpret_edid.c | 23 +- xorg-server/hw/xfree86/ddc/print_edid.c | 33 +- xorg-server/hw/xfree86/ddc/xf86DDC.h | 33 +- xorg-server/hw/xfree86/dixmods/Makefile.in | 35 +- xorg-server/hw/xfree86/dixmods/extmod/Makefile.am | 2 +- xorg-server/hw/xfree86/dixmods/extmod/Makefile.in | 40 +- xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h | 60 +- xorg-server/hw/xfree86/dixmods/extmod/modinit.c | 9 - xorg-server/hw/xfree86/dixmods/extmod/modinit.h | 20 +- xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c | 32 +- xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c | 51 +- xorg-server/hw/xfree86/dixmods/extmod/xvmod.c | 2 +- xorg-server/hw/xfree86/dixmods/xkbKillSrv.c | 1 - xorg-server/hw/xfree86/dixmods/xkbPrivate.c | 1 - xorg-server/hw/xfree86/dixmods/xkbVT.c | 1 - xorg-server/hw/xfree86/doc/Makefile.in | 35 +- xorg-server/hw/xfree86/doc/devel/Makefile.am | 2 - xorg-server/hw/xfree86/doc/devel/Makefile.in | 37 +- xorg-server/hw/xfree86/doc/man/Makefile.in | 35 +- xorg-server/hw/xfree86/doc/man/Xorg.man.pre | 20 +- xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre | 31 +- xorg-server/hw/xfree86/doc/sgml/Makefile.in | 35 +- xorg-server/hw/xfree86/dri/Makefile.am | 4 +- xorg-server/hw/xfree86/dri/Makefile.in | 39 +- xorg-server/hw/xfree86/dri/dri.c | 16 +- xorg-server/hw/xfree86/dri/dri.h | 108 +- xorg-server/hw/xfree86/dri/xf86dri.c | 18 +- xorg-server/hw/xfree86/dri2/Makefile.am | 2 +- xorg-server/hw/xfree86/dri2/Makefile.in | 37 +- xorg-server/hw/xfree86/dri2/dri2.c | 251 +- xorg-server/hw/xfree86/dri2/dri2.h | 50 +- xorg-server/hw/xfree86/dri2/dri2ext.c | 32 +- xorg-server/hw/xfree86/exa/Makefile.in | 35 +- xorg-server/hw/xfree86/exa/examodule.c | 2 +- xorg-server/hw/xfree86/fbdevhw/Makefile.in | 35 +- xorg-server/hw/xfree86/fbdevhw/fbdevhw.c | 43 +- xorg-server/hw/xfree86/fbdevhw/fbdevhw.h | 88 +- xorg-server/hw/xfree86/i2c/Makefile.am | 4 +- xorg-server/hw/xfree86/i2c/Makefile.in | 85 +- xorg-server/hw/xfree86/i2c/bt829.h | 50 +- xorg-server/hw/xfree86/i2c/fi1236.h | 25 +- xorg-server/hw/xfree86/i2c/i2c_def.h | 10 +- xorg-server/hw/xfree86/i2c/msp3430.h | 21 +- xorg-server/hw/xfree86/i2c/tda8425.h | 17 +- xorg-server/hw/xfree86/i2c/tda9850.h | 25 +- xorg-server/hw/xfree86/i2c/tda9885.h | 21 +- xorg-server/hw/xfree86/i2c/uda1380.h | 33 +- xorg-server/hw/xfree86/i2c/xf86i2c.h | 48 +- xorg-server/hw/xfree86/int10/Makefile.in | 35 +- xorg-server/hw/xfree86/int10/generic.c | 5 +- xorg-server/hw/xfree86/int10/helper_exec.c | 32 +- xorg-server/hw/xfree86/int10/xf86int10.h | 32 +- xorg-server/hw/xfree86/libxorg.c | 0 xorg-server/hw/xfree86/loader/Makefile.am | 25 +- xorg-server/hw/xfree86/loader/Makefile.in | 115 +- xorg-server/hw/xfree86/loader/loader.c | 145 +- xorg-server/hw/xfree86/loader/loaderProcs.h | 11 - xorg-server/hw/xfree86/loader/loadext.c | 4 +- xorg-server/hw/xfree86/loader/loadmod.c | 53 +- xorg-server/hw/xfree86/loader/os.c | 2 +- xorg-server/hw/xfree86/loader/sdksyms.c | 2342 ++ xorg-server/hw/xfree86/loader/sdksyms.sh | 418 + xorg-server/hw/xfree86/modes/Makefile.am | 13 +- xorg-server/hw/xfree86/modes/Makefile.in | 110 +- xorg-server/hw/xfree86/modes/xf86Crtc.c | 260 +- xorg-server/hw/xfree86/modes/xf86Crtc.h | 161 +- xorg-server/hw/xfree86/modes/xf86Cursors.c | 13 +- xorg-server/hw/xfree86/modes/xf86DiDGA.c | 4 +- xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c | 437 + xorg-server/hw/xfree86/modes/xf86EdidModes.c | 47 +- xorg-server/hw/xfree86/modes/xf86Modes.c | 82 +- xorg-server/hw/xfree86/modes/xf86Modes.h | 58 +- xorg-server/hw/xfree86/modes/xf86RandR12.c | 167 +- xorg-server/hw/xfree86/modes/xf86RandR12.h | 18 +- xorg-server/hw/xfree86/modes/xf86Rotate.c | 40 +- xorg-server/hw/xfree86/modes/xf86cvt.c | 2 +- xorg-server/hw/xfree86/modes/xf86gtf.c | 2 +- xorg-server/hw/xfree86/os-support/Makefile.in | 35 +- xorg-server/hw/xfree86/os-support/bsd/Makefile.am | 3 - xorg-server/hw/xfree86/os-support/bsd/Makefile.in | 51 +- .../hw/xfree86/os-support/bsd/alpha_video.c | 31 +- xorg-server/hw/xfree86/os-support/bsd/arm_video.c | 6 +- xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c | 4 +- xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c | 4 +- xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c | 2 +- xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c | 21 +- xorg-server/hw/xfree86/os-support/bsd/bsd_kmod.c | 2 +- .../hw/xfree86/os-support/bsd/bsd_kqueue_apm.c | 4 +- xorg-server/hw/xfree86/os-support/bsd/i386_video.c | 6 +- xorg-server/hw/xfree86/os-support/bsd/ppc_video.c | 4 +- .../hw/xfree86/os-support/bsd/sparc64_video.c | 2 +- xorg-server/hw/xfree86/os-support/bus/Makefile.in | 35 +- xorg-server/hw/xfree86/os-support/bus/Pci.c | 26 +- xorg-server/hw/xfree86/os-support/bus/Pci.h | 36 +- xorg-server/hw/xfree86/os-support/bus/Sbus.c | 16 +- xorg-server/hw/xfree86/os-support/bus/bsd_pci.c | 2 +- xorg-server/hw/xfree86/os-support/bus/linuxPci.c | 136 +- xorg-server/hw/xfree86/os-support/bus/xf86Pci.h | 9 +- xorg-server/hw/xfree86/os-support/hurd/Makefile.am | 2 +- xorg-server/hw/xfree86/os-support/hurd/Makefile.in | 51 +- xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c | 2 +- xorg-server/hw/xfree86/os-support/hurd/hurd_init.c | 8 +- .../hw/xfree86/os-support/hurd/hurd_video.c | 28 +- .../hw/xfree86/os-support/linux/Makefile.am | 3 +- .../hw/xfree86/os-support/linux/Makefile.in | 64 +- .../hw/xfree86/os-support/linux/int10/linux.c | 36 +- .../os-support/linux/int10/vm86/linux_vm86.c | 4 +- xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c | 22 +- xorg-server/hw/xfree86/os-support/linux/lnx_agp.c | 24 +- xorg-server/hw/xfree86/os-support/linux/lnx_apm.c | 19 +- xorg-server/hw/xfree86/os-support/linux/lnx_axp.c | 26 +- xorg-server/hw/xfree86/os-support/linux/lnx_bell.c | 2 +- xorg-server/hw/xfree86/os-support/linux/lnx_font.c | 14 +- xorg-server/hw/xfree86/os-support/linux/lnx_init.c | 85 +- xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c | 2 +- .../hw/xfree86/os-support/linux/lnx_video.c | 44 +- xorg-server/hw/xfree86/os-support/misc/Makefile.am | 2 +- xorg-server/hw/xfree86/os-support/misc/Makefile.in | 41 +- xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c | 56 +- xorg-server/hw/xfree86/os-support/sco/Makefile.in | 35 +- xorg-server/hw/xfree86/os-support/sco/sco_iop.c | 4 +- xorg-server/hw/xfree86/os-support/sco/sco_video.c | 8 +- .../hw/xfree86/os-support/shared/VTsw_noop.c | 6 +- .../hw/xfree86/os-support/shared/VTsw_usl.c | 6 +- .../hw/xfree86/os-support/shared/agp_noop.c | 20 +- .../hw/xfree86/os-support/shared/bios_devmem.c | 2 +- .../hw/xfree86/os-support/shared/bios_mmap.c | 8 +- xorg-server/hw/xfree86/os-support/shared/ia64Pci.c | 12 +- .../hw/xfree86/os-support/shared/ioperm_noop.c | 4 +- .../hw/xfree86/os-support/shared/kmod_noop.c | 2 +- .../hw/xfree86/os-support/shared/posix_tty.c | 47 +- xorg-server/hw/xfree86/os-support/shared/sigio.c | 56 +- .../hw/xfree86/os-support/shared/sigiostubs.c | 8 +- xorg-server/hw/xfree86/os-support/shared/vidmem.c | 12 +- .../hw/xfree86/os-support/solaris/Makefile.am | 21 +- .../hw/xfree86/os-support/solaris/Makefile.in | 114 +- .../hw/xfree86/os-support/solaris/solaris-amd64.S | 2 +- .../hw/xfree86/os-support/solaris/solaris-ia32.S | 2 +- .../os-support/solaris/solaris-sparcv8plus.S | 2 +- .../hw/xfree86/os-support/solaris/sun_VTsw.c | 110 + .../hw/xfree86/os-support/solaris/sun_agp.c | 27 +- .../hw/xfree86/os-support/solaris/sun_apm.c | 4 +- .../hw/xfree86/os-support/solaris/sun_bell.c | 2 +- .../hw/xfree86/os-support/solaris/sun_init.c | 199 +- .../hw/xfree86/os-support/solaris/sun_vid.c | 6 +- xorg-server/hw/xfree86/os-support/sysv/Makefile.in | 35 +- .../hw/xfree86/os-support/sysv/sysv_video.c | 4 +- xorg-server/hw/xfree86/os-support/xf86_OSlib.h | 25 +- xorg-server/hw/xfree86/os-support/xf86_OSproc.h | 136 +- xorg-server/hw/xfree86/parser/Configint.h | 10 +- xorg-server/hw/xfree86/parser/DRI.c | 4 +- xorg-server/hw/xfree86/parser/Device.c | 13 +- xorg-server/hw/xfree86/parser/Extensions.c | 2 +- xorg-server/hw/xfree86/parser/Files.c | 59 +- xorg-server/hw/xfree86/parser/Flags.c | 38 +- xorg-server/hw/xfree86/parser/Input.c | 2 +- xorg-server/hw/xfree86/parser/Layout.c | 36 +- xorg-server/hw/xfree86/parser/Makefile.am | 21 +- xorg-server/hw/xfree86/parser/Makefile.in | 389 +- xorg-server/hw/xfree86/parser/Module.c | 12 +- xorg-server/hw/xfree86/parser/Monitor.c | 8 +- xorg-server/hw/xfree86/parser/Pointer.c | 42 +- xorg-server/hw/xfree86/parser/Screen.c | 16 +- xorg-server/hw/xfree86/parser/Vendor.c | 4 +- xorg-server/hw/xfree86/parser/Video.c | 4 +- xorg-server/hw/xfree86/parser/configProcs.h | 9 +- xorg-server/hw/xfree86/parser/read.c | 36 +- xorg-server/hw/xfree86/parser/scan.c | 58 +- xorg-server/hw/xfree86/parser/xf86Optrec.h | 36 +- xorg-server/hw/xfree86/parser/xf86Parser.h | 41 +- xorg-server/hw/xfree86/parser/xf86tokens.h | 1 - xorg-server/hw/xfree86/ramdac/BT.h | 8 +- xorg-server/hw/xfree86/ramdac/IBM.h | 20 +- xorg-server/hw/xfree86/ramdac/Makefile.am | 4 +- xorg-server/hw/xfree86/ramdac/Makefile.in | 94 +- xorg-server/hw/xfree86/ramdac/TI.c | 4 +- xorg-server/hw/xfree86/ramdac/TI.h | 22 +- xorg-server/hw/xfree86/ramdac/xf86Cursor.c | 6 +- xorg-server/hw/xfree86/ramdac/xf86Cursor.h | 8 +- xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h | 2 +- xorg-server/hw/xfree86/ramdac/xf86RamDac.c | 14 +- xorg-server/hw/xfree86/ramdac/xf86RamDac.h | 22 +- xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c | 3 - xorg-server/hw/xfree86/shadowfb/Makefile.in | 35 +- xorg-server/hw/xfree86/shadowfb/shadow.c | 25 +- xorg-server/hw/xfree86/shadowfb/shadowfb.h | 4 +- xorg-server/hw/xfree86/utils/Makefile.in | 35 +- xorg-server/hw/xfree86/utils/cvt/Makefile.am | 2 - xorg-server/hw/xfree86/utils/cvt/Makefile.in | 40 +- xorg-server/hw/xfree86/utils/cvt/cvt.c | 66 +- xorg-server/hw/xfree86/utils/gtf/Makefile.in | 35 +- xorg-server/hw/xfree86/vbe/Makefile.in | 35 +- xorg-server/hw/xfree86/vbe/vbe.c | 3 +- xorg-server/hw/xfree86/vbe/vbe.h | 52 +- xorg-server/hw/xfree86/vbe/vbeModes.c | 4 +- xorg-server/hw/xfree86/vbe/vbeModes.h | 12 +- xorg-server/hw/xfree86/vgahw/Makefile.in | 35 +- xorg-server/hw/xfree86/vgahw/vgaCmap.c | 7 +- xorg-server/hw/xfree86/vgahw/vgaHW.c | 69 +- xorg-server/hw/xfree86/vgahw/vgaHW.h | 77 +- xorg-server/hw/xfree86/x86emu/Makefile.am | 4 +- xorg-server/hw/xfree86/x86emu/Makefile.in | 92 +- xorg-server/hw/xfree86/x86emu/sys.c | 183 +- xorg-server/hw/xfree86/xaa/Makefile.in | 35 +- xorg-server/hw/xfree86/xaa/xaa.h | 8 +- xorg-server/hw/xfree86/xaa/xaaBitOrder.c | 2 +- xorg-server/hw/xfree86/xaa/xaaCpyArea.c | 2 +- xorg-server/hw/xfree86/xaa/xaaCpyWin.c | 2 +- xorg-server/hw/xfree86/xaa/xaaFillArc.c | 6 +- xorg-server/hw/xfree86/xaa/xaaFillRect.c | 8 +- xorg-server/hw/xfree86/xaa/xaaImage.c | 10 +- xorg-server/hw/xfree86/xaa/xaaInit.c | 6 +- xorg-server/hw/xfree86/xaa/xaaInitAccel.c | 4 +- xorg-server/hw/xfree86/xaa/xaaLineMisc.c | 6 +- xorg-server/hw/xfree86/xaa/xaaNonTEGlyph.c | 4 +- xorg-server/hw/xfree86/xaa/xaaOverlay.c | 2 +- xorg-server/hw/xfree86/xaa/xaaPCache.c | 23 +- xorg-server/hw/xfree86/xaa/xaaPict.c | 20 +- xorg-server/hw/xfree86/xaa/xaaSpans.c | 14 +- xorg-server/hw/xfree86/xaa/xaaStipple.c | 8 +- xorg-server/hw/xfree86/xaa/xaaTEGlyph.c | 8 +- xorg-server/hw/xfree86/xaa/xaaTables.c | 2 +- xorg-server/hw/xfree86/xaa/xaaWrapper.h | 2 +- xorg-server/hw/xfree86/xaa/xaalocal.h | 380 +- xorg-server/hw/xfree86/xaa/xaarop.h | 20 +- xorg-server/hw/xfree86/xf8_16bpp/Makefile.in | 35 +- xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h | 17 +- xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c | 17 +- xorg-server/hw/xfree86/xorgconf.cpp | 31 +- xorg-server/hw/xnest/Args.c | 2 +- xorg-server/hw/xnest/Color.c | 22 +- xorg-server/hw/xnest/Events.c | 13 +- xorg-server/hw/xnest/Font.c | 4 +- xorg-server/hw/xnest/Init.c | 25 +- xorg-server/hw/xnest/Keyboard.c | 126 +- xorg-server/hw/xnest/Makefile.in | 35 +- xorg-server/hw/xnest/Pointer.c | 21 +- xorg-server/hw/xnest/Window.c | 9 +- xorg-server/hw/xquartz/GL/Makefile.am | 2 - xorg-server/hw/xquartz/GL/Makefile.in | 37 +- xorg-server/hw/xquartz/GL/capabilities.c | 57 +- xorg-server/hw/xquartz/GL/indirect.c | 1994 +- xorg-server/hw/xquartz/GL/visualConfigs.c | 348 +- xorg-server/hw/xquartz/GL/visualConfigs.h | 2 +- xorg-server/hw/xquartz/Makefile.am | 2 +- xorg-server/hw/xquartz/Makefile.in | 37 +- xorg-server/hw/xquartz/X11Application.h | 3 + xorg-server/hw/xquartz/X11Application.m | 196 +- xorg-server/hw/xquartz/X11Controller.h | 37 +- xorg-server/hw/xquartz/X11Controller.m | 78 +- xorg-server/hw/xquartz/applewm.c | 59 +- xorg-server/hw/xquartz/applewmExt.h | 4 + xorg-server/hw/xquartz/bundle/Info.plist.cpp | 18 +- xorg-server/hw/xquartz/bundle/Makefile.am | 4 + xorg-server/hw/xquartz/bundle/Makefile.in | 43 +- .../Resources/Dutch.lproj/Localizable.strings | Bin 1084 -> 2616 bytes .../Dutch.lproj/main.nib/keyedobjects.nib | Bin 32654 -> 46189 bytes .../Resources/English.lproj/Localizable.strings | Bin 2528 -> 2698 bytes .../English.lproj/main.nib/designable.nib | 43 +- .../English.lproj/main.nib/keyedobjects.nib | Bin 41769 -> 41440 bytes .../Resources/French.lproj/Localizable.strings | Bin 1168 -> 2708 bytes .../French.lproj/main.nib/keyedobjects.nib | Bin 36404 -> 55983 bytes .../Resources/German.lproj/Localizable.strings | Bin 1096 -> 2632 bytes .../German.lproj/main.nib/keyedobjects.nib | Bin 34995 -> 52977 bytes .../Resources/Italian.lproj/Localizable.strings | Bin 1146 -> 2618 bytes .../Italian.lproj/main.nib/keyedobjects.nib | Bin 33677 -> 50126 bytes .../Resources/Japanese.lproj/Localizable.strings | Bin 916 -> 2166 bytes .../Japanese.lproj/main.nib/keyedobjects.nib | Bin 33095 -> 47803 bytes .../Resources/Spanish.lproj/Localizable.strings | Bin 1134 -> 2562 bytes .../Spanish.lproj/main.nib/keyedobjects.nib | Bin 35294 -> 53635 bytes .../bundle/Resources/da.lproj/Localizable.strings | Bin 1090 -> 2554 bytes .../Resources/da.lproj/main.nib/keyedobjects.nib | Bin 34164 -> 51757 bytes .../bundle/Resources/fi.lproj/Localizable.strings | Bin 1102 -> 2614 bytes .../Resources/fi.lproj/main.nib/keyedobjects.nib | Bin 34765 -> 53385 bytes .../bundle/Resources/ko.lproj/Localizable.strings | Bin 916 -> 2140 bytes .../Resources/ko.lproj/main.nib/keyedobjects.nib | Bin 32690 -> 46727 bytes .../bundle/Resources/no.lproj/Localizable.strings | Bin 1084 -> 2576 bytes .../Resources/no.lproj/main.nib/keyedobjects.nib | Bin 33581 -> 50330 bytes .../bundle/Resources/pl.lproj/Localizable.strings | Bin 1116 -> 2508 bytes .../Resources/pl.lproj/main.nib/keyedobjects.nib | Bin 35113 -> 52516 bytes .../bundle/Resources/pt.lproj/Localizable.strings | Bin 1192 -> 2654 bytes .../Resources/pt.lproj/main.nib/keyedobjects.nib | Bin 34533 -> 52942 bytes .../Resources/pt_PT.lproj/Localizable.strings | Bin 1140 -> 2598 bytes .../pt_PT.lproj/main.nib/keyedobjects.nib | Bin 35485 -> 54065 bytes .../bundle/Resources/ru.lproj/Localizable.strings | Bin 1122 -> 2656 bytes .../Resources/ru.lproj/main.nib/keyedobjects.nib | Bin 36593 -> 55338 bytes .../bundle/Resources/sv.lproj/InfoPlist.strings | Bin 260 -> 260 bytes .../bundle/Resources/sv.lproj/Localizable.strings | Bin 1106 -> 2498 bytes .../Resources/sv.lproj/main.nib/keyedobjects.nib | Bin 35017 -> 52602 bytes .../Resources/zh_CN.lproj/Localizable.strings | Bin 884 -> 1998 bytes .../zh_CN.lproj/main.nib/keyedobjects.nib | Bin 31481 -> 44178 bytes .../Resources/zh_TW.lproj/Localizable.strings | Bin 890 -> 2018 bytes .../zh_TW.lproj/main.nib/keyedobjects.nib | Bin 31748 -> 44416 bytes xorg-server/hw/xquartz/darwin.c | 146 +- xorg-server/hw/xquartz/darwin.h | 17 +- xorg-server/hw/xquartz/darwinEvents.c | 50 +- xorg-server/hw/xquartz/darwinEvents.h | 12 +- xorg-server/hw/xquartz/darwinXinput.c | 1 - xorg-server/hw/xquartz/darwinfb.h | 56 + xorg-server/hw/xquartz/doc/Makefile.in | 35 +- xorg-server/hw/xquartz/mach-startup/Makefile.am | 7 +- xorg-server/hw/xquartz/mach-startup/Makefile.in | 50 +- xorg-server/hw/xquartz/mach-startup/bundle-main.c | 40 +- xorg-server/hw/xquartz/mach-startup/stub.c | 6 +- xorg-server/hw/xquartz/pbproxy/Makefile.in | 35 +- xorg-server/hw/xquartz/pbproxy/app-main.m | 3 + xorg-server/hw/xquartz/pseudoramiX.c | 2 +- xorg-server/hw/xquartz/quartz.c | 23 +- xorg-server/hw/xquartz/quartzAudio.c | 48 +- xorg-server/hw/xquartz/quartzAudio.h | 3 - xorg-server/hw/xquartz/quartzKeyboard.c | 65 +- xorg-server/hw/xquartz/xpr/Makefile.am | 2 + xorg-server/hw/xquartz/xpr/Makefile.in | 44 +- xorg-server/hw/xquartz/xpr/appledri.c | 80 +- xorg-server/hw/xquartz/xpr/appledri.h | 21 +- xorg-server/hw/xquartz/xpr/appledristr.h | 83 +- xorg-server/hw/xquartz/xpr/dri.c | 211 +- xorg-server/hw/xquartz/xpr/dri.h | 12 +- xorg-server/hw/xquartz/xpr/driWrap.c | 547 + xorg-server/hw/xquartz/xpr/driWrap.h | 31 + xorg-server/hw/xquartz/xpr/xpr.h | 14 + xorg-server/hw/xquartz/xpr/xprAppleWM.c | 73 +- xorg-server/hw/xquartz/xpr/xprCursor.c | 2 +- xorg-server/hw/xquartz/xpr/xprEvent.c | 1 - xorg-server/hw/xquartz/xpr/xprFrame.c | 66 +- xorg-server/hw/xquartz/xpr/xprScreen.c | 34 +- xorg-server/hw/xwin/InitInput.c | 29 +- xorg-server/hw/xwin/InitOutput.c | 29 +- xorg-server/hw/xwin/Makefile.am | 49 +- xorg-server/hw/xwin/Makefile.in | 315 +- xorg-server/hw/xwin/X.ico | Bin 20870 -> 25214 bytes xorg-server/hw/xwin/XWin.man.pre | 288 + xorg-server/hw/xwin/XWin.rc | 8 +- xorg-server/hw/xwin/XWinrc.man.pre | 248 + xorg-server/hw/xwin/win.h | 18 +- xorg-server/hw/xwin/winclipboard.h | 23 +- xorg-server/hw/xwin/winclipboardinit.c | 10 +- xorg-server/hw/xwin/winclipboardthread.c | 33 +- xorg-server/hw/xwin/winclipboardwndproc.c | 43 +- xorg-server/hw/xwin/winclipboardwrappers.c | 43 +- xorg-server/hw/xwin/winclipboardxevents.c | 65 +- xorg-server/hw/xwin/winconfig.c | 286 +- xorg-server/hw/xwin/winconfig.h | 24 +- xorg-server/hw/xwin/wincreatewnd.c | 28 +- xorg-server/hw/xwin/wincursor.c | 69 +- xorg-server/hw/xwin/windialogs.c | 198 +- xorg-server/hw/xwin/winengine.c | 4 +- xorg-server/hw/xwin/winerror.c | 10 +- xorg-server/hw/xwin/winkeybd.c | 129 +- xorg-server/hw/xwin/winkeyhook.c | 4 +- xorg-server/hw/xwin/winlayouts.h | 22 +- xorg-server/hw/xwin/winmouse.c | 70 +- xorg-server/hw/xwin/winms.h | 3 + xorg-server/hw/xwin/winmultiwindowclass.c | 2 +- xorg-server/hw/xwin/winmultiwindowicons.c | 272 +- xorg-server/hw/xwin/winmultiwindowshape.c | 1 - xorg-server/hw/xwin/winmultiwindowwindow.c | 163 +- xorg-server/hw/xwin/winmultiwindowwm.c | 264 +- xorg-server/hw/xwin/winmultiwindowwndproc.c | 216 +- xorg-server/hw/xwin/winprefs.c | 103 +- xorg-server/hw/xwin/winprefs.h | 30 +- xorg-server/hw/xwin/winprefslex.c | 482 +- xorg-server/hw/xwin/winprefslex.l | 12 +- xorg-server/hw/xwin/winprefsyacc.c | 541 +- xorg-server/hw/xwin/winprefsyacc.h | 73 +- xorg-server/hw/xwin/winprefsyacc.y | 78 +- xorg-server/hw/xwin/winprocarg.c | 21 +- xorg-server/hw/xwin/winscrinit.c | 49 +- xorg-server/hw/xwin/winshaddd.c | 31 +- xorg-server/hw/xwin/winshadddnl.c | 21 +- xorg-server/hw/xwin/winshadgdi.c | 2 +- xorg-server/hw/xwin/wintrayicon.c | 4 +- xorg-server/hw/xwin/winwin32rootless.c | 19 +- xorg-server/hw/xwin/winwin32rootlesswindow.c | 10 +- xorg-server/hw/xwin/winwin32rootlesswndproc.c | 20 +- xorg-server/hw/xwin/winwindow.c | 4 - xorg-server/hw/xwin/winwindow.h | 24 +- xorg-server/hw/xwin/winwindowswm.c | 18 +- xorg-server/hw/xwin/winwndproc.c | 23 +- xorg-server/include/Makefile.am | 4 +- xorg-server/include/Makefile.in | 74 +- xorg-server/include/XIstubs.h | 12 +- xorg-server/include/closestr.h | 1 - xorg-server/include/colormap.h | 32 +- xorg-server/include/cursor.h | 26 +- xorg-server/include/dix-config.h.in | 12 +- xorg-server/include/dix.h | 240 +- xorg-server/include/dixaccess.h | 1 + xorg-server/include/dixevents.h | 44 +- xorg-server/include/dixfont.h | 72 +- xorg-server/include/dixfontstr.h | 1 - xorg-server/include/dixgrabs.h | 24 +- xorg-server/include/dixstruct.h | 57 +- xorg-server/include/do-not-use-config.h.in | 62 +- xorg-server/include/eventconvert.h | 40 + xorg-server/include/events.h | 35 + xorg-server/include/eventstr.h | 232 + xorg-server/include/exevents.h | 317 +- xorg-server/include/extension.h | 12 +- xorg-server/include/extinit.h | 9 +- xorg-server/include/extnsionst.h | 12 +- xorg-server/include/gc.h | 34 +- xorg-server/include/globals.h | 98 +- xorg-server/include/hotplug.h | 4 +- xorg-server/include/input.h | 225 +- xorg-server/include/inputstr.h | 160 +- xorg-server/include/misc.h | 46 +- xorg-server/include/opaque.h | 50 +- xorg-server/include/os.h | 282 +- xorg-server/include/pixmap.h | 10 +- xorg-server/include/privates.h | 22 +- xorg-server/include/property.h | 10 +- xorg-server/include/ptrveloc.h | 102 +- xorg-server/include/regionstr.h | 52 +- xorg-server/include/registry.h | 16 +- xorg-server/include/resource.h | 53 +- xorg-server/include/screenint.h | 2 +- xorg-server/include/scrnintstr.h | 4 +- xorg-server/include/selection.h | 12 +- xorg-server/include/servermd.h | 3 +- xorg-server/include/site.h | 4 - xorg-server/include/swaprep.h | 96 +- xorg-server/include/swapreq.h | 6 +- xorg-server/include/version-config.h.in | 16 + xorg-server/include/window.h | 83 +- xorg-server/include/windowstr.h | 31 +- xorg-server/include/xkb-config.h.in | 14 +- xorg-server/include/xkbfile.h | 163 +- xorg-server/include/xkbrules.h | 92 +- xorg-server/include/xkbsrv.h | 366 +- xorg-server/include/xkbstr.h | 148 +- xorg-server/include/xorg-config.h.in | 13 +- xorg-server/include/xorg-server.h.in | 19 +- xorg-server/include/xserver-properties.h | 137 + xorg-server/ltmain.sh | 33 +- xorg-server/m4/ac_define_dir.m4 | 49 + xorg-server/m4/dolt.m4 | 178 + xorg-server/m4/libtool.m4 | 7360 +++++ xorg-server/m4/ltoptions.m4 | 368 + xorg-server/m4/ltsugar.m4 | 123 + xorg-server/m4/ltversion.m4 | 23 + xorg-server/m4/lt~obsolete.m4 | 92 + xorg-server/m4/shave.m4 | 73 + xorg-server/mi/Makefile.am | 4 +- xorg-server/mi/Makefile.in | 45 +- xorg-server/mi/mi.h | 188 +- xorg-server/mi/miarc.c | 34 +- xorg-server/mi/mibank.c | 11 +- xorg-server/mi/mibank.h | 4 +- xorg-server/mi/mibitblt.c | 32 +- xorg-server/mi/mibstore.c | 23 +- xorg-server/mi/mibstore.h | 2 +- xorg-server/mi/micmap.c | 44 +- xorg-server/mi/micmap.h | 28 +- xorg-server/mi/micopy.c | 354 + xorg-server/mi/midispcur.c | 25 +- xorg-server/mi/mieq.c | 357 +- xorg-server/mi/miexpose.c | 50 +- xorg-server/mi/mifillarc.c | 22 +- xorg-server/mi/mifillarc.h | 4 +- xorg-server/mi/mifillrct.c | 6 +- xorg-server/mi/mifpoly.h | 2 +- xorg-server/mi/mifpolycon.c | 6 +- xorg-server/mi/migc.c | 14 +- xorg-server/mi/migc.h | 14 +- xorg-server/mi/miglblt.c | 6 +- xorg-server/mi/miinitext.c | 28 +- xorg-server/mi/miline.h | 8 +- xorg-server/mi/mioverlay.c | 16 +- xorg-server/mi/mioverlay.h | 14 +- xorg-server/mi/mipointer.c | 50 +- xorg-server/mi/mipointer.h | 37 +- xorg-server/mi/mipoly.c | 2 +- xorg-server/mi/mipoly.h | 10 +- xorg-server/mi/mipolycon.c | 4 +- xorg-server/mi/mipolygen.c | 3 +- xorg-server/mi/mipolypnt.c | 4 +- xorg-server/mi/mipolyrect.c | 4 +- xorg-server/mi/mipolyseg.c | 2 +- xorg-server/mi/mipolytext.c | 8 +- xorg-server/mi/mipolyutil.c | 23 +- xorg-server/mi/mipushpxl.c | 2 +- xorg-server/mi/miregion.c | 66 +- xorg-server/mi/miscrinit.c | 21 +- xorg-server/mi/mispans.c | 11 +- xorg-server/mi/mispans.h | 13 +- xorg-server/mi/misprite.c | 355 +- xorg-server/mi/mivaltree.c | 2 +- xorg-server/mi/miwideline.c | 32 +- xorg-server/mi/miwideline.h | 8 +- xorg-server/mi/miwindow.c | 16 +- xorg-server/mi/mizerarc.c | 10 +- xorg-server/mi/mizerarc.h | 2 +- xorg-server/mi/mizerclip.c | 2 +- xorg-server/mi/mizerline.c | 6 +- xorg-server/miext/Makefile.am | 3 + xorg-server/miext/Makefile.in | 39 +- xorg-server/miext/cw/Makefile.in | 35 +- xorg-server/miext/cw/cw.c | 2 +- xorg-server/miext/cw/cw.h | 16 +- xorg-server/miext/damage/Makefile.in | 35 +- xorg-server/miext/damage/damage.c | 84 +- xorg-server/miext/damage/damage.h | 52 +- xorg-server/miext/damage/damagestr.h | 5 + xorg-server/miext/rootless/Makefile.in | 35 +- xorg-server/miext/rootless/rootless.h | 1 + xorg-server/miext/rootless/rootlessCommon.c | 4 +- xorg-server/miext/rootless/rootlessCommon.h | 7 +- xorg-server/miext/rootless/rootlessGC.c | 53 - xorg-server/miext/rootless/rootlessScreen.c | 21 +- xorg-server/miext/rootless/rootlessValTree.c | 2 +- xorg-server/miext/rootless/rootlessWindow.c | 11 +- xorg-server/miext/shadow/Makefile.in | 35 +- xorg-server/miext/shadow/shadow.c | 4 +- xorg-server/miext/shadow/shadow.h | 59 +- xorg-server/miext/shadow/shpacked.c | 5 +- xorg-server/os/Makefile.in | 35 +- xorg-server/os/WaitFor.c | 15 +- xorg-server/os/access.c | 21 +- xorg-server/os/backtrace.c | 48 +- xorg-server/os/connection.c | 44 +- xorg-server/os/io.c | 35 +- xorg-server/os/log.c | 27 +- xorg-server/os/mitauth.c | 4 +- xorg-server/os/osdep.h | 8 +- xorg-server/os/osinit.c | 121 +- xorg-server/os/rpcauth.c | 4 +- xorg-server/os/utils.c | 125 +- xorg-server/os/xdmauth.c | 8 +- xorg-server/os/xdmcp.c | 9 +- xorg-server/randr/Makefile.in | 35 +- xorg-server/randr/randr.c | 8 +- xorg-server/randr/randrstr.h | 267 +- xorg-server/randr/rrcrtc.c | 110 +- xorg-server/randr/rrdispatch.c | 7 +- xorg-server/randr/rrmode.c | 46 +- xorg-server/randr/rroutput.c | 47 +- xorg-server/randr/rrproperty.c | 41 +- xorg-server/randr/rrscreen.c | 18 +- xorg-server/randr/rrsdispatch.c | 6 +- xorg-server/randr/rrtransform.h | 12 +- xorg-server/randr/rrxinerama.c | 5 +- xorg-server/record/Makefile.in | 35 +- xorg-server/record/record.c | 60 +- xorg-server/render/Makefile.in | 35 +- xorg-server/render/animcur.c | 13 +- xorg-server/render/filter.c | 4 +- xorg-server/render/glyph.c | 4 +- xorg-server/render/glyphstr.h | 32 +- xorg-server/render/matrix.c | 8 +- xorg-server/render/mipict.c | 56 +- xorg-server/render/mipict.h | 72 +- xorg-server/render/mirect.c | 2 +- xorg-server/render/picture.c | 60 +- xorg-server/render/picture.h | 18 +- xorg-server/render/picturestr.h | 123 +- xorg-server/render/render.c | 203 +- xorg-server/render/renderedge.c | 10 +- xorg-server/render/renderedge.h | 10 +- xorg-server/shave-libtool.in | 69 + xorg-server/shave.in | 86 + xorg-server/test/Makefile.am | 38 + xorg-server/test/Makefile.in | 979 + xorg-server/test/README | 36 + xorg-server/test/input.c | 732 + xorg-server/test/libxservertest.c | 0 xorg-server/test/xi2/Makefile.am | 47 + xorg-server/test/xi2/Makefile.in | 1174 + xorg-server/test/xi2/protocol-common.c | 169 + xorg-server/test/xi2/protocol-common.h | 153 + xorg-server/test/xi2/protocol-eventconvert.c | 904 + xorg-server/test/xi2/protocol-xigetclientpointer.c | 167 + .../test/xi2/protocol-xigetselectedevents.c | 241 + xorg-server/test/xi2/protocol-xiquerydevice.c | 316 + xorg-server/test/xi2/protocol-xiquerypointer.c | 220 + xorg-server/test/xi2/protocol-xiqueryversion.c | 186 + xorg-server/test/xi2/protocol-xiselectevents.c | 337 + xorg-server/test/xi2/protocol-xisetclientpointer.c | 149 + xorg-server/test/xi2/protocol-xiwarppointer.c | 216 + xorg-server/test/xkb.c | 173 + xorg-server/test/xtest.c | 116 + xorg-server/xfixes/Makefile.am | 4 + xorg-server/xfixes/Makefile.in | 102 +- xorg-server/xfixes/cursor.c | 140 +- xorg-server/xfixes/region.c | 2 +- xorg-server/xfixes/select.c | 7 +- xorg-server/xfixes/xfixes.c | 42 +- xorg-server/xfixes/xfixes.h | 28 +- xorg-server/xfixes/xfixesint.h | 42 +- xorg-server/xkb/Makefile.am | 8 +- xorg-server/xkb/Makefile.in | 50 +- xorg-server/xkb/XKBAlloc.c | 32 +- xorg-server/xkb/XKBGAlloc.c | 42 +- xorg-server/xkb/XKBMAlloc.c | 70 +- xorg-server/xkb/XKBMisc.c | 88 +- xorg-server/xkb/ddxBeep.c | 1 - xorg-server/xkb/ddxCtrls.c | 1 - xorg-server/xkb/ddxDevBtn.c | 104 +- xorg-server/xkb/ddxFakeMtn.c | 1 - xorg-server/xkb/ddxKillSrv.c | 1 - xorg-server/xkb/ddxLEDs.c | 1 - xorg-server/xkb/ddxList.c | 7 +- xorg-server/xkb/ddxLoad.c | 39 +- xorg-server/xkb/ddxPrivate.c | 1 - xorg-server/xkb/ddxVT.c | 1 - xorg-server/xkb/maprules.c | 344 +- xorg-server/xkb/xkb.c | 160 +- xorg-server/xkb/xkb.h | 8 - xorg-server/xkb/xkbAccessX.c | 107 +- xorg-server/xkb/xkbActions.c | 135 +- xorg-server/xkb/xkbEvents.c | 505 +- xorg-server/xkb/xkbInit.c | 613 +- xorg-server/xkb/xkbLEDs.c | 17 +- xorg-server/xkb/xkbPrKeyEv.c | 145 +- xorg-server/xkb/xkbSwap.c | 2 - xorg-server/xkb/xkbUtils.c | 493 +- xorg-server/xkb/xkbfmisc.c | 59 +- xorg-server/xkb/xkbgeom.h | 4 - xorg-server/xkb/xkbout.c | 2 +- xorg-server/xkb/xkbtext.c | 20 +- xorg-server/xkb/xkmread.c | 108 +- xorg-server/xorg-server.pc.in | 3 +- 1000 files changed, 91667 insertions(+), 49216 deletions(-) create mode 100644 xorg-server/Xext/syncsrv.h create mode 100644 xorg-server/Xi/xiallowev.c create mode 100644 xorg-server/Xi/xiallowev.h create mode 100644 xorg-server/Xi/xichangecursor.c create mode 100644 xorg-server/Xi/xichangecursor.h create mode 100644 xorg-server/Xi/xichangehierarchy.c create mode 100644 xorg-server/Xi/xichangehierarchy.h create mode 100644 xorg-server/Xi/xigetclientpointer.c create mode 100644 xorg-server/Xi/xigetclientpointer.h create mode 100644 xorg-server/Xi/xigrabdev.c create mode 100644 xorg-server/Xi/xigrabdev.h create mode 100644 xorg-server/Xi/xipassivegrab.c create mode 100644 xorg-server/Xi/xipassivegrab.h create mode 100644 xorg-server/Xi/xiquerydevice.c create mode 100644 xorg-server/Xi/xiquerydevice.h create mode 100644 xorg-server/Xi/xiquerypointer.c create mode 100644 xorg-server/Xi/xiquerypointer.h create mode 100644 xorg-server/Xi/xiqueryversion.c create mode 100644 xorg-server/Xi/xiqueryversion.h create mode 100644 xorg-server/Xi/xiselectev.c create mode 100644 xorg-server/Xi/xiselectev.h create mode 100644 xorg-server/Xi/xisetclientpointer.c create mode 100644 xorg-server/Xi/xisetclientpointer.h create mode 100644 xorg-server/Xi/xisetdevfocus.c create mode 100644 xorg-server/Xi/xisetdevfocus.h create mode 100644 xorg-server/Xi/xiwarppointer.c create mode 100644 xorg-server/Xi/xiwarppointer.h create mode 100644 xorg-server/composite/compositeext.h create mode 100644 xorg-server/dix/eventconvert.c create mode 100644 xorg-server/dix/inpututils.c create mode 100644 xorg-server/exa/exa_classic.c create mode 100644 xorg-server/exa/exa_driver.c create mode 100644 xorg-server/exa/exa_migration_classic.c create mode 100644 xorg-server/exa/exa_migration_mixed.c create mode 100644 xorg-server/exa/exa_mixed.c create mode 100644 xorg-server/hw/xfree86/common/vidmodeproc.h create mode 100644 xorg-server/hw/xfree86/common/xf86VGAarbiter.c create mode 100644 xorg-server/hw/xfree86/common/xf86VGAarbiter.h create mode 100644 xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h create mode 100644 xorg-server/hw/xfree86/ddc/ddc.c create mode 100644 xorg-server/hw/xfree86/libxorg.c create mode 100644 xorg-server/hw/xfree86/loader/sdksyms.c create mode 100644 xorg-server/hw/xfree86/loader/sdksyms.sh create mode 100644 xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c create mode 100644 xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c create mode 100644 xorg-server/hw/xquartz/darwinfb.h create mode 100644 xorg-server/hw/xquartz/xpr/driWrap.c create mode 100644 xorg-server/hw/xquartz/xpr/driWrap.h create mode 100644 xorg-server/hw/xwin/XWin.man.pre create mode 100644 xorg-server/hw/xwin/XWinrc.man.pre create mode 100644 xorg-server/include/eventconvert.h create mode 100644 xorg-server/include/events.h create mode 100644 xorg-server/include/eventstr.h create mode 100644 xorg-server/include/version-config.h.in create mode 100644 xorg-server/m4/ac_define_dir.m4 create mode 100644 xorg-server/m4/dolt.m4 create mode 100644 xorg-server/m4/libtool.m4 create mode 100644 xorg-server/m4/ltoptions.m4 create mode 100644 xorg-server/m4/ltsugar.m4 create mode 100644 xorg-server/m4/ltversion.m4 create mode 100644 xorg-server/m4/lt~obsolete.m4 create mode 100644 xorg-server/m4/shave.m4 create mode 100644 xorg-server/mi/micopy.c create mode 100644 xorg-server/shave-libtool.in create mode 100644 xorg-server/shave.in create mode 100644 xorg-server/test/Makefile.am create mode 100644 xorg-server/test/Makefile.in create mode 100644 xorg-server/test/README create mode 100644 xorg-server/test/input.c create mode 100644 xorg-server/test/libxservertest.c create mode 100644 xorg-server/test/xi2/Makefile.am create mode 100644 xorg-server/test/xi2/Makefile.in create mode 100644 xorg-server/test/xi2/protocol-common.c create mode 100644 xorg-server/test/xi2/protocol-common.h create mode 100644 xorg-server/test/xi2/protocol-eventconvert.c create mode 100644 xorg-server/test/xi2/protocol-xigetclientpointer.c create mode 100644 xorg-server/test/xi2/protocol-xigetselectedevents.c create mode 100644 xorg-server/test/xi2/protocol-xiquerydevice.c create mode 100644 xorg-server/test/xi2/protocol-xiquerypointer.c create mode 100644 xorg-server/test/xi2/protocol-xiqueryversion.c create mode 100644 xorg-server/test/xi2/protocol-xiselectevents.c create mode 100644 xorg-server/test/xi2/protocol-xisetclientpointer.c create mode 100644 xorg-server/test/xi2/protocol-xiwarppointer.c create mode 100644 xorg-server/test/xkb.c create mode 100644 xorg-server/test/xtest.c (limited to 'xorg-server') diff --git a/xorg-server/COPYING b/xorg-server/COPYING index f92d653d9..5dc8c1dfb 100644 --- a/xorg-server/COPYING +++ b/xorg-server/COPYING @@ -11,10 +11,12 @@ Copyright © 1998 Egbert Eich Copyright © 2006-2007 Intel Corporation Copyright © 2006 Nokia Corporation Copyright © 2006-2008 Peter Hutterer +Copyright © 2006 Adam Jackson +Copyright © 2009 NVIDIA Corporation Copyright © 1999 Keith Packard -Copyright © 2007-2008 Red Hat, Inc. -Copyright © 2005-2007 Daniel Stone -Copyright © 2006-2008 Simon Thum +Copyright © 2007-2009 Red Hat, Inc. +Copyright © 2005-2008 Daniel Stone +Copyright © 2006-2009 Simon Thum Copyright © 2006 Luc Verhaegen Permission is hereby granted, free of charge, to any person obtaining a @@ -45,6 +47,7 @@ licenses. Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. +Copyright (C) Colin Harrison 2005-2008 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 @@ -68,16 +71,16 @@ 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. -Copyright 1997-2003 by The XFree86 Project, Inc. +Copyright 1997 by 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 names of Orest Zborowski and David Wexelblat +documentation, and that the name of the XFree86 Project, Inc. not be used in advertising or publicity pertaining to distribution of -the software without specific, written prior permission. Orest Zborowski -and David Wexelblat make no representations about the suitability of this +the software without specific, written prior permission. The Xfree86 +Project, Inc. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. @@ -185,27 +188,6 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -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 1987-1991, 1993 by Digital Equipment Corporation, Maynard, Massachusetts. Copyright 1991 Massachusetts Institute of Technology, Cambridge, Massachusetts. Copyright 1991, 1993 Olivetti Research Limited, Cambridge, England. @@ -307,79 +289,28 @@ dealings in this Software without prior written authorization from Digital Equipment Corporation. -Copyright (c) 1993-1997 by Silicon Graphics Computer Systems, Inc. +SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) +Copyright (C) 1991-2000 Silicon Graphics, Inc. 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 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. +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 including the dates of first publication and +either this permission notice or a reference to +http://oss.sgi.com/projects/FreeB/ +shall be included in all copies or substantial portions of the Software. -License Applicability. Except to the extent portions of this file are -made subject to an alternative license as permitted in the SGI Free -Software License B, Version 1.1 (the "License"), the contents of this -file are subject only to the provisions of the License. You may not use -this file except in compliance with the License. You may obtain a copy -of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - -http://oss.sgi.com/projects/FreeB - -Note that, as provided in the License, the Software is distributed on an -"AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - -Original Code. The Original Code is: OpenGL Sample Implementation, -Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -Copyright in any portions created by third parties is as indicated -elsewhere herein. All Rights Reserved. - -Additional Notice Provisions: The application programming interfaces -established by SGI in conjunction with the Original Code are The -OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -Window System(R) (Version 1.3), released October 19, 1998. This software -was created using the OpenGL(R) version 1.2.1 Sample Implementation -published by SGI, but has not been independently verified as being -compliant with the OpenGL(R) version 1.2.1 Specification. - - -The contents of this file are subject to the GLX Public License Version 1.0 -(the "License"). You may not use this file except in compliance with the -License. You may obtain a copy of the License at Silicon Graphics, Inc., -attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 -or at http://www.sgi.com/software/opensource/glx/license.html. - -Software distributed under the License is distributed on an "AS IS" -basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY -IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR -PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific -language governing rights and limitations under the License. - -The Original Software is GLX version 1.2 source code, released February, -1999. The developer of the Original Software is Silicon Graphics, Inc. -Those portions of the Subject Software created by Silicon Graphics, Inc. -are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +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 +SILICON GRAPHICS, INC. 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. Copyright (c) 1994, 1995 Hewlett-Packard Company @@ -496,51 +427,6 @@ OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Copyright (c) 2006, Red Hat, 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. - -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 -RED HAT 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 Red Hat shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from Red Hat. - - -Copyright © 2006, 2007 Red Hat, 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 Red Hat, -Inc not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. Red Hat, Inc makes no representations about the -suitability of this software for any purpose. It is provided "as -is" without express or implied warranty. - -RED HAT, INC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN -NO EVENT SHALL RED HAT, INC 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 © 2006 Red Hat, Inc. (C) Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. All Rights Reserved. @@ -597,7 +483,7 @@ authorization from the X Consortium. Copyright 1998-2000 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. +Copyright (c) 2002, 2008, 2009 Apple Computer, Inc. Copyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved. @@ -1001,8 +887,8 @@ the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. -Copyright (C) 2001-2004 Harold L Hunt II -All Rights Reserved. +Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. +Copyright (C) Colin Harrison 2005-2008 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -1280,29 +1166,6 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Copyright (C) 1999 Jeff Hartmann -Copyright (C) 1999 Precision Insight, Inc. -Copyright (C) 1999 Xi Graphics, Inc. - -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 -JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS 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. - - Copyright 1992 by Rich Murphey Copyright 1993 by David Wexelblat @@ -1949,30 +1812,6 @@ 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. - - -Copyright 2006 Adam Jackson. -Copyright 2007 Red Hat, Inc. - -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 -on the rights to use, copy, modify, merge, publish, distribute, sub -license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS 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. - - Copyright © 2007 OpenedHand Ltd Permission to use, copy, modify, distribute, and sell this software and its diff --git a/xorg-server/ChangeLog b/xorg-server/ChangeLog index 73582f3ad..47a09432d 100644 --- a/xorg-server/ChangeLog +++ b/xorg-server/ChangeLog @@ -1,2786 +1,14691 @@ -commit 3044711412d0a08ba65a491bd2441c0c8980f5e2 -Author: Keith Packard -Date: Tue Aug 25 22:37:16 2009 -0700 +commit e6e83d81ee7366779d600cbb128034e248815339 +Author: Peter Hutterer +Date: Fri Sep 4 14:51:08 2009 +1000 - Bump version to 1.6.3.901 (1.6.4 RC1) + xserver 1.6.99.900 - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit d8e48deb212767c4dfce982e6cb9d1b1fce63b96 -Author: Keith Packard -Date: Tue Aug 25 22:29:25 2009 -0700 +commit bc0841b6e87cdd752b44b17ccb021c831a3e02a5 +Author: Peter Hutterer +Date: Fri Sep 4 15:58:36 2009 +1000 - Block signals while delivering XTest events (fixes bug 23100) + shave: hack around the configure ld check for make distcheck. - XTest uses the same event list as all input devices, and input devices - use it at SIGIO time. This causes mass confusion when a SIGIO event - occurs in the middle of XTest event processing. + configure calls $(CC) -print-prog-name=ld to get the binary for the linker. + The shave script prints " CC \nld" which can't be parsed by configure, + resulting in a fatal error. - The master branch has a much different fix, using a separate input - queue which reduces latency that may be caused by XTest event queuing; - it's a 'nicer' fix in some ways, but this simple fix should solve the - problem. + This patch special-cases -print-prog-name and passes it though directly + without any additional output. - Reviewed-by: Peter Hutterer - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 76a1839b0a7dcb82e46c43533d252288677c6dbb -Author: Keith Packard -Date: Tue Aug 25 18:07:00 2009 -0700 +commit 58d9a4c6356c98c32be2826410df027ece70d44d +Author: Peter Hutterer +Date: Fri Sep 4 15:06:45 2009 +1000 - Ensure that rotation updates happen frequently - - The smart scheduler is designed to minimize scheduler overhead by - increasing the interval between WaitForSomething calls when a single - client is running. However, the software rotation code depends on - its BlockHandler being invoked for screen updates; the long delays - caused by the smart scheduler optimizations means that screen updates - can be delayed a long time as well. + xfree86: fix make distcheck after removal of Domain.note and RAC.Notes. - The change is simple -- prevent the smart scheduler from increasing - the scheduling interval while any screen is using software rotation. - (cherry picked from commit e7dd1efef408effe52d0bd3d3aa0b5d4ee10ed90) - - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 31dc4fe0be57da4e9458ee490811fbd92598b7a7 -Author: Keith Packard -Date: Tue Aug 25 16:58:07 2009 -0700 +commit 8af2793a90e8e644a6a598adce3f752c15b3e37a +Author: Peter Hutterer +Date: Thu Sep 3 11:30:48 2009 +1000 - Perform rotation redisplay before calling driver block handler (which may flush rendering) + xkb: xkbGetKbdByName on the lastSlave needs to change the master (#21859) - The rotation block handler uses regular driver rendering functions to - repaint the screen, if those functions queue commands in the driver, - it's important that the driver block handler be invoked after the - rotated image is drawn. + If the layout is changed on a master's lastSlave, the master needs to change + layout immediately. Otherwise, the master stays on the same layout until the + lastSlave changes - which may not happen if only a single keyboard is + available. - Signed-off-by: Keith Packard - (cherry picked from commit 1740cda7a37abc7d0a169ab4555b446adaa62211) + X.Org Bug 21859 + + Signed-off-by: Peter Hutterer -commit cebc0a7aa7a368b2ade3a808195d2e738fda83e9 -Author: Keith Packard -Date: Tue Aug 25 16:54:16 2009 -0700 +commit 219ae5b628f9ffe2be0876d5911cc04e52bef5f8 +Author: Peter Hutterer +Date: Fri Aug 21 16:38:53 2009 +1000 - xf86_reload_cursors: fix cursor position to eliminate jumping after mode set + dix: hide the sequenceNumber key repeat hack behind two functions. - xf86_reload_cursors restores the cursor to the correct position, but - that must adjust for cursor hot spot and frame before calling down to - the hardware function, otherwise the cursor jumps to the wrong - position until it is repositioned by the user. + Just in case we figure out a better way to do it in the future. - Signed-off-by: Keith Packard - (cherry picked from commit 4aab05e3b3231f1ec9795a66a075d17a722634a7) + Signed-off-by: Peter Hutterer -commit 5848fca11f3c5b65bb6634816c0df6aeb6eda87d -Author: Michel Dänzer -Date: Tue Jun 23 16:45:40 2009 +0200 +commit bfb219f532f3c78ba905424365ee7c5f7b5f21a2 +Author: Daniel Stone +Date: Fri Aug 21 16:03:36 2009 +1000 - glx: Clean up more thoroughly if the drawable of a current context goes away. + input: allow for detectable autorepeat. - Fixes crash when restarting compiz, due to cl->currentContexts[x] being stale. - (cherry picked from commit 3020b1d43e34fca08cd51f7c7c8ed51497d49ef3) - -commit fad2de1cca057586a88fb20ebf9a9964f8e3e298 -Author: Michel Dänzer -Date: Thu May 14 11:46:41 2009 +0200 - - glx: If a destroyed window is bound to the current context, make it not current. + For core and XI1 events, store the key_repeat flag in the sequence number + until TryClientEvents. The sequenceNumber is unset until TryClientEvents. - Avoids subsequent crashes due to stale pointers to the DrawableRec, see - https://bugs.freedesktop.org/show_bug.cgi?id=21132#c15 and previous comments. + [Also thrown in, some random indentation changes. Thanks] - Signed-off-by: Michel Dänzer - (cherry picked from commit 2075d4bf9e53b8baef0b919da6c44771220cd4a5) + Signed-off-by: Peter Hutterer -commit a32d717ac64b21e15a5736ae4981cdd32f2da56b -Author: Richard Hughes -Date: Mon Aug 17 09:15:32 2009 +0100 +commit 3d988e01e41e98fc5160f825a250522ba274d09f +Author: Daniel Stone +Date: Fri Aug 21 15:15:41 2009 +1000 - Do not reset lastDeviceEventTime when we do dixSaveScreens + dix: improve code flow in TryClientEvents, better debugging messages. - When we turn off DPMS with DPMSModeOff and do dixSaveScreens, don't reset the - event time else session clients using IDLETIME will be reset. + Instead of a massive if (blah && blah), return early where possible. Signed-off-by: Peter Hutterer - (cherry picked from commit 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066) -commit 32115e690f43fde619234722aa674ff1ae1b44ae +commit 6fb01c8286c16968fd07e4a5b78da89cd8768d79 Author: Peter Hutterer -Date: Fri Aug 14 11:48:54 2009 +1000 +Date: Fri Sep 4 10:57:33 2009 +1000 - dix: update the sprite trace for all masters && floating slaves (#23257) - - When the windows are restructured, CheckMotion needs to be called for all - masters and floating slaves to update the spriteTrace. - - X.Org Bug 23257 - (cherry picked from commit 6c292d17053eb2a7e7054e51210f423dbc0cb7e8) + require xf86vidmodeproto 2.2.99.1 or newer. + +commit 2122fedb2c058dc27f9df0e856d2193fabe725e2 +Author: Peter Hutterer +Date: Fri Sep 4 11:37:58 2009 +1000 + + os: silence bigreqsproto compiler warning - Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer - Signed-off-by: Keith Packard -commit af7e62a913c3c5b9639b4557b31537853f3f58bb -Author: Dan Nicholson -Date: Sun Aug 16 18:07:49 2009 -0700 +commit 59e731ef66095723e74a16b2e5548aed627089ff +Author: Peter Hutterer +Date: Fri Sep 4 11:06:37 2009 +1000 - xfree86: Link libselinux with Xorg system libraries + xfree86: silence some xf86dgaproto compiler warnings - Put the reference to -lselinux in XORG_SYS_LIBS so it isn't added as a - make dependency for libxorg.la. Otherwise, make goes looking for a file - -lselinux in the current directory, which it obviously won't find. + We already require xf86dgaproto > 2.0.99 since 6fffcd582 - Signed-off-by: Dan Nicholson - Tested-by: Justin P. Mattock - (cherry picked from commit c73cd3b265c301b8a54ffe484d6c696f2abefb46) + Signed-off-by: Peter Hutterer -commit 397f7c42cd775f1dbfced58bc1dfaead48e86440 +commit ead57a13531aa14033839112fa66e33e142f67da Author: Peter Hutterer -Date: Fri Aug 14 09:48:45 2009 +1000 +Date: Fri Sep 4 11:03:55 2009 +1000 - config: don't shutdown the libhal ctx if it failed to initialize (#23213) - - Regression introduced by b1c3dc6ae226db178420e3b5f297b94afc87c94c. - Shutting down the libhal_ctx if the init failed may cause an abort. - This can happen if hald is not yet running at server startup. - - X.Org Bug 23213 + xfree86: silence 'unused variable' compiler warning - Tested-by: Stefan Dirsch Signed-off-by: Peter Hutterer - (cherry picked from commit 49046088f10cceaea7da97401d742d3fb59371f5) -commit 55c26d8e4d110b689aea9d806e9d4fa7bbbdd32a +commit 21f04f008e6b1ab66a63de3de668b1f261a6928a Author: Peter Hutterer -Date: Thu Aug 13 16:37:00 2009 +1000 +Date: Fri Sep 4 11:01:09 2009 +1000 - Xext: fix up wrong conditions for negative sync transitions. - - If the counter had a value higher than the trigger value for a negative - transition, the trigger value did not get set. - - The correct sequence of checks is: - if (positive transition) - if (counter value < trigger value) - set up trigger - if (negative transition) - if (counter value > trigger value) - set up trigger - - Red Hat Bug 501601 + os: don't redefine GNU_SOURCE Signed-off-by: Peter Hutterer - (cherry picked from commit db568f9eabf3450d8a023597ff007df355b13ea8) -commit f274e595ed56722450f6ecebad70500c92e50c58 -Author: Keith Packard -Date: Fri Jul 31 23:37:53 2009 -0700 +commit 09f0ee1324b046f2830bdd260f6e2a67ee8f2973 +Author: Martin-Éric Racine +Date: Fri Sep 4 04:17:09 2009 +0300 + + Formatted recent Geode PCI ID changes to fit a 80-column coding style. + +commit a17b50b130fe01c058a74f2696a8b97c756acb49 +Author: Martin-Éric Racine +Date: Fri Sep 4 03:51:01 2009 +0300 + + Further explained what the Geode PCI ID is all about as comments. - Bump release number to 1.6.3 +commit afd800dae4f7491baee08509094a30160bb9c849 +Author: Martin-Éric Racine +Date: Fri Sep 4 03:41:08 2009 +0300 + + Removed unnecessary curly braces for Geode LX PCI ID. + +commit 842b7a47d583a7729099de3031ae20977dddf774 +Author: Martin-Éric Racine +Date: Fri Sep 4 03:25:32 2009 +0300 + + Updated the PCI Vendor and Device IDs for all Geode variants. - Signed-off-by: Keith Packard + In practice, some of the native drivers for older Geode products + have become deprecated due to lack of e.g. libpciaccess upgrade, + but that's OK, since most distributions don't ship them anymore. + In that case, we'll let X server fall back to good old VESA. -commit 55dcfdbbd6a2a4debb717b104c4b54f4a2c76fff -Author: Alan Coopersmith -Date: Tue Jul 28 15:02:37 2009 -0700 +commit 8e873185f4cbfb2a36e1f43fe7da47fd9fd5aeea +Author: Michel Dänzer +Date: Thu Sep 3 19:11:02 2009 +0200 - Remove hardcoded gcc -Wall option from configure.ac + EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_mixed. - Signed-off-by: Alan Coopersmith - (cherry picked from commit 442967c90dd9d8483a56bdc9237c49e33d619126) + Otherwise we may incorrectly clobber it to NULL on repeated PrepareAccess + calls. -commit 4d349b6c333449517913a5e981b4fc3155da4855 -Author: Adam Jackson -Date: Fri Mar 27 15:56:15 2009 -0400 +commit 120286aef59dabdb7c9fa762e08457e5cc8ec3a6 +Author: Michel Dänzer +Date: Thu Sep 3 08:05:59 2009 +0200 - selinux: Only activate if policy says to be an object manager - (cherry picked from commit 283a081572d8db787c77d09e5ba6bcadebf4f7fe) + glx: Add screen DestroyWindow wrapper to destroy the GLX drawable. + + Fixes crashes exitting MacSlow's rgba-glx demo. -commit d0875154f4f4b751264a2f6781500e97409a499b -Author: Ben Skeggs -Date: Wed May 27 15:24:34 2009 +1000 +commit f04fe06ae244b851b38be824b1a80f2f8a030591 +Author: Peter Hutterer +Date: Thu Sep 3 14:17:14 2009 +1000 - quirk: use first detailed timing as preferred for PEA prod 9003 (rh#492359) + dix: don't return BadMatch from GetProperty (#23562) + + dixLookupWindow may return BadMatch if the window in question isn't actually + a window. In this case, GetProperty needs to return BadWindow - not + BadMatch. + + X.Org Bug 23562 Signed-off-by: Peter Hutterer - (cherry picked from commit 048697ccfa31cf7f7a29afa90a2f702d43efb7d4) -commit c941479ecc2dead9c3deaee2620c9b9518c3da9a -Author: Rémi Cardona -Date: Mon Jul 27 12:07:51 2009 +0200 +commit 84eb4c66a4a09c360cef260fb2f35dfb6d8a93c6 +Author: Peter Hutterer +Date: Thu Sep 3 10:00:42 2009 +1000 - config: add HAL error checks + test: add protocol testing for XIWarpPointer. - This patch simplifies error handling in the HAL code and fixes a - segfault if libhal_find_device_by_capability() failed. + TODO: some way to check src_x/y coordinates would be good. - Fixes http://bugs.gentoo.org/278760 + Signed-off-by: Peter Hutterer + +commit 1b7858e8469aea6d2031039ba41d7191a4b80f28 +Author: Peter Hutterer +Date: Thu Sep 3 10:58:00 2009 +1000 + + test: expose the default screen to tests, some cleanup work. - Based on a patch by Martin von Gagern + Provide common #define for invalid window IDs. + Init the sprite's hotPhys, provide a common #define for the initial sprite + position. - Signed-off-by: Rémi Cardona - Acked-by: Peter Hutterer - (cherry picked from commit b1c3dc6ae226db178420e3b5f297b94afc87c94c) + Signed-off-by: Peter Hutterer -commit 546f913ff5461dd93d4a0b29b24d2267557326c7 -Author: Alan Coopersmith -Date: Fri May 8 21:31:01 2009 -0700 +commit 61a6e1f074d9ff75d61446b946aab6c04019c287 +Author: Peter Hutterer +Date: Thu Sep 3 10:00:00 2009 +1000 - Don't printf NULL pointers on HAL connection error - - Fixes Solaris bug 6801386 Xorg core dumps on startup if hald not running - http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6801386 + Xi: return BadDevice for master kbds and attached slaves in XIWarpPointer - Signed-off-by: Alan Coopersmith - (cherry picked from commit 1e816065e5ec3b9394dc1fa5815457a664e15fd9) + Signed-off-by: Peter Hutterer -commit 155cb2f9a376d40b699a72ac3bdede71af1b518f -Author: Keith Packard -Date: Sun Jul 26 14:22:35 2009 -0700 +commit 8939ad2b2aa0385f072d3e1169eaf99289ed737a +Author: Peter Hutterer +Date: Thu Sep 3 09:44:11 2009 +1000 - Bump to version 1.6.2.901 (1.6.3 RC1) + Xi: return error values to client from XIWarpPointer. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 87900645c22d6066fe70190ab838a687808db5c3 -Author: Dave Airlie -Date: Thu Jun 11 14:21:53 2009 +1000 +commit d481720c57f558c47273bf89854fc69254319772 +Author: Peter Hutterer +Date: Wed Sep 2 15:28:28 2009 +1000 - xfree86: move didLock assignment down to where the function pointer is valid. + Xi: standardise XI2 headers. - crtc->funcs->lock is NULL, so it's no use calling it here. Move it down so - it's actually defined before we use it. + Adding missing dix-config.h include, adding one missing header guard. - Introduced with 6f59a8160042ea145514fdcb410f17f33fd437c2. + Signed-off-by: Peter Hutterer + +commit 377a5f655ca88cd836da24ab42361df9f3ff51a2 +Author: Peter Hutterer +Date: Wed Sep 2 11:16:15 2009 +1000 + + Xi: if XISetEventMask fails, return this to the client. - Tested-by: Peter Hutterer - (cherry picked from commit 0de58c88aba7ddd69b04f24ab5b2967c359aa69e) + The only failure point can be a BadAlloc. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 72c9bc64ff86999a4643663e5699a6547a9e2997 -Author: Benjamin Defnet -Date: Wed Jun 10 21:35:48 2009 -0700 +commit 993ca5acbdccef9e43cd6580e7cc22cfda1a2578 +Author: Peter Hutterer +Date: Wed Sep 2 10:53:40 2009 +1000 - randr: fix operation order so that rotation+transform works + dix: when unsetting a cursor, update the sprite immediately (#23608) - The matrix multiply to combine rotation and projective transforms was being - done in the wrong order. + Removing the device cursor while the cursor was within the window did not + update the visible sprite until the next enter/leave event. - Signed-off-by: Keith Packard - (cherry picked from commit b2bf67b61c564a4b92a429ca9ad455403161f33a) + X.Org Bug 23608 - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 7f95d18397757facafcba39e4613b2ed5047c5c4 -Author: Benjamin Defnet -Date: Mon Jun 8 21:45:42 2009 -0700 +commit b41db8fe460fc0956922b79261752d1bb104684f +Author: Peter Hutterer +Date: Wed Sep 2 08:57:40 2009 +1000 - hw/xf86/modes: Set crtc mode/rotation/transform before calling set_mode_major + Xi: fix broken swap code in XISelectEvents request processing. - This moves code out of each implementation of set_mode_major and back into - the X server. The real feature here is that the transform is now available - in the crtc for use by either xf86CrtcRotate or whatever the driver wants to - do. Without this change, the transform was lost for drivers providing the - set_mode_major interface. + The pointer advanced 12 bytes too short. Rather unfortunate if both the code + and the test have the same bug. - Note that users of this API will want to stop smashing the transformPresent - field, and could also stop setting mode/x/y/rotation for new enough X servers, - but there's no reason to make that change as it will break things when - running against older X servers. + Signed-off-by: Peter Hutterer + +commit 727de7c90de4198222e0dc58d7503b4a1672f642 +Author: Peter Hutterer +Date: Tue Sep 1 16:33:56 2009 +1000 + + Xi: Unify checking for invalid bits in grab masks. - Signed-off-by: Keith Packard - Acked-by: Daniel Stone - (cherry picked from commit 6f59a8160042ea145514fdcb410f17f33fd437c2) + Bits above XI2LASTEVENT are invalid and cause in BadValues. These checks + must be performed anywhere where a mask_len parameter is given. - Signed-off-by: Keith Packard + This patch also adds the missing checks to grab masks. + + Signed-off-by: Peter Hutterer -commit abc89e2c48a88c29f49fe44d03778deab4b1a3b9 -Author: Matthias Hopf -Date: Tue Mar 10 15:49:49 2009 +0100 +commit 59a6d7d478903a8bc9c5d4cc8b2e62e2ad102dba +Author: Peter Hutterer +Date: Tue Sep 1 16:30:52 2009 +1000 - randr: Nuke broken set_origin shortcut + Xi: don't overrun memory for grab masks. - Shortcut is impossible to implement this way, because we don't know for sure - whether the crtc of an output has changed or not. - (cherry picked from commit cadf65a6e190a8952ad3cc216dc9ea55241de91a) + A grab mask provided in the request may be larger than the one used in the + server. Cut down to size before memcopying. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit b1eed8970f7c5b07152dbc6b7dcc4c8504aeb67c -Author: Julien Cristau -Date: Fri May 22 09:54:38 2009 +0200 +commit 83db2b126e8623824e1303e74070375994984599 +Author: Peter Hutterer +Date: Tue Sep 1 15:58:02 2009 +1000 - randr: fix server crash in RRGetScreenInfo + Xi: don't try to set oversized or non-existing masks. - We don't return rates to randr < 1.1 clients, so don't allocate space - for them. This fixes a FatalError due to not all allocated space being - used. + Fixes crash if the first XISelectEvents has a zero sized event mask. + Fixes crash if the mask provided is larger than others->xi2mask[]. - X.Org bug#21861 + Signed-off-by: Peter Hutterer + +commit 6fe235d3635aaf995dfa198c60ded1a43fe9dd45 +Author: Peter Hutterer +Date: Tue Sep 1 15:46:34 2009 +1000 + + test: fix request length calculation, add length tests for XISelectEvents - Reported-by: Guillaume Quintin - Signed-off-by: Julien Cristau - (cherry picked from commit 12e725d08b4cf7dbb7f09b9ec09fa1b621156ea9) + Signed-off-by: Peter Hutterer + +commit 7ab1b50c545ae1a62384bedee60168e227bb2a94 +Author: Peter Hutterer +Date: Tue Sep 1 15:27:29 2009 +1000 + + test: fix build after changing libxf86config.la - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 1addf6fe235f8537024140aff56dffb4738701a7 -Author: Keith Packard -Date: Wed Aug 6 15:26:24 2008 -0700 +commit 58c298acc1045927e0d90be73b8dbc8837252589 +Author: Peter Hutterer +Date: Tue Sep 1 15:16:17 2009 +1000 - Replace dixLookupResource by dixLookupResourceBy{Type,Class} + Xi: extra length checking for requests providing masks. - dixLookupResource attempted to automatically detect whether the caller - wanted a lookup by-type or by-class, unfortunately, it guessed wrong for - RT_NONE. Instead of trying to make the guess better, this patch just reverts - the unification and creates separate functions for each operation. - (cherry picked from commit f8dd80d13bb5313a11b38b280f8ad3e22f0a6300) + masks can be of arbitrary length. If the client did not initialize mask_len, + some sort of boundary check is needed to avoid running over memory. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit c838a03e891a6fcd2f7b71f727c1b93f7c26e7a7 -Author: Robert Noland -Date: Wed Apr 15 12:06:19 2009 -0500 +commit 0e4dd3b2d28d3dbbfc152d6f5030901ec063a7ae +Author: Peter Hutterer +Date: Mon Aug 31 09:50:36 2009 +1000 - One = is more than adequate here. Make is sh safe. - (cherry picked from commit b3e3154cce47add97f5561088036ce3b9e7dc937) + Un-export ApplyPointerMapping. This is an in-server function. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 68cb38bed65c49716104eeb345c4b1b85a4b15bc -Author: Rémi Cardona -Date: Fri Jul 3 10:51:50 2009 +0200 +commit a470e8426ee290046a927a17fc969235c4b1e2e7 +Author: Eamon Walsh +Date: Wed Sep 2 17:56:52 2009 -0400 - configure: libXinerama isn't needed anymore - - since libXinerama commit 90d4d23bf2e94721149ddc0a80093b10a82e8845 and - xineramaproto commit 21477147613c28c968b5e1eb9d8aea7017dd399d, the - server no longer needs libXinerama. + Correct outdated e-mail address in "Author" statements. - Signed-off-by: Rémi Cardona - (cherry picked from commit 2c69deb92e11542f615df0f24fdc03e3b4415475) + Signed-off-by: Eamon Walsh + +commit 17545ed80ee3bb6a058a2748fc7bfb0fc5139fc1 +Author: Adam Jackson +Date: Wed Sep 2 14:40:07 2009 -0400 + + randr: Fix crtcs using set_mode_major() - Signed-off-by: Keith Packard + We'd never mark the crtc as active, meaning (among other things) gamma + upload wouldn't work. -commit ec60f4ca65dbc25f9a40636f5280b1a1ec68407f -Author: Michel Dänzer -Date: Fri Jul 10 20:06:02 2009 +0200 +commit 291408980f33b1e541c89d958535e6fad55fdac9 +Author: Dave Airlie +Date: Wed Sep 2 20:14:30 2009 +1000 - EXA: Only pass CT_YXBANDED to RECTS_TO_REGION() if that is really true. + vgaarb: protect fini as well just in case + +commit 8aeadbff0840efc0c9a073e60d6fec0dba313060 +Author: Dave Airlie +Date: Wed Sep 2 19:07:40 2009 +1000 + + vgaarb: if arb init fails, make sure locking doesn't occur. - Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 . - (cherry picked from commit 35758544813f156eaac28844e693b2a28f6de316) + pointed out by Martin Jansa on irc. - Signed-off-by: Keith Packard + Signed-off-by: Dave Airlie -commit b10c4fe343d2339bae4736793939e44a6befaf88 -Author: Kim Woelders -Date: Sat Jul 11 18:55:17 2009 +0200 +commit 0e46066efea4e385b2874d4a62a786957e572fe5 +Author: Jerome Glisse +Date: Tue Sep 1 13:59:47 2009 +0200 - Fix key repeat problem. + Xext: fix a typo for bigreqsproto.h header file - Signed-off-by: Kim Woelders + Signed-off-by: Jerome Glisse -commit 606f6dba16d42e3546a82a386d5a01087467b511 -Author: Adam Jackson -Date: Tue Apr 14 10:54:25 2009 -0400 +commit c61d8ce1507318476b75b81bf871da19cb1bf747 +Author: Jeremy Huddleston +Date: Mon Aug 31 17:57:50 2009 -0700 - xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675) - - You could be more clever than this, but the wire protocol says this - really is an array of not more than 255 ARRAY8, so it's not just a - matter of changing the types. + Xext: Require newer versions of xcmiscproto, bigreqsproto, and xf86bigfontproto for new *proto.h header file names - (cherry picked from commit 0eb19f9437b7d8c19592e49eedb028771d300d80) + bigreqsproto >= 1.1.0 + xcmiscproto >= 1.2.0 + xf86bigfontproto >= 1.2.0 -commit 396d3a7762abd0dd84042833b75f2ebf9d100bb0 -Author: Alan Coopersmith -Date: Wed Jul 8 11:26:46 2009 -0700 +commit 1c37be80982151a5acd74fe4b960695f604f22ca +Author: Michael Witrant +Date: Tue Sep 1 10:46:50 2009 +1000 - Fix build of drivers with 1.6.2 when not using --install-libxf86config + XFree86: Linux: Fix 100% CPU usage with ShareVTs and kbd - c859b736d1d23c5dc2f53958b1e76660e6d45018 removed duplicate entries for - these from the Makefile, but removed a different set than was done in - master branch, causing xf86Parser.h to not be installed, which in turn - breaks the build of drivers like -ati, -intel & -nv that use xf86Modes.h, - which includes xf86Parser.h + Leave consoleFd open over the course of the server, even though any use + of it in this context is likely to be disastrous. - Signed-off-by: Alan Coopersmith - Signed-off-by: Keith Packard + Signed-off-by: Michael Witrant + Reviewed-by: Daniel Stone -commit 6f1aff5a2b45bc2985081abc240a8fed37170386 -Author: Keith Packard -Date: Mon Jul 6 14:08:31 2009 -0700 +commit 65183dc3153232943dff3cfbaacab141e7ed0e9c +Author: Daniel Stone +Date: Sun Jul 5 19:53:55 2009 +0300 - Bump to version 1.6.2 + Input: Mark Xi input events as critical - Signed-off-by: Keith Packard + Note that the Xi events are critical and should thus cause a flush to + the client when an input event is pending. + + Signed-off-by: Daniel Stone -commit 499f9f62e408510ed4efb6f2321a3f851f535567 -Author: Keith Packard -Date: Wed Jul 1 14:01:57 2009 -0700 +commit a4e614d301cfa2577de1ee6a15abf023590586d1 +Author: Daniel Stone +Date: Sat Apr 25 16:46:10 2009 +1000 - dri2: Preserve compatibility with 1.6 DRI2 API/ABI + Xi: Fix harmless ButtonPress/ButtonRelease confusion - The old DRI2 buffer allocation API wasn't great, but there's no reason to - make the server stop working with those drivers. This patch has the - X server adapting to the API provided by the driver, using the new API where - available and falling back to the old API as necessary. A warning will be - placed in the log file when the old API is in use. - (cherry picked from commit 2e2c5b216cc1c7a9bc26bd2c68226aaed5fc52ca) + A missing break meant that ButtonPress would fall through into + ButtonRelease, but luckily it appears to have been completely harmless. - Signed-off-by: Keith Packard + Signed-off-by: Daniel Stone -commit c859b736d1d23c5dc2f53958b1e76660e6d45018 -Author: Arkadiusz Miskiewicz -Date: Fri Jul 3 11:03:32 2009 +0200 +commit 5ef53a94ce4e48e11de26290cd677266308640c8 +Author: Matt Turner +Date: Mon Aug 31 20:23:26 2009 -0400 - xfree86: remove duplicate header entries in Makefile.am + alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus - fixes https://bugs.freedesktop.org/show_bug.cgi?id=22547 + xf86SlowBCopyToBus and xf86SlowBCopyFromBus cause segfaults on my + system. - This bug was fixed in a big clean-up commit in master, which cannot be - backported (see commit b1dac41fb3853ca8182048ea57b88b6e84ecceb3) + Also remove associated slowbcopy_tobus/slowbcopy_frombus macros. - Signed-off-by: Rémi Cardona - Signed-off-by: Keith Packard + Signed-off-by: Matt Turner -commit 6f82ca0f8bfc074474407cb5ffe782c3c128f838 -Author: Alan Hourihane -Date: Mon Feb 16 11:39:34 2009 +0000 +commit a8e634b86d47353ef354717904fa66ebe35e1303 +Author: Jeremy Huddleston +Date: Mon Aug 31 15:53:58 2009 -0700 - dri2: support glXWaitGL & glXWaitX by copying fake front to front and - vice-versa. - (cherry picked from commit 2a8b8077d8f6001eb57deba60e1009fc99c28668) - - Signed-off-by: Keith Packard + XQuartz: GLX: Drawable does not contain resize anymore. + (cherry picked from commit 1e642f22fbf029bb3917091cb5fa2f78b4a92f62) -commit d478bc948838d11b3abcf6d2cdd3a00dccb344c4 -Author: Eric Anholt -Date: Tue Feb 17 09:59:17 2009 -0800 +commit 1b30545c04a51bfa3ff95a26d64962907a62ff15 +Author: Matt Turner +Date: Mon Aug 31 16:16:02 2009 -0400 - xinerama: Put the proto version in the code instead using proto headers. + Make sys.c use compiler.h unaligned access functions - Proto headers updating resulting in the server advertising new versions is - broken. This should be applied to every extension. - - This fixes the build against slightly-older xineramaproto. - (cherry picked from commit b349a764e98f0d8f221190157ffa0904b91beca5) + Signed-off-by: Matt Turner + +commit 9522ab9a98e98bc394703038e34b1c12aa39a179 +Author: Matt Turner +Date: Mon Aug 31 16:12:29 2009 -0400 + + Remove unused Delay.c - Signed-off-by: Keith Packard + Signed-off-by: Matt Turner -commit a7a93c12f91e0de72868f17a555215f1795d9e2f -Author: Keith Packard -Date: Mon Jun 29 23:18:55 2009 -0700 +commit 4fac13ff8848bc38654b5567170fbc0d7b2c96d6 +Author: Matt Turner +Date: Mon Aug 31 16:11:59 2009 -0400 - Build against DRI_TEX_BUFFER_VERSION 1 + Remove unused BUSmemcpy.c - setTexBuffer2 isn't present in this version of the structure, so don't try - to call it. + BUSmemcpy.c provides xf86BusToMem and xf86MemToBus, which are are memcpy + wrappers written to avoid glibc's memcpy on Alpha. glibc'c memcpy on + Alpha has improved much since this was written, so it's no longer + needed. Neither function is used inside the xserver, and no module on + my machine uses either as well. - Signed-off-by: Keith Packard + Signed-off-by: Matt Turner -commit 5b49aff4f8b5e4d15bc883f74509d93324f09f5f -Author: Keith Packard -Date: Mon Jun 29 14:40:46 2009 -0700 +commit b65146fc8418b53b7e43dd34cc20000369475671 +Author: Matt Turner +Date: Mon Aug 31 16:11:10 2009 -0400 - Bump version to 1.6.1.902 + Remove unused ia64_flush_cache function - Signed-off-by: Keith Packard + Signed-off-by: Matt Turner -commit e97cabce4abdaf6b83d1a442f7972d4c45979b33 -Author: Peter Hutterer -Date: Wed Mar 25 12:55:42 2009 +1000 +commit f201705e29bdc3309dd611b461ec67740cb706ef +Author: Matt Turner +Date: Mon Aug 31 16:09:33 2009 -0400 - xfree86: fix SWCursor check in xf86CursorSetCursor. + Simplify unaligned access code - Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when - the pointer left the screen (in a Xinerama setup). - We must call the sprite rendering function if - - SW cursors are enabled, or - - The current device is not the VCP and not attached to the VCP. + All architectures should be able to use the same unaligned access code, + regardless of whether they need special unaligned access instructions. + Let's let gcc do the heavy lifting. - Backported from commit 66089e9129a821cfb1983d3d35f41b975a52de5e for - server-1.6-branch by Peter Hutterer + In the case that we're not using a gcc-compatible compiler, use memmove. - Reported-by: Gordon Yuan - Signed-off-by: Peter Hutterer - Signed-off-by: Keith Packard + The xserver already requires pixman, so include pixman.h for its uint*_t + types. + + Signed-off-by: Matt Turner -commit 17c5b2caf01deec1d1be9fc2ac68a3d636e64c44 -Author: Julien Cristau -Date: Mon May 18 19:01:46 2009 +0200 +commit 3718beb69cc5b4cdb79dd97242fce9231a26a39a +Author: Matt Turner +Date: Mon Aug 31 16:08:52 2009 -0400 - Change default for ExaOptimizeMigration to false + Clean up unaligned access functions on alpha - Quoting Michel Dänzer in <1234862541.4823.541.camel@thor>: + Checks for __GNUC__ are superfluous since the only other compiler for + the platform is Compaq C, and it doesn't support GCC style inline + assembly. - Unfortunately, there are still bugs left in EXA which prevent it from - working 100% correctly with the option enabled, see + Signed-off-by: Matt Turner + +commit e1fdd7671346ce374a2b77fe94b8c1a25c0520da +Author: Matt Turner +Date: Mon Aug 31 16:08:20 2009 -0400 + + Move unaligned access functions to common section - http://bugs.freedesktop.org/show_bug.cgi?id=16416 + Signed-off-by: Matt Turner + +commit 628b863bcc6a2a14fd3c0e6c2be4394833cc314c +Author: Matt Turner +Date: Mon Aug 31 15:53:41 2009 -0400 + + Remove unused arm_flush_cache function - http://bugs.freedesktop.org/show_bug.cgi?id=19940 + Signed-off-by: Matt Turner + +commit a544139196ac7f5bc89bc642c6c5c0ea1b0bb60e +Author: Matt Turner +Date: Mon Aug 31 15:53:19 2009 -0400 + + Remove unused ppc_flush_icache function - So disable it for now to avoid corruption. + Signed-off-by: Matt Turner + +commit 52aa0495218dc7821a23b045b2c74b2a66e34616 +Author: Matt Turner +Date: Mon Aug 31 15:52:39 2009 -0400 + + Replace 8 nops with proper sync instruction on mips - Signed-off-by: Keith Packard + Cc: Ralf Baechle + Acked-by: David Daney + Signed-off-by: Matt Turner -commit 8d65439d5c950ea01ec8e1e4dd989aff0fb4c3f0 -Author: Keith Packard -Date: Thu May 28 14:43:27 2009 -0700 +commit 563fa1c5d762173cd6fb78f9e33cb960ef3153bb +Author: Matt Turner +Date: Mon Aug 31 15:52:10 2009 -0400 - Make RANDR 'set' timestamps follow client specified time. Bug 21987. + Use sfence and mfence instructions on amd64 - The lastSetTime value which indicates when the configuration within the - server was last changed was not getting set in the appropriate RandR - requests. + Signed-off-by: Matt Turner + +commit 430c4af0d6e2cad03ca5f49ec6e87f3717d0d9e2 +Author: Matt Turner +Date: Mon Aug 31 15:51:41 2009 -0400 + + Add x86 barrier macros - Signed-off-by: Keith Packard - (cherry picked from commit 69a9545d1f8110841538410818df19fd960412c5) + Signed-off-by: Matt Turner + +commit 0d87f77a3ff4b22729220b7edcb98c6f06d0787c +Author: Matt Turner +Date: Mon Aug 31 15:51:05 2009 -0400 + + define barrier macros as nops if not otherwise defined - Signed-off-by: Keith Packard + Signed-off-by: Matt Turner -commit d98f2792d2f523d7397eac70cc021761e9561219 -Author: Federico Mena Quintero -Date: Tue Jun 9 13:28:28 2009 -0700 +commit 1b43ee13b30d9e3f828e94cdf686d103ce1cac07 +Author: Matt Turner +Date: Mon Aug 31 15:53:58 2009 -0400 - dix/randr: Add missing fields to SRR*NotifyEvent() + Move memory barrier macros into common section - Also, remove redundant field swaps and make others match the order in which - they are declared in the xRR*NotifyEvent structs. + alphabetize by architecture also. - Signed-off-by: Federico Mena Quintero - Signed-off-by: Keith Packard - (cherry picked from commit e244a5991e2cc55f5aa2f6e5255f1dabf56f0235) + Signed-off-by: Matt Turner + +commit 295e598d9a83ff7162a093810ca9f546d00c0968 +Author: Tiago Vignatti +Date: Mon Aug 31 20:04:51 2009 +0300 + + xfree86: remove _more_ RAC junk - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti -commit f697b6c582095aa1eec3244fa05835922249425b -Author: Peter Hutterer -Date: Mon May 11 12:53:56 2009 +1000 +commit 38627b2eaf64aa8fe694fc3e1f5e4fee0c9c11c3 +Author: Tiago Vignatti +Date: Mon Aug 31 19:36:02 2009 +0300 - kdrive: set Activate/Deactivate grab for input devices (#21591) + xfree86: shut up vgaarb warnings when server doesn't support it - X.Org Bug 21591 - (cherry picked from commit b1b5ec45c1cb650ccb8c659218f9481379c777d9) + Signed-off-by: Tiago Vignatti + +commit 79182538b43ecd35bf2b47eccfb2dd3bbcdc12eb +Author: Tiago Vignatti +Date: Mon Aug 31 19:25:13 2009 +0300 + + xfree86: removal of some dead code due VGA arbiter's inclusion - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti + +commit 6f3cc08ec01609c7efe424ac3e30fe4ff9391007 +Author: Jeremy Huddleston +Date: Thu Aug 27 16:21:11 2009 -0700 + + XQuartz: GL: Unset GL_EXT_gpu_program_parameters for Tiger/ppc + + See http://trac.macports.org/ticket/20638 + (cherry picked from commit 0f3a89d306838b3c75a73cd1e9e2928737222b70) -commit c91accd173b5f17af771bd9f4e60b5860af15718 +commit fdb29ebeed143fa05630966b847b05399a446ddc +Author: Jeremy Huddleston +Date: Thu Aug 27 11:04:00 2009 -0700 + + XQuartz: GL: Explicitly set GL_EXT symbols to 0 if they are not in OpenGL.framework to prevent X11's glext.h from setting them to 1. + (cherry picked from commit 7fe37137d826d1b698e87a5b35050dd02f0a4d4b) + +commit 3be80bd98357cf362aa9a004d1292e5167d83a17 Author: Peter Hutterer -Date: Mon May 11 12:51:40 2009 +1000 +Date: Fri Aug 28 16:20:59 2009 +1000 - dix: ensure Activate/DeactivateGrab has a valid value. + Xi: silence compiler warning "type may be used uninitialized" - Xephyr doesn't manually set Activate/DeactivateGrab for new devices, - resulting in a NULL-pointer dereference later when a grab is activated. - Avoid the segfault by ensuring that the pointer is always valid. + GrabKey and GrabButton are only called from XI/XI2 code. Set type to -1, + just in case. Signed-off-by: Peter Hutterer - (cherry picked from commit 6f9e22049862ee9ac7f604411d005d8bb1b2dd1c) - - Signed-off-by: Keith Packard -commit bd94c7c986aed4496cd4e8141bb30c3e4412f1f4 -Author: Alan Coopersmith -Date: Tue May 12 16:11:01 2009 -0700 +commit 24716b9254fa7d609792596723a192bb044a7d3f +Author: Eamon Walsh +Date: Fri Aug 28 22:52:48 2009 -0400 - Resync COPYING file with notices in code base as of xorg-server-1.6.1 + xace: fix up access modes in dixLookupDrawable calls from dri2. - Remove notices for code no longer in tree (Xprint, Xgl, kdrive, cfb, etc.) - Add/update notices for new/changed code in tree + Referencing a screen through a drawable only requires GetAttr access. + Treat dri2 drawables as child windows (Add/Remove access). + Treat getting buffers as intent to read/write the drawable. - Signed-off-by: Alan Coopersmith - (cherry picked from commit b746a00cffca5c553b607a8e9c1074294a23b443) + Signed-off-by: Eamon Walsh + +commit 0f3a64c3a5bce6cf3f00fe42cc7d1d3e69822945 +Author: Eamon Walsh +Date: Thu Aug 27 15:11:12 2009 -0400 + + Add DRI2 requests to protocol.txt - Signed-off-by: Keith Packard + Signed-off-by: Eamon Walsh -commit 597747c6551cd67487069415297e5eb441038321 -Author: Jeremy Huddleston -Date: Sat May 9 11:42:17 2009 -0700 +commit 3d17c4f6e1538986fe7b1f17614d76e28f2d1e11 +Author: Adam Jackson +Date: Fri Aug 28 12:12:52 2009 -0400 - Fix a couple off-by-one array boundary checks. + EDID: Vendor detailed blocks aren't worth X_WARNING about + +commit 2c1a845521a31f08938b0f8d6e38835ce127c94a +Author: Adam Jackson +Date: Fri Aug 28 12:09:57 2009 -0400 + + EDID: Print 1152x864 in established timings, not x870 - Error: Write outside array bounds at Xext/geext.c:406 - in function 'GEWindowSetMask' [Symbolic analysis] - In array dereference of cli->nextSib[extension] with index 'extension' - Array size is 128 elements (of 4 bytes each), index <= 128 + The spec says x870, but we actually use x864 because that's a real DMT + mode and x870 isn't. This might or might not be wrong, but we should at + least tell the truth. + +commit 2a806d7fa372e28d039761c9b4087cf812e8e46b +Author: Tiago Vignatti +Date: Fri Aug 28 16:05:04 2009 +0300 + + os: remove unused -cursor option - Error: Buffer overflow at dix/events.c:592 - in function 'SetMaskForEvent' [Symbolic analysis] - In array dereference of filters[deviceid] with index 'deviceid' - Array size is 20 elements (of 512 bytes each), index >= 0 and index <= 20 + Signed-off-by: Tiago Vignatti + +commit 9040dab76182d1a019ca7fef7b29733d2c199e61 +Author: Tiago Vignatti +Date: Fri Aug 28 15:50:50 2009 +0300 + + xfixes: minor clean ups on createInvisibleCursor() - Error: Read buffer overflow at hw/xfree86/loader/loader.c:226 - in function 'LoaderOpen' [Symbolic analysis] - In array dereference of refCount[new_handle] with index 'new_handle' - Array size is 256 elements (of 4 bytes each), index >= 1 and index <= 256 + - unused return value + - no reason to declare static variable given the function is just called + once + - no reason to declare different type and cast it after. - These bugs were found using the Parfait source code analysis tool. - For more information see http://research.sun.com/projects/parfait + Signed-off-by: Tiago Vignatti + +commit 80ed8096f9b8e974b556a6c9f3b600fb71b994c3 +Author: Tiago Vignatti +Date: Fri Aug 28 15:33:19 2009 +0300 + + render: delete unused headers declaration - Signed-off-by: Alan Coopersmith - Signed-off-by: Adam Jackson - Acked-by: Peter Hutterer - (cherry picked from commit b680bda34da130ce408783f04214771471e41e8d) - (cherry picked from commit 04c9e80f083659e63cffec8969fb3a0cfc551a97) + Signed-off-by: Tiago Vignatti + +commit f959b1e5485b93700c7da449a98182f5ce067ca2 +Author: Tiago Vignatti +Date: Fri Aug 28 15:30:21 2009 +0300 + + render: AnimCurInit and AnimCursorCreate shouldn't be _X_EXPORT - Signed-off-by: Keith Packard + Pointed by Peter Hutterer on xorg-devel ml. + + Signed-off-by: Tiago Vignatti -commit 10c06ddeefccc195e70adfed664e9488eeb53804 -Author: Peter Hutterer -Date: Thu Apr 9 15:40:24 2009 +1000 +commit e454f106dc65ecfacc154a1fa0810935022a8fee +Author: Dave Airlie +Date: Fri Aug 28 11:39:42 2009 +1000 - xfree86: restore default off for DontZap + xf86 ddx: add vga arbiter support. - Zapping is triggered by xkb these days, so note in the man page that it's the - Terminate_Server action. Since it's XKB, personal preferences towards or - against zapping should be achieved through xkb rulesets. - If Terminate_Server is not in the xkb actions, then we can't zap anyway and we - don't need a default of DontZap "on". + This adds support for using the libpciaccess interface for + vga arbitration support on top of a kernel which supports it. - This patch restores the old meaning of DontZap - disallow zapping altogether, - regardless of XKB's current keymap. - Ideally, this patch should be accompanied by b0f64bdab00db652e in - xkeyboard-config. + Currently patches are queued for kernel 2.6.32 in jbarnes + pci tree, and shipping in Fedora kernel. - Signed-off-by: Peter Hutterer - (cherry picked from commit 737b49199a05299486064e6e762cf2a2f6f95be6) + Co-authors: + Tiago Vignatti - Signed-off-by: Keith Packard + Signed-off-by: Dave Airlie -commit 966349f8e068fa120470549b0db9a8fcf88aca5b -Author: Michel Dänzer -Date: Fri May 15 15:48:37 2009 +0200 +commit 6fffcd5825454a7fe58ffbcfb219f007cf38e731 +Author: Peter Hutterer +Date: Thu Aug 27 13:43:15 2009 +1000 - EXA: Always damage glyph cache pixmap manually after uploading a glyph. + xfree86: require xf86dgaproto 2.0.99.1. - Signed-off-by: Michel Dänzer - (cherry picked from commit 7c8327f0a75087a85864256a9cea80dd4b86def5) + Signed-off-by: Peter Hutterer + +commit 2fba2eac0b4c8d07bdf7bea20ef75ff579621728 +Author: Peter Hutterer +Date: Mon Aug 24 11:23:23 2009 +1000 + + test: add a few tests for xtest device initialization. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit cc5e4b632aa99623ff577776039287c5950d921d -Author: Michel Dänzer -Date: Fri May 15 15:48:37 2009 +0200 +commit 903c3db1d1685bd855dceed9e7b92890743663e1 +Author: Peter Hutterer +Date: Mon Aug 24 09:48:00 2009 +1000 - EXA: Take GC client clip type into account for migration. + Xext: rename Xtst* to XTest* - Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18950 . + This patch corrects a misnaming of XTest-related functions. - Signed-off-by: Michel Dänzer - (cherry picked from commit 850675d4de4373e5df95507dbf2cd9affaaf54bc) + The extension itself announces itself as XTEST. Xtst is the library name + itself, but all library functions are prefixed by XTest. Same with the + naming in the server. - Signed-off-by: Keith Packard + - Rename all *Xtst* functions to *XTest* for consistency with the library + and in-server API. + - Rename the "Xtst device" property to "XTEST device" for consistency with + the extension naming. + - Rename the device naming to " XTEST device". The + default xtest devices become "Virtual core XTEST pointer" and "Virtual + core XTEST keyboard". + + Signed-off-by: Peter Hutterer -commit bbe0be1e459b0d5810a0e7b916cc890c440a4e21 -Author: Tomas Janousek -Date: Wed May 20 15:03:01 2009 +0200 +commit 8bfd23e144e51401e3756de9260a4811fcc59e91 +Author: Peter Hutterer +Date: Mon Aug 24 09:38:15 2009 +1000 - Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. - - In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and - .totalVModMapKeys were not initialized, contained random values and caused - accesses to unallocated and later modified memory, causing - XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of - nonzero values, resulting in writes past the end of an array in XkbSendMap. + input: move XTest device initialization into Xext/xtest.c - This patch initializes those values sensibly and reverts commits 5c0a2088 and - 6dd4fc46, which have been plain non-sense. + XTest devices are non-optional but nonetheless specific to the XTEST + extension. - Signed-off-by: Tomas Janousek Signed-off-by: Peter Hutterer - (cherry picked from commit 525aa17f804d37d1cfcbbf6b8e6cddb45e999b20) - - Signed-off-by: Keith Packard -commit 6056d429e7dcc37fe706dd7bc8d3429fdb635e14 -Author: Kristian Høgsberg -Date: Wed Apr 1 17:42:33 2009 -0400 +commit a95f80fa914678d360f6dfd2b58926193df6ea4a +Author: Peter Hutterer +Date: Mon Aug 24 09:26:56 2009 +1000 - Support setTexBuffer2 in AIGLX. + dix: use IsXtstDevice instead of the direct key lookup. - Fixes broken GLX_tfp, specifically, lets compositors ignore un-defined - alpha channel for pixmaps. - (cherry picked from commit 91b697efdefba125348dbcaf584ee51a7f8c9bf6) - - Signed-off-by: Keith Packard - -commit 7cae08d21952b02ef664641af6588ef6bd727bf8 -Author: Adam Jackson -Date: Mon Jun 29 11:16:16 2009 -0400 - - EDID: Fix timing class names to match the spec - (cherry picked from commit 5c1afac5eea1d8327c74342d12d082b75f0cebde) - -commit dbac41b624e4aa86a6a184b7ebb52bfdd367bbf0 -Author: Adam Jackson -Date: Fri Jun 19 12:42:07 2009 -0400 - - pci: Dump vendor/devices ids in the printed device list - (cherry picked from commit eb35402d0a5290e8a73d7d1e92f173294c364cc2) + Signed-off-by: Peter Hutterer -commit 6be19e8f43086fb4b7fb30a47b89b5f3eed798ef -Author: Ian Romanick -Date: Wed Apr 8 14:54:30 2009 -0700 +commit 16b7ebd7d876034edfe8f74562bd06e747879d79 +Author: Peter Hutterer +Date: Mon Aug 24 14:34:23 2009 +1000 - Use a #define instead of a magic number + xfree86: Remove xf86GetMotionEvents from public API. - The number of buffers is likely to change in the future, so having - this as a define is the right way to go. + This function was used as the default motion event queue API until + including XINPUT_ABI 2 (server 1.5). - Signed-off-by: Ian Romanick - (cherry picked from commit 03aebed519986c4dd03e02b3b3d4af1f64595ca7) + This API was broken with 1883485 in May 2008 (wrong casting of parameters) + and isn't in use by input drivers past ABI 3. + + Signed-off-by: Peter Hutterer + Signed-off-by: Tiago Vignatti -commit 540d5b87a4e24d85ec46620dfedd7bd7979180ea -Author: Jerome Glisse -Date: Mon May 11 22:52:46 2009 +0200 +commit af76bddd7a47092e2f0f85b2547c1cc74eb5cebc +Author: Jeremy Huddleston +Date: Sun Aug 9 16:13:32 2009 -0700 - DRI2: update DRI2 private drawable width & height according to X drawable - (cherry picked from commit f250eea2e90fc50bec5214c2f41132b95edc2c46) + XQuartz: Check NSINTEGER_DEFINED to make sure the NSInteger and NSUInteger types are defined. + (cherry picked from commit 36e02a8649c0a545084cce5fb2c5717277b9273c) -commit ec9f1ae32474bc0507a3c66e63bdf2835d467a34 -Author: Ian Romanick -Date: Mon Apr 27 15:11:10 2009 -0700 +commit 07c935b72fb14cb12f1cb5afbf8cc81f97086bac +Author: Jeremy Huddleston +Date: Tue Aug 25 20:11:38 2009 -0700 - DRI2: Force allocation of real-front buffer for non-windows as well - - For redirected rendering we end up with pixmaps (which the app thinks are - windows) that are double buffered. + XQuartz: Use applewmproto 1.4 updated headers. + (cherry picked from commit 203df06c0eb2dcd5adfa788a1ba9569650c15f9c) + +commit 0f613007cd43545eda40825bd74ada3e6e5f36f6 +Author: Jeremy Huddleston +Date: Wed Aug 5 17:43:29 2009 -0700 + + CheckWindowOptionalNeed: Ensure w->optional is set to avoid SEGFAULT - Signed-off-by: Ian Romanick - Tested-by: Pierre Willenbrock - (cherry picked from commit 0d9d3f3e361f769822caedccf4c2a58cc9930ecc) + If CheckWindowOptionalNeed is called consecutively (and the first removes optional), then + we will SEGFAULT. This can happen in XQuartz because ReparentWindow will call + pScreen->ReparentWindow which can DeleteProperty which will CheckWindowOptionalNeed... then + ReparentWindow will call it again later indiscriminantly. + (cherry picked from commit b608c864ccc59628bd33c033393121b61580460e) -commit 4fad615d689c61c6c3a000295a1fa755359737cb -Author: Ian Romanick -Date: Fri Apr 24 12:49:19 2009 -0700 +commit e7dd1efef408effe52d0bd3d3aa0b5d4ee10ed90 +Author: Keith Packard +Date: Tue Aug 25 18:07:00 2009 -0700 - DRI2: Implement protocol for DRI2GetBuffersWithFormat + Ensure that rotation updates happen frequently - This change implements the protocol for DRI2GetBuffersWithFormat, but - the bulk of the differences are the changes to the extension / driver - interface to make this function work. The old CreateBuffers and - DeleteBuffers routines are replaced with CreateBuffer and DeleteBuffer - (both singular). + The smart scheduler is designed to minimize scheduler overhead by + increasing the interval between WaitForSomething calls when a single + client is running. However, the software rotation code depends on + its BlockHandler being invoked for screen updates; the long delays + caused by the smart scheduler optimizations means that screen updates + can be delayed a long time as well. - This allows drivers to allocate buffers for a drawable one at a time. - As a result, 3D drivers can now allocate the (fake) front-buffer for a - window only when it is needed. Since 3D drivers only ask for the - front-buffer on demand, the real front-buffer is always created. This - allows CopyRegion impelemenations of SwapBuffers to continue working. - As with previous version of this code, if the client asks for the - front-buffer for a window, we instead give it the fake front-buffer. + The change is simple -- prevent the smart scheduler from increasing + the scheduling interval while any screen is using software rotation. - Signed-off-by: Ian Romanick - Reviewed-by: Kristian Høgsberg + Signed-off-by: Keith Packard -commit 98c3c21735197fbd2c8166c9bdabf055e14c9009 -Author: Ian Romanick -Date: Fri Apr 24 12:09:21 2009 -0700 +commit 1740cda7a37abc7d0a169ab4555b446adaa62211 +Author: Keith Packard +Date: Tue Aug 25 16:58:07 2009 -0700 - DRI2: Add interface for drivers to query DRI2 extension version + Perform rotation redisplay before calling driver block handler (which may flush rendering) - Signed-off-by: Ian Romanick - (cherry picked from commit 28ddfc88d8d547941c7f4713db527a3c2f9ec35a) + The rotation block handler uses regular driver rendering functions to + repaint the screen, if those functions queue commands in the driver, + it's important that the driver block handler be invoked after the + rotated image is drawn. + + Signed-off-by: Keith Packard -commit 4cb4c210c365fd40ad314e0707eb38811f240a12 -Author: Ian Romanick -Date: Thu Apr 16 12:10:34 2009 -0700 +commit 4aab05e3b3231f1ec9795a66a075d17a722634a7 +Author: Keith Packard +Date: Tue Aug 25 16:54:16 2009 -0700 - DRI2: Add missing front-buffer flush callback. + xf86_reload_cursors: fix cursor position to eliminate jumping after mode set - Signed-off-by: Ian Romanick - (cherry picked from commit d1e916d29be8b470cbc8cadcf6e83991fdbc5a9f) + xf86_reload_cursors restores the cursor to the correct position, but + that must adjust for cursor hot spot and frame before calling down to + the hardware function, otherwise the cursor jumps to the wrong + position until it is repositioned by the user. + + Signed-off-by: Keith Packard -commit aa13faef2b1464f808e04de9826c6b8b8b91ae89 -Author: Ian Romanick -Date: Wed Apr 15 11:13:48 2009 -0700 +commit 0f9ffc887ca1471e98df746253d9300e03e46a15 +Author: Peter Hutterer +Date: Mon Aug 24 15:10:52 2009 +1000 - DRI2: Don't leave empty entries in private->buffers + Xi: fix XIWarpPointer up for FP3232 as input coordinates. - This should fix bug #21130. + requires inputproto 1.9.99.902 - Signed-off-by: Ian Romanick - (cherry picked from commit de1e43181bd670877b994db221ad8a04b5d63324) + Signed-off-by: Peter Hutterer -commit d7277296ed7aea7bd41b3489d4ceef750d400206 -Author: Ian Romanick -Date: Thu Apr 9 14:38:24 2009 -0700 +commit 5e96945cf54136afdb80cc17f67611251d59205d +Author: Peter Hutterer +Date: Fri Aug 21 12:15:54 2009 +1000 - DRI2: Synchronize the contents of the real and fake front-buffers + Xi: fix swapping for XIWarpPointer and XIChangeCursor requests. - Signed-off-by: Ian Romanick - (cherry picked from commit 567cf67959b30432ae30f4851ec17b3a375ab838) + Signed-off-by: Peter Hutterer -commit 73b786f7e7f46d40bf3b039538540c2e25f45947 -Author: Ian Romanick -Date: Thu Apr 9 14:31:01 2009 -0700 +commit 990d204ef8074665763ad129d0b015b7ab3ae9ef +Author: Peter Hutterer +Date: Mon Aug 24 09:22:16 2009 +1000 - DRI2: Do not send the real front buffer of a window to the client + Xext: remove un-used extern of DeviceMotionNotify. - Signed-off-by: Ian Romanick - (cherry picked from commit f1a995d1496d73741731e32f475097c44a8da972) + Signed-off-by: Peter Hutterer -commit 32d250a881341ece8a1f1d78359adc1b265b5174 -Author: Ian Romanick -Date: Wed Apr 8 15:44:34 2009 -0700 +commit 80f18a73267bd3090e459de609a7006a21e6c649 +Author: Peter Hutterer +Date: Mon Aug 24 09:21:03 2009 +1000 - DRI2: Add fake front-buffer to request list for windows + input: move CorePointer/KeyboardProc declarations into header. - If a front-buffer is requested for a window, add the fake front-buffer - to the list of requested buffers. + The extern declaration in xichangehierarchy.c was broken anyway. + This fixes a crash on creating a new master device. - Signed-off-by: Ian Romanick - (cherry picked from commit aa2928325fe51d94a636dde9c090e8f54a311a12) + Reported-by: Maxim Levitsky + Signed-off-by: Peter Hutterer -commit db61eff891675aeaf2466c3529424de4621005dc -Author: Adam Jackson -Date: Fri May 22 12:01:55 2009 -0400 +commit b96823713129f641ee99306e3cadba8dfe21afa2 +Author: Peter Hutterer +Date: Mon Aug 24 09:06:29 2009 +1000 - EDID: Add modes from Established Timings III descriptor to mode pool + mi: include shmint.h if needed, silence compiler warning. - EDID 1.4, section 3.10.3.9 - (cherry picked from commit 99e22b86c5f1a3653f3caaf01368a777d2b208d0) + Signed-off-by: Peter Hutterer -commit ebca49e0fedcc1c536f1dee7c58cae9903e74fa2 -Author: Adam Jackson -Date: Thu May 21 10:20:48 2009 -0400 +commit 1b3859a49a3861517c9b34f6e8750f7ae0ff2b5d +Author: Peter Hutterer +Date: Fri Aug 21 12:29:39 2009 +1000 - EDID: Be more cautious about finding vendor blocks. - - Many old monitors zero-fill the detailed descriptors, so check for that - to avoid a useless warning like: + Xi: add swapping hook for XIGetFocus reply. - (WW) RADEON(0): Unknown vendor-specific block 0 - (cherry picked from commit a2c5ee36b21c2ee5c0468f1b251e74c1412dbecb) + Signed-off-by: Peter Hutterer -commit c643d24cdeaade8d7839691a3113c4d2d17be61e -Author: Adam Jackson -Date: Fri May 29 18:07:48 2009 -0400 +commit fe430d7d3b0a85fbea9e93171423688f76dc9e1e +Author: Peter Hutterer +Date: Fri Aug 21 12:09:32 2009 +1000 - vfb: Fix depth setup. + test: add XIQueryPointer protocol tests. - Initialize the depth corresponding to the root window before the - pixmap-only depths. Otherwise you end up with the root window depth in - the depth list twice, which is mildly confusing for clients and - catastrophically confusing for PanoramiXConsolidate(). - (cherry picked from commit 45530d16097459a756696e255ab4e72d6e51fbc4) + Signed-off-by: Peter Hutterer -commit 5cd5a01259ba349f1868ca4af04207cf120d69e4 -Author: Eamon Walsh -Date: Tue May 19 19:30:33 2009 -0400 +commit 285c88018ba4b3819500027c9b6a05b8c27ff2ee +Author: Peter Hutterer +Date: Fri Aug 21 11:38:42 2009 +1000 - xace: Fix a bad device access hook call. - - Add a proper access mode, and reverse the logic of the return value. - Zero ("Success") is returned on success from the hook calls. + Xi: correct length field for XIQueryPointer reply. - Signed-off-by: Eamon Walsh - (cherry picked from commit 3cea176d5abcb0f14eefbdcbe17fed0847524dd4) + Signed-off-by: Peter Hutterer -commit a9f85dcefbadfe44d8c58ad08430aaadb8c59d34 -Author: Eamon Walsh -Date: Mon May 11 15:27:46 2009 -0400 +commit e4ea91a02d6fac9dad844150c5d2fbe7dc9629b1 +Author: Peter Hutterer +Date: Fri Aug 21 12:12:05 2009 +1000 - xselinux: Relax ownership restriction on SetSelectionUseContext. - - Instead, clients should keep track of the selection instances they use. - (cherry picked from commit 0952d12717031e9dda9e48123bb922d0f4e81834) + Xi: allow XIQueryPointer requests for master pointers and floating slaves. - Signed-off-by: Eamon Walsh + Signed-off-by: Peter Hutterer -commit 0fbf6f30f771e60714fb3003a9bb1a6b79e50c6e -Author: Alan Coopersmith -Date: Thu Mar 26 22:22:32 2009 -0700 +commit 8e396f2b806496cdcac233cc731b0322735020c3 +Author: Peter Hutterer +Date: Fri Aug 21 12:11:19 2009 +1000 - Don't leak default font path when appending built-ins + Xi: fix swapping for XIQueryPointer request/reply handling. - Signed-off-by: Alan Coopersmith - (cherry picked from commit 66539cc05d0b017b9feb4a038499907810140623) + buttons_size is necessary as WriteToClient swaps the buttons_len field, + resulting in the wrong number of bytes being written later. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 773e4890b385a229b0919b4a249714d0bb7171a2 -Author: Alan Coopersmith -Date: Thu Mar 26 22:25:08 2009 -0700 +commit f1c856ef9073d9d02bc84ce1472883c8441a9758 +Author: Peter Hutterer +Date: Fri Aug 21 10:42:15 2009 +1000 - Don't leak canonical module name and patterns if module is built-in - - Signed-off-by: Alan Coopersmith - Acked-by: Peter Hutterer - (cherry picked from commit 1c101d75d4855b2698e3fc8d2dd662f20585812f) + test: fake initialization of a sprite trace and window locations - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 21f58a2b0d0d96492d2d7c7de1bd654ed0114279 +commit 58fd28f6b6bebab7f31c54e696f96d64ebb50f5a Author: Peter Hutterer -Date: Wed May 6 16:55:32 2009 +1000 +Date: Fri Aug 21 09:44:37 2009 +1000 - Xi: don't double-swap the XListDeviceProperties reply. + Xi: return deviceid as error value in XIQueryPointer. Signed-off-by: Peter Hutterer - (cherry picked from commit 50cc8adafca4ba3838d468278d6eb8a4692d2488) - - Signed-off-by: Keith Packard -commit b575af88d0e547a03b164f6f3b2d4b268b9ffc34 +commit b41dd4328bfb8a0981d299bb60f986a2bc55fd24 Author: Peter Hutterer -Date: Wed May 6 22:25:28 2009 +1000 +Date: Fri Aug 21 09:43:46 2009 +1000 - Xi: fix copy/paste error causing sizeof against wrong struct. - - This wrong check may cause BadLength to be returned to the client even if the - length is correct. + record: include recordproto.h, require recordproto 1.13.99.1 Signed-off-by: Peter Hutterer - (cherry picked from commit 8b583ca2b21155359c6255f406c96599b277c762) - - Signed-off-by: Keith Packard -commit 9c643b1e3ddc4ec9f1a924bd25f24df8536c7ea6 +commit 65354e5a698a5b527db09afc431110afba0e14b2 Author: Peter Hutterer -Date: Thu Apr 16 16:17:07 2009 +1000 +Date: Thu Aug 20 10:52:52 2009 +1000 - os: don't malloc memory in LogVMessageVerb. - - LogVWrite is limited to a buffer size of 1024, so we don't loose anything here - by truncating. This way we can use LogVMessageVerb (and xf86Msg and friends) - during signal handlers with the normal message types. + Xi: return BadDevice for changing device cursors on non-master pointers. Signed-off-by: Peter Hutterer - Acked-by: Alan Coopersmith - (cherry picked from commit 0e0642ee9466d3268476d0084a83a9d93a4aa555) + +commit ef75301854d41c6b11dd2742fa9d17a5de8a4cfa +Author: Peter Hutterer +Date: Thu Aug 20 10:52:24 2009 +1000 + + dix: FixUpEventFromWindow mustn't scramble non-device events. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 7cd596e0dd6b9c195d7e395c26bfb00ef544c525 -Author: Dave Airlie -Date: Wed Apr 15 18:26:06 2009 +1000 +commit c73cd3b265c301b8a54ffe484d6c696f2abefb46 +Author: Dan Nicholson +Date: Sun Aug 16 18:07:49 2009 -0700 - randr12: looking up these bits if randr isn't initialised is bad. + xfree86: Link libselinux with Xorg system libraries - When xinerama is enabled we don't get randr protocol, but the - driver might still want randr internals - (cherry picked from commit faf7dfa099f5b42a703313fbd1bf8afdad07a179) + Put the reference to -lselinux in XORG_SYS_LIBS so it isn't added as a + make dependency for libxorg.la. Otherwise, make goes looking for a file + -lselinux in the current directory, which it obviously won't find. - Signed-off-by: Keith Packard + Signed-off-by: Dan Nicholson + Tested-by: Justin P. Mattock -commit bc95f29441b3daa7b9d91bd3c2b3e502a3a8cc81 -Author: Alan Coopersmith -Date: Thu Apr 23 08:42:38 2009 -0700 +commit 9d8fc33cae2fee7777edd20658dbf6a3ffb3d557 +Author: Adam Jackson +Date: Thu Aug 20 16:56:04 2009 -0400 - Fix byte swapping of XF86VidMode{Get,Set}GammaRamp - - Fixes OpenSolaris Bug 8315: - Xorg segfaults when screensaver fades in cross-endian xdmcp session - + composite: Move screen init before extension registration. - Signed-off-by: Alan Coopersmith - (cherry picked from commit 7d0f7518c2235a9dc783029971259ddaada2db20) + Otherwise, you'd still advertise the extension even if no screens + actually supported it, and the first Composite protocol request would + probably crash. + +commit ae68708ebe24c4cdf8c5265e206f6913d9298f37 +Author: Adam Jackson +Date: Thu Aug 20 15:45:57 2009 -0400 + + xfree86: dump /proc/cmdline in the log on Linux + +commit 0b131a5cd91cea54240777c66a9cd385029e8cb2 +Author: Adam Jackson +Date: Thu Aug 20 15:28:57 2009 -0400 + + linux: Yet more malloc() avoidance for backtrace() - Signed-off-by: Keith Packard + Turns out, there's an initializer at the top of backtrace() that (on + some arches) calls dlopen(). dlopen(), unsurprisingly, calls malloc(). + So, call backtrace() early in signal handler setup so we can later + safely call it from the signal handler itself. -commit 3f0c73694b9ddc85b82a7a82a5d98fa8b18a01a8 -Author: Jon TURNEY -Date: Thu Feb 12 16:03:16 2009 +0000 +commit 792dee3854cbede64e17fdc4736831edad295706 +Author: Tiago Vignatti +Date: Wed Aug 19 18:20:54 2009 +0300 - Remove references to rgb.txt from files section of Xserver and Xorg man pages + xfree86: remove bus state change notification callback - The references to this file in the server code were removed in commit dda10c9066a660b647384179f82e1da8e063264f + No one is using bus notifications now. We hope that the kernel take care of + this properly. - Signed-off-by: Jon TURNEY - (cherry picked from commit d0dd649035fc3698c5b436f9d9d248116aa106a3) + For other not-so-urgent-notifications (ACPI wakeups, etc) we can just register + a handler on server's scheduler (using xf86AddGeneralHandler). And for + external applications, the "trend" is to use HAL to kick notifications. So + we're already provided of enough notification schemes. - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti + Signed-off-by: Aaron Plattner -commit 78eb366c65a953bbc059a989a92dfe28fbe1ae29 -Author: Jon TURNEY -Date: Thu Feb 12 16:02:17 2009 +0000 +commit eb031d4013d36f6aef4aba45840762ae8635cc13 +Author: Adam Jackson +Date: Wed Aug 19 15:42:34 2009 -0400 - Remove long-gone '-co' option from Xserver man page + linux: hand-roll a backtrace printer instead of using backtrace_symbols - The '-co' option was removed in commit dda10c9066a660b647384179f82e1da8e063264f + Why? Because backtrace_symbols calls malloc, which you can't do from a + signal handler. Face? Palm. + +commit 75b9383d8a4c113ab3c6cfc1d5efcb5d9982a1bf +Author: Jesse Adkins +Date: Tue Aug 18 21:13:40 2009 -0700 + + xserver doesn't stop all connections to localhost - Signed-off-by: Jon TURNEY - (cherry picked from commit b0ad9e1ced9619f37acf77764c395c57b86cf463) + X.Org Bugzilla #23329: http://bugs.freedesktop.org/show_bug.cgi?id=23329 + Patch #28648: http://bugs.freedesktop.org/attachment.cgi?id=28648 - Signed-off-by: Keith Packard + I noticed in xserver at os/access.c that xorg tries to stop connections + to localhost by checking against the address 127.0.0.1. However, RFC + 3330 defines the localhost network as 127.0.0.0/8. This means that any + IPv4 address that starts with 127 is just another name for localhost. -commit 31536307703fcffa14a027ec777310c9962f816c +commit 2d34eace13c2016048c627c4e96c3b2399901078 Author: Alan Coopersmith -Date: Sat May 2 00:26:18 2009 -0700 +Date: Tue Aug 18 20:11:23 2009 -0700 - XkbSetNamedIndicator should ignore SD's without LED's + Sun bug 6872917: Xorg not querying /dev/fb when no xorg.conf exists - When ProcXkbSetNamedIndicator is called on a core device, and we - walk the slaves to set the LED's on each of them, ignore any slaves - that do not have either a KbdFeedbackCtrl or LedCtrl structure. + commit 48ee5558333bd324463b6994735cabb23de262ec (OpenSolaris VT support) + broke the autoconfiguration code in xf86AutoConfig.c that uses the + Solaris-specific VIS_GETIDENTIFIER ioctl on a frame buffer device like + /dev/fb by changing xf86Info.consoleFd from /dev/fb to a /dev/vt/* + device. - (This is much more critical in xserver-1.5-branch, where we walk - *all* devices, not just the slaves of the specified master, and - thus return failure when setting an LED on the Core Keyboard and - hit a xf86-input-mouse device with no LED's to set.) + This fixes it by reworking the code to split the console device + (/dev/vt/*, the vtXX CLI option) from the frame buffer device + (/dev/fb, -dev option) to allow both VT and autoconfig to work. - Signed-off-by: Alan Coopersmith - Acked-by: Peter Hutterer - (cherry picked from commit 557dbadf3be273255e8fdb12d9321f4e88bf2b65) + It also fixes the console device to use /dev/fb when VT's are not + supported instead of throwing a Fatal Error because it can't open + /dev/vt/0. - Signed-off-by: Keith Packard + Signed-off-by: Alan Coopersmith -commit 01f0210b2ba34f724aa221bbe6b567a5751781a6 -Author: Keith Packard -Date: Fri May 8 22:29:15 2009 -0700 +commit d225230148b3cdab3b32fce3abee26b818d4bab0 +Author: Jesse Barnes +Date: Tue Aug 18 12:15:32 2009 -0700 - xserver 1.6.1.901 + xfree86/linux: don't change VT perms unless we're running as root - Signed-off-by: Keith Packard + In non-setuid root installations, we shouldn't try to adjust VT/tty + ownership. It will fail, and shouldn't be necessary anyway (since + startup scripts or PAM should be handling perms for us in that case). + + Signed-off-by: Jesse Barnes -commit e21c9949ac456ba9b162b6244a17e68c5b8112a9 -Author: Pierre Ossman -Date: Tue Apr 28 09:34:55 2009 +0200 +commit 41884b8f4dfe4d931c64a6046adfefcc2b7646c2 +Author: Tiago Vignatti +Date: Tue Aug 18 15:47:56 2009 +0300 - dix: fix calculation of number of fake KeyRelease events + xfree86: remove unused code (xf86Configure.c) - Signed-off-by: Pierre Ossman - Signed-off-by: Keith Packard + The xorg.conf generator was not assigning correctly the primary device + ("bootable") as screen zero. So just skip this kind of routines for now. + + Signed-off-by: Tiago Vignatti -commit 3b1ff33587458bad45777b8eb74b81c3e55987ad -Author: Pierre Ossman -Date: Tue Apr 28 12:29:07 2009 +0200 +commit 097376266f256e3ae37a16b343ed1e3441a8f003 +Author: Tiago Vignatti +Date: Tue Aug 18 13:13:57 2009 +0300 - Xi: don't send XKB mapping notifications when XKB is disabled + xfree86: remove unaffected code (xf86Configure.c) - Signed-off-by: Pierre Ossman - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti -commit 4b702526dec35f5cfe5c6baec6a77c02c95c2867 -Author: Peter Hutterer -Date: Wed Mar 25 13:08:27 2009 +1000 +commit dd8960a9f37fbef65cb99e058c3772edfda7b6db +Author: Tiago Vignatti +Date: Tue Aug 18 12:53:47 2009 +0300 - dix: ignore non-pointer events in XineramaCheckMotion (#20557) + xfree86: remove stupid macro (xf86Configure.c) - Note that deviceKeyButtonPointer and keyButtonPointer have the same wire - layout, so we only need to check for event types. + It was confusing more instead helping. - X.Org Bug 20557 + Signed-off-by: Tiago Vignatti + +commit 4ec7667bb17839bd4ec11091c75ecfff317fc96c +Author: Tiago Vignatti +Date: Tue Aug 18 12:33:35 2009 +0300 + + xfree86: remove wrong commentary - Signed-off-by: Peter Hutterer - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti -commit fdbb6fd3d3c0ce7078f8faaf089af51cc36cbcb3 -Author: Jesse Barnes -Date: Mon May 4 15:38:22 2009 -0700 +commit 2e8c2b8ae6a092871838b7cceaaf4a7590bce1d3 +Author: Tiago Vignatti +Date: Tue Aug 18 12:28:15 2009 +0300 - Don't prepare outputs & crtcs if set_mode_major is present + xfree86: header clean up (xf86Configure.c) - A driver with this hook will take care of preparing the outputs & crtcs, - so calling the prepare functions will just cause unnecessary flicker. + Signed-off-by: Tiago Vignatti + +commit 2df414a33321ae772af1e7e52c36aec222bb3c8f +Author: Tiago Vignatti +Date: Tue Aug 18 12:14:27 2009 +0300 + + xfree86: reorganize xf86Configure.c - Fixes bug #21077 - (cherry picked from commit 94648bb797d94b025746c60679c584e5be2fae28) + No semantical changes. Only code moved around. - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti -commit eac2b3658aacc8a64dc3c0fd7cc8fd77abcc59af -Author: Julien Cristau -Date: Wed Apr 22 20:01:49 2009 +0200 +commit 113e66a1ffe2a43c4d1c92a7d78ca43b4db58822 +Author: Tiago Vignatti +Date: Sun Aug 16 21:02:11 2009 +0300 - Bug#21324: Add quirk for Iiyama Vision Master 450 - - Reported-by: Jeremy Henty - Signed-off-by: Julien Cristau - (cherry picked from commit 0dfb97f15f591f85e079f5829c77d0c328d00464) + xfree86: remove unused PCI header - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti -commit b3c42e6450b0af97ead4f410983c803a959e1d04 -Author: Tormod Volden -Date: Wed Apr 1 19:32:21 2009 +0200 +commit 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066 +Author: Richard Hughes +Date: Mon Aug 17 09:15:32 2009 +0100 - xfree86: edid quirk for Philips LCD LP154W01-TLAJ + Do not reset lastDeviceEventTime when we do dixSaveScreens - This panel reports its vertical size in cm. + When we turn off DPMS with DPMSModeOff and do dixSaveScreens, don't reset the + event time else session clients using IDLETIME will be reset. - X.Org bug#21000 + Signed-off-by: Peter Hutterer + +commit 4098ad72d00e65d142fb9fe8a1194be35338508b +Author: Eamon Walsh +Date: Sun Aug 16 00:06:10 2009 -0400 + + xace: fix access mode in dixLookupWindow within several RandR calls. - Signed-off-by: Tormod Volden - Signed-off-by: Julien Cristau - (cherry picked from commit b1dab580bdfb4acfe3feddeda6e760098ec4922a) + Referencing a screen using a window only requires GetAttr access. - Signed-off-by: Keith Packard + Signed-off-by: Eamon Walsh -commit 96eede556ac9f95204fa54287f74794acdbf3a2b -Author: Julien Cristau -Date: Wed Dec 24 14:17:27 2008 +0100 +commit d4b8f7602b5e266a0ebd3b1ba23724362cc7de3a +Author: Eamon Walsh +Date: Mon Aug 10 18:39:04 2009 -0400 - Add RandR 1.3 requests to protocol.txt - (cherry picked from commit 4f86ee61a4abf7a29e565d095aa08abd0ca9dc66) + xace: fix access mode in dixLookupWindow call within ProcUngrabKey. - Signed-off-by: Keith Packard + Referencing a window (as grab-window) only requires GetAttr access. + + Signed-off-by: Eamon Walsh -commit b7b520e3a93fde5579c48eabb9b8c694a7dfbcb1 -Author: Julien Cristau -Date: Wed Dec 24 14:23:37 2008 +0100 +commit 6d2f4e487869f10de4a62365b4d6de036c752ab8 +Author: Eamon Walsh +Date: Mon Aug 10 18:36:53 2009 -0400 - Add XI 1.5 event and requests to protocol.txt - (cherry picked from commit 063833f3a6d9f8f657e3de309c8d6d5c3d606513) + Add XI2 requests to protocol.txt - Signed-off-by: Keith Packard + Signed-off-by: Eamon Walsh -commit 0df12a3f01c953c0908b4b53a93fd3a5c704f69b -Author: Ander Conselvan de Oliveira -Date: Mon Apr 6 16:01:20 2009 -0300 +commit 73975ef3a39ce522c6206ca800ed175fbf851dcf +Author: Eamon Walsh +Date: Mon Aug 10 18:34:07 2009 -0400 - xfree86: Remove device from inputInfo.devices if ActivateDevice failed. + xselinux: Allow per-client device create contexts. - After the call to xf86ActivateDevice, the new device will be added to - inputInfo.devices. However, if the subsequent call to ActivateDevice - fails, the correponding InputInfoRec for the device is deleted but an - entry still remains in inputInfo.devices. This might lead to a server - crash later on (on InitAndStartDevices for instance) when the device - control proc would be called for an invalid device. - (cherry picked from commit efa31092d6703397121a0ada4f7205a8ecad3d3d) + The previous behavior was to set the serverClient's value which was used globally. + This is in support of XI2, where clients can create device pairs directly. - Signed-off-by: Peter Hutterer - Signed-off-by: Keith Packard + Signed-off-by: Eamon Walsh -commit 24dc7694a2ba72d45cda7720aeaec8350930edc3 -Author: Michel Dänzer -Date: Fri Feb 6 11:37:53 2009 +0100 +commit 66e32d252cffcd4fe7d505f1c211253f23c5002c +Author: Eamon Walsh +Date: Mon Aug 10 18:33:05 2009 -0400 - EXA: Guard empty pending region warning by DEBUG_MIGRATE. + xselinux: Add more new device permissions for XI2. - It isn't very useful yet while the damage layer calls us for empty operations, - mostly confuses users. - (cherry picked from commit 3948b523893d3d44b6a088340c4252e969613769) + Reflects the ability of clients to create/destroy device objects. - Signed-off-by: Keith Packard + Signed-off-by: Eamon Walsh -commit 5198ff6f86e4796819c0d1f742de57a69228c93b -Author: Michel Dänzer -Date: Fri Feb 27 16:37:28 2009 +0100 +commit 1f4ea22a20fdd30412a259a87eee133155e1163d +Author: Rémi Cardona +Date: Mon Aug 17 11:33:24 2009 +0200 - EXA: Handle separate alpha maps properly in Composite fallback, take two. + configure: fix help string after Xnest default build was changed - Preserve the EXA ABI by introducing a new driver flag EXA_SUPPORTS_PREPARE_AUX. - If the driver doesn't set this flag, we have to assume any Prepare/FinishAccess - driver hooks can't handle the EXA_PREPARE_AUX* indices, so we move out such - pixmaps at PrepareAccess time. + Signed-off-by: Rémi Cardona + +commit 7e37e7c50e4fdcb53296a99d90af3d90081ce9bb +Author: Peter Hutterer +Date: Tue Aug 11 14:39:50 2009 +1000 + + test: add protocol tests for DeviceChangedEvents - Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . + Signed-off-by: Peter Hutterer + +commit 2851f04cb2f6e5c30267f733d867c86d4e69a485 +Author: Peter Hutterer +Date: Tue Aug 11 16:27:40 2009 +1000 + + dix: rework DeviceChangedEvents a bit. - Signed-off-by: Michel Dänzer - (cherry picked from commit 4cfb36f6ad2df01215028fec48d99239a0e4496b) + DCEs are now processed when sent throught the master device, not when sent + through the slave device. This includes a removal of some un-used (or partly + used) fields in the DCE itself to something more self-explanatory. - Signed-off-by: Keith Packard + TODO: if a device has events queued and its attachment is changed, the DCE + is silently dropped now. Instead, it should be generated as soon as the + first event after the attachment is sent. + + Signed-off-by: Peter Hutterer -commit 199bb367152d68e784dfbec79ab9b70540d83fc2 -Author: Ian Romanick -Date: Mon Apr 20 18:20:52 2009 -0700 +commit c1d901d723c3bee523736eacc15b44a7dff484fe +Author: Richard Hughes +Date: Fri Aug 14 11:44:35 2009 +0100 - DRI2: Send the version the code actually supports + Don't reset the lastDeviceEventTime when doing DPMS actions - This prevents building an older server with a new dri2proto.h from - resulting in a DRI2 extension module that lies about the version it - supports. + When we change the DPMS mode, don't play games with the last event time as + this breaks applications using IDLETIME to turn the backlight off after a + preset time. - Signed-off-by: Ian Romanick - (cherry picked from commit 44227ef1b77467c76147b9bf79bdd0e6305a522a) + This patch fixes gnome-power-manager and xfce-power-manager - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 11db545a86c8933c638a0bc1fcd4f2c65279f617 -Author: Eamon Walsh -Date: Thu Apr 16 22:48:11 2009 -0400 +commit dca4de72d375c4b9bcdd25b151e291a77a5b06cc +Author: Peter Hutterer +Date: Sat Aug 15 20:17:20 2009 +1000 - security: Grant untrusted windows remove access on all windows. + dix: fix potential use of unused variable 'mask'. - This allows untrusted clients to destroy their own windows when they - have been reparented by a trusted window manager. - (cherry picked from commit 4559d2ace6ac55fe361f572ded0769cdd1f3b545) + Signed-off-by: Peter Hutterer -commit 5d48f288eccb57dfe1751946c9d60dbd3ac0129a -Author: Eamon Walsh -Date: Thu Apr 16 22:39:54 2009 -0400 +commit 978b65bce14598f2d42ca0177ea58fef71fc12c5 +Author: Peter Hutterer +Date: Fri Aug 14 15:05:42 2009 +1000 - security: Fix a crash caused by wrong ordering of format arguments. - (cherry picked from commit 3481b32ab971c41cb972f6819ae049f3e9f7033b) + include: XInputExtensionInit doesn't need to be exported. + + Signed-off-by: Peter Hutterer -commit 93e0a648138e569087fc6e07c1a28abfa92a4dde -Author: Eamon Walsh -Date: Thu Apr 16 22:33:12 2009 -0400 +commit 3989dc1d34f116f30915632cc5286937392e180a +Author: Peter Hutterer +Date: Tue Aug 11 16:20:20 2009 +1000 - security: Revert behavior of extension access for compatibility. + dix: use the XI2 defines for class types. - Previously, three extensions were defined as "trusted" by the extension: - BIG-REQUESTS, XC-MISC, and XPrint. No other extensions were permitted - to be used by untrusted clients. + Doesn't matter really, they have the same values anyway. - In commit 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 this was changed for - some reason. Return to the old, compatible behavior. - (cherry picked from commit 6045506be0cebca4ebbe943ae77f020aafa703d4) - -commit cd321badf0c185854b3e0c038f3851a3ac7864ea -Author: Adam Jackson -Date: Tue Apr 14 16:08:11 2009 -0400 - - xserver 1.6.1 + Signed-off-by: Peter Hutterer -commit fcffa3a178683ede0d15656c432fccf23ebca5ef +commit fe045820f1fb33991e8bff5c6e192097caa85727 Author: Peter Hutterer -Date: Wed Mar 25 15:51:43 2009 +1000 +Date: Mon Aug 10 15:34:00 2009 +1000 - Xext: set POINTER_SCREEN flag in XTestFakeInput if necessary. (RH #490984) + input: move DeviceChangedEvent conversion into eventconvert.c - The POINTER_SCREEN flag must be set explicitly for XTest core events to avoid - out-of-range events when the lastSlave was an SD with an explicit axis range. - Device events sent through XTest don't need this flag, they are expected to be - in the valuator range of the device anyway. - - Red Hat Bug 490984 + The version in eventconvert.c was half broken and for some reason we ended + up with a second version in exevents.c (which works). Move it over to where + it belongs and call EventToXI2 instad of having a custom function for it. Signed-off-by: Peter Hutterer - (cherry picked from commit 603db34337a61754e0c5f71525011d10eab78411) -commit 6ff60c626141771b365d557fe64bc93f200d1c9c -Author: Kristian Høgsberg -Date: Thu Apr 9 13:16:37 2009 -0400 +commit 33eb6f70816921abc5da62e434f40e78d672274e +Author: Peter Hutterer +Date: Fri Aug 14 13:49:58 2009 +1000 - glx: Fix drawable private leak on destroy + include: Unexport most symbols from exevents.h. - When a drawable goes away, we don't destroy the GLX drawable in full, - since it may be current for a context. This means that when the drawable - is destroyed in full later, the backend doesn't get a chance to - destroy resources associated with the drawable (the DRI2Drawable). + And shuffle them around so that the part used by drivers is up the top and + commented. - With this patch, we destroy the GLX drawable in full when it goes away - and then track down all contexts that reference it and NULL their - pointers. + Also, woo, the sdksyms script doesn't like declarations with return type and + function name on the same line... - (cherry picked from commit 7b6400a1b8d2f228fcbedf17c30a7e3924e4dd2a) - -commit 50894e13545538ed93f20823f7ba81d1ab8906bb -Author: Eamon Walsh -Date: Thu Apr 9 02:48:04 2009 -0400 - - xselinux: Don't BadAlloc in List* requests if there are no items to list. - (cherry picked from commit 682d7b55699cacbb2dbcd84a5e816bf6e2d2f02a) + Signed-off-by: Peter Hutterer -commit feb01d7d6e98fa77f9069b08aaa9727368ef3aaf -Author: Eamon Walsh -Date: Wed Apr 8 15:10:16 2009 -0400 +commit 1373c2ea877b562076a4a3c97e8e4f999c977217 +Author: Dave Airlie +Date: Sat Aug 15 12:14:26 2009 +1000 - xselinux: Don't require incoming context strings to be null-terminated. - (cherry picked from commit e8b324102f6e21ae2b8292a6f50d016dd6254dd6) + exa: clarify createpixmap2 new pitch return -commit b7dc7374bbcb708eee6eec26ff141619f914d8eb -Author: Eamon Walsh -Date: Mon Mar 9 17:28:40 2009 -0400 +commit 48ee5558333bd324463b6994735cabb23de262ec +Author: Aaron Zang +Date: Mon Aug 3 23:21:39 2009 -0700 - Correct access mode in call to dixLookupWindow() within RRSelectInput. + Add new VT support for OpenSolaris & future Solaris releases - Reported by Alan Coopersmith. - (cherry picked from commit 6544490700051b3b5e88ac1890d71b35634c9100) + Signed-off-by: Aaron Zang + Signed-off-by: Alan Coopersmith -commit 38b0f9edca80e43b4c8c364cfebc25c835d24cbd -Author: Adam Jackson -Date: Fri Mar 27 16:49:45 2009 -0400 +commit 613e76ff9055d8ac2b1af1130668180646a9e14c +Author: Alan Coopersmith +Date: Mon Aug 3 21:38:51 2009 -0700 - Fix distcheck with dolt + Remove support for Solaris x86 releases older than Solaris 8 + + If you want to run a pre-1999 kernel, you'll need a pre-2009 X server + + [Some pre-Solaris 8 VT support is left by this patch to allow reuse by + the new Solaris VT support that follows in the next patch.] + + Signed-off-by: Aaron Zang + Signed-off-by: Alan Coopersmith -commit 509986d6f0255588f37446173ea76640895c9886 -Author: Adam Jackson -Date: Fri Mar 27 16:28:26 2009 -0400 +commit 6c292d17053eb2a7e7054e51210f423dbc0cb7e8 +Author: Peter Hutterer +Date: Fri Aug 14 11:48:54 2009 +1000 - Fix Changelog generation + dix: update the sprite trace for all masters && floating slaves (#23257) + + When the windows are restructured, CheckMotion needs to be called for all + masters and floating slaves to update the spriteTrace. + + X.Org Bug 23257 + + Tested-by: Thomas Jaeger + Signed-off-by: Peter Hutterer -commit 0f9fd02dacf4363c0efd69825bc804bfb55599bf -Author: Adam Jackson -Date: Mon Mar 16 13:24:48 2009 -0400 +commit 49046088f10cceaea7da97401d742d3fb59371f5 +Author: Peter Hutterer +Date: Fri Aug 14 09:48:45 2009 +1000 - selinux: Add support for avc_acquire_netlink_fd() + config: don't shutdown the libhal ctx if it failed to initialize (#23213) - Requires libselinux 2.0.79 or newer. Without this, libselinux will - check for policy updates on the netlink socket on basically every policy - lookup. Statistically speaking, they never happen, and the check - translates to at least one more syscall on basically every operation. + Regression introduced by b1c3dc6ae226db178420e3b5f297b94afc87c94c. + Shutting down the libhal_ctx if the init failed may cause an abort. + This can happen if hald is not yet running at server startup. - Instead, take control of the fd from the library, and check it in - WakeupHandler if it polls readable. - (cherry picked from commit 3992dd38caf33b343affd8d732c94880d1099dcf) + X.Org Bug 23213 + + Tested-by: Stefan Dirsch + Signed-off-by: Peter Hutterer -commit b3484c848040ae29b8ca1327d3b142db30c38387 -Author: Adam Jackson -Date: Sat Feb 21 19:56:20 2009 -0500 +commit 1545a120df6dffb5b84fe96c5a992357520b7c8d +Author: Dave Airlie +Date: Tue Aug 11 15:00:36 2009 +1000 - selinux: Don't bother relabeling resources that are being destroyed + exa: fix CreatePixmap2 to be useful for tiling. - Makes window destroy about 40x faster in Xvfb. - (cherry picked from commit b030f858f2f1ce1fd27a73ebf7f9ec5db541a668) + This adds a pitch return so that the driver can align the pitch to any + value it wishes and not just the one it gave to EXA at startup. -commit 08ac9140f6042ce3faa618613fc8443c92924a21 +commit db568f9eabf3450d8a023597ff007df355b13ea8 Author: Peter Hutterer -Date: Fri Feb 13 09:56:22 2009 +1000 +Date: Thu Aug 13 16:37:00 2009 +1000 - xkb: Fix wrong colour reference in XKB geometry copying. #20081 + Xext: fix up wrong conditions for negative sync transitions. - base_color and label_color need to reference the color in the destination, not - in the source. + If the counter had a value higher than the trigger value for a negative + transition, the trigger value did not get set. - X.Org Bug 20081 + The correct sequence of checks is: + if (positive transition) + if (counter value < trigger value) + set up trigger + if (negative transition) + if (counter value > trigger value) + set up trigger + + Red Hat Bug 501601 Signed-off-by: Peter Hutterer - Signed-off-by: Daniel Stone - (cherry picked from commit f5bf1fdaf36163d5c2f1b9b51df96326ebbb0e9c) -commit 124da1da5cd3ac85edd7f0e30f61ee842d49a6a4 +commit a3e50b05747cab92090ae7d7f4475cd61d3fcadf +Author: Pierre-Loup A. Griffais +Date: Mon Jul 27 20:58:44 2009 +0200 + + Add 4 missing 10bpc picture formats to the server format list. + + Signed-off-by: Aaron Plattner + +commit 36e24a6d93bd5aced4e566b80bf2d03555fab9ca Author: Peter Hutterer -Date: Mon Mar 9 08:59:01 2009 +1000 +Date: Thu Aug 13 10:50:26 2009 +1000 - Xi: don't crash on a NULL property name, just return None. + Xext: add missing return code check to ProcSyncDestroyAlarm - strcmp doesn't like NULL-pointers. + Introduced with 57aff88c7d0761e590806d07bee1c9410680c89f. Signed-off-by: Peter Hutterer - (cherry picked from commit 0d9a42dc0380d1583889b6b6521bd5a2451735d4) -commit ea9f51fd42ae0285aed707b7efa44c558dad4e4b +commit ce69a06aff934b2dcded8606cab079ac6465007c Author: Peter Hutterer -Date: Fri Dec 5 16:24:57 2008 +1000 +Date: Tue Aug 11 16:16:54 2009 +1000 - Xi: add XATOM_FLOAT to server-defined properties. + Xi: fix up broken DeviceChangedEvent swapping code + +commit b44d34d5fd0d8aaacb89121e8b4afba04f1dcc80 +Author: Peter Hutterer +Date: Mon Aug 10 15:32:59 2009 +1000 + + include: correct a copy/paste error in a comment. - This property is used to denote type float for input properties. Such - properties can be accessed easily through the XIPropToFloat() function. + Signed-off-by: Peter Hutterer + +commit c477ac8a151a28ba23f5c87e8f7affd6e82cfaa9 +Author: Peter Hutterer +Date: Mon Aug 10 15:15:02 2009 +1000 + + dix: re-name internal eventToClassesChanged to eventToDeviceChanged - Code originally written by Simon Thum. + DeviceClassesChangedEvents (where this name comes from) have been replaced + with DeviceChangedEvents. - Signed-off-by: Peter Hutterer - (cherry picked from commit a48c81dcdf569a3f634ac23e08d2491354de6a36) + Signed-off-by: Peter Hutterer -commit 6ad6b6f900e9c3a55e4ee509bdc9ff0ddec9a59a -Author: Peter Hutterer -Date: Wed Nov 19 15:50:57 2008 +1000 +commit af38f6790c4c8ba1e70f5c5ba3530ded85d6e372 +Author: Peter Hutterer +Date: Mon Aug 10 14:08:59 2009 +1000 - Xi: add XIPropToInt() auxiliary function. - - Converts an XIPropertyValuePtr to an integer, provided that type and format is - right. + test: add event conversion tests for XIDeviceEvents + +commit 3f2e4b9867b6877ee7be32b151fcaf221ef0812f +Author: Peter Hutterer +Date: Mon Aug 10 14:07:54 2009 +1000 + + Xi: add event swapping for XIRawEvents. - Code originally written by Simon Thum. + Signed-off-by: Peter Hutterer + +commit f3b2f9fb734ecfff6db9ae85b0d247856ede8112 +Author: Peter Hutterer +Date: Mon Aug 10 13:12:40 2009 +1000 + + Xi: fix event swapping for XIDeviceEvents. - Signed-off-by: Peter Hutterer - (cherry picked from commit 669f6810af9a89187d6149841925fe765f3988ff) + Signed-off-by: Peter Hutterer -commit 667865b9eb98ed73461028b3d38be19619712533 -Author: Adam Jackson -Date: Mon Mar 2 14:26:23 2009 -0500 +commit e46f02fa2de79261221b42ab73f9daa2ce8ac650 +Author: Peter Hutterer +Date: Mon Aug 10 09:50:16 2009 +1000 - randr: Fix thinko in xf86TargetPreferred + Xext: allocate a separate event list for XTest events (#23100) - The only-one-output case would only work right if that also happened to - be the zeroth output. Oops. - (cherry picked from commit 8a6ed44a8b2fc5f14729dc54fec17607ced03859) + XTest event processing may be interrupted by a SIGIO. If Xtest uses the same + event list as the rest of the server, this list may be overwritten + in-flight. + + X.Org Bug 23100 + + Signed-off-by: Peter Hutterer -commit f469726fec502ce29999eda6919c3c3d26c127d8 -Author: Eric Paris -Date: Tue Mar 3 13:15:39 2009 -0500 +commit 8483b08152104dc619d9e44f877d2687d866355e +Author: Peter Hutterer +Date: Fri Aug 7 16:11:37 2009 +1000 - This patch changes all places in the X code to use _raw functions. The - X server should never see, translate, or deal with a munged context. - Display managers which show contexts to the user should take care of - translating these to human readable form. - (cherry picked from commit c7cf926d25523d5d0d8e5c83671c901660070d71) + test: add focus and enter conversion testing. + + Doesn't actually convert anything, but verify the expected behaviour. -commit 60c161545af80eb78eb790a05bde79409dfdf16e -Author: Keith Packard -Date: Wed Feb 25 12:05:44 2009 -0800 +commit 59dc59a72ffd4cbc4df207bc688c92bb4863e8a9 +Author: Peter Hutterer +Date: Fri Aug 7 11:23:33 2009 +1000 - X server version 1.6.0 + test: add XI2 eventconversion test for raw events. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit e9a9f807971b8fb62b957c9d54b4aea7fb0f96ca -Author: Maarten Maathuis -Date: Fri Jan 30 19:32:33 2009 +0100 +commit 10d7948e0360860e1e9633dca39f646d492e73bf +Author: Peter Hutterer +Date: Fri Aug 7 10:17:14 2009 +1000 - exa: kill of exaImageGlyphBlt + test: fix build error introduced by new AllocDevicePair API - - It serves no obvious purpose, yet it directly accesses many fb - symbols. - (cherry picked from commit 5cc67ae94c066dcac78072ad8a819c3b602d8bab) + Signed-off-by: Peter Hutterer -commit 10e0603fb989d1e6b2675ef5ca8223777b4921e6 -Author: Jeremy Huddleston -Date: Tue Feb 24 23:12:57 2009 -0800 +commit 3f161a0aac39fbdeef393a17269486b8dace4672 +Author: Peter Hutterer +Date: Mon Aug 10 14:14:35 2009 +1000 - XQuartz: Re-enable support for capslock - (cherry picked from commit 4901b8147e593d26d7a31a9b73a201254b948916) + Xi: un-statify XI2EventSwap, it is needed for tests. + + Signed-off-by: Peter Hutterer -commit e96921ca954ff0d3de8a69cea085aac2d43b0a2e -Author: Michel Dänzer -Date: Mon Feb 23 16:49:51 2009 +0100 +commit 55e1ea08d03d89ecc0f2db7652a4d15567204696 +Author: Peter Hutterer +Date: Mon Aug 3 16:46:11 2009 +1000 - DRI1: Make DRICreateDrawable return TRUE for pixmaps. + Xi: get device changed data from DeviceChangedEvents, not the device (#23100) - GLX_EXT_texture_from_pixmap was broken since commit - a26c77ff432d2e85a2665fc36fca25143460c476 ('glx: fix retval checks when failures - occur for drawable creation.') + If a new device posts an event while the DCE is in the queue, getting the + data from the device may result in invalid memory access. - Signed-off-by: Michel Dänzer - (cherry picked from commit ef320bdd5ec3419abba77041d3a4d96a3ff87563) + X.Org Bug 23100 -commit 584f46b81c6ed126014e963cb4ea40f83014f1c7 -Author: Alan Coopersmith -Date: Thu Feb 19 13:57:28 2009 -0800 +commit 8ce4fde76fdf747fd3e00836c9c9c542e516ae9a +Author: Matt Turner +Date: Wed Aug 12 14:45:13 2009 -0400 - Add Extensions section to xorg.conf man page + Fix build on Alpha + +commit a400dbb38f93030d51afe806b4b20d5ef501c855 +Author: Colin Harrison +Date: Wed Aug 12 17:48:36 2009 +0100 + + Xming: Add NET_WM_ICON to native icon conversion - Extensions section was added in X11R6.8.0 and documented in the release notes: - http://www.x.org/archive/X11R6.8.0/doc/RELNOTES2.html#3 - but never made it into the man page. + fd.o bugzilla #4491 + originally from a patch by Joe Krahn - Also fix a bonus typo. + Convert a NET_WM_ICON to a native icon by converting to a native + bitmap and then using CreateIconIndirect() - Signed-off-by: Alan Coopersmith - (cherry picked from commit ab61033700b5383a7a15370dd054eaa80e72e811) + Don't use icon alpha on Windows 2000 or if display isn't 32-bit, convert + alpha channel to a 1-bit transparency mask using a threshold value + + Fix warning in winScaleXBitmapToWindows() about signedness of *iconData + + Signed-off-by: Jon TURNEY -commit ae7991b16d7fefb4335b05f951a3228cef102683 -Author: Keith Packard -Date: Wed Feb 25 10:14:36 2009 -0800 +commit 211511f150ce189681aff176c311fa8f312517e9 +Author: Soren Sandmann Pedersen +Date: Tue Aug 11 14:40:42 2009 -0400 - Pre-clip panning coordinates to keep crtc within panning region + Disable the out-of-bounds workaround in pixman. - There is a separate panning region check, but that doesn't work under - transformation, so just pre-clip the mouse coordinates when computing the - panning offsets. This leaves the case where panning constants are changing - unresolved. + This workaround was necessary for older X servers, but now fb should + be using correct coordinates. - Signed-off-by: Keith Packard - (cherry pick from commit c090f5514d28e1602a6ebbe7c909e98a0e3374d7) + Also bump pixman requirement to 0.15.20. -commit e59aa804df8a39541aa3224a5e688b819196070c -Author: Keith Packard -Date: Wed Feb 25 10:12:23 2009 -0800 +commit 93d9646c713336e03c135204c061f561d3654e23 +Author: Tiago Vignatti +Date: Sat Aug 8 20:18:10 2009 +0300 - RandR rotations and reflections offset by one pixel + mi: fix indentation - The matrix computation for rotation and reflection resulted in dropping a - row or column of pixels as the offsets used in the matrix computations used - width and height rather than width-1 and height-1. + mieq.c looks indented-wise now. Let's see how long it will take to someone + mess it again. - Signed-off-by: Keith Packard - (cherry picked from commit 77c7a64e8885696665556c9fbcb3cffb552e367a) + Signed-off-by: Tiago Vignatti -commit 9a59e7f304ab19c91738311bb9f1ec7709fc8847 -Author: Keith Packard -Date: Sun Feb 8 15:08:15 2009 +0100 +commit f9a2fff2248d7254958857677cabfea914ed4853 +Author: Tiago Vignatti +Date: Wed Aug 5 21:02:29 2009 +0300 - xf86CrtcShadowClear is unused. + mi: fix cursor warping screens - Remove this now that clearing is done by repainting with appropriate extend - modes. - Signed-off-by: Keith Packard - (cherry picked from commit 60a4f1368785d26a49a3ef6df829723ca154c154) + The server was processing ET_RawMotion type when the cursor was wrapping to + another screen and getting wrong valuator values. This fix such issue + considering only ET_Motion, ET_KeyPress, ET_KeyRelease, ET_ButtonPress and + ET_ButtonRelease types when the cursor detects a new screen, keeping the + "normal" processing of device events. - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti + Signed-off-by: Peter Hutterer -commit 369d7b22a9009e7054bd121484fa128c7a6d21f6 -Author: Keith Packard -Date: Thu Feb 5 11:36:54 2009 -0800 +commit d573cc46d3106824902ab4f926617bd9959af57c +Author: Maarten Maathuis +Date: Sat Aug 8 11:32:05 2009 +0200 + + exa: more safety + +commit 8b652435cd42929e2d187b353b3b20e798569356 +Author: Maarten Maathuis +Date: Sat Aug 8 10:35:01 2009 +0200 + + exa: minor cleanup + +commit a73f95aa93634cf7ba2c7c9274a046b2df2adca7 +Author: Maarten Maathuis +Date: Sat Aug 8 02:31:23 2009 +0200 - Make panning+transform be correctly driven by mouse + exa: Fix the broken upload fallback for "mixed" - Figuring out how to adjust the crtc origin to keep the mouse pointer within - the crtc is a bit of a trick + - Replace it with something wfb friendly while i'm at it. + +commit c029678bf7883b91f3c8095e764abbee246c9bb6 +Author: Julien Cristau +Date: Fri Aug 7 20:42:30 2009 +0200 + + configure.ac: drop dependency on fontenc - Signed-off-by: Keith Packard - (cherry picked from commit 63810aca31b962c93be4796883bde6ccb653e3a9) + Nothing in the server uses this anymore. + +commit 3943df7f76c1b4930fb7370d9d145cee96dd562b +Author: Maarten Maathuis +Date: Fri Aug 7 20:36:03 2009 +0200 + + exa: one can never be too careful + +commit 1548e8ae5d28ed0eb6057a1a19cfc84a78ef34dc +Author: Maarten Maathuis +Date: Fri Aug 7 20:04:53 2009 +0200 + + exa: fix a potential loophole in "mixed" - Signed-off-by: Keith Packard + - Always free sys_ptr before setting the pixmap to pinned. -commit c0a36197002c7de98f14dc98969409778d29dc50 -Author: Alan Coopersmith -Date: Tue Feb 17 18:48:52 2009 -0800 +commit e94c7c42ce9d6a194b76ba7e8b3904b180f93a1b +Author: Dave Airlie +Date: Fri Aug 7 13:36:52 2009 +1000 - Make RgbPath keyword in xorg.conf a non-fatal error + parser: make libxf86config_internal.la not installed. + +commit 5fb188b547e0ef4e2f2c59b66a3183b004e4a1e9 +Author: Dave Airlie +Date: Fri Aug 7 12:05:51 2009 +1000 + + ddx: fix xf86Config.a generation - Xorg shouldn't refuse to run just because the user has an xorg.conf that - had the previously-used RgbPath keyword in it. + We were generating a shared library, but this lib is foobar, the parser + requires some symbols from the X server or from the program its being linked + into. If the program its being linked into (say a python .so) has symbol + visibility enabled then it will fail to dynamic link, also if this .so has + symbol visiblity enabled it will fail to dynamic link. - Signed-off-by: Alan Coopersmith - Acked-by: Peter Hutterer - (cherry picked from commit d2cf562bbad553d7f09b70202134f5b6ada0114e) + Screw it go back to a .a file really unless someone cleans it up properly. - Signed-off-by: Keith Packard + Signed-off-by: Dave Airlie -commit 6b8bbbd21b39181e9dd3175fa73c05008c361ba2 -Author: Peter Hutterer -Date: Wed Feb 4 11:50:18 2009 +1000 +commit 3047bd067464efb9857960d3fa6324b947faa970 +Author: Maarten Maathuis +Date: Wed Aug 5 18:39:47 2009 +0200 - config: if we can't connect to HAL, listen for a startup notification. + exa: delay malloc for "mixed" + +commit e8ac2ed5dc4c2ac0a5e1e1f371f94c15b1c729dd +Author: Maarten Maathuis +Date: Wed Aug 5 16:12:16 2009 +0200 + + exa: implement exaMoveInPixmap for "mixed" - If HAL isn't available when we try to connect, the registered NameOwnerChanged - signal handler waits until HAL is available. Once we connected to HAL, we - unregister the signal handler again. - This allows HAL to be started in parallel or after the server has started. + - This can be used to force creation of driver pixmap. + - Not for 1 or 4 bpp. + - Driver can still fail (driver) pixmap creation. + +commit 9d2a7128d3e66b8c076a714d69f84bcad49391b9 +Author: Maarten Maathuis +Date: Sun Aug 2 02:35:46 2009 +0200 + + exa: Use damage to optimise away useless copies. + +commit 03ecb164f2592c954aa408bf121e0c67b604d854 +Author: Maarten Maathuis +Date: Sat Aug 1 19:19:19 2009 +0200 + + exa: A simple 3rd backend implementation. - Signed-off-by: Peter Hutterer - (cherry picked from commit 4844bff58f296b2851be4e6b955c3a68d02437a9) + - Based on driver pixmaps with some changes (completely transparent to driver). + - It helps with the problem of known software fallbacks, such as trapezoids. + - exaDoMigration is now called for all cases that provide a do_migration hook. + - exa_migration.c is renamed to exa_migration_classic.c + +commit ac7ac913fd98ea359c05c89968ab53a3223615b4 +Author: Maarten Maathuis +Date: Wed Jul 22 21:35:41 2009 +0200 + + exa: Split out some classic and driver allocated pixmap code into seperate files - Signed-off-by: Keith Packard + - Create a few seperate functions and a few private function pointers. + - Replace a few if conditions with a check for pExaPix->pDamage instead. + - This is in preperation of a third scheme that lies somewhere in between. + - Code clarity would have suffered (i started working on it and didn't like the mess). -commit 4557b3f6c4273cd83b701beaf7a150c806fed298 -Author: Keith Packard -Date: Wed Feb 18 16:43:23 2009 -0800 +commit 3abbd327f4a732408119de1f8e9ecba4812772a5 +Author: Peter Hutterer +Date: Wed Aug 5 15:47:46 2009 +1000 - X11/fonts/fontmod.h doesn't exist anymore. + dix: detach SD during XI2 grabs only. - libXfont 1.4.0 no longer includes this file, nor do we need it, so just stop - attempting to reference it. + XI1 grabs on slave devices leave the device attached - just like in earlier + versions of XI. - Signed-off-by: Keith Packard + Tested-by: Thomas Jaeger + Signed-off-by: Peter Hutterer -commit 3575cb86a18d9e80e239acefdab18694e4ca2098 -Author: Ian Romanick -Date: Tue Feb 17 08:27:32 2009 -0800 +commit c29aa7da220661532b05972cacd3dbaff29408b5 +Author: Peter Hutterer +Date: Wed Aug 5 15:33:07 2009 +1000 - glx: Inialize best_score before calculating visual scores - - This bug was pointed out by Peter Åstrand. + Revert "dix: Remove temporary detachment of slave devices." - Signed-off-by: Ian Romanick - (cherry picked from commit 4039603413f9f46d7f725463a70b4a51838e0049) + This reverts commit 0c0ef42292f4c910c73b308cd75d77637312da53. - Signed-off-by: Keith Packard + Tested-by: Thomas Jaeger + Signed-off-by: Peter Hutterer -commit d050a61747bd5e5f9c96f5df5a191598c3f01e5c -Author: Jeremy Huddleston -Date: Tue Feb 17 23:25:14 2009 -0800 +commit 931160fcf378120e58849d801dbc62bed6e65a4b +Author: Jeremy Huddleston +Date: Tue Aug 4 02:53:17 2009 -0700 - configure.ac: Support version strings like W.X.Y.Z-XXXXXX - (cherry picked from commit 43967514cd57ad836d7fb85c8c9e58ada07e0232) - - Signed-off-by: Keith Packard + XQuartz: AIGLX: Provide empty __glXAquaDrawableResize to avoid crashing in DoMakeCurrent + (cherry picked from commit 60a1d2c2764f2f02c0751940a264588717afce79) -commit 8e16e64f55deb8e94007915333ba356c0f7e4f73 -Author: Jeremy Huddleston -Date: Tue Feb 17 23:24:25 2009 -0800 +commit 0fe639a314de397516cf00d8100da8086abdd97a +Author: Jeremy Huddleston +Date: Sat Aug 1 22:53:45 2009 -0700 - XQuartz: Don't need GlxSetVisualConfig any more + XQuartz: Only save lastpt on mouse/tablet events + (cherry picked from commit 552be074e5be6492df3e290e8b7d9daff1a2cb34) + +commit 491c2d74c12d7f9bc9f31b427ece04e049ebff5a +Author: Jeremy Huddleston +Date: Sat Aug 1 12:43:14 2009 -0700 + + XQuartz: Use mouseLocation rather than locationInWindow when setting lastpt - Fixes build failure resulting from 516f8e2cad1311a09764e2633644188d1e3c31bb - (cherry picked from commit 066b17028a35956a089815716e38571f305469c5) + I don't understand the *why* ... I just see that it works better this way for games like Quake2 through wine. It *should* be better the other way, but somehow it's not. - Signed-off-by: Keith Packard + I guess this will go in my list of puzzles to unravel. + (cherry picked from commit 65ae2d00e1a53f97f2ff9522406ab69d50bf3199) -commit eca523e7e7e267728a1f5ec346e012ada3debba0 -Author: Keith Packard -Date: Tue Feb 17 22:17:41 2009 -0800 +commit df6c01352471c766e9f71ceac03cab8c3911faa1 +Author: Jeremy Huddleston +Date: Sat Aug 1 02:32:52 2009 -0700 - Bump to 1.5.99.903 + XQuartz: Don't use location delta for tablets since NSEvent does not give a precise delta. + (cherry picked from commit 6c5bf756a7f5389cdfe2e43a339d7c31a3e522e9) -commit a86dd529e9deaba61aee220d79ac607abbcb5dc6 -Author: Keith Packard -Date: Fri Feb 6 06:34:35 2009 +0100 +commit e360104880e6e2e666aa05dfd56e2ef3880f38ef +Author: Jeremy Huddleston +Date: Wed Aug 5 16:17:01 2009 -0700 - Eliminate the shadow clear on transform change - - When the crtc transformation changes, the entire crtc must be repainted. - This was being done by clearing the shadow and then painting the rectangle - containing the screen image; the clear being required as the screen image - may not fill the crtc. When changing the transform rapidly, this leads to - flashing. Eliminate the clear by painting the entire crtc instead of just - the screen rectangle. - - (cherry picked fom commit 5394b7e66224d20888dd4020f5cb8ca930720fb4) - - Signed-off-by: Keith Packard + XQuartz: Purge redundant QuartzBell + (cherry picked from commit de14a63d20095e1537fd74352850c734d900031d) -commit 5946d603e76206105bea41a8beeb116daf209964 -Author: Keith Packard -Date: Mon Feb 9 13:09:11 2009 +0100 +commit 8c0085c715effdc450d78eec14bc32e6214c78af +Author: Tiago Vignatti +Date: Wed Aug 5 22:50:44 2009 +0300 - Add XkbDir to Files config file section + xfree86: remove more RAC junky - The XKB base directory was not configuable through the config file. + Signed-off-by: Tiago Vignatti + +commit 444723273ae82fc3f6707ed1a461aaaa8fdae39c +Author: Tiago Vignatti +Date: Wed Aug 5 22:48:02 2009 +0300 + + xfree86: reorganize pci code - (cherry picked from commit 76f18b94bd2719a8199334742d021c4d0806187d) + - xf86PciVideoInfo doesn't need to be global + - remove unused macros - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti -commit 39eb1bee84b520cfa45981c445c4c976d63ab03d -Author: Adam Jackson -Date: Tue Feb 17 12:59:16 2009 -0500 +commit 20169414e1afd5d1d02cb1b57866b1c158b2fc6c +Author: Tiago Vignatti +Date: Wed Aug 5 22:44:19 2009 +0300 - RANDR: Fail softly on GetPanning if the screen can't do it. + xfree86: remove unused functions - Just return a zeroed-out reply in that case. This is unambiguous, and - distinguishes "you didn't name a CRTC" from "you named a CRTC that can't - do panning". - (cherry picked from commit 123093996507c4d3b6dc457240ce00f8ac42f410) + RAC trash. - Signed-off-by: Keith Packard + Signed-off-by: Tiago Vignatti -commit 69a2728891e92da6a674d7313f3bb47c629b38dc -Author: Paulo Cesar Pereira de Andrade -Date: Wed Jan 7 19:37:03 2009 -0200 +commit 95b678e6dc41f2524ada4eb11289687fafce7588 +Author: Alan Coopersmith +Date: Mon Aug 3 23:49:56 2009 -0700 - Default to use standard bitmap fonts, with builtins as fallback + Correct modifier map built when ProcSetModifierMapping is called - The builtin-fonts configure option was removed, as it at best should - have been a runtime option. Instead, now it always register all "font - path element" backends, and adds built-ins fonts at the end of the - default font path. - This should be a more reasonable solution, to "correct" the most - common Xorg FAQ (could not open default font 'fixed'), and also don't - break by default applications that use only the standard/historical - X Font rendering. - (cherry picked from commit 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6) + Fixes xmodmap changes to modifiers to stop corrupting modifier maps - Signed-off-by: Keith Packard + Previous code had two bugs: + - the code to increment mod was after the code to continue if no + modifier was set, so mod wouldn't be incremented for modifiers + with no keys mapped to them (such as if you called + xmodmap -e 'clear Lock') + - the value it set in the modifier map was the raw modifier number, + not the bitmask value for that modifier + + Signed-off-by: Alan Coopersmith + Signed-off-by: Peter Hutterer -commit 444127f9f408d2f517fdfab0092bd67b29073373 -Author: Alan Hourihane -Date: Fri Feb 13 13:45:08 2009 +0000 +commit 4ca305956e5ea6f606b22ef62aa462186a7b95f0 +Author: Peter Hutterer +Date: Wed Aug 5 09:40:56 2009 +1000 - glx: fix retval checks when failures occur for drawable creation. - (cherry picked from commit a26c77ff432d2e85a2665fc36fca25143460c476) + Re-enable Xnest by default. - Signed-off-by: Keith Packard + Xnest was disabled in 82fc102568b3d6b0daeb6c5f5b3a1310a7f14fcd due do build + errors. These errors have since been fixed. + + Re-enable Xnest by default to increase coverage by default builds. + + Signed-off-by: Peter Hutterer -commit 4302a32391711ea86051c7e6d90cb018c79beec2 -Author: Keith Packard -Date: Fri Jan 30 14:19:41 2009 -0800 +commit 5904ef2ccd6056b187ca76f104c21e2d686bfc1d +Author: Peter Hutterer +Date: Wed Aug 5 10:40:20 2009 +1000 - Make crtc_notify wrap/unwrap code do nothing unless mode code is inuse + xnest: restore xnestUpdateModifierState - Drivers not using the new hw/xfree86/modes code would crash in DRI due to - that code trying to monitor CRTC changes. + The meat of xnestUpdateModifierState was ifdef'd out in + 6ef46c40e62def4841a4cff4e0b443516a2ed782. This resulted in stuck modifiers + when a modifier key release event wasn't sent to Xnest (e.g. Alt-Tab away). - (cherry picked from commit ea309e47457156b60aadbf113f04e5b6851029c8) + See X.Org Bug 3664 for + the original bug report. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 09cde70a6b3a05c28014862db19b36650412c2f3 -Author: Jeremy Huddleston -Date: Mon Feb 2 12:30:57 2009 -0800 +commit 44afc7577ad3339f4555438388f6a4d8e220c991 +Author: Peter Hutterer +Date: Wed Aug 5 09:51:05 2009 +1000 - XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on Leopard - (cherry picked from commit 8620579483789ae9ac1b68dbefe32b70011386de) - (cherry picked from commit 0dbc356795bbab3889b5f1684f55bd193757d0c9) + xnest: include exevents.h for XIGetKnownProperty. - Signed-off-by: Keith Packard + Silences compiler warning. + Pointer.c: In function ‘xnestPointerProc’: + Pointer.c:64: warning: implicit declaration of function ‘XIGetKnownProperty’ + Pointer.c:64: warning: nested extern declaration of ‘XIGetKnownProperty’ + + Signed-off-by: Peter Hutterer -commit 6bbe98f01d1fc66b6b853bdcdd62edf87a91627d -Author: Jeremy Huddleston -Date: Sun Feb 1 15:08:02 2009 -0800 +commit 32ce5c83a504d2cafd2b19ed628b40032ef347b3 +Author: Peter Hutterer +Date: Wed Aug 5 09:39:47 2009 +1000 - XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXT - (cherry picked from commit e01662cadcaa4052e3a5aa82cbaed00a2d0220e0) - (cherry picked from commit fd08be749e0b3c5de02a6ae8b3d21f92c5986157) + xnest: use AllocDevicePair for Xnest device initalization - Signed-off-by: Keith Packard + All Xnest needs is a single pointer+keyboard pair. AllocDevicePair sets them + up nicely with the name assigned etc. + + Signed-off-by: Peter Hutterer -commit 519ae3a0dfc61fc55370abec75551aa2615643fb -Author: Jeremy Huddleston -Date: Sun Jan 11 16:34:36 2009 -0800 +commit 26b83ad4a29dc180b336a19d9e97589814e93e37 +Author: Peter Hutterer +Date: Wed Aug 5 09:32:50 2009 +1000 - XQuartz: Don't need explicit Activate/EnableDevice in InitInput - (cherry picked from commit b1d29784410b3b93037e5636f336ba608d8ad6e3) + dix: require PointerProc and KeyboardProc to be passed into AllocDevicePair. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit ada58b69ca0a5e674cda7ae59a53061645621888 -Author: Alan Coopersmith -Date: Fri Jan 30 21:44:08 2009 -0800 +commit 6a500fdd4d717947b86f6d6844ebf9a8603eb8e2 +Author: Peter Hutterer +Date: Tue Aug 4 15:29:55 2009 +1000 - x11-input.fdi: Add options needed to handle adding USB devices on Solaris - (cherry picked from commit 60bcdd687040db76490851d4b459284ce37020e0) + dmx: include exglobals.h for DeviceKeyPress and friends. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 516f8e2cad1311a09764e2633644188d1e3c31bb -Author: Eric Anholt -Date: Sun Feb 8 13:00:15 2009 +0100 +commit 591c2f8758ef36a9bbf1625f9c207a1804f58ef4 +Author: Peter Hutterer +Date: Tue Aug 4 15:30:52 2009 +1000 - glx: Replace broken GLX visual setup with a fixed "all" mode. - - With trying to match depths so that you didn't end up with a depth 24 - fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth - 24 X visual, which angered other applications. But in fixing that, the - pickFBconfigs code for "minimal" also could end up breaking GLX visuals if - the same FBconfig was chosen for more than one X visual. - We have no reason to not expose as many visuals as possible, but the old - "all" mode didn't match any existing X visuals to GLX visuals, so normal - GL apps didn't work at all. - - Instead, replace it with a simple combination of the two modes: Create GLX - visuals by picking unique FBconfigs with as many features as possible for - each X visual in order. Then, for all remaining FBconfigs that are - appropriate for display, add a corresponding X and GLX visual. + dmx: typecast to InternalEvent* before mieqEnqueue. - This gets all applications (even ones that aren't smart enough to do FBconfigs) - get all the options to get the visual configuration they want. The only - potential downside is that the composite ARGB visual is unique and gets a - nearly full-featured GLX visual (except that the root visual might have taken - the tastiest FBconfig), which means that a dumb compositing manager could - waste resources. Write compositing managers using FBconfigs instead, please. - (cherry picked from commit c40bad88475debf7a1774e22dce835577ad32154) + Silences a few compiler warnings. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 8b967b24690cb072fc37c463eceb2b886cef80c4 -Author: Eric Anholt -Date: Mon Feb 2 10:13:46 2009 -0800 +commit 15b425b5a6630d2ac95b490f4f4dbb9240ac9c5d +Author: Peter Hutterer +Date: Tue Aug 4 15:31:42 2009 +1000 - glx: Don't match fbconfigs to visuals with mismatched channel masks. + dmx: move 'state' around to silence compiler warning. - This fixes at least one known bug, where the depth 32 visual would end up - with a depth 24 fbconfig attached, angering compiz. - (cherry picked from commit 5100d829a4d71ce4a9fbc2b81694a1fb90066ccf) + Signed-off-by: Peter Hutterer + +commit e10f802c8260e034fd6c835d3f2622d9cd5085f8 +Author: Peter Hutterer +Date: Tue Aug 4 15:40:17 2009 +1000 + + dmx: include inputstr.h for inputInfo.pointer - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 7fdaca64463951ab9199dc12910379c90dba3fac -Author: Keith Packard -Date: Tue Feb 17 18:57:13 2009 -0800 +commit 9ffc3f280b3907a672f99101548a5eb52027b37f +Author: Peter Hutterer +Date: Tue Aug 4 15:40:31 2009 +1000 - mi: force the paired kbd device before CopyKeyClass. (#19574) + dmx: don't call InitKbdFeedbackClassDeviceStruct - doesn't exist anymore. - Some multi-media keyboards send the key events for multimedia keys through - the device file used by the mouse. Sending a key event through the VCP - however will fail. The VCP doesn't have a key class so the server crashes or - (with an appropriate fix) the event is simply swallowed. + InitKeyboardDeviceStruct does the same task now. - Thus, for key events if the master does not have a key class, get the device - paired with the master (i.e. the VCK) before processing the event any - further. + Signed-off-by: Peter Hutterer + +commit 63155cf985ee15bf6aad95066b076ab680cf5a31 +Author: Peter Hutterer +Date: Tue Aug 4 15:28:30 2009 +1000 + + dmx: pass button/axis labels into the init functions (currently unset) - X.Org Bug 19574 + Currently only None labels are passed in, in the future these labels should + be whatever the respective buttions/axes are. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit a9dd41de7eecc1dcede4ccc8d5cf25f10343bb1a +commit af85973a0a80fb0ba82330ae3ec897f65d618003 Author: Peter Hutterer -Date: Mon Feb 2 10:20:13 2009 +1000 +Date: Tue Aug 4 15:25:06 2009 +1000 - mi: don't call UpdateSpriteForScreen if we have Xinerama enabled. #18668 - - In Xinerama all windows hang off the first root window. Crossing the screens - must not reset the spriteTrace, otherwise picking fails and events are sent to - the root window. + dmx: remove now-useless defines. - X.Org Bug 18668 + XI is mandatory so we can expect both to be defined. + +commit 654d7a02600bbafd890f555a081aa0a2fcb5e253 +Author: Peter Hutterer +Date: Tue Aug 4 15:23:01 2009 +1000 + + Revert "dmx: claim we support XI 2." - Signed-off-by: Peter Hutterer - (cherry picked from commit 9fe9b6e4ef669b192ee349e3290db5d2aeea273c) + XQueryInputVersion doesn't exist anymore and for now XI 1 support is good + enough. - Signed-off-by: Keith Packard + This reverts commit 8da8a0fec4b1b9d9208635dedb2f449dc99e0004. -commit 536748aa88f82e4157b86ed1a02b798b1510bdb8 -Merge: 8c6ddbf be21199 -Author: Keith Packard -Date: Tue Feb 17 18:52:04 2009 -0800 +commit e7c950c6273ff93f25c091c93d86da6e332a2277 +Author: Peter Hutterer +Date: Tue Aug 4 15:15:24 2009 +1000 - Merge branch 'panning-for-server-1.6' into server-1.6-branch + dmx: fix a call to XkbSetRulesDflts, takes XkbRMLVOSet now. -commit 8c6ddbf754ff6c2eb99105f93aaa30749dced619 -Author: Paulo Cesar Pereira de Andrade -Date: Sun Nov 30 02:59:34 2008 -0200 +commit 2cde9208ff756e33d162e2324f4b99540230d743 +Author: Peter Hutterer +Date: Tue Aug 4 14:58:25 2009 +1000 - Correct static symbol XkmReadTOC and first pass on compile warning fixes. + dmx: Enable/DisableDevice take a boolean variable now. - The warnings corrected were only the ones that should correct - real problems. The most common one is 64 bit integers as - "printf %l" arguments. - Note that there is a patch related to this at: - http://bugs.freedesktop.org/show_bug.cgi?id=18204 + We want to send events here, so pass in TRUE. - Signed-off-by: Keith Packard - (cherry picked from commit 16b11cd03d8c5def07f0e598f237f71a37883a46) + Signed-off-by: Peter Hutterer -commit 0c9db0ea10d9fd2a311bca47bba3c60e74ec6eec +commit 1e210d6d10ec63d22247e5801890e024826fc861 Author: Peter Hutterer -Date: Fri Jan 9 14:32:14 2009 +1000 +Date: Tue Aug 4 14:41:46 2009 +1000 - xfree86: always force RAW mode under linux. + xkb: remove now-unused XkbGetKeysym. - The previous check for AEI on left us with the possibility that AEI is forced - off in the config, but devices are added through evdev nonetheless. A keyboard - added this way can CTRL+C the server. Even when we use kbd, we can set the - mode to RAW, so it's safer alround to to so. + XkbGetKeysyms was only used by the now-removed Keysym grabs. Signed-off-by: Peter Hutterer - (cherry picked from commit b33905234025f005819c7e2acd653a3a0ecfeb82) - - Signed-off-by: Keith Packard -commit 3284b03dca180ba2312904b1e20fe83df56f5f3c +commit a6ce6c70cff5108f0751b662b8e52c83daab0722 +Author: Michel Dänzer +Date: Tue Aug 4 23:23:21 2009 +0200 + + EXA: Simplify exaGetPixmapFirstPixel using GetImage. + +commit 842373104d08d47efc863cecbe30431d3faebef1 +Author: Michel Dänzer +Date: Tue Aug 4 23:23:21 2009 +0200 + + Add support for RENDER BGRA formats. + +commit 0bf7eaf3052ce24066b0a7c14860b4762fb81364 Author: Alan Coopersmith -Date: Thu Feb 12 18:34:22 2009 -0800 +Date: Mon Aug 3 23:14:50 2009 -0700 - Check for and report errors writing xorg.conf.new from Xorg -configure + Ansify function arguments in VTsw_noop.c Signed-off-by: Alan Coopersmith - (cherry picked from commit ac470dfb4fadaa0b28b6f8b57f4f13a20842b897) + +commit 736f2d64725c6df8413e627bd40ce7ecb011acc7 +Author: Paul Bender +Date: Tue Jun 30 15:50:46 2009 -0800 + + Bug 16832: XDMCP related build error when --disable-xdmcp is used - Signed-off-by: Keith Packard + X.Org Bugzilla #16832: http://bugs.freedesktop.org/show_bug.cgi?id=16832 + Patch #27279: http://bugs.freedesktop.org/attachment.cgi?id=27279 -commit caf503aef15865a969b881355d5e663490a6e194 +commit b159a98f7fbdb3f8b337cd1bfd2ff27312856619 +Author: Lee Leahu +Date: Thu Oct 23 21:03:57 2008 -0500 + + seg fault when initializing DMX screens + + X.Org Bugzilla #18086: http://bugs.freedesktop.org/show_bug.cgi?id=18086 + Patch #19837: http://bugs.freedesktop.org/attachment.cgi?id=19837 + +commit 5da9b255a64bec7dbf5ddb392d54dac9be5b43c0 Author: Alan Coopersmith -Date: Thu Feb 12 18:23:59 2009 -0800 +Date: Mon Aug 3 19:53:27 2009 -0700 - Correct error message if specified config file is not found + Fix blddir != srcdir builds of solaris-*.il files - By making the "Unable to open config file" header a warning, it was - not appearing with the filename when a config file was specified and - not found. Now we make it an error message again, but only issue - the error if a filename was specified - if none was specified, then - we don't even issue a warning, just the "Using autoconfig" info message. + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=17509 Signed-off-by: Alan Coopersmith - (cherry picked from commit bd713794ceaa1b2890522554562103c0a2d50f04) - - Signed-off-by: Keith Packard -commit 791c6ecceec94369f6035b8845a2cb293d194eef -Author: Keith Packard -Date: Tue Feb 3 20:18:37 2009 -0800 +commit 1e69fd4a60147287b31e53bfc61543fb17bb82c8 +Author: Peter Hutterer +Date: Mon Aug 3 12:03:26 2009 +1000 - Handle the combination of panning and crtc transforms + xnest: fix up parameters to InitKeyboardDeviceStruct. - This patch gets the shadow scanout buffer repainted on panning area changes. - It does not, however, track the mouse correctly. + IKDS takes a DeviceIntPtr as first argument, and an RMVLO struct as second. + The keysyms stuff is long gone now. - Signed-off-by: Keith Packard - (cherry picked from commit 7968823cbc02615e1080c0d3f34dcebe14ea1771) + Signed-off-by: Peter Hutterer + +commit 008658049cbeea35a9f76f98037aa2f4173f3573 +Author: Peter Hutterer +Date: Mon Aug 3 12:00:45 2009 +1000 + + xnest: silence compiler warnings by typecasing properly. + + Events.c: In function ‘xnestQueueKeyEvent’: + Events.c:112: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ + Events.c: In function ‘xnestCollectEvents’: + Events.c:141: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ + Events.c:150: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ + Events.c:160: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ + Events.c:193: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 099d74a12752808dd1972c28bdb228fc447d3774 -Author: Keith Packard -Date: Tue Feb 3 20:15:41 2009 -0800 +commit 664ac92d8bbe956dd6fd80fac5dc3161028803b2 +Author: Peter Hutterer +Date: Fri Jul 31 14:38:35 2009 +1000 - Damage re-used shadow scanout buffer using new transforms. + xfixes: backup the DisplayCursor/CloseScreen proc before restoring it (#23034) - When the shadow scanout buffer can be re-used, the underlying framebuffer - area must be damaged so that the scanout will be repainted. This patch - delays the addition of that damaged area until after the transform in the - crtc has been updated, otherwise the old transform would have been used and - the wrong area repainted. + The screen's DisplayCursor func is wrapped as + AnimCurDisplayCursor -> CursorDisplayCursor -> miPointerDisplayCursor. - Signed-off-by: Keith Packard - (cherry picked from commit 763df9eec79a867978efc5138d8635a46c1a0d17) + Calling CursorDisplayCursor while an animated cursor was currently displayed + would remove AnimCurDisplayCursor from the wrap stack. Thus, the next call + to ChangeToCursor wouldn't update the animated cursor state. The block + handler for animated cursors would then continuously overwrite the actual + cursor, leaving an animated cursor everywhere on the screen. - Signed-off-by: Keith Packard + X.Org Bug 23034 -commit 4992c31e6c09a9140d4482d762b5dfff0a4efedb -Author: Keith Packard -Date: Tue Feb 3 20:12:42 2009 -0800 +commit f48dfcc1b772a09428e328c72124ea0d46a73416 +Author: Peter Hutterer +Date: Fri Jul 31 10:44:28 2009 +1000 - Handle matrix computation overflow in RRTransformCompute - - If the computation of the composite fixed-point transform for RandR - overflows at any point, take the resulting floating point transform and - scale that back to fit in a fixed point matrix. This ensures that a matrix - will always be available, although perhaps at reduced precision. Someday we - should add floating point matrices to Render. + xfixes: allocate CurrentCursor for all devices. - Signed-off-by: Keith Packard - (cherry picked from commit 62fc98cb88e4e8b636f343453fc1168a87c58972) + XFixes requires cursor notifies to clients when the cursor changes. This + should work on the ClientPointer and then on all master pointers. Hence + change CurrentCursor to a MAXDEVICES array. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 660c2a7d4c6cb52fd0992e9d2008a24805dc8c02 -Author: Aaron Plattner -Date: Thu Feb 12 18:27:48 2009 -0800 +commit d3e5629fac224d53a972df5e2a87db02534f9b17 +Author: Peter Hutterer +Date: Thu Jul 30 16:36:56 2009 +1000 - Query the DDX in ProcRRGetScreenInfo. + dix: call SetFocusOut and LeaveWindow when disabling a device. - This is the RandR 1.1 version of GetScreenResources and needs to re-query the - DDX to see if the mode pool changed. + PointerWindows[x] would be set after removing a master pointer. Destroying + this window then crashed the server. - Fixes Launchpad bug #325115. - Signed-off-by: Adam Jackson + Signed-off-by: Peter Hutterer -commit 34724f45512e311377b972da480d35304fd687cc -Author: Paulo Cesar Pereira de Andrade -Date: Fri Jan 30 03:56:39 2009 -0200 +commit 97ed946cfccec5979c47b5fabf1ad56cc7d33ef4 +Author: Peter Hutterer +Date: Thu Jul 30 16:36:30 2009 +1000 - Work around inclusion of + dix: SetFocusOut and LeaveWindow don't need parameters other than dev. - The X Server build only needs the macros PANORAMIX_MAJOR_VERSION - and PANORAMIX_MINOR_VERSION from that header. - Addition of extra prototypes to - caused a X Server build failure. - -commit 1f729b42d567ae9533ac0e467afc9fbc83390776 -Author: Keith Packard -Date: Fri Jan 30 21:12:17 2009 -0800 - - Version to 1.5.99.902 + Signed-off-by: Peter Hutterer -commit 56f6fb8c8652c85e522e42557f8969987069076b -Author: Eric Anholt -Date: Fri Jan 30 19:06:17 2009 -0800 +commit d040940efe041b57e6323921c380ceb2bb43f41e +Author: Peter Hutterer +Date: Thu Jul 30 16:16:51 2009 +1000 - randr: Avoid re-querying the configuration on everything but GetScreenResources. + xfixes: FixesHideCursor should work on all master pointers. - The new path should only re-query on the other requests when we haven't - gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX). + Presumably, a client calling HideCursor doesn't want any cursor displayed. - Bug #19037. - (cherry picked from commit 317f2b4a9fe4b606975711bc332166a82db5087d) + Signed-off-by: Peter Hutterer -commit 6d928aa227b12832dd358619722a5f4dc71b5d19 -Author: Keith Packard -Date: Fri Jan 30 20:17:10 2009 -0800 +commit b83c682e7ea4e10757eca6363de28281108591a8 +Author: Oliver McFadden +Date: Mon Aug 3 02:46:57 2009 +0300 - RandR crtcs not fetched correctly when primary output is set. + xf86Xinput: xf86PostButtonEventP must set POINTER_ACCELERATE for relative events. - Primary outputs may not have a CRTC. - Loops fetching CRTCs respecting primary output were broken. - - Signed-off-by: Keith Packard - (cherry picked from commit 4de5705545792d77c9990bbec3e263a517757a2a) + Thanks to Peter Hutterer for spotting this bug. -commit 759ed0679a030f502b74a6ff44c15d1c97d9a937 -Author: Keith Packard -Date: Fri Jan 30 19:14:36 2009 -0800 +commit ae65daab080c6269f0eadc6be1a48bf27866c542 +Author: Jeremy Huddleston +Date: Fri Jul 31 15:32:07 2009 -0700 - RandR SetOutputPrimary should work with or without a crtc connected - - The test was inverted from the protocol spec, and besides, the test is bogus - anyways. - - Signed-off-by: Keith Packard - (cherry picked from commit c1f2be1f3fd0c80cb4c85b98140b98aa9311242b) + XQuartz: Unify how we set our bitmasks for visuals + (cherry picked from commit c230b52c27ce50ac6c27011ec8e88f1b263b25f9) -commit b893dc59da9f5a7afb59ea0b2cd794872fc5727f -Author: Thomas Jaeger -Date: Sat Dec 20 16:17:02 2008 +0100 +commit 4a53fed41d711f270c7d8a7fbeaafb4fb619e879 +Author: Jeremy Huddleston +Date: Fri Jul 31 14:19:50 2009 -0700 - Don't release grabs unless all buttons are up - - Previously, only buttons <= 5 would count here, but the core protocol - allows for 255 buttons. - - http://lists.freedesktop.org/archives/xorg/2009-January/042092.html + XQuartz: Dead code removal for StaticColor visual + (cherry picked from commit e457a44e87950207f6c16bf82bf5af11c777ecf1) + +commit da0a2747803dbecb1308181176a784e14cf02809 +Author: Jeremy Huddleston +Date: Fri Jul 31 14:14:21 2009 -0700 + + XQuartz: Cleanup the bitmask setting for GLX visuals. + (cherry picked from commit d32c3df258e748958ef997c675dc4fae118c0d7b) + +commit 70ac671af2f092471022590cb7a19ef9155c51b4 +Author: Jeremy Huddleston +Date: Thu Jul 30 01:30:52 2009 -0700 + + XQuartz: no DirectColor + (cherry picked from commit df2fbc410f2c484612f65a6539a6cb069ef4a468) + +commit c0c72a866a237d3c2d9e69e1c69181ef5446e3f8 +Author: Jeremy Huddleston +Date: Thu Jul 30 00:51:55 2009 -0700 + + XQuartz: Define DDXRingBell + (cherry picked from commit 113347381289497cb2a79994d0ef5f427ae63ac5) + +commit 949811313989809f5b58424af04b9fd8e1d0bec4 +Author: Peter Hutterer +Date: Thu Jul 30 21:59:40 2009 +1000 + + test: fix build by including eventstr.h Signed-off-by: Peter Hutterer - (cherry picked from commit 717a961528ec69a6e630d536e15568670e0b398a) - - Signed-off-by: Keith Packard -commit 191161a24a80dc553b11f829c12cfffb76ec7185 -Author: Thomas Jaeger -Date: Mon Dec 22 00:55:09 2008 +0100 +commit 0565f4ed4519962bed40a0bbcf0b409471f4de40 +Author: Peter Hutterer +Date: Wed Jul 29 16:46:45 2009 +1000 - Count the number of logically down buttons in buttonsDown + Xi: set the sourceid for focus devices to the device id. - This fixes the following bug. Assuming your window manager grabs - Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping, - then press the physical button 3 (this shouldn't have any effect), press - Alt and then button 1. The press event is delivered to the application - instead of firing the grab. + Unlike Enter/Leave events generated by a device pushing the pointer around, + a device doesn't change focus all by itself. It's a result of a + SetInputFocus call, a window becoming unviewable or a grab activating. As + such, the sourceid for focus events is always the deviceid itself. Signed-off-by: Peter Hutterer - (cherry picked from commit f7f85f696570541e2dd43462675de9e6ee46f545) -commit fe0abdceb483ec0bb2977016b00aef57033aa449 +commit de4dd5848cab90b0f8b8243ca0b49985ef047124 Author: Peter Hutterer -Date: Thu Jan 8 11:53:30 2009 +1000 +Date: Wed Jul 29 16:45:34 2009 +1000 - mi: ensure chained button mappings from SD -> MD (#19282) - - After copying the master event, flip the detail field to the mapped button of - the SD, not the physical button. This way if the SD has a mapping 1:3 and the - MD has a mapping of 3:4, a press on button 1 on the SD results in a core event - on button 4. - - X.Org Bug 19282 + include: DeviceFocusEvent is not to be exported. Signed-off-by: Peter Hutterer - Signed-off-by: Keith Packard -commit 3441917008021fb13cf86fa619970859d927e17a -Author: Thomas Jaeger -Date: Mon Jan 5 01:26:42 2009 -0500 +commit 46ac9f92416f3cb99b5d84a9d200237dc33a3bb7 +Author: Peter Hutterer +Date: Wed Jul 29 16:34:28 2009 +1000 - Don't alter device button maps in DoSetPointerMapping + dix: pass the sourceid around for enter/leave events. - Currently, if a device map differs from the core pointer map, then the - request may return MappingBusy, even though all the affected core - buttons are in the up state. + The sourceid for enter/leave events as a result of pointer motion is the ID + of the slave device. The sourceid for those as a result of a grab activating + is the device itself. Signed-off-by: Peter Hutterer - (cherry picked from commit 3d549438c29004d78032ecc50ab45ca0e3f49623) -commit 364bcbea48d5e49bef8d36f6724e2702cbb4b1af -Author: Thomas Jaeger -Date: Fri Jan 9 02:02:38 2009 -0500 +commit c299b2228fb63c192b72851c90e14ceaceb67bbc +Author: Peter Hutterer +Date: Wed Jul 29 16:00:19 2009 +1000 - Xext: Send out correct events in ProcXTestFakeInput + dix: remove obsolete comment, parameter described doesn't exist. Signed-off-by: Peter Hutterer - (cherry picked from commit b2756a71a432f7cf7c870a48676c98625512558d) -commit e789789196db8271a83c751fdf990ceb70164cb1 +commit 5085ac09a50721d87196bd9f2607dc76200ca399 Author: Peter Hutterer -Date: Mon Jan 5 15:48:45 2009 +1000 +Date: Wed Jul 29 13:45:32 2009 +1000 - xkb: fix typo - missing negation when checking button state. + input: switch internal event types to enums. - Introduced with a85f0d6b98237d8a196de624207acf1983a1859a. - - Reported by Thomas Jaeger. + Use enum EventType instead of ints. This requires a load of default + cases in various switch statements to silence compiler warnings. + Reported-by: Aaron Plattner Signed-off-by: Peter Hutterer - (cherry picked from commit 515ce3e4ba42605a1ee9979e8bb5acd3cf6470a3) -commit ebb3872925315d705e47e1ccd7f193ac90ac33dc -Author: Peter Hutterer -Date: Wed Nov 26 11:15:05 2008 +1000 +commit 1ae8332d643299a3ee9a9f45a8e25b8c87c751e1 +Author: Peter Hutterer +Date: Wed Jul 29 13:39:38 2009 +1000 - Xi: fix use of button->down - bitflags instead of int arrays. - - The device's button down state array was changed to use DOWN_LENGTH and thus - bitflags for each button in cfcb3da7. - - Update the DBSN events to copy this bit-wise state. - Update xkb and Xi to check for the bit flag instead of the array value. + include: fix enum EventType declaration. - Reported by ajax. + Having EventType after the enum declares a variable. silly me. - Signed-off-by: Peter Hutterer - (cherry picked from commit a85f0d6b98237d8a196de624207acf1983a1859a) + Reported-by: Aaron Plattner + Signed-off-by: Peter Hutterer -commit 50d80c25525a691472e3fc5859fb303a3ffe1ef2 +commit 994f7a1c814a89e90f710dac5bf6b2445fb64712 Author: Peter Hutterer -Date: Mon Jan 12 15:29:36 2009 +1000 +Date: Wed Jul 29 12:11:13 2009 +1000 - dix: fix WarpPointer calls for devices with custom valuator ranges (#19297) + record: silence some compiler warnings. - If the MD's lastSlave was a devices with custom axes ranges, then a - WarpPointer would position the cursor at the wrong location. A WarpPointer - request provides screen coordinates and these coordinates were scaled to the - device range before warping. + warning: passing argument 4 of ‘RecordAProtocolElement’ discards qualifiers + from pointer target type + note: expected ‘pointer’ but argument is of type ‘const void *’ - This patch consists of two parts: - 1) in the WarpPointer handling, get the lastSlave and post the event through - this device. - 2) assume that WarpPointer coordinates are always in screen coordinates and - scale them to device coordinates in GPE before continuing. Note that this - breaks device-coordinate based XWarpDevicePointer calls (for which the spec - isn't nailed down yet anyway) until a better solution is found. + record.c:2745: warning: passing argument 1 of ‘SwapConnSetupInfo’ from + incompatible pointer type + ../include/swaprep.h:243: note: expected ‘char *’ but argument is of type + ‘struct xConnSetup *’ - X.Org Bug 19297 + record.c:2745: warning: passing argument 1 of ‘SwapConnSetupInfo’ from + incompatible pointer type + ../include/swaprep.h:243: note: expected ‘char *’ but argument is of type + ‘struct xConnSetup *’ Signed-off-by: Peter Hutterer - (cherry picked from commit d36adf52a2b2711d22b11105f7bd907d4493fb9b) -commit b19f12712a0762f20065282fd055fe9bc3ca975f +commit a863d636293cd7361639c1a8cf9c4f7f15da1e1d Author: Peter Hutterer -Date: Mon Jan 12 16:16:24 2009 +1000 +Date: Wed Jul 29 12:09:34 2009 +1000 - dix: EnqueueEvent and PlayReleasedEvent need to handle DeviceMotionNotifies + Xi: remove FIXME and obsolete include. - No MotionNotify events in the processing anymore, so let's have them treat DMN - instead. + Signed-off-by: Peter Hutterer + +commit fac49df08f173f091cbb77feaf373d7d465358af +Author: Peter Hutterer +Date: Wed Jul 29 12:07:22 2009 +1000 + + Xi: remove obsolete comment. - Reported by Thomas Jaeger. - (cherry picked from commit 488d45295105daf10ccd17ca93ae6a6f4d0104f1) + XI1 only uses 7 bits for deviceids, bit 8 is used for the MORE_EVENTS flag + on the wire (when DeviceValuator events are required). + + Signed-off-by: Peter Hutterer -commit ef796a95dd7ddf4ad5761a6ee2de1cdb56190ba2 -Author: Xiang, Haihao -Date: Tue Jan 6 10:03:19 2009 +0800 +commit 845e65f08059e8f4bfd37356e99b48bba9416c0c +Author: Peter Hutterer +Date: Wed Jul 29 11:54:14 2009 +1000 - avoid a potential endless loop. + xkb: move XkbFilterEvents to xkbsrv.h - Previously it is possible that creating rotation data, then cleaning - up and creating again so that pScreen->BlockHandler and - xf86_config->BlockHandler all point to xf86RotateBlockHandler. - See bug #19343. - (cherry picked from commit 5f3188228eb988bd8f08b62c84f98a8ff66ee283) + Signed-off-by: Peter Hutterer -commit 840b4da5f29e43ccadc720f075e00237d12ef01b -Author: George Staplin -Date: Mon Jan 26 03:02:38 2009 -0700 +commit 8da0ff2d51086666d10ca7330d428e8610a4a0e3 +Author: Oliver McFadden +Date: Tue Jul 28 08:20:37 2009 +0300 - XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks. - (cherry picked from commit 143224405ba74929c702a95de52b56df140b0d1b) + xf86Xinput: Add the xf86Post(Proximity|Button|Key)EventP helper functions. + + xf86PostKeyboardEvent also makes use of xf86PostKeyEventP to avoid code + duplication, and the valuator verification has been split into the + XI_VERIFY_VALUATORS macro. + + Signed-off-by: Peter Hutterer -commit 97a6f55f221e3d470add18db80e3769713480103 -Author: Jeremy Huddleston -Date: Fri Jan 16 19:26:07 2009 -0800 +commit a148d407429c7d13136b3fcafd2d279c5438df73 +Author: Peter Hutterer +Date: Tue Jul 28 16:53:51 2009 +1000 - XQuartz: SnowLeopard: Help system book name changed in 10.6 - (cherry picked from commit b57cb05c69acbedb00a97234099ea104309aa2cb) + xkb: restore XKB PtrBtn actions. + + Ifdef'd out since the switch to internal events. PtrBtn actions now work + again. Instead of generating the event directly, GPE generates the event and + it is then posted through the usual event processing routines + (mieqProcessDeviceEvent). + + Signed-off-by: Peter Hutterer -commit e81b4d495ba02d4fc0b05c26a53fd2a816a61eaa -Author: Jeremy Huddleston -Date: Fri Jan 16 13:54:08 2009 -0800 +commit 3d3b8babd1a5407082f1a40875ed69f62ba2153f +Author: Peter Hutterer +Date: Tue Jul 28 16:51:14 2009 +1000 - XQuartz: mieq: Wait for the server to finish initializing before letting other threads mieqEnqueue + mi: update master event copying to InternalEvents. - Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes - (cherry picked from commit 94e417ac87a98cd5c6bf2d7c495d702748398931) + This is long overdue. The device events are InternalEvents now (and only one + at a time), diminishing the need for an EventList for the master event. + Furthermore, don't make masterEvent a static since this will interfere if + mieqProcessDeviceEvent is called from somewhere else (e.g. XKB actions). + + Signed-off-by: Peter Hutterer -commit d6498ea62117cce6a00ac045ddeefb7268a70f5b -Author: Eric Anholt -Date: Fri Jan 30 16:17:58 2009 -0800 +commit f85619b14d130ec54d42cabfaee15e55ced0c665 +Author: Peter Hutterer +Date: Tue Jul 28 16:48:56 2009 +1000 - Move the apple fat binary hacks back to a header file, and make it apple-only. - (cherry picked from commit dd098501d800571e71d06ffc936635a6c9d44e05) + dix: update GetMaximumEventsNum() to real value (3). + + GPE and friends now use internal events so they may generate up to 3 events. + One (optional) DeviceChanged event and one raw event plus a device event. + + Signed-off-by: Peter Hutterer -commit b530a0e97b5737375ca1f4eced26d587a16f843f -Author: Jeremy Huddleston -Date: Thu Jan 15 20:57:42 2009 -0800 +commit 0217d0370c0b0bce66a9c09092eda8e820274e2e +Author: Peter Hutterer +Date: Tue Jul 28 14:54:30 2009 +1000 - XQuartz: Fix builddir != srcdir issues and undef _XSERVER64 where appropriate on fat binary compilation - (cherry picked from commit f020900641b44a1142e5c2198e9678de2744454e) + record: ifdef out RecordExtensionInit and print a warning to the log. + + The RECORD extension is currently broken. By ifdef'ing out the content of + RecordExtensionInit the extension isn't added to the server's internal list + and it does not get advertised to the client. Clients can thus fail + gracefully with a "extension not supported" instead of waiting forever for + events that never arrive. + + Signed-off-by: Peter Hutterer -commit 82fd4d170824068dddf3b4e6581a12d48e1a069a -Author: George Staplin -Date: Mon Jan 12 19:30:43 2009 -0700 +commit 4e9b2938cd8637a5d3b0a4c9f69d6ee75faab3a0 +Author: Peter Hutterer +Date: Mon Jul 27 16:54:33 2009 +1000 - XQuartz: xpr: Cleanup some of the code and possibly fix part of the GLX Pixmap problem. + include: untangle events.h from the SDK headers. - Split DRICreateSurface into 3 functions. + InternalEvents shouldn't be used anywhere outside the X server itself. Split + up into events.h for opaque typedefs for the events needed by various + headers and eventstr.h for the actual struct definitions. - Make CreateSurfaceForPixmap use xp_configure_surface. I suspect this is partly why - GLXPixmaps never worked. + eventstr.h must only be included by code that requires internal events and + is not part of the SDK. - It will require some more work and thoughts for pbuffers, unless we fake those with - pixmaps and surfaces. - (cherry picked from commit 9cf264e67744262b9f45079e6cd752eb3e3b0e08) + Signed-off-by: Peter Hutterer -commit 9cbdcf1fa4bdcc115def9f134a57ac96a56c69dd -Author: Jeremy Huddleston -Date: Sun Jan 11 14:49:39 2009 -0800 +commit fad5f96c01811af7490a071719e4017c019a8d9b +Author: Jon TURNEY +Date: Wed Jul 29 13:50:48 2009 +0100 - XQuartz: Only call DarwinUpdateModKeys when needed + Cygwin/X: Only try to build rootless extension if multiwindow extwm mode is being built - Previously, we were calling it on almost every itteration through sendX11Event - (cherry picked from commit 6461729647ff4441d80811e73f0c0d2f108f2700) + Rootless extension still needs a bit more work to build successfully for Cygwin/X -commit 037e52fd7353410397dfd877b3e9af99f791fce1 -Author: George Staplin -Date: Mon Jan 12 14:14:44 2009 -0700 +commit de2ae521abde445daaf025a07aa01563ca5ddd41 +Author: Colin Harrison +Date: Sun Jul 26 20:48:19 2009 +0100 - XQuartz: GL: Make indirect.c build and work in the 1.6 branch. - - Reorder some header files and provide some types earlier on. + Xming: Use RegisterClassEx() instead of superseded RegisterClass() - Remove the static __GLXextensionInfo __glDDXExtensionInfo; that isn't - used in 1.4 or 1.5, and seems to have been removed from 1.6. Remove - the data structures associated with that too. + RegisterClass is supserseded by RegisterClassEx, so change to using that everywhere - Remove __glXAquaDrawableResize. The GLX structure doesn't use - it anymore, and the Apple version did nothing useful before. + Signed-off-by: Jon TURNEY + +commit 764ce6ee683db342264bbca4df6379eb6093fb85 +Author: Colin Harrison +Date: Tue Jul 28 16:16:57 2009 +0100 + + Xming: Use GetClassLongPtr() instead of superseded GetClassLong() - __glXAquaDrawableSwapBuffers(): base no longer contains a drawGlxc - member. Now provide the the Apple/Aqua context in the __GLXAquaDrawable - struct. Add the context member to the __GLXAquaDrawable struct. + GetClassLong() is superseded by GetClassLongPtr(), so change to using that + +commit a85523dc50f392a33a1c00302a0946828bc9249d +Author: Jeremy Huddleston +Date: Tue Jul 28 22:52:33 2009 -0700 + + XQuartz: Avoid a possible spinlock in applicationWillTerminate + (cherry picked from commit f430cda0fdcc1a8fc5f4795743b40f09ff0bd869) + +commit 1e49c8d340ee8d8b6f90abcc2e2e9c390cbcd622 +Author: Jeremy Huddleston +Date: Tue Jul 28 13:40:15 2009 -0700 + + XQuartz: Avoid namespace collission for BOOL in Sparkle + (cherry picked from commit 227c6e01a641b72158201553273299283cdb5599) + +commit 442967c90dd9d8483a56bdc9237c49e33d619126 +Author: Alan Coopersmith +Date: Tue Jul 28 15:02:37 2009 -0700 + + Remove hardcoded gcc -Wall option from configure.ac - Remove the fallback configs. They aren't used in 1.4 or 1.5 either. + Signed-off-by: Alan Coopersmith + +commit 52e9ef5664a697a31102e8761eaa03cff01d14d8 +Author: Tiago Vignatti +Date: Tue Jul 28 19:04:59 2009 +0300 + + xfree86: remove some RAC junk - Remove init_visuals(). It's not used in 1.4 or 1.5 either. + Signed-off-by: Tiago Vignatti + +commit d57361bb9ac08bec470f76ca8ca602d60c339502 +Author: Tiago Vignatti +Date: Tue Jul 28 18:55:32 2009 +0300 + + doc: remove outdated PCI/RAC/Domain notes - In the drawable constructor initialize the state properly, including - the new context member. + Signed-off-by: Tiago Vignatti + +commit 7b3d05ebd5a55f88098f4a763d1fa7ca110bb780 +Author: Tiago Vignatti +Date: Tue Jul 28 18:45:16 2009 +0300 + + xfree86: remove pci debug macros - Remove glAquaResetExtension() -- it's not used anymore. + there's no effect when their are enabled. - This has been tested remotely and proven to work with glxgears, - fire, various texture programs I wrote, and various Mesa demos. - (cherry picked from commit d514152195452ae11ec7769c76489651620ad380) + Signed-off-by: Tiago Vignatti -commit ee9736b26b1021fac2cf259e6b2142ea780b2af8 -Author: George Staplin -Date: Fri Jan 9 16:08:26 2009 -0700 +commit 6089d9cfde533c6a7aec7dfc08aec9c8f2f18e27 +Author: Tiago Vignatti +Date: Tue Jul 28 18:29:35 2009 +0300 - XQuartz: GL: Set the __GLXconfig renderType to GLX_RGBA_BIT. - (cherry picked from commit 3c14546f58f8a138fe67c9cacc3bd0b7fa90c29a) - (cherry picked from commit a665ed16f736cf1901b89448dc5d37f4d16dfaf4) + xfree86: remove RAC/resource doc + + Signed-off-by: Tiago Vignatti -commit b646513861aac9538ba3ebd8e2c7ef530392ff5d -Author: George Staplin -Date: Fri Jan 9 15:53:39 2009 -0700 +commit c553161e17ebc577ecb91ec6c81f0bdd0ae85e13 +Author: Tiago Vignatti +Date: Fri Jul 24 13:47:31 2009 +0300 - XQuartz: GL: Make many more fbconfigs and visuals available for the 1.5 branch. + xfree86: delete devices probe code (-probe and -probeonly options) - Use a __GLXconfig linked list struct to store the configurations for the - fbconfigs and visuals in a pGlxScreen. + Inside a windowing system, it's not the place to probe for devices. Goodbye + -probe and -probeonly. - Also, remove the __GLXvisualConfig/GlxSetVisualConfigs code that isn't used - anymore. There is more code we can remove later, but I want to do that in - separate commits. - (cherry picked from commit 94162b0f8a25267aca280d25e216cc6bde47da6e) - (cherry picked from commit 15bb6abd59fdefe7037237faaea1a39711a972ed) + Signed-off-by: Tiago Vignatti -commit 9e03178ae2da6beb939141f662d875c4c1d40354 -Author: Michel Dänzer -Date: Tue Jan 13 13:05:32 2009 +0100 +commit c09779f95a9772c0556760222dfc570dbaf8a28e +Author: Tiago Vignatti +Date: Fri Jul 24 13:37:31 2009 +0300 - EXA: Declare glyph cache picture as component-alpha when necessary. + xfree86: delete stupid video driver dump (-modalias option) - Without this, rendering component-alpha glyphs may break without a mask. + Such stupid and ugly way to dump PCI information! Oh boy... Anyway, this + doesn't belong to the X server at all. Go away! - Fixes http://bugs.freedesktop.org/show_bug.cgi?id=19233 . - (cherry picked from commit 639f289dcdbe00a516820f573c01a8339e120ed4) + Signed-off-by: Tiago Vignatti -commit 648807adb059b6cfc413d41e3a37670ce850aee6 -Author: Keith Packard -Date: Fri Jan 30 15:43:04 2009 -0800 +commit 0524420622df6cbdb3872917906f7b2a6ec02958 +Author: Colin Harrison +Date: Mon Jul 27 15:49:41 2009 +0100 - Make RandR CRTC info report panning area instead of just crtc area + Cygwin/X: use GWLP_WNDPROC, GWLP_USERDATA with Get/SetWindowLongPtr - This makes the RandR info consistent with the Xinerama info. + Missed from commit b3751454cbe02ee952bab213e8c3684d429c41b3 - Signed-off-by: Keith Packard - (cherry picked from commit 6e49fdd2c839b6244c23ce95c3ae76a1a265b986) + Signed-off-by: Jon TURNEY -commit 9b2958b3a2fb4b65d67916ba7e98dfd21ad434f3 -Author: Maarten Maathuis -Date: Fri Dec 19 18:59:27 2008 +0100 +commit b1c3dc6ae226db178420e3b5f297b94afc87c94c +Author: Rémi Cardona +Date: Mon Jul 27 12:07:51 2009 +0200 - randr: Consider panned crtc's when calculating xinerama screen sizes. + config: add HAL error checks - - This will allow window managers and applications to actually use the panned area. - (cherry picked from commit 332d65ec7a6e94d75efe95d53742f137835274de) + This patch simplifies error handling in the HAL code and fixes a + segfault if libhal_find_device_by_capability() failed. + + Fixes http://bugs.gentoo.org/278760 + + Based on a patch by Martin von Gagern + + Signed-off-by: Rémi Cardona + Acked-by: Peter Hutterer -commit 251d0d8090322b2c9dc0c8b7bef001f338d19433 -Author: Keith Packard -Date: Mon Jan 12 13:03:30 2009 -0800 +commit 8898203b0d0e9fa03453b2bcd9b88843cccc3230 +Author: Dave Airlie +Date: Tue Jul 28 19:35:37 2009 +1000 - Update version to 1.5.99.901 (1.6 RC1) + sbus: fixup for rac removal -commit 71628cabc9dddf5c9fe12d555ae0c47d5902b2f7 -Author: Keith Packard -Date: Mon Jan 12 11:51:28 2009 -0800 +commit 4b42448a2388d40f257774fbffdccaea87bd0347 +Author: Dave Airlie +Date: Tue Jul 28 14:47:42 2009 +1000 - Merge include/dix-config-post-verbatim.h into include/dix-config.h.in + xserver: remove RAC/resource handling code. - No sense having an extra include file here; it makes building stuff harder. + This changes the ABI, but since the video ABI is at 6 already + it should be fine. - Signed-off-by: Keith Packard + driver changes are in the pipeline after this. + + Signed-off-by: Dave Airlie -commit cbd977cc15cf22a3e42b10942d5657cb8b9ac335 -Author: Alban Browaeys -Date: Mon Jan 12 10:57:11 2009 -0800 +commit 0a168401c401727e49a12cae43a6a387b1f2928d +Author: Dave Airlie +Date: Tue Jul 28 14:19:24 2009 +1000 - Fix dmx compile on 1.6 branch. - - http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg166742.html - contains a patch from "arekm" which I build upon to make up this one. + pci: add support for pci is boot vga call. - Mostly fixes for Xcalloc which I previously tried to fix the same way but - without finding the right spot. + This allows us to ask the kernel for the boot VGA device + instead of nasty guessing. + +commit b3751454cbe02ee952bab213e8c3684d429c41b3 +Author: Colin Harrison +Date: Tue Jul 21 16:07:56 2009 +0100 + + Cygwin/X: Update Get/SetWindowLong() to Get/SetWindowLongPtr() everywhere - I cannot tell if dmx works though. Only that it at least compile. + Get/SetWindowLong() is superseded by Get/SetWindowLongPtr(), so change to + using that everywhere it remains - Signed-off-by: Keith Packard + Signed-off-by: Jon TURNEY -commit 6be355b8e8cabeb5832ce9970a83782ea46fd4d1 -Author: Peter Hutterer -Date: Fri Jan 9 13:46:20 2009 +1000 +commit c81595e23b48368dafc054f023c1dd16bbad9494 +Author: Jeremy Huddleston +Date: Sun Jul 26 02:32:17 2009 -0700 - dix: drop x/y back into last.valuators before updating the history (#19285) - - positionSprite needs to scale to screen coordinates and in the process of - doing so alters dev->last.valuators[0:1]. Drop the real coordinates back after - finishing and before updating the motion history. This way, we don't push the - screen coordinates into the motion history. + XQuartz: Overhaul setting up visuals - X.Org Bug 19285 - (cherry picked from commit 56efbc0986e782da45addb05ece9f456d41d7a90) + The main change is cleanup of the visualConfigs and setting up alpha correctly there to match the visuals being added earlier (so the default visual has a corresponding GLX visual) + (cherry picked from commit 7351db5c8746be30a4047469ee9b50bc19e62a89) -commit ca21fd7ddf50e6a363c6ad027d46388596872d3b +commit 7f28c555b80dda2ed4f518efdb79733647dfea80 Author: Jeremy Huddleston -Date: Sun Jan 11 01:52:42 2009 -0800 +Date: Sat Jul 25 20:19:05 2009 -0700 - XQuartz: Add locking to make mieq thread safe on OSX - (cherry picked from commit 7a8d2266861e74176b5310b83652a9c10a170494) + XQuartz: Use CopyKeyClass to copy the keymap to the virtual core keyboard. + (cherry picked from commit 9a801d1716f005c30be076fcc9ac8dbb3e74d989) -commit 671b71a6cba1c9da7797524f21ef1b27ff04adfd +commit 1031ac3a7306e7a82169c79c64607696c826c47f Author: Jeremy Huddleston -Date: Sun Jan 11 01:42:24 2009 -0800 +Date: Sat Jul 25 20:18:38 2009 -0700 - XQuartz: misc 1.6 updates (still --disable-glx) - rlAccel is not longer compatable, and it's not worth fixing - Don't override DeviceCursorInitialize with a noop - Don't do a SwitchCoreKeyboard (which wasn't even needed in the first place) - (cherry picked from commit c137f681680e1d04b1513a8be68aeda4d1c56fd5) + Revert "XQuartz: Copy the keyboard map to the core keyboard" + + This reverts commit 795de791cf18c658421d701af645718493eac51e. -commit 69ddac23281534a06c0acb3005a09e4448594925 +commit 48703083a1cf308306f254691d7c2ecda09b3812 Author: Jeremy Huddleston -Date: Sat Jan 10 01:39:08 2009 -0800 +Date: Sat Jul 25 19:34:17 2009 -0700 - Apple: Don't use DRI2 - (cherry picked from commit a1d35cee5907a76977ee43c49cb55c8f411c9794) + XQuartz: Use pDev=NULL for DarwinSendDDXEvent + + These events aren't really related to physical input devices anyways, so it doesn't make sense to use the pointer. + (cherry picked from commit bfe0b9cfa7af4a48dba849cab1eb152c409b4e08) -commit 681cc0f38b0b96c5e41c93d6944e4fa58c950eda +commit b8e0f740829d0c81324aeb59222fc8e3d22493cc Author: Jeremy Huddleston -Date: Tue Dec 23 12:39:38 2008 -0800 +Date: Sat Jul 25 20:17:25 2009 -0700 - XQuartz: Use depth=24 instead of FatalError if we can't figure out our depth - (cherry picked from commit 80b65c5b78d125c4ad3620b87b121c9e666299c3) - (cherry picked from commit 932ed6e949757926a17f7efe6b0255e38efa1152) + mieq: Protect from pDev=NULL in mieqEnqueue and mieqProcessInputEvents + (cherry picked from commit bf60ffb49700da367f7f88983b042a88fef7219b) -commit 7872669105d6d81ded5128eb4d4f1acce34c3b02 +commit dab8de036808e363a8ec9be826cff7fbcd92b953 Author: Jeremy Huddleston -Date: Tue Dec 9 23:48:18 2008 -0800 +Date: Sat Jul 25 15:21:12 2009 -0700 - XQuartz: Make debugging output for invalid depths a bit more detailed - (cherry picked from commit 609fb166b7062c76f0561df12ffe893811f6ac8f) - (cherry picked from commit 1962af7ee3bdf54cfa674187dea67b9ad36cd5a1) + XQuartz: Bump the reported version to X11R7.4 + (cherry picked from commit c83f701aa75c75433b8745f5d79bca3a7516df91) -commit fdfc70ea0a183daaabb9bb436f2b0cbf95f47e88 -Merge: 8cfb353 82f4273 -Author: Keith Packard -Date: Mon Jan 12 10:40:04 2009 -0800 +commit 9e74bb97ab6cb83dd99ec36bd3842197263b8a8c +Author: Jeremy Huddleston +Date: Sat Jul 25 10:39:26 2009 -0700 - Merge commit 'whot/server-1.6-branch' into server-1.6-branch + XQuartz: xpr: Added missing include for RootlessHideAllWindows + (cherry picked from commit 75e104730810acbb11bf8503bac24ea25243b2ac) -commit 82f42730fa268e85dc95c43a6450c35f9e57acdf -Author: Peter Hutterer -Date: Mon Dec 15 10:46:07 2008 +1000 +commit 09b024db636f5a306c9cec3806fffde9acd3c408 +Author: Jeremy Huddleston +Date: Sat Jul 25 15:22:01 2009 -0700 - mi: force CopyKeyClass for key events. (#19048) - - While we don't want to copy all other device classes into the VCK, we need to - copy the key class to transfer the layout from the SDs into the VCK. - This resembles the functionality of SwitchCoreKeyboard in server 1.5. - - Thanks to Colin Guthrie for providing the follow-up patch (#19222) + XQuartz: Use the master device in DarwinSendDDXEvent to avoid duplicate events. + (cherry picked from commit 6fa62192af937aa9656f64b516050bc099231c7a) + +commit 795de791cf18c658421d701af645718493eac51e +Author: Jeremy Huddleston +Date: Sat Jul 25 15:25:06 2009 -0700 + + XQuartz: Copy the keyboard map to the core keyboard - X.Org Bug 19048 + This still doesn't handle the modifier map... gotta figure out what to do now that SwitchCoreKeyboard is gone + (cherry picked from commit 427e1aab41dabb54354bfd30f2baae98ac8202c0) + +commit af8047f7816b39be7015e8cbbe085c57bb354592 +Author: Aaron Plattner +Date: Fri Jul 17 15:10:46 2009 -0700 + + Damage: Add devPrivates to DamageRec - Signed-off-by: Peter Hutterer + Signed-off-by: Aaron Plattner -commit 8cfb353078d9b5d03a9633304038141a60adc970 -Author: Peter Hutterer -Date: Mon Jan 12 11:07:08 2009 +1000 +commit c80ed4945ef6dd50473fab871211b71b3d20dc3c +Author: Aaron Plattner +Date: Fri Jul 17 15:10:32 2009 -0700 - dix: Fix handling of do_not_propagate_mask window attribute. + Damage: Add wrappable hooks for damage create, destroy, register, & unregister. - This was broken in 32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2. + Signed-off-by: Aaron Plattner + +commit fb46474feb69d52d3dfdd61452ced5cfc38f6651 +Author: Jeremy Huddleston +Date: Fri Jul 24 09:16:37 2009 -0700 + + XQuartz: Rever the "Set can_quit to true during a Sparkle-initiated relaunch." change - Signed-off-by: Kim Woelders - Signed-off-by: Peter Hutterer - (cherry picked from commit 30d2cfcd3851870178d62e5067211aa36f87fbd2) + This was in place to work around the issue that was correctly solved with the + previous commit (changing the Windows menu behavior). Reverting this change + no longer causes crashing, so it's safe to show the dialog now. + (cherry picked from commit 023cef31bbb2ab80a241098d82fcfd35ada75fc0) + +commit 0d73893a5795d5c1d28fd0287f2f1965f2ff1bda +Author: Jeremy Huddleston +Date: Thu Jul 23 20:03:29 2009 -0700 + + XQuartz: Change handling of Windows menu to workaround a bug triggered by mixing Sparkle and X11 windows - Conflicts: + NSApplication releases the separator in the Windows menu even though it's an IBOutlet + (cherry picked from commit 27ac5135267be9cb221329ae68461117dd43a4bf) + +commit 171409cecbd848e5fec6334fc61a20e882e80fa9 +Author: Jeremy Huddleston +Date: Tue Jul 21 00:22:12 2009 -0700 + + XQuartz: Set can_quit to true during a Sparkle-initiated relaunch. + (cherry picked from commit b2e9a77111d4572402d8ca95e3368db97ba7d598) + +commit 7ff84d350b44fa40669c1d0d48a715a0bf056ece +Author: Jeremy Huddleston +Date: Mon Jul 20 22:38:25 2009 -0700 + + XQuartz: Added a "Check for X11 Updates..." menu item. + (cherry picked from commit 305144bfa4b59791123c44e869fab93a084792d6) + +commit 1e1dbd1e462f571dad2f9684fcf4cd8ae17eedd5 +Author: Tiago Vignatti +Date: Mon Jun 29 11:46:17 2009 +0300 + + xfree86: "Staticize" functions in xf86AutoConfig.c - dix/events.c + Signed-off-by: Tiago Vignatti + +commit 7c6b5458de9bc7f6cd972a36b56888aaa3d201ee +Author: Aaron Plattner +Date: Thu Jul 23 15:16:44 2009 -0700 + + Fix dist. - Signed-off-by: Keith Packard + * Makefile.am: Include the test/ subdirectory in the dist tarball. + + * include/Makefile.am: Move events.h to sdk_HEADERS and eventconvert.h to + EXTRA_DIST so they're included in the tarball. events.h shouldn't be + included in the SDK either, but for now it's needed by input.h. -commit 10c0287232eab1b93d078774f52e65efa0c03607 +commit 20daa145c437c3ba67970146f6182849f87a1b43 Author: Peter Hutterer -Date: Mon Jan 12 11:07:08 2009 +1000 +Date: Thu Jul 23 08:33:00 2009 +1000 - dix: Fix handling of do_not_propagate_mask window attribute. + mi: fix build error caused by missing xtest.h - This was broken in 32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2. + xtest.h was renamed to xtestconst.h in xextproto. + Requires xextproto 7.0.99.3 - Signed-off-by: Kim Woelders Signed-off-by: Peter Hutterer - (cherry picked from commit 30d2cfcd3851870178d62e5067211aa36f87fbd2) - - Conflicts: - - dix/events.c -commit 93e510d3abaee97f5b7812abc3a2693dabf94478 -Author: Peter Hutterer -Date: Thu Dec 4 10:30:02 2008 +1000 +commit 587c3a2d1961834558193e8e14e8e381a077a253 +Author: Aaron Plattner +Date: Wed Jul 22 10:55:46 2009 -0700 - xfree86: Only use the evdev ruleset on linux. + Bug #22804: Reject out of bounds XGetImage requests - As suggested by Julien Cristau + The XGetImage man page states: - This is an follow-up to - commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a - Author: Peter Hutterer - Date: Wed Dec 3 14:24:25 2008 +1000 + If the drawable is a window, the window must be viewable, and it must be the + case that if there were no inferiors or overlapping windows, the specified + rectangle of the window would be fully visible on the screen and wholly + contained within the outside edges of the window, or a BadMatch error + results. Note that the borders of the window can be included and read with + this request. - Let the DDX decide on the XkbRulesDefaults. + However, the server was only checking the requested region against the screen + bounds, allowing XGetImage requests to read pixels outside the bounds of a + window's ancestors. Normally, this would just read other pixels from the + screen, but if one of the ancestor windows is redirected, the window's backing + pixmap may be smaller than the window itself. - Signed-off-by: Peter Hutterer - Acked-by: Julien Cristau - Signed-off-by: Daniel Stone - (cherry picked from commit 13de7511b17b57a28668e1a60b196ccfe61dbcbe) + This change checks the region against the window's bounding drawable, which is + either the screen pixmap, a redirected window's backing pixmap, or the root + window for servers that don't support GetWindowPixmap. - Signed-off-by: Keith Packard + Signed-off-by: Aaron Plattner + Reviewed-by: Keith Packard -commit cc78f04b22daabc06d9fb82f550e3f4dbbe76f28 -Author: Peter Hutterer -Date: Wed Dec 3 14:24:25 2008 +1000 +commit ecd618957ebf01cb4137f98efec3faed35f8a9f5 +Author: Peter Hutterer +Date: Wed Jul 22 15:19:34 2009 +1000 - Let the DDX decide on the XkbRulesDefaults. - - Rather than assuming rules in the CoreKeyboardProc, init the default rules in - InitCoreDevices, then re-use them later. + dix: fix null-pointer dereference on activating enter/focus grabs. - In the xfree86 DDX, set the rules to "base" or "evdev", depending on whether - we'll load kbd or evdev. + EventToXI2 returns a NULL event for enter/focus events since these events + aren't yet wrapped into internal events. This is a quickfix only, it works + thanks to the alignment of internal and XI2 event types. - If we create a new MD, use pc105,us as default and re-use the rules file used - previously. + Eventually, enter/leave events should be wrapped into internal events. - Signed-off-by: Peter Hutterer - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 02c059ea99a791b9e3643b4fb131af01306b1c23 -Author: Keith Packard -Date: Sun Jan 11 15:56:28 2009 -0800 +commit 48585bd1e3e98db0f3df1ecc68022510216e00cc +Author: Peter Hutterer +Date: Wed Jul 22 12:09:24 2009 +1000 - dix: move focus handling into enterleave.c. - - This commit moves the focus handling from events.c into enterleave.c and - implements a model similar to the core enter/leave model. - For a full description of the model, see: - http://lists.freedesktop.org/archives/xorg/2008-December/041740.html + dix: use the event mask of the grab for TryClientEvents. - This commit also gets rid of the focusinout array in the WindowRec, ditching - it in favour of a local array that keeps the current focus window for each - device. + A client that grabs for button/key events may not have the + ButtonPress/KeyPress mask set and should not receive an event in that case. Signed-off-by: Peter Hutterer - (cherry picked from commit eb2d7b3d700952ba88c77deacf687b251300e660) - - Conflicts: - - dix/events.c - include/input.h - - Signed-off-by: Keith Packard -commit c75445754e283dc2a306ef1cf2bbd94b40423640 -Author: Peter Hutterer -Date: Fri Dec 19 21:05:09 2008 +1000 +commit 4dc91b3e54503a1be555bae5b18f3e52f58be307 +Author: Pierre Willenbrock +Date: Tue Jul 21 17:21:28 2009 +0200 - dix: add a few auxiliary functions for the updated focus model. + Check if new space was actually allocated before freeing. - SetFocusIn and SetFocusOut, including the static array to keep all focus - windows. + There will be no new space allocated, if mode != PropModeReplace and + len == 0, or if mode is not one of the handled modes. + This fixes freeing data that is still in use, leading to double frees and + other memory corruption. Signed-off-by: Peter Hutterer - (cherry picked from commit 673eb23aac578dcdc04e2a99d1fa5c2987eb58b8) -commit ceeb62f892a1a4df9ef1054d2c9ba12e26d55ef2 +commit 9a1bfa5664a80f03cedeb89b9f8a86115a08e7af Author: Peter Hutterer -Date: Thu Dec 18 15:55:11 2008 +1000 +Date: Mon Jul 20 16:39:16 2009 +1000 - dix: reduce FirstPointerChild complexity + input: remove XI2 keysym grabs, use keycode grabs instead. - Instead of keeping a flag on each window for the devices that are in this - window, keep a local array that holds the current pointer window for each - device. Benefit: searching for the first descendant of a pointer is a simple - run through the array. + Keysym grabs are tricky in the details, keycode grabs are known to work. So + for now, provide keycode grabs only. + + Requires inputproto 1.9.99.15. Signed-off-by: Peter Hutterer - (cherry picked from commit 38b28dcadd0990cb43f50db4300eebb8f044db96) -commit ed90245461f33f1e0eac01c0dea4d0132364f60a -Author: Peter Hutterer -Date: Thu Dec 18 15:43:18 2008 +1000 +commit afc3e3b5955ea4a49308399820cc4c499f4312da +Author: Jon TURNEY +Date: Tue Jul 21 16:14:21 2009 +0100 - dix: remove now unused "exclude" parameter from FirstPointerChild + Cygwin/X: winInitMultiWindowClass() should be static - Signed-off-by: Peter Hutterer - (cherry picked from commit 72ad4a85cc0ffe60a90011d65ef718d5852beae4) + Signed-off-by: Jon TURNEY -commit f0025f59e85f48da5e77cd6b759a693d40b2f9ea -Author: Keith Packard -Date: Fri Jan 9 11:20:31 2009 -0800 +commit 9dc8106ba095474fea1474622b0f0162c8fd5aa4 +Author: Michel Dänzer +Date: Tue Jul 21 14:34:47 2009 +0200 - dix: re-implement enter/leave model. + randr12: Add compatibility for XF86VidMode gamma ramps. - The old model was implemented based on a misunderstanding of NotifyVirtual and - NotifyNonlinearVirtual events. It became complicated and was broken in some - places [1]. This patch wipes this model completely. + Fixes screensaver fadeout effects. - A much simplified implementation is provided instead. Rather than a top-down - approach ("we have a tree of windows, which ones need to get which event") - this one uses a step-by-step approach. For each window W between A and B - determine the pointer window P as perceived by this window and determine the - event type based on this information. This is in-line with the model described - by Owen Taylor [2]. + Also make all RandR 1.2 compatibility code for XF86VidMode operate only on the + CRTC associated with the compatibility output, not all CRTCs at once. + +commit 268e227ba06c027f5c56b1aaee5dcc6a2034403f +Author: Michel Dänzer +Date: Tue Jul 21 14:34:13 2009 +0200 + + EXA: Make Prepare/FinishAccess tracking resilient to repeated / nested calls. - [1] http://lists.freedesktop.org/archives/xorg/2008-December/041559.html - [2] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html - (cherry picked from commit 0aa4460c3b4f9bb17d5412d76fa8c4c501132429) + Use reference counting and do nothing unless the reference count transitions + to/from 0. - Conflicts: + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=22822 . - dix/enterleave.c + As a bonus, this avoids calling the driver Prepare/FinishAccess hooks more than + once per pixmap and operation. + + Also update the Doxygen documentation for the PrepareAccess driver hook to + better match current reality. -commit 1ffd9ec7606606570980490b91b780e02bc29d7d -Author: Peter Hutterer -Date: Tue Dec 16 17:10:03 2008 +1000 +commit de7a14ca92f99ff03c8ad204aab5be8203c86a72 +Author: Michel Dänzer +Date: Tue Jul 21 12:55:27 2009 +0200 - xfree86: don't restore the TTY mode if we didn't initialize it ourselves + EXA: Fix up some issues introduced by 00fe4a297744c81b40f0243fb56ad848a9be6a2b. - Restoring it unconditionally means we restore to whatever tty_mode has as - default value (i.e. 0). K_RAW happens to be 0x00, so we always restore to raw - mode if allowEmptyInput is off. + * Check all pixmaps involved for damage records, fixes visual corruption due to + the screen pixmap never having one. + * Fix an array size and remove a now superfluous assignment. + +commit be4dd35ffecbf49aff13aa9f604a44c9b665ae92 +Author: Jeremy Huddleston +Date: Sat Jul 18 15:51:29 2009 -0700 + + XQuartz: Initial support for automatic updates through Sparkle + (cherry picked from commit c45f1be36426bceeef9af67c26351114f14f5277) + +commit 2415e2dce918efd49d5e6d71f705255a234a866b +Author: Michel Dänzer +Date: Mon Jul 20 02:08:31 2009 +0200 + + EXA: Bail earlier from exaDoPutImage if the driver has no UploadToScreen hook. - Signed-off-by: Peter Hutterer - Signed-off-by: Adam Jackson - Signed-off-by: Julien Cristau - (cherry picked from commit aea6f19f25e13768b1d09fac4991d6a5e6c2cdac) + Also remove dead code associated with access_prepared local variable. -commit 3c11efd7dc09aa92039f851c2bbf2ca6b5a5ac8c -Author: Peter Hutterer -Date: Tue Dec 23 09:59:28 2008 +1000 +commit 00fe4a297744c81b40f0243fb56ad848a9be6a2b +Author: Michel Dänzer +Date: Mon Jul 20 02:04:40 2009 +0200 - xfree86: If an input device failed to activate, return immediately. + EXA: Completely eliminate exaDoMigration calls for drivers that manage pixmaps. + +commit 7b9915b11ed9eedd0698b4563328504d686ac4ec +Author: Gaetan Nadon +Date: Sat Jul 18 20:52:20 2009 -0400 + + dix: xserver "make dist" fails due to eventconvert.h (#27825) - Devices are only activated once - right after they've been added to the - server. If a device failes activation, it's dead. There's no reason to - continue. Return the error code from ActivateDevice() without setting up - sprite information or even sending a event to the client. + This header file is not in the /dix dir, but in the /include dir. + The makefile aborted and the xserver distribution files were not created. + The fix is to remove this header file from the libdix_la_SOURCES + in the dix/Makefile.am. - Then - in the DDX - just remove the device again. + X.Org Bug 27825 Signed-off-by: Peter Hutterer - (cherry picked from commit 27011254c4de4e573a0851bf46892fb488db6522) - -commit 2ce48363b862db134624797bc071f8c45323a075 -Author: Peter Hutterer -Date: Tue Dec 23 10:00:34 2008 +1000 - - xfree86: don't call CheckMotion if a device hasn't been enabled. #19176 - - X.Org Bug - (cherry picked from commit e1a3a1a0d85c9971aea65c2228b5fd4dbf3bf57a) -commit 3225e1378e3929e538941bbfc9ec495638bd407a -Author: Maarten Maathuis -Date: Fri Dec 26 15:51:55 2008 +0100 +commit a98acb290737ac6b0776f2ea8128a4613c0f778b +Author: Adam Jackson +Date: Wed Jul 15 13:56:19 2009 -0400 - exa: preparing as source and finishing access as mask is a bad idea - (cherry picked from commit 027b440d4f9f0cdd46addff46fd2d5c44cd5c847) + s/xf86EnableOutputs/xf86CollectEnabledOutputs/ for clarity -commit 2056c10d12f6b4facf628b861230f9b0a13f3a73 -Author: Maarten Maathuis -Date: Fri Dec 26 16:38:27 2008 +0100 +commit 8fab7f72f2cc4ac5ca415c95ccbd05d3084f10c4 +Author: Adam Jackson +Date: Wed Jul 15 14:09:08 2009 -0400 - exa: Allow drivers to set non-NULL devPrivate.ptr for !offscreen pixmaps. - (cherry picked from commit 3534a5e5d9c5af85149c799f324257f89507fa23) + randr: Add Option "Primary" to Monitor sections -commit 4130761f151ff5414694472e1dc29d8f2893f10e -Author: Jeremy Huddleston -Date: Wed Jan 7 10:56:26 2009 -0800 +commit 053bb92145045e06f8d72c3bddb75806432faa1c +Author: Adam Jackson +Date: Thu Jul 16 14:29:05 2009 -0400 - XQuartz: Fat binary buildfixes + xfree86: Remove xf86SetPriority - Let Xarch.h set X_BYTE_ORDER for us. - Determine _XSERVER64 at build time. - (cherry picked from commit f54736c2b0b537c8322ecb2db8e9cee5eea68165) - (cherry picked from commit cc677cb4f458f371a4012ce0dc1121a52a2cb699) + GetClocks is pretty doomed to begin with, this really isn't going to + make it worse. -commit 2eb09af56179d570a6d52b65c2029a2b62dcdff3 -Author: Jeremy Huddleston -Date: Sun Nov 16 15:35:17 2008 -0800 +commit 3637945a45d55385335833197b18703379892884 +Author: Adam Jackson +Date: Thu Jul 16 14:10:45 2009 -0400 - XQuartz: Use AvailabilityMacros.h instead of availability.h for Tiger - (cherry picked from commit 91f3c3435716195e6d606c8e2f6b0de52eb5972d) - (cherry picked from commit 65ab2f44ea7fc4d87e021bed548eda81fc3cbae7) + loader: Remove a useless check. -commit fecc82ee1147cb314725ac774525a18a861ed719 -Author: Jeremy Huddleston -Date: Fri Jan 2 11:06:12 2009 -0800 +commit ef2bb08c76f0d1eed0c8b3e4937648f0b6ae01e5 +Author: Adam Jackson +Date: Thu Jul 16 13:53:00 2009 -0400 - XQuartz: Copyright Update... happy new year - (cherry picked from commit 9f1c26ae8d9ccf81cba0ab946326968a701f8c36) - (cherry picked from commit df6ca888b0c04fdf4ff2d7fb4a414275b983ed34) + loader: remove dead LoaderCheckUnresolved -commit d80e35a9ae507ad742f97ca7254314ff28371688 -Author: Jeremy Huddleston -Date: Fri Jan 2 10:58:40 2009 -0800 +commit 06a2784232b5d0e2440ed365d272abdfa1f5d35f +Author: Adam Jackson +Date: Thu Jul 16 13:40:48 2009 -0400 - XQuartz: pbproxy: Push dpy init and CFRunLoop hook setup into the pbproxy thread to avoid possible deadlock - (cherry picked from commit 49e59d32b88e4fad070f230b5efaa261b47f78db) - (cherry picked from commit adbfd49da2453b58a9e13b09c62e0611ea1c3f77) + loader: Remove useless TestFree() macro -commit c32a680f2670f05902ee323c68f772f52d3a8320 -Author: Jeremy Huddleston -Date: Wed Dec 31 12:40:02 2008 -0800 +commit 087745b809b9a834751e5c719b9d87967194369b +Author: Adam Jackson +Date: Thu Jul 16 10:51:53 2009 -0400 - XQuartz: Don't use NX_SECONDARYFNMASK, NX_NUMERICPADMASK, NX_HELPMASK - - We don't have keycodes for them, so don't try to use them - (cherry picked from commit cb912aca3a2834c4ad8e386c8a0d05c1bb31b0e7) - (cherry picked from commit 0676a580fcc05d54049269028a34358935a4101c) + fbdevhw: Remove pointless OS check, this never gets built on non-Linux -commit e08ce79152b0887b8d67c4b03b33634f5ef499bc -Author: Jeremy Huddleston -Date: Wed Dec 31 11:57:49 2008 -0800 +commit 892c93553aa0b03aeb3f4c27d952cc4bb7120aff +Author: Adam Jackson +Date: Thu Jul 16 10:51:27 2009 -0400 - XQuartz: Make sure to reset the saved key state when deactivating X11.app - (cherry picked from commit 3eef78eb321f4f7dbca5a10c80666c621e28a1e0) - (cherry picked from commit 0d2621b6d4684ec62e67156a5a9dbdd3297f9cb0) + fbdevhw: Remove a #if 0 -commit bdf776b4579921dd49316c2ff32ff12cc702720a -Author: Jeremy Huddleston -Date: Wed Dec 31 12:44:50 2008 -0800 +commit e5712f2926abf33b146a4ccfcf6e89c914dad37b +Author: Adam Jackson +Date: Thu Jul 16 10:49:22 2009 -0400 - XQuartz: Honor system key repeat rate - (cherry picked from commit 4303c9be39a86f5a21de108f72b90a989435905e) - (cherry picked from commit 9faf3de7e5610af340b92acb1b86bf03b6f2241a) + fbdevhw: simplify some #if 1 -commit 16560db0c041b24346e186169f6e3bd315ca13ae -Author: Jeremy Huddleston -Date: Mon Dec 29 19:54:12 2008 -0800 +commit 8868bb4131be25340bf65ec61b998d353965bab6 +Author: Adam Jackson +Date: Thu Jul 16 10:44:24 2009 -0400 - XQuartz: Better avoid stuck keys on context switches - (cherry picked from commit e9963f1a4f4f12f253eae9d4f01694b6cabe35ad) - (cherry picked from commit 4be8d7346b9fdc014b72dd6c404ceecc0ef0d245) + randr: Un-duplicate the reduced blanking check. -commit 66f801f5a06925c303027f856c5ecea4926d80f2 -Author: Jeremy Huddleston -Date: Mon Dec 29 19:38:31 2008 -0800 +commit 453ee39bc6a6b46e6cda11512cfcd431ba32a4b7 +Author: Adam Jackson +Date: Thu Jul 16 10:39:37 2009 -0400 - XQuartz: Workaround OSX VNC server bug for modifier key state - - A better approach which ensures we have a L modifier key down if we are told neither are down and atleast one is down... =/ - (cherry picked from commit bc13dda345f716bf4de9bfe4e1d85969263b60c2) - (cherry picked from commit c67a3e2972c75c02f1aeed94bc0a3c5272422267) + xfree86: Fix some misleading comments -commit a05dbce40248159099c7a7ec7e94bff9ffb700fc -Author: Jeremy Huddleston -Date: Mon Dec 29 00:30:31 2008 -0800 +commit 2c57a7aa07fdf52be315ecb498341776268c1a10 +Author: Adam Jackson +Date: Thu Jul 16 10:32:53 2009 -0400 - XQuartz: Updated man page fullscreen_hotkeys fullscreen_menu - (cherry picked from commit 00f3a2e33c8e91da5f855821313a04ea97445656) - (cherry picked from commit d790c9dd041a2c8e3513d14a556333219d0f8d5e) + xfree86: Remove some #if 0 + + This code all lives in xf86Modes.c now anyway -commit b8877bb9e4c113a400e47a65a7d25d21f0a43116 -Author: Jeremy Huddleston -Date: Sun Dec 28 15:57:59 2008 -0800 +commit 1a8c89683ff40cdd1d33da89ab47e7bd240b9bb7 +Author: Adam Jackson +Date: Thu Jul 16 10:15:41 2009 -0400 - XQuartz: pbproxy: We explicitly need libX11 for pbproxy - (cherry picked from commit 32824120da0749b8369c2592f851bb1030dea9f1) - (cherry picked from commit 8c6e8fa811c782c85e7fefbe75fe5480098739ae) + xfree86: Remove TargetRefresh option + + This was a vestige from the days before we'd make the mode list from the + EDID data, and from CRT technology when you could reasonably assume that + higher refresh rates were better. Also it did not function as advertised, + acting as a high-pass filter instead of a band-pass. -commit de78ac43782d7f4ad4b98622e3c419c893d3eeff -Author: Jeremy Huddleston -Date: Sun Dec 28 01:53:38 2008 -0800 +commit b4ee3bf700e04ae1b3c4ec021373424ed6e5338f +Author: Adam Jackson +Date: Fri Jul 17 14:57:50 2009 -0400 - XQuartz: Try harder to get the user's login environment - (cherry picked from commit 6bedaddd78aa04bd303df434a4c49bb87bd7deaa) - (cherry picked from commit 338f096861136fb6c4f604e93ff21277252676b7) + dbe: Fix indentation -commit c391114df95109d306e172bea75781d0e9523f62 -Author: Jeremy Huddleston -Date: Wed Dec 24 00:39:06 2008 -0800 +commit 0bb9a7e1650180a24246d14493a8168487cf8914 +Author: Adam Jackson +Date: Tue Jun 9 11:49:41 2009 -0400 - XQuartz: Reposition windows when we enter fullscreen to ensure our root window - (cherry picked from commit 7617d3659b5481ef85aecc1f936e7dd2662bdfbd) - (cherry picked from commit 61ae56f97326c57dda05632ca9f4873238ee18e1) + displayid: Implement mode decoding. -commit beafebef82687d777d88152c62a351954df7c864 -Author: Jeremy Huddleston -Date: Tue Dec 23 20:33:27 2008 -0800 +commit 2f1a9c5baa367818bf017bdb72f20a2f6fa7ac21 +Author: Adam Jackson +Date: Tue Jun 9 10:13:47 2009 -0400 - XQuartz: Re-enable rlAccel + ddc: s/xf86DDCMonitorSet/xf86EdidMonitorSet/ - It was incorrectly blamed for some crashes a few months ago, and it should be - safe to use until we get an EXA driver to replace it. - (cherry picked from commit 8121f30bd29591fc74fbc680fbbf20210271fa58) - (cherry picked from commit 85347902d97f2d4937f63ae1fac62ee46a61c82f) + Since we need a second path for DisplayID. -commit 86ba5eff623336592091b990209eb07b3f74f8b9 -Author: Jeremy Huddleston -Date: Sun Dec 21 21:03:59 2008 -0800 +commit d0cb4f5a91932e901d10cac5f2a4ba12bb8a0e6f +Author: Adam Jackson +Date: Tue Jun 9 10:10:18 2009 -0400 - XQuartz: Don't use keycode 0 to determine !swallow since our most common key to swallow is actual keycode 0 (a) - (cherry picked from commit 33f43a7f03023bfbab25a957cb81fc25b4afa4ca) - (cherry picked from commit 84f0c03418bf74188596635dcac128fc05f204ad) + ddc: Refactor root window property code -commit 2a42a059ce7b259622b36fb3ef909f289d5388d7 -Author: Jeremy Huddleston -Date: Sun Dec 21 20:40:36 2008 -0800 +commit 14103b781201bc36896cbe9112a2e0d991fb785d +Author: Adam Jackson +Date: Tue Jun 9 10:05:01 2009 -0400 - XQuartz: Update our "screens" when we toggle rootless rather than when we toggle fullscreen - - This old behavior was used as a workaround for the menubar behavior in the older server, - but we handle it better now and need to update our screens when we toggle the rootless - state instead. - (cherry picked from commit 508aa95bc2cd3fdc3dff448ec090919bf807d153) - (cherry picked from commit 7e7758e1780326ad867be74dbd583a154bad017b) + ddc: Don't try to publish a root window property for DisplayID -commit 51319550c9bb079c3af1b98c96c5174bc74e0dbd -Author: Jeremy Huddleston -Date: Sun Dec 21 14:54:11 2008 -0800 +commit c302a5ff49146bff24df196fc36ed38745d42911 +Author: Adam Jackson +Date: Mon Jun 8 17:42:10 2009 -0400 - XQuartz: Run applications via '/bin/sh -c ...' to support users who expect shell parsing - (cherry picked from commit 67455e716e3ecffd528930479192785958d37988) - (cherry picked from commit 7dc0dafef1d241d396f215c506ec2d4f7d8e3a24) + ddc: Skeleton for xf86DoDisplayID() -commit b0503b69f998bcf5398ed0382a38346a3f18a77c -Author: Jeremy Huddleston -Date: Sun Dec 21 14:43:12 2008 -0800 +commit 0b36f68efb1171fcdbe53e93064394f5609b7fb5 +Author: Adam Jackson +Date: Mon Jun 8 15:36:15 2009 -0400 - XQuartz: pbproxy: Release display notification lock when not needed to avoid deadlock - (cherry picked from commit 22f664ab95a0cae981e9cefad6f075d051583ca5) - (cherry picked from commit 4c256c0e9c4fe61990343c8bcf2e352c83d76e69) + ddc: mv xf86DDC.c ddc.c -commit 6c635faa6ff0474199f4f7375022efe1e8ffa8f1 -Author: Jeremy Huddleston -Date: Sun Dec 21 14:42:26 2008 -0800 +commit 8eb82168fc5c7ea958a4f63676738510647dd203 +Author: Adam Jackson +Date: Mon Jun 8 15:34:42 2009 -0400 - XQuartz: update quoting in case X11.app is moved to a directory with a space. - (cherry picked from commit cc805dc799efa37c8dcefa3db04d87e9b835ffbd) - (cherry picked from commit ecc3a7b6090552c309fe8e264d527ddd666a5761) + ddc: Give DisplayID a place to hang its hat -commit 14d9ccf0ce4c5b4820e692cb58077c4c5918f12a +commit ace0fe09aee48d57cd0079260cd8d20d041e8eb6 +Author: Adam Jackson +Date: Mon Jun 8 14:45:47 2009 -0400 + + ddc: Yet more code motion + +commit 3a350688bbe1257feaf1502b4009f5f701d2640e +Author: Adam Jackson +Date: Mon Jun 8 14:37:38 2009 -0400 + + ddc: Code motion to eliminate forward decls + +commit 8797831f82637b0e65a08e1262d1ec57c075cc12 +Author: Adam Jackson +Date: Mon Jun 8 14:30:53 2009 -0400 + + ddc: Update a comment. + +commit bb6fa39eb3aa044ffc18632288fd59909ff06344 +Author: Adam Jackson +Date: Thu Jul 16 17:43:31 2009 -0400 + + dbe: Adapt to new headers + +commit 9965174f4f09a7de00a9569607e96226208bc2ce +Author: Pierre Willenbrock +Date: Thu Jul 16 12:12:48 2009 +0200 + + Check dev->u.master if there is a custom event handler, too + + Signed-off-by: Peter Hutterer + +commit c806162c133603a99d9cd844bb04485bb663707d +Author: Pierre Willenbrock +Date: Tue Jul 14 13:42:19 2009 +0200 + + Always update u.lastSlave + + Signed-off-by: Peter Hutterer + +commit 4db8950b1dfc3150ee2e9f1f975e9ecb4eabb1f2 +Author: Peter Hutterer +Date: Fri Jul 17 10:40:59 2009 +1000 + + Xext: include securproto.h instead of securstr.h + + Reported-by: Byeong-ryeol Kim + Signed-off-by: Peter Hutterer + +commit b5f6da1e9b37f52484948185dcf17950657cd65b +Author: Oliver McFadden +Date: Fri Jul 17 06:34:00 2009 +0300 + + Revert "Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty:" + + This reverts commit 7333dc2969f60af0abcfb28e7182a5fff9918223. + + False positive. + +commit f517fca31d8c341ad36f3de4863adb0bc5206176 +Author: Jeremy Huddleston +Date: Thu Jul 16 17:28:56 2009 -0700 + + XQuartz: Localization updates + (cherry picked from commit 4b797fc1edf2bd963410a3133e3d2182ccfda4c3) + +commit c8a35165147a9b2f747b25da80d0fdb4279a8331 +Author: Jeremy Huddleston +Date: Thu Jul 16 17:20:16 2009 -0700 + + XQuartz: Cleanup getGlCapabilities to avoid hardcoding the number of displays + (cherry picked from commit 12f7365f1f58d648217b16f09c2152fa47dcd7a1) + +commit e7bc9ff816c1848c700a376908a1411f1e20d29f +Author: Jeremy Huddleston +Date: Thu Jul 16 16:59:47 2009 -0700 + + XQuartz: Allow more than 3 OSX displays + (cherry picked from commit 45045eb3968069a8d74ce9188890a5537dc60fec) + +commit 7333dc2969f60af0abcfb28e7182a5fff9918223 +Author: Oliver McFadden +Date: Thu Jul 16 18:57:49 2009 +0300 + + Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty: + + Event alloc_arg: Called allocation function "XIPropToInt" on "ptr" [details] + 167 rc = XIPropToInt(val, &nelem, &ptr); + + Event leaked_storage: Variable "ptr" goes out of scope + +commit 66eabbebaf1b40fed7670b7c05337ed6226dd81e +Author: Oliver McFadden +Date: Thu Jul 16 18:50:22 2009 +0300 + + Coverity Prevent: RESOURCE_LEAK in xf86CrtcSetInitialGamma + +commit 464e8ad733fa6afee028607d6e7d4663b4c273cc +Author: Oliver McFadden +Date: Thu Jul 16 17:51:08 2009 +0300 + + Coverity Prevent: NEGATIVE_RETURNS in fbdev_open_pci: + + Event var_tested_neg: Variable "fd" tested NEGATIVE + At conditional (1): "fd != -1" taking false path + 335 if (fd != -1) { + + Event negative_returns: Tracked variable "fd" was passed to a negative sink. + 347 close(fd); + +commit 53ae6b63387e04324b23b6f8311cc22a154c1fb8 +Author: Jeremy Huddleston +Date: Wed Jul 15 23:18:35 2009 -0700 + + XQuartz: Cleanup keymap locking, fix a possible synchro bug + (cherry picked from commit 33e7437a4984ee7c1b04b87d23dee7d4739d5f12) + +commit 6a90c7b93724a2d26eae70b5806ca06c91e7df4c +Author: Peter Hutterer +Date: Thu Jul 16 09:28:42 2009 +1000 + + xkb: cosmetic fix, use TRUE instead of True. + + Rest of InitKeyboardDeviceStruct uses TRUE and FALSE. + + Signed-off-by: Peter Hutterer + +commit 52088d3c2d53a91b2690f9cc402f839d77769e37 +Author: Éric Piel +Date: Sun Jun 21 18:11:28 2009 +0200 + + xserver: remove unused code in clipValuators + + The axes variables was never used, remove it. + + Signed-off-by: Peter Hutterer + +commit d3f6b43a240eb763025b3cbf546cb7ae502c94fa +Author: Peter Hutterer +Date: Wed Jul 15 16:51:05 2009 +1000 + + Update to xextproto 7.0.99.1. + + xextproto had Xlib client headers moved into libXext. + Protocol header files are named fooproto.h, header files with constants + foo.h or fooconst.h where foo.h was already in use for client-side headers. + +commit 693babbf12cc7969c3e211c4037c7af0d41c13e9 +Author: Peter Hutterer +Date: Wed Jul 15 12:30:02 2009 +1000 + + xkb: Remove XKMformat.h include from xkbsrv.h into the files that need it. + + xkbsrv.h is used by drivers, they don't need the XKM format and shouldn't + require it. + + Signed-off-by: Peter Hutterer + +commit 35ff5cd26eb7564fefebf238e30b8d43cbb4dc25 +Author: Peter Hutterer +Date: Wed Jul 15 10:29:46 2009 +1000 + + dix: fix wrong raw valuator copy + + internal events keep valuator data at the index for the valuator, not like + the wire events that start with first_valuator. + + Signed-off-by: Peter Hutterer + +commit 975bf60a82f863e3bdc36fc3f8201b48a4d1e6f7 +Author: Peter Hutterer +Date: Wed Jul 15 10:29:19 2009 +1000 + + dix: use sizeof(FP3232) instead of 2 * sizeof(int32_t). + + Signed-off-by: Peter Hutterer + +commit d040af7fa3c7314917414a28d723bdda3c4289c3 +Author: Peter Hutterer +Date: Mon Jul 13 15:09:38 2009 +1000 + + Update to type-specific raw events - require inputproto 1.9.99.14. + + Signed-off-by: Peter Hutterer + +commit 81b64f668541217c1c9518ac4a7e3fdf0a6e4002 +Author: Fredrik Höglund +Date: Wed Jul 15 00:38:01 2009 +0200 + + Require renderproto >= 0.11 and pixman-1 >= 0.15.14 for the new blend modes. + +commit 0ce42adbf4cff9e7f049d9fc79d588ece5936177 +Author: Fredrik Höglund +Date: Wed Jul 15 00:37:05 2009 +0200 + + Render: Add support for the PDF blend mode operators. + +commit 686e4867302a741f3029c4105b997d0f0ac7c13c +Author: Tiago Vignatti +Date: Tue Jul 14 17:11:13 2009 +0300 + + xfree86: remove a bunch of unused pci headers + + Signed-off-by: Tiago Vignatti + +commit cc575a3ba4a52265e410b325c2291fe900a54f33 +Author: Peter Hutterer +Date: Fri Jun 12 11:38:46 2009 +1000 + + test: add tests for ProcXIGetClientPointer. + + Signed-off-by: Peter Hutterer + +commit 92b0065a19dcde50494d2528e19a4ee76723b3da +Author: Peter Hutterer +Date: Fri Jun 12 11:38:00 2009 +1000 + + test: add ProcXISetClientPointer tests. + + Signed-off-by: Peter Hutterer + +commit 019bc9d70c5b3beb69ca20b6bca3551e00415992 +Author: Peter Hutterer +Date: Fri Jun 12 11:37:17 2009 +1000 + + test: add ProcXIGetSelectedEvents tests. + + Signed-off-by: Peter Hutterer + +commit 8579d39c12b065d8e82fe75af4b254c8ad4f4ab8 +Author: Peter Hutterer +Date: Fri Jun 12 11:36:22 2009 +1000 + + test: add ProcXISelectEvents tests. + + Signed-off-by: Peter Hutterer + +commit 60b7a7990003a22be5cc26ebe4d8d2d0803b97de +Author: Peter Hutterer +Date: Fri Jun 12 11:33:22 2009 +1000 + + test: add ProcXIQueryDevice tests. + + Signed-off-by: Peter Hutterer + +commit 441c91be05912e2665cc1d3ee72fb70dcd32e7a2 +Author: Peter Hutterer +Date: Fri Jun 12 11:32:15 2009 +1000 + + test: Add ProcXIQueryVersion tests. + + Signed-off-by: Peter Hutterer + +commit 1d635ae65b217e124b3bd5a8844e73f447eb1b79 +Author: Peter Hutterer +Date: Fri Jun 12 11:30:53 2009 +1000 + + test: add xi2 directory, prepare for protocol testing. + + These two files provide a couple of common defines, functions and variables + that will be used in a number of protocol tests. + + Signed-off-by: Peter Hutterer + +commit 4b93413b2a490a74de2e27b37268332b609ac872 +Author: Peter Hutterer +Date: Tue Jul 14 11:20:01 2009 +1000 + + Add test subdir to base Makefile.am + + If unittests are enabled, make will build those as well - spotting potential + build errors in the tests faster. Furthermore, this allows for the tests to + be run from the top-level directory. + This patch removes the "run make check to build the test suite" message + since that'd pop up after every build now. + + If unittests are disabled, this change has no effect. + + Signed-off-by: Peter Hutterer + +commit e2226f3cd7d1bef598f9657b756a171b02f1a299 +Author: Peter Hutterer +Date: Mon Jul 6 14:57:04 2009 +1000 + + dbe: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit 3e1a054423c22f0e35f25127dde1ea8263892480 +Author: Peter Hutterer +Date: Mon Jul 6 14:24:45 2009 +1000 + + record: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit 089c460058c4e6814d98d40179eb4c731f37fa80 +Author: Peter Hutterer +Date: Mon Jul 6 14:22:40 2009 +1000 + + xkb: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit 0dc11da57562a7bbb6830ab657a2b818c596a537 +Author: Peter Hutterer +Date: Mon Jul 6 12:41:29 2009 +1000 + + ephyr: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit 34bfaa9d9ecd90cfe8413bc275179fdcc193eab3 +Author: Peter Hutterer +Date: Mon Jul 6 12:29:26 2009 +1000 + + xfixes: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit e216527107fda470b92b7e526f3db22465962a43 +Author: Peter Hutterer +Date: Mon Jul 6 12:27:23 2009 +1000 + + render: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit 1d6b71b8d0dc24355e84391ba413170a03ccdbf4 +Author: Peter Hutterer +Date: Mon Jul 6 12:25:39 2009 +1000 + + os: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit 86b239ff9c4d01685c357ca2b1ef761d167e3224 +Author: Peter Hutterer +Date: Mon Jul 6 12:24:27 2009 +1000 + + randr: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit 7b9e84e320a6f6449fe7bc58a8d6a094ae37b86c +Author: Peter Hutterer +Date: Mon Jul 6 12:20:21 2009 +1000 + + Xext: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit aa19d355125a10b1a385c8f134d68e79d3d609c7 +Author: Peter Hutterer +Date: Fri Jul 10 14:25:22 2009 +1000 + + xwin: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit 0b4e6af857bcc5513e4c19912a54656d4696e56d +Author: Peter Hutterer +Date: Mon Jul 6 12:12:57 2009 +1000 + + xquartz: switch to byte counting functions + + Signed-off-by: Peter Hutterer + Signed-off-by: Jeremy Huddleston + +commit ad508c93c239a5ba8381000c031e96caf2769265 +Author: Peter Hutterer +Date: Mon Jul 6 12:12:20 2009 +1000 + + xfree86: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit c20304226b3ca2f8d0a4f4866480b0d71913941c +Author: Peter Hutterer +Date: Mon Jul 6 12:07:00 2009 +1000 + + glx: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit 87ce93c9973067255b4197d82772f83cd4ea5d27 +Author: Peter Hutterer +Date: Mon Jul 6 12:06:47 2009 +1000 + + dmx: switch to byte counting functions + + Signed-off-by: Peter Hutterer + +commit dc82e11e509ecf586d77c3e7c1325d515509ce51 +Author: Peter Hutterer +Date: Mon Jul 6 12:03:34 2009 +1000 + + exa: switch to byte counting functions. + + Signed-off-by: Peter Hutterer + Acked-by: Michel Dänzer + +commit 2d35ea8d957a955e1200ba2b14424bddfe1f4148 +Author: Peter Hutterer +Date: Fri Jul 3 16:50:03 2009 +1000 + + dix: switch to byte-counting functions. + + Signed-off-by: Peter Hutterer + +commit 7dd415aa6a3959f15276741db168ba264948ecfe +Author: Peter Hutterer +Date: Fri Jul 3 13:57:14 2009 +1000 + + Xi: use byte-counting macros instead of manual calculation. + + Signed-off-by: Peter Hutterer + +commit 912402fd71144bcee255141efe12a78abad39240 +Author: Peter Hutterer +Date: Mon Jun 29 13:09:57 2009 +1000 + + include: introduce byte counting functions. + + This patch adds the following three functions: + bits_to_bytes(bits) - the number of bytes needed to hold 'bits' + bytes_to_int32(bytes) - the number of 4-byte units to hold 'bytes' + pad_to_int32(bytes) - the closest multiple of 4 equal to or larger than + 'bytes'. + + All three operations are common in protocol processing and currently the + server has ((foo + 7)/8 + 3)/4 operations all over the place. A common set + of functions reduce the error rate of these (albeit simple) calculations and + improve readability of the code. + + The functions do not check for overflow. + + Signed-off-by: Peter Hutterer + +commit 2c535b6f13ffbf2c4ac59834dae39bb8e172c003 +Author: Peter Hutterer +Date: Tue Jul 14 08:58:23 2009 +1000 + + dix: don't send presence events for attaching/detaching slave devices. + + The code that didn't list attached slave devices for XI1 clients doesn't + exist anymore, so there's no need for these presence events. + + Signed-off-by: Peter Hutterer + +commit 0c0ef42292f4c910c73b308cd75d77637312da53 +Author: Peter Hutterer +Date: Sun Jul 12 21:43:06 2009 +1000 + + dix: Remove temporary detachment of slave devices. + + Previously, an active grab on an attached slave device would send the device + floating for the duration of the grab. This breaks existing XI applications + (e.g. the GIMP) since they grab all devices automatically - resulting in the + loss of control over the VCP. + + The behaviour of extended input devices during a grab in relation to the + core pointer is not specified in the XI protocol specification. + The removal of the temporary detachment restores the behaviour of extended + input devices as present in currently released servers - even if a device is + grabbed, an event from this device will result in an event from the core + pointer. + + Signed-off-by: Peter Hutterer + +commit 9f1570c8f4f549cdd2fbae1234011290fcc73e18 +Author: Peter Hutterer +Date: Fri Jun 26 09:12:47 2009 +1000 + + input: include effective modifiers in device events. + + Require inputproto 1.9.99.13 + + Signed-off-by: Peter Hutterer + +commit 78aedbe609e309446e71835ed15e4557d3ccf723 +Author: Alan Coopersmith +Date: Fri Jul 10 17:35:57 2009 -0700 + + Fix int10 module build after typo in commit 2638e9899 + + Signed-off-by: Alan Coopersmith + +commit 35758544813f156eaac28844e693b2a28f6de316 +Author: Michel Dänzer +Date: Fri Jul 10 20:06:02 2009 +0200 + + EXA: Only pass CT_YXBANDED to RECTS_TO_REGION() if that is really true. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 . + +commit 2638e9899e57d9b25a2cade3247083a6e101dee2 +Author: Tiago Vignatti +Date: Fri Jul 10 16:09:08 2009 +0300 + + configure: introduce --{enable,disable}-int10-module + + Not all chipsets need to rely on the int10 scheme to do its daily work. + + Well, the ideal would be to remove all int10 module from the server. I'll try + to provide some patches "soon" for this. Something like: + http://cgit.freedesktop.org/~vignatti/libx86/ + + Signed-off-by: Tiago Vignatti + Acked-by: Oliver McFadden + +commit 42d95a38535f382bfb2ddfaef93839ab9bbf584f +Author: Tiago Vignatti +Date: Fri Jul 10 15:54:07 2009 +0300 + + configure: introduce --{enable,disable}-vbe + + Not all drivers need this kind of access as well. + + Signed-off-by: Tiago Vignatti + Acked-by: Oliver McFadden + +commit 53d64930513fecaa417bb5a922966b45c9ff8679 +Author: Tiago Vignatti +Date: Fri Jul 10 15:38:51 2009 +0300 + + configure: introduce --{enable,disable}-vgahw + + Not all drivers need this kind of access. + + Signed-off-by: Tiago Vignatti + Acked-by: Oliver McFadden + +commit aafcae79d17c1f802bc880d2142af7171fed75d8 +Author: Tiago Vignatti +Date: Fri Jul 10 14:56:31 2009 +0300 + + xfree86: remove unused vbe header file + + Signed-off-by: Tiago Vignatti + Acked-by: Oliver McFadden + +commit 3711d68f657c77b947cc4670cc4eac4f62de3af8 +Author: Peter Hutterer +Date: Fri Jul 10 11:10:30 2009 +1000 + + Revert "XKB: Sanitise * actions" commits (#19602) + + Reverts the following four patches: + + feb757f384382c7782ceac55 "XKB: Sanitise vmods for redirected keys" + b5f49382fe48f0a762d9a15f "XKB: Sanitise ctrls action" + 1bd7fd195d85681e722161f8 "XKB: Sanitise pointer actions" + 61c508fa78aa08ea2666fde9 "XKB: Sanitise vmods in actions" + + Strictly speaking, the structs used in the server are not part of the client + ABI. Practically, they are as we copy from the wire straight into the + structs. Changing the struct sizes breaks various wire/server conversions. + + Even when the structs have the same size, some internal magic causes + conversions to fail. Visible by diffing the output files of: + setxkbmap -layout de; xkbcomp -xkb :0 busted.xkb + setxkbmap -layout de -print | xkbcomp -xkb - correct.xkb + + Interestingly enough, busted.xkb is the working one although the output is + incorrect. Revert the four offending patches until the exact cause of this + breakage can be determined. + + This patch restores functionality to Level3 modifiers. + + X.Org Bug 19602 + + Signed-off-by: Peter Hutterer + +commit 08df24555cb432eb0d90a3f63275e9485e777c4c +Author: Soren Sandmann Pedersen +Date: Thu Jul 9 17:23:04 2009 -0400 + + Reserve space for two GC values in copy_drawable(). + + Pointed out by Pierre Willenbrock. + +commit 3c53f3241319d96affad2f4539f7661e02e80521 +Author: Adam Jackson +Date: Thu Jul 9 17:21:07 2009 -0400 + + Since font modules are dead, don't mention them in xorg-server.pc + +commit e812103382a7bc3f7ba8b2f44ab97960dec265a9 +Author: Adam Jackson +Date: Thu Jul 9 10:58:17 2009 -0400 + + config: drop i810. + + The driver assuredly no longer builds against 1.7. Please don't feel + compelled to fix it. + +commit 55ac155d42268009eaecbc183329a8744d6ae48c +Author: Alan Coopersmith +Date: Tue Jul 7 16:59:39 2009 -0700 + + Xephyr & Xserver man page fixes + + Xephyr(1): Fix quote formatting, add missing ' to contraction + Xserver(1): Add Xephyr(1) & startx(1) to SEE ALSO section + + Signed-off-by: Alan Coopersmith + +commit 36dc66ae79b6e1cbe0a23587e32aebb68365b0d0 +Author: Michael Lorenz +Date: Tue Jul 7 20:21:39 2009 -0400 + + The way XaceHook() mixes struct initializers and va_arg() is not portable and + gives bogus data on sparc and probably others leading to a crash. + + Fix: + Don't use initializers, instead set each member directly to enforce order. + + Signed-off-by: Eamon Walsh + +commit 48a9d65b88f56d1f8ab3bf824a4fe48c2f68725f +Author: Jon TURNEY +Date: Sun Jul 5 16:06:32 2009 +0100 + + Cygwin/X: Window positioning improvements for multiwindow mode + + A few tweaks to winUpdateWindowPosition(): + + * Don't allow window decoration to disappear off to top or left edge of the + display as a result of adjustments to add decoration for the window style + + * Honour the position requested by window geometry for the client area (so + windows which save their position don't get moved by the decoration width + every time they are created) (unless we need to bump it away from top or left edges) + + * Fix an issue with initial window placement being offscreen on multimonitor + systems when some monitors have negative coordinates (are to the left of or + above the primary monitor) + + Signed-off-by: Jon TURNEY + +commit 5aec72745232dd61e60cfbf3acc4628d4fcd0315 +Author: Keith Packard +Date: Mon Jul 6 11:53:02 2009 -0700 + + Remove old DRI2 buffer alloc/free interfaces + + These old interfaces are no longer supported by the server, removing them + requires bumping the video driver ABI. Note that this is not guaranteed to + be the last change in ABI version 6. + + Signed-off-by: Keith Packard + Reviewed-by: Eric Anholt + +commit 2e2c5b216cc1c7a9bc26bd2c68226aaed5fc52ca +Author: Keith Packard +Date: Wed Jul 1 14:01:57 2009 -0700 + + dri2: Preserve compatibility with 1.6 DRI2 API/ABI + + The old DRI2 buffer allocation API wasn't great, but there's no reason to + make the server stop working with those drivers. This patch has the + X server adapting to the API provided by the driver, using the new API where + available and falling back to the old API as necessary. A warning will be + placed in the log file when the old API is in use. + + Signed-off-by: Keith Packard + +commit 7c7f0c2c6a04f7044d5ce69e97a615735e5831f1 +Author: Søren Sandmann Pedersen +Date: Fri Jul 3 14:36:54 2009 -0400 + + Use IncludeInferiors when copying windows before compositing. + + Part of bug 22484. + +commit 43ee8d2ead862f84a4526a472519663ef27a8d6a +Author: Matthias Hopf +Date: Wed Jun 24 18:26:23 2009 +0200 + + Unclaim PCI slot if driver probing fails. + + Otherwise no subsequent driver will be able to claim this pci slot. + Example for this: fbdev tries to claim, but framebuffer device is not + available. Later on VESA cannot claim the device. + +commit 73abdc94c3cceadeda26a9b6bd3cdfecf0df8db2 +Author: RALOVICH, Kristóf +Date: Sun Jul 5 16:42:54 2009 +0200 + + glx: damage is only used with DRI + + Signed-off-by: Tiago Vignatti + +commit 7208a0f032d487bd3bc9809800f4557f1da1e2db +Author: RALOVICH, Kristóf +Date: Mon Jun 29 15:18:56 2009 +0200 + + glx: remove Xgl leftover + + GlxSetRenderTables was only used by the long gone Xgl. + + Signed-off-by: Tiago Vignatti + +commit 89cf81cd85919e3dbb5adff5e6c6056c7990b60f +Author: Peter Hutterer +Date: Fri Jul 3 10:29:40 2009 +1000 + + Xext: return BadValue for XTestFakeInput on unsupported capabilities. + + Calling XTestFakeDevice*Event on a device that doesn't allow the matching + event returns BadValue. + + Reported-by: Florian Echtler + Signed-off-by: Peter Hutterer + +commit b773b4e8e0087993406d1d8c2df895db4d6301ff +Author: Peter Hutterer +Date: Mon Jul 6 11:04:47 2009 +1000 + + s/MAX_DEVICES/MAXDEVICES/ updates. + + The number of input devices is MAXDEVICES, not MAX_DEVICES (f781a752e6) + Two comments updated to refer to MAXDEVICES. + + MAX_FUNCS in sigio.c was set to 16 if MAX_DEVICES was undefined. If more + than 15 physical input devices were present, this could result in a + failure to install the SIGIO handler for any device above 15. + + Signed-off-by: Peter Hutterer + +commit 183c075d2f9d5f6effa1ce7ab135fb0c2e46085a +Author: Peter Hutterer +Date: Fri Jul 3 13:26:48 2009 +1000 + + dix: always init the full button map to default values (#22594) + + Master devices must have the standard button map applied for all buttons to + ensure buttons larger than 7 (the default for MDs) are mapped appropriately. + + We can't copy the button map from SDs to MDs since that breaks the chained + button mapping. However, by ensuring all buttons (even non-existing ones) + are mapped, devices that send such buttons continue to work. + + X.Org Bug 22594 + + Signed-off-by: Peter Hutterer + +commit 744bb559826ede37a77e9000b6c620eaa6a3c837 +Author: Peter Hutterer +Date: Fri Jul 3 13:58:38 2009 +1000 + + Xext: remove unused variable 'it'. + + Signed-off-by: Peter Hutterer + +commit fd4eed69e40cf090aa16e79a8596eb1442461829 +Author: Eric Anholt +Date: Thu Jul 2 15:24:54 2009 -0700 + + dri2: Enable GLX_SGI_make_current_read when the DRI driver supports it. + + This matches idr's 82f150d73cc9a7d8eaf7241a51b03af05bcec159 for DRI1. + +commit d6b8205e699c0c62af76c4a9cbff1402337927b3 +Author: Jeremy Huddleston +Date: Fri Jul 3 19:25:33 2009 -0700 + + XQuartz: ProcAppleWMAttachTransient to play nice with the new Dock in SL + (cherry picked from commit ddc0242d8f291d0f961ba9aa8c883e39861ce2ad) + +commit a49ae50370ec94e08e7dec3c742d33e20e79ef36 +Author: Colin Harrison +Date: Mon Jun 29 22:55:52 2009 +0100 + + Xming: Apply window style hints in -multiwindow mode + + Remove frames from 'dock' windows and make them topmost in -multiwindow mode. + Remove frames from windows with MOTIF_WM_HINTS of no decorations in -multiwindow mode. + Apply some _NET_WM_STATE hints in -multiwindow mode. + Apply window styles overrides from .rc file + Correctly update region of shaped windows when applying styles + + Copyright (C) Colin Harrison 2005-2009 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + +commit 17e67c407d130c325d3899c18d68b8eef6a88bea +Author: Joe Krahn +Date: Wed Jun 24 23:32:09 2009 +0100 + + Cygwin/X: Change to a single native window class for all X windows + + from fd.o Bugzilla #4491: + + There is no point in having one class for every window, aside from trying to + set custom icons via the class, which we no longer do, so converted to using + a single class for all client windows. + + Signed-off-by: Jon TURNEY + +commit 2c69deb92e11542f615df0f24fdc03e3b4415475 +Author: Rémi Cardona +Date: Fri Jul 3 10:51:50 2009 +0200 + + configure: libXinerama isn't needed anymore + + since libXinerama commit 90d4d23bf2e94721149ddc0a80093b10a82e8845 and + xineramaproto commit 21477147613c28c968b5e1eb9d8aea7017dd399d, the + server no longer needs libXinerama. + + Signed-off-by: Rémi Cardona + +commit 97e29ffb5bf04a9d8280f1fa32ceced148503492 +Author: Peter Hutterer +Date: Fri Jul 3 09:52:04 2009 +1000 + + xfree86: fix wrong IsMaster() check causing crashes. + + Crashes caused by dereferencing NULL if the path was executed for a floating + slave device. + + Signed-off-by: Peter Hutterer + +commit 50a2a8dc76645d8736f7d712f0ef05f23089407e +Author: Peter Hutterer +Date: Fri Jul 3 09:18:57 2009 +1000 + + Fix IsXtstDevice - returns false positives since 0814f511d5. + + Missing check for the value of 'mid' returned false positives if master was + NULL. + + Signed-off-by: Peter Hutterer + +commit 3525d140567e0ad5f0184e4b37893c47239e1628 +Author: Felix Kuehling +Date: Tue Jun 30 20:07:30 2009 -0400 + + Export symbols needed by the RandR implementation in fglrx + + GIT change + http://cgit.freedesktop.org/xorg/xserver/commit/?id=45c8bd0fe54273039fdaa1eeeafb81b5774f2c75 + changed the default symbol visibility of the Xserver. As a result 2 symbols + that are needed by the RandR 1.2/1.3 implementation in the fglrx driver are no + longer visible: + + xf86configptr + xf86CursorScreenKey + + We would like to get these two symbols _X_EXPORT'ed before Xserver 1.7 is + released. Otherwise it will be problematic for fglrx to support RandR 1.3 on + Xserver 1.7. + + In the future, we may want to sync our RandR implementation to later versions + of the RandR implementation in hw/xfree86/modes. Therefore it would be nice if + all symbols used by the Xserver RandR implementation were _X_EXPORT'ed in the + future. + +commit e13605ea40cfc671314a0086c75b917564298b55 +Author: Peter Hutterer +Date: Tue Jun 23 14:09:22 2009 +1000 + + dix: introduce "Xtst Device" label property. + + Xtst devices get this property assigned automatically so they can be + detected easily by a client. + The property is read-only. + + Signed-off-by: Peter Hutterer + +commit 0814f511d56a89c7b1868b17eba7a89f990b9ab1 +Author: Peter Hutterer +Date: Tue Jun 23 10:50:52 2009 +1000 + + input: store the master device's ID in the devPrivate for XTest devices. + + Rather than storing a simple boolean in the devPrivate for XTest devices, + store the actual master device's id (since it is constant for the life of + the device anyway). + + Callers should use GetXtstDevice now instead of digging around in the + devPrivates themselves. + + This patch allows for a cleanup in the creation of new master devices since + GetMaster and GetXtstDevice spare the need for loops, IsPointer checks and + similar. + + Signed-off-by: Peter Hutterer + Acked-by: Benjamin Close + +commit 1bcc0d3c244ce7d9f5cbab626aa5fd5784b41a1c +Author: Peter Hutterer +Date: Mon Jun 22 16:55:12 2009 +1000 + + input: abstract Xtst device lookup + + The callers should need to use the dev privates key to look up xtest + devices. + + Signed-off-by: Peter Hutterer + Acked-by: Benjamin Close + +commit 34424fab9abd7a4ca11036be25414129980db0e0 +Author: Peter Hutterer +Date: Tue Jun 23 11:50:29 2009 +1000 + + dix: set the client's error value to the bad deviceid in check_butmap_change. + + Signed-off-by: Peter Hutterer + +commit da04e8f1354fa9d253443489dc002b16f94d6fab +Author: Eamon Walsh +Date: Tue Jun 30 17:52:42 2009 -0400 + + dix/property.c: use memcpy where appropriate. + + Signed-off-by: Eamon Walsh + +commit 65d74d93145d22b68bad5728a7ebe38dc662cb21 +Author: Jon TURNEY +Date: Wed May 20 21:32:54 2009 +0100 + + Cygwin/X: Fix multiwindow extwm mode to build again + + Build and link with rootless extension + Update Xwin code for removal of RootlessAccelInit() + Fix Xwin code which now has a collision with the type name EventType + + Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz + + Signed-off-by: Jon TURNEY + +commit 638ca9a7a2363757dc5b5d456e10d34f6f158885 +Author: Jon TURNEY +Date: Mon May 18 18:14:41 2009 +0100 + + Cygwin/X: Avoid a visual glitch on window move in rootless modes + + Handle and ignore WM_ERASEBKGND since we repaint the entire invalidated region anyhow + (this avoids a white flickering on window resize) + + Signed-off-by: Jon TURNEY + +commit b718b2e0880cf2b969675da98d5ef8a4a01ca5d6 +Author: Jon TURNEY +Date: Mon May 18 18:14:09 2009 +0100 + + Cygwin/X: Allow pointer warping to work in rootless modes + + Mouse pointer warping in multiwindow/rootless mode was never implemented, + due to concerns that moving the mouse pointer without asking might be rude + + This patch allows X applications to move the mouse pointer in rootless modes, + Let's hope they don't abuse this privilege ;-) + + Signed-off-by: Jon TURNEY + +commit 85614946ba3d5a233eece612afc7f09572a347c2 +Author: Jon TURNEY +Date: Mon May 18 18:13:08 2009 +0100 + + Cygwin/X: Improve mouse tracking for moving/resizing undecorated windows + + In -multiwindow mode, tell Windows we wish to capture the mouse when a button + is down. This causes Windows to continue to send movement events for the mouse + even if the mouse pointer moves outside the window frame. + + This helps greatly with undecorated windows which have regions you can grab + to move (e.g. gmplayer, xine control panels) or resize (e.g. Songbird) the + window, as it means the window continues to receive the mouse motion even if the + mouse pointer moves out of the window (which presumably happens if we don't + manage to update the window fast enough to track the mouse pointer) + + Consolidate the multiple instances of the code to start the mouse position + polling timer into a new function winStartMousePolling(), and use that to + restart the polling timer when we release the mouse. + + Also, start the timer on WM_SHOW, so that xeyes will track the mouse position + when it is first shown, even if the mouse doesn't enter it's window + (You probably need focus-stealing turned off to see this problem) + + Signed-off-by: Jon TURNEY + +commit f351c10a9774cc0ea2cbb58f00f07ece7f7c6e73 +Author: Yaakov Selkowitz +Date: Mon Jan 5 16:17:30 2009 +0000 + + Cygwin/X: Man page fixes + + Correct path names in man pages, using cpprules.in + Install XWinrc man page into section 5 + + Signed-off-by: Jon TURNEY + +commit 5c1afac5eea1d8327c74342d12d082b75f0cebde +Author: Adam Jackson +Date: Mon Jun 29 11:16:16 2009 -0400 + + EDID: Fix timing class names to match the spec + +commit bf0f3b8f2bc830c8bd6f8f9410b89394b8d96257 +Author: Peter Hutterer +Date: Mon Jun 29 13:31:02 2009 +1000 + + test: fix build error introduced by XINPUT_ABI 7 + + Signed-off-by: Peter Hutterer + +commit cbeb6a73c44143674a700d36a7e9804d41003a4f +Author: Thomas Jaeger +Date: Sat Jun 20 20:17:41 2009 -0400 + + dix: report subpixel coordinates for high-resolution devices + + Acked-by: Simon Thum + Signed-off-by: Peter Hutterer + +commit 069b4c5f0a38649de73d1e0f70ee81bf862399dd +Author: Simon Thum +Date: Sat Jun 20 18:57:22 2009 +0200 + + dix: make part of ptrveloc.h internal + + Though this is a SDK header, some functions are intended solely + for the server. + + Signed-off-by: Peter Hutterer + +commit 2830e8493757e0da1253fe5ab280562b84730e77 +Author: Simon Thum +Date: Wed Jun 24 11:33:19 2009 +0200 + + dix: rename pDev->dev, pVel->vel for consistency + + Signed-off-by: Peter Hutterer + +commit 373e8c960d00e2b8c2250dd3f66859b081e14854 +Author: Simon Thum +Date: Wed Jun 24 11:16:24 2009 +0200 + + dix: improve pointer acceleration API + + This makes the ptr accel api actually sensible from a driver + perspective, since it avoids superfluous device lookups. + Also, makes independent accel contexts possible. + + Signed-off-by: Peter Hutterer + +commit b8050bb6deebdb1ee60731f63884ffca575c09ce +Author: Jeremy Huddleston +Date: Sat Jun 27 15:28:34 2009 -0700 + + XQuartz: Don't leave zombied processes at startup + (cherry picked from commit 40c1406830588fa85d880e9f4e9ca570db1db306) + +commit aaff92c8c22a47804a21010d023ef76d82e7ec7e +Author: Jeremy Huddleston +Date: Sat Jun 27 14:40:03 2009 -0700 + + XQuartz: 64bit fix for screen origin in AppleWM + (cherry picked from commit 60a757d2802a5c34acd91ca9a052937b5a169ede) + +commit cabcc1a7ad697dde915794ddcea6a300f66b0a28 +Author: Jeremy Huddleston +Date: Sat Jun 27 10:40:59 2009 -0700 + + XQuartz: More localization updates + (cherry picked from commit 5925c1f48ad05bf94195b986c1fdefc52a20ae42) + +commit 31166c2ae0ce898c96995a8b16b58b127dc85a2f +Author: Eamon Walsh +Date: Fri Jun 26 16:51:22 2009 -0400 + + xace: add a new hook for checking property content after it has been set. + + Allows security modules to enforce what property contents can be set by + clients. Uses the new DixPostAccess bit to distinguish between the + existing call made during the lookup (with the old property data) and + this new call. Note that this only applies to writes, prepends, or + appends to existing properties; for new properties the existing + DixCreateAccess hook call may be used since it includes the new data. + + Refer to the XACE-Spec document in xorg-docs, section "Property Access." + + Signed-off-by: Eamon Walsh + +commit 51105de9b0d865c4b5e5a7d9ab23c89d808d1cfa +Author: Eamon Walsh +Date: Fri Jun 26 16:50:12 2009 -0400 + + xselinux: ignore property hook calls with the new Post access mode bit set. + + Signed-off-by: Eamon Walsh + +commit 10812204b3415c969bcebd3215e84d758a0b4dd8 +Author: Eamon Walsh +Date: Fri Jun 26 16:48:24 2009 -0400 + + dix: add a new DixAccess bit, "DixPostAccess". + + This will be used for follow-up checks after a client has written something, + for security modules that enforce a set of valid values a client can set. + + Signed-off-by: Eamon Walsh + +commit 9480725af0275b72b24b9e1cb3b68d5b97288d01 +Author: Rémi Cardona +Date: Wed Jun 24 10:12:50 2009 +0200 + + xfree86: DIST_SUBDIRS should not contain variables + + This patch reverts a change done in commit + 800d4ceb946c93724661ebfd28afb658ca63b6b1 to add conditional XAA support + + Signed-off-by: Rémi Cardona + +commit 84662e40c3d4141ebb298a1ad714f75056a4ab74 +Author: Eamon Walsh +Date: Thu Jun 18 23:19:21 2009 -0400 + + Xi: check for GetAttr permission when listing or querying devices. + + If the check fails, leave the device off the returned list of info + structures. Under XI2, this may cause inconsistent views of the device + topology after a change (for example, devices disappearing from view, + or showing as attached to a master that cannot be seen). More work is + needed to deal with topology changes and device relabeling. + + Signed-off-by: Eamon Walsh + +commit 00bc8d34c68dab6c818cd1c7e03e9992d1d0cbfc +Author: Eamon Walsh +Date: Thu Jun 18 21:41:17 2009 -0400 + + Xi: check for Use permission on the device in SetClientPointer(). + + Presumably, some intelligent, XI2-aware management app will be calling + XISetClientPointer on behalf of other clients; this check makes sure + the target client has permission on the device. + + Requires changing the prototype to return status code instead of Bool. + + Signed-off-by: Eamon Walsh + Acked-by: Peter Hutterer + +commit 119b96667778391436998c76a68bf64e746c9e08 +Author: Eamon Walsh +Date: Thu Jun 18 21:02:28 2009 -0400 + + Xi: fix up access modes for calls to dixLookupDevice(). + + New access modes are being passed to the device access hook for XI2: + DixCreateAccess for creating a new master device; + DixAdd/RemoveAccess for attaching/removing slave devices to a master; and + DixListProp/GetProp/SetPropAccess for device properties. + + Refer to the XACE-Spec document in xorg-docs, section "Device Access." + + Signed-off-by: Eamon Walsh + +commit 07c36e4fdcd93df3d33bdab6cca4780ebc9c1f54 +Author: Dave Airlie +Date: Wed Jun 10 13:33:47 2009 +1000 + + dix/resource: fix use after free in resource code with DRI + + LookupClientResourceComplex is used by DRI1 code to find and free a DRI + drawable in a callback, however when the DRI code returns this->value + is now pointing at freed memory. It seemed easiest to store the value + to a temporary and return it afterwards. + + Another option might be a new FreeClientResourceComplex or one that + also returns the id, so we can free it using an alternative means. + + found using valgrind. + + amended along ajax's suggestions + +commit 184deb9bc325eb7aa7eb7b7d4f98aa917f0269cb +Author: Dave Airlie +Date: Wed Jun 24 10:40:05 2009 +1000 + + GLX: make function static. + + This function isn't called from anywhere else and I don't think it shuold be. + +commit 9d85b56078ec05da1369ca22930d8eb214c389db +Author: Dave Airlie +Date: Wed Jun 24 10:38:49 2009 +1000 + + GLX: note the implicit flushes with ReadPixels in indirect contexts. + + This just notes the flush has occured when readpixels returns, and + fixes the glean test. + +commit e341512bfa40dd98853a20596dc65dcac4dcaa37 +Author: Thomas Jaeger +Date: Sat Jun 20 21:37:59 2009 -0400 + + dix: update a comment + + Signed-off-by: Peter Hutterer + +commit 5cbd4d3d6e54d202ecdbb527b57aaefeb8435600 +Author: Thomas Jaeger +Date: Sat Jun 20 20:17:04 2009 -0400 + + dix: do away with an instance of temporary in-place modification + + Signed-off-by: Peter Hutterer + +commit 94cdc1ef0a72802573a11ba292e2f5cc8474aa8e +Author: Thomas Jaeger +Date: Mon Jun 22 13:00:37 2009 -0400 + + dix: deal with first_valuator > 0 correctly if POINTER_SCREEN is set + + Signed-off-by: Peter Hutterer + +commit 21cbb4c9de44e2629dc0fa6f647ce2d139f2cef0 +Author: Oliver McFadden +Date: Wed Jun 24 00:24:44 2009 +0300 + + xorg-server.h.in: Export the X Access Control Extension (XACE), too. + + Acked-by: Daniel Stone + +commit 800d4ceb946c93724661ebfd28afb658ca63b6b1 +Author: Tiago Vignatti +Date: Wed Jun 24 00:13:32 2009 +0300 + + configure: Provide the --enable/disable-xaa option. + + Acked-by: Daniel Stone + +commit ce3d539ac6ecab3e343cef7c4dc112bc82ea3b02 +Author: Oliver McFadden +Date: Wed Jun 24 00:08:51 2009 +0300 + + xf86Config: Avoid attempting to load non-compiled modules. + + Acked-by: Daniel Stone + +commit 33e25143361d63ea776dfafeeb6d4ffb2f6fd8d4 +Author: Yaakov Selkowitz +Date: Fri May 15 22:42:30 2009 +0100 + + Cygwin/X: add hebrew to autodetected keyboard layouts + + Signed-off-by: Jon TURNEY + +commit b079945c39e2a72220b46953352e24c3a74ef39a +Author: Jon TURNEY +Date: Fri Feb 20 15:21:35 2009 +0000 + + Cygwin/X: more warnings fixes + + More warning fixes, mainly removing casts on function return values + + Signed-off-by: Jon TURNEY + +commit e79db6a97d02c8a256a4a7e145ea0b48b5a084ab +Author: Jon TURNEY +Date: Wed Feb 11 23:00:58 2009 +0000 + + Cygwin/X: Remove an obsolete mention of xf86Config + + Signed-off-by: Jon TURNEY + +commit 3020b1d43e34fca08cd51f7c7c8ed51497d49ef3 +Author: Michel Dänzer +Date: Tue Jun 23 16:45:40 2009 +0200 + + glx: Clean up more thoroughly if the drawable of a current context goes away. + + Fixes crash when restarting compiz, due to cl->currentContexts[x] being stale. + +commit df597709d71f47b8516e27c6fb1bfffd59de5e48 +Author: Michel Dänzer +Date: Tue Jun 23 16:45:39 2009 +0200 + + dri2: Don't crash if pPriv is NULL. + +commit 048697ccfa31cf7f7a29afa90a2f702d43efb7d4 +Author: Ben Skeggs +Date: Wed May 27 15:24:34 2009 +1000 + + quirk: use first detailed timing as preferred for PEA prod 9003 (rh#492359) + + Signed-off-by: Peter Hutterer + +commit 07154db4a8b96467785fd6be93d20379acacffa8 +Author: Ben Gamari +Date: Mon Jun 22 08:59:45 2009 -0400 + + Xi: Remove redundant and incorrect butmap range check + + Maps are CARD8s, therefore checking for values above 255 is completely + unnecessary. Moreover, 0 is a valid value for maps, so the check wasn't + even correct to begin with. This fixes bug #22392, which was uncovered + by commit 280b7f92d729ec910ffa3d18dce7bbc215be7a3c. + + Signed-off-by: Ben Gamari + Signed-off-by: Peter Hutterer + +commit 96706c24bd57fbd9b11e5bd5e38d05d81b90aebe +Author: Peter Hutterer +Date: Thu Jun 18 15:40:08 2009 +1000 + + dix: fix wrong indices in set_valuator. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer + +commit ae20e748cd3a656173e1f50109bfd4af0712bb87 +Author: Jeremy Huddleston +Date: Fri Jun 19 21:16:10 2009 -0700 + + XQuartz: More localization updates + (cherry picked from commit 7fbe974246f54535c545861a57c043d80e127ee7) + +commit 30df49f54945e75f033a0eb6445c26d37eb33c5e +Author: Eamon Walsh +Date: Thu Jun 18 23:15:47 2009 -0400 + + Xi: fix 2 memory leaks. + + In ProcXIQueryDevice() and XISendDeviceHierarchyEvent(). + + Signed-off-by: Eamon Walsh + +commit eb35402d0a5290e8a73d7d1e92f173294c364cc2 +Author: Adam Jackson +Date: Fri Jun 19 12:42:07 2009 -0400 + + pci: Dump vendor/devices ids in the printed device list + +commit c733660428c0a7c1d11f7bd21e23e1bb934d352e +Author: Søren Sandmann Pedersen +Date: Fri Jun 19 08:37:18 2009 -0400 + + Use pixman_version_string() instead of PIXMAN_VERSION_STRING + + Pointed out by Julien Cristau. + +commit aef6b904ebf0d7de6259058606c7c04ea177bda3 +Author: Dave Airlie +Date: Thu Mar 13 16:16:46 2008 +1000 + + fbdev: make entity fail if PCI claimed already. + + bad kitty fbdev, been shipping this in Fedora for a while now + +commit 3efb23a6c40dc3583d083d25ada3853ecc56000d +Author: Eamon Walsh +Date: Thu Jun 18 19:35:22 2009 -0400 + + xselinux: Add new device permissions for XI2. + + Refects the ability of clients to add/remove devices and device properties. + + Signed-off-by: Eamon Walsh + +commit 1e060c3d8b13d352a58fc65980cb9a3c6cb5718f +Author: Eamon Walsh +Date: Thu Jun 18 18:48:24 2009 -0400 + + xselinux: Move the security class mapping to the header file. + + Take the mapping of DixAccess bits to Flask permissions, move it + into the header file, break up the extremely long lines, and + annotate the permission names with the bit being referenced. + + Signed-off-by: Eamon Walsh + +commit 75c51c67b340548286efd41a53882e2acaf74ab5 +Author: Alan Coopersmith +Date: Thu Jun 18 09:49:12 2009 -0700 + + Clarify use of and need for mffs vs. ffs + + Signed-off-by: Alan Coopersmith + +commit 128cd03eecacc6d5c5903d59a11966dcf3697bf1 +Author: Søren Sandmann Pedersen +Date: Sat Jun 13 10:55:04 2009 -0400 + + Fix miComputeCompositeRegion() to follow new clip rules. + + Ignore the hierarchy clip, and always apply any client clip after + transformation and repeating. + +commit e9aa61e9f0d663d5b34a397b943b4d1df44e873d +Author: Søren Sandmann Pedersen +Date: Sat Jun 13 10:28:21 2009 -0400 + + Fix clipping when windows are used as sources + + The new clipping rules: + + - client clips happen after transformation + - pixels unavailable due to the hierarchy are undefined + + The first one is implemented in pixman; the second one is realized by + making a copy of window sources (to prevent out-of-bounds access). + +commit d9b5e77a0e48a16c53653b56bc61a0b8dc4122a1 +Author: Søren Sandmann Pedersen +Date: Tue Jun 9 14:36:21 2009 -0400 + + Print the current version of pixman. + +commit 1e9907499c27321a2aa5dc8a75a375b7a82c999a +Author: Peter Hutterer +Date: Thu Jun 18 15:14:00 2009 +1000 + + record: use dixLookupResourceByClass instead of LookupIDByClass. + + Signed-off-by: Peter Hutterer + +commit 66089e9129a821cfb1983d3d35f41b975a52de5e +Author: Peter Hutterer +Date: Wed Mar 25 12:55:42 2009 +1000 + + xfree86: fix SWCursor check in xf86CursorSetCursor. + + Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when + the pointer left the screen (in a Xinerama setup). + We must call the sprite rendering function if + - SW cursors are enabled, or + - The current device is not the VCP and not attached to the VCP. + + Reported-by: Gordon Yuan + Signed-off-by: Peter Hutterer + +commit afa680e495622f521cae80563511c0d284f57551 +Author: David Miller +Date: Thu Jun 11 05:15:05 2009 -0700 + + mi: ignore DGA events in ChangeDeviceID + + DGA events don't have a deviceid, so they don't need changing. + + Signed-off-by: Peter Hutterer + +commit cd8abd17abcc8ae9da6704d03b97a9f134f36aab +Author: Jon TURNEY +Date: Wed Jun 17 14:17:07 2009 +0100 + + Cygwin/X: Fix permuted args to InitPointerDeviceStruct() + + Fix a minor error in commit a30fef9956b296f59ea18a9ee38d0abafeb15a4e, + new btn_labels argument to InitPointerDeviceStruct() wasn't added in + the right place + +commit 14581afb474552716c02ca15220ca7050123c375 +Author: Benjamin Close +Date: Thu Feb 26 17:32:10 2009 +1030 + + xfree86: correctly define barriers for FreeBSD amd64 + + Previously when compiling on freebsd amd64 we'd end up at xi86 + block (line 1315) which would define mem_barrier and write_mem_barrier + to be NOP's. Instead they should be valid, as per the linux amd64 setup. + + This stops the hangs experienced by many when using the nv driver + which would hang due to out of order dma requests as noticed in + http://bugs.freedesktop.org/show_bug.cgi?id=3168 + + Signed-off-by: Benjamin Close + +commit e92dcb6ce07aa3cfb53e8bad5701481c106c4094 +Author: Peter Hutterer +Date: Thu Jun 18 14:40:20 2009 +1000 + + input: unify button numbers on master devices. + + Master devices provide the union of all attached slave devices' buttons, + i.e. the number of buttons on the master device is always the number of + buttons of the slave device with the highest number of buttons. When slaves + are attached or detached, the master device adjusts the button number to + reflect the new buttons. + + On a slave switch, this slave's button labels are copied into the master (up + to slave->num_buttons). The remaining button labels (if any) stay as they + are. Thus, if any of the higher buttons is still pressed, it reflects the + label of the last pressed device that provided this button. + + If two devices press the same button and it is differently labelled the last + pressed one will be reflected in the master device. + + Signed-off-by: Peter Hutterer + +commit 280b7f92d729ec910ffa3d18dce7bbc215be7a3c +Author: Peter Hutterer +Date: Wed Jun 17 22:38:24 2009 +1000 + + dix: reduce MDs and xtest pointers to 7 buttons by default. + + MD's will soon be the union of all devices anyway. XTest pointers are only + for the core protocol XTest stuff, so 7 buttons (lmr + 4 wheel buttons) + should do. + + Signed-off-by: Peter Hutterer + +commit 6c7d992735eebbd7a20247926e7725896348b865 +Author: Peter Hutterer +Date: Wed Jun 17 09:11:52 2009 +1000 + + Require inputproto 1.9.99.12 + + Signed-off-by: Peter Hutterer + +commit 09cef7573938e5c08007e578e1b638bc5e1796a8 +Author: Peter Hutterer +Date: Wed Jun 17 09:04:08 2009 +1000 + + Xi: valuator/button labels are called labels now, not 'names' + + Signed-off-by: Peter Hutterer + +commit bc2ff5365030ad8bc11efde430b1064080dd7098 +Author: Peter Hutterer +Date: Tue Jun 16 19:36:57 2009 +1000 + + Xi: copy the valuator mode from SD to MD. + + Signed-off-by: Peter Hutterer + +commit 87d1f44bad608507e3995e17eb84fa0a0119796c +Author: Peter Hutterer +Date: Tue Jun 16 14:18:45 2009 +1000 + + Xi: copy the button and axes labels into the XIQueryDevice reply. + + Signed-off-by: Peter Hutterer + +commit a30fef9956b296f59ea18a9ee38d0abafeb15a4e +Author: Peter Hutterer +Date: Tue Jun 16 16:38:11 2009 +1000 + + input: Add labels to buttons and valuators - ABI_XINPUT_VERSION 7 + + Signed-off-by: Peter Hutterer + +commit 17f9723f488d0470e3879c6b0dfdba61544cdd7b +Author: Peter Hutterer +Date: Wed Jun 17 08:37:44 2009 +1000 + + input: bump to ints for deviceids - XI2 requires 16-bit deviceids. + + Note: ABI break, but ABI_XINPUT_VERSION has NOT been bumped. Recompile input + drivers. + + Revert "Xi: return BadImplementation for deviceids 256 and above" + This reverts commit 2b459f44f3edaea137df9a28bc7adfeb1b9f1df7. + + Signed-off-by: Peter Hutterer + +commit cbeb73e2055f6c013c8fe6325851f2631170137d +Author: Peter Hutterer +Date: Tue Jun 16 10:51:52 2009 +1000 + + Xi: return current valuator values in XIQueryDevice. + + Signed-off-by: Peter Hutterer + +commit 80837dbefd9d5e96ab5c1f4b4c2d5c66ce17ce67 +Author: Peter Hutterer +Date: Tue Jun 16 10:51:17 2009 +1000 + + input: change axisVal from uint to double. + + With subpixel support, uint just doesn't cut it. + + Signed-off-by: Peter Hutterer + +commit 25b6fc4a42f7698e6ae0b16becb316bfd7835d05 +Author: Peter Hutterer +Date: Tue Jun 16 10:48:48 2009 +1000 + + Xi: last_valuator is used like an index, so range it accordingly. + + The previous code would always skip the last valuator due to a wrong + upper boundary in the loop. last_valuator is the index of the last set + valuator - which also means it must be initialized to -1, not 0. + + Signed-off-by: Peter Hutterer + +commit 3fc762ea9474cf92f6b7ef60dd0bb68f59385272 +Author: Peter Hutterer +Date: Tue Jun 16 10:48:03 2009 +1000 + + Xi: Motion events update the device state too. + + Without this line the device's axis values don't get updated properly for + pure motion events. + + Signed-off-by: Peter Hutterer + +commit ad6347afead500fefb34131841f4beb5b03ad4ec +Author: Peter Hutterer +Date: Tue Jun 16 16:35:40 2009 +1000 + + Xi: don't use a constant number for class sizes - use sizeof instead + + The protocol is still changing, and having to debug crap like this is + annoying. + + Signed-off-by: Peter Hutterer + +commit d5a15e65b7d2fdda14fb719e3ebf076cce896386 +Author: Peter Hutterer +Date: Sun Jun 14 09:15:42 2009 +1000 + + Xi: include button state in XIButtonInfo. + + Signed-off-by: Peter Hutterer + +commit 01241b4247a7ad0974d48412cc0d88e1a09a3c49 +Author: Peter Hutterer +Date: Sun Jun 7 19:43:11 2009 +1000 + + Xi: Add support for sourceid in the device classes. + +commit d230742ea820a21a3f1ed0c58b5e6d8680b2f2aa +Author: Peter Hutterer +Date: Tue Jun 16 12:13:16 2009 +1000 + + Xi: namespace XI2 files. + + Some files (notably those merged with MPX before XI2 came along) didn't use + a 'xi' prefix. This patch changes all of them to meaningful names. + + Signed-off-by: Peter Hutterer + +commit 4ddb002b6847e8a88e6f13ae0453a35ee79946ae +Author: Peter Hutterer +Date: Mon Jun 15 15:14:47 2009 +1000 + + xfree86: fix two compiler warnings in xf86vmode.c + + xf86vmode.c:1578: warning: pointer targets in passing argument 1 of + ‘SwapShorts’ differ in signedness + ../../../../include/misc.h:231: note: expected ‘short int *’ but argument is + of type ‘CARD16 *’ + + xf86vmode.c:1543: warning: unused variable ‘i’ + + Signed-off-by: Peter Hutterer + +commit 9d039ef5047af2dedff0c583dda11032f71bed01 +Author: Peter Hutterer +Date: Mon Jun 15 15:11:55 2009 +1000 + + xfree86: silence a few int10 compiler warnings. + + 'format ‘%#x’ expects type ‘unsigned int’, but argument 2 has type ‘CARD32’' + and similar. + + Signed-off-by: Peter Hutterer + +commit fb882b3da189847bc98b646faddac9e8b42aa435 +Author: Adam Jackson +Date: Tue Jun 16 14:58:10 2009 -0400 + + EDID: Carp about 1.4 monitors with no preferred refresh rate + + You would think, having finally tightened down the spec, that + monitor vendors would bother to implement what the spec actually + mandates. You would be wrong. + +commit b2d2af76b43d62c9be07fd736652f904632fd663 +Author: Adam Jackson +Date: Mon Jun 15 10:10:26 2009 -0400 + + randr: fix typo in swapped dispatch + +commit 1d20b9021e8aecb942619f64017cc2fc31f02d29 +Author: Peter Hutterer +Date: Sun Jun 14 18:21:43 2009 +1000 + + Xi: fix wrong bit->byte conversion in ProcXIQueryPointer + + Signed-off-by: Peter Hutterer + +commit 9afc3241c157e5c19454f913c7105b3fdfa97ec4 +Author: Peter Hutterer +Date: Sun Jun 14 18:24:22 2009 +1000 + + Xi: remove un-used IsOn macro. + + Signed-off-by: Peter Hutterer + +commit b67ff1d6e0d01170c6261593ca36d0f51d917393 +Author: Peter Hutterer +Date: Fri Jun 12 16:45:36 2009 +1000 + + Xi: XISelectEvents/XIGetSelectedEvents use 'win' instead of 'window' now. + + Signed-off-by: Peter Hutterer + +commit b2bf67b61c564a4b92a429ca9ad455403161f33a +Author: Benjamin Defnet +Date: Wed Jun 10 21:35:48 2009 -0700 + + randr: fix operation order so that rotation+transform works + + The matrix multiply to combine rotation and projective transforms was being + done in the wrong order. + + Signed-off-by: Keith Packard + +commit 3627215e97734cc367fff273a3358c2a95a53481 +Author: Peter Hutterer +Date: Fri Jun 5 16:38:46 2009 +1000 + + Add check for GNU ld in the test suite. + + The GNU linker supports a -wrap option to wrap function calls at link-time. + This allows for easy overriding of functions in the X server with stubs in + the test suite. This functionality is only supported on the GNU linker and + will be used extensively in the tests. Disable the tests if GNU ld is not + available. + +commit 5e0ca6fabd12401de6bd6039484be2079e28851e +Author: Peter Hutterer +Date: Thu Jun 11 16:26:23 2009 +1000 + + input: remove un-used "setter" argument from SetClientPointer. + + It's obsolete, not likely to come back, let's drop it. + + Signed-off-by: Peter Hutterer + +commit e6a18762ef113296c6a09833be70cb4b45aa3940 +Author: Peter Hutterer +Date: Thu Jun 11 15:40:56 2009 +1000 + + Xi: fix XISetClientPointer return values. + + If SetClientPointer fails, the only reason may be that the device is not a + pointer or that the device is an SD. Return BadDevice instead of BadAccess. + (BadAccess is a leftover from the early times of the ClientPointer + implementation when only one client was allowed to set it). + + If the window parameter doesn't name a valid window or client, return + BadWindow. + + Finally, allow both master keyboards and master pointers as deviceid. + + Signed-off-by: Peter Hutterer + +commit ae7dab2a136d15b976b956f68feec53886951dd6 +Author: Peter Hutterer +Date: Thu Jun 11 15:40:38 2009 +1000 + + Xi: Fix XISetClientPointer swapping. + + Signed-off-by: Peter Hutterer + +commit 98e8ec8deb09db1c56e06afed267e6f517042fa3 +Author: Peter Hutterer +Date: Fri Jun 12 10:54:55 2009 +1000 + + Xi: sanitize ProcXIGetClientPointer. + + This was quite old code and can be streamlined a bit. The new code is + essentially the same as in ProcXISetClientPointer. + + Signed-off-by: Peter Hutterer + +commit 96ea82fdac7c28feb2748cd4ff7faa7c00dbbdcd +Author: Peter Hutterer +Date: Fri Jun 12 10:54:25 2009 +1000 + + Xi: fix reply swapping in XIGetClientPointer. + + Signed-off-by: Peter Hutterer + +commit 76f25086a9ab6f0c27d9e2cd745f8463c6b3df5f +Author: Adam Jackson +Date: Thu Jun 11 16:34:06 2009 -0400 + + vfb: Re-enable 30bpp support + +commit 0de58c88aba7ddd69b04f24ab5b2967c359aa69e +Author: Dave Airlie +Date: Thu Jun 11 14:21:53 2009 +1000 + + xfree86: move didLock assignment down to where the function pointer is valid. + + crtc->funcs->lock is NULL, so it's no use calling it here. Move it down so + it's actually defined before we use it. + + Introduced with 6f59a8160042ea145514fdcb410f17f33fd437c2. + + Tested-by: Peter Hutterer + +commit a85d210b34506cb39e7f08d81d4586fe4448b47f +Author: Peter Hutterer +Date: Thu Jun 11 12:32:39 2009 +1000 + + Xi: store mask_len before swapping in ProcXIGetSelectedEvents. + + Swapping the mask_len and then advancing the pointer by the swapped length + is just a bad idea. + + Signed-off-by: Peter Hutterer + +commit 5043f42f36b49e7702d0c496dd4fe157788d44ee +Author: Peter Hutterer +Date: Thu Jun 11 12:31:40 2009 +1000 + + Xi: correct return buffer size for XIGetSelectedEvents. + + The maximum number of bytes is calculated by the mask len, and the mask len + is always in 4-byte units. XI2MASKSIZE however is in bytes. + + Signed-off-by: Peter Hutterer + +commit fcf0c0b8f332cbde03c1a479376b7913197962eb +Author: Peter Hutterer +Date: Thu Jun 11 13:23:40 2009 +1000 + + Xi: XISetEventMask needs to clear the mask if len is 0 + + zero-length masks are supposed to clear the device's mask. + ProcXISelectEvents passes these masks through directly, so we need to clear + the bits here if such a mask is supplied. + + Signed-off-by: Peter Hutterer + +commit 22b4ac44e4fdbe8f36f2b570cdbdaf237062e33e +Author: Peter Hutterer +Date: Thu Jun 11 11:08:07 2009 +1000 + + Xi: XIGetSelectedEvents mustn't returned masks from non-existing devices. + + Or devices the client doesn't have XACE permissions for. + + Signed-off-by: Peter Hutterer + +commit 7868956b0fb50a9d77506f01413612e429f540a3 +Author: Peter Hutterer +Date: Wed Jun 10 17:09:39 2009 +1000 + + Xi: ProcXIGetSelectedEvents must use WriteToClient for swapped data. + + The data is already swapped before, so we just post it to the client as-is, + without attempting to swap it again. + + Signed-off-by: Peter Hutterer + +commit aa2babf11c30be4d289b58212dc330b84efb4053 +Author: Peter Hutterer +Date: Wed Jun 10 14:41:11 2009 +1000 + + input: remove dependency on XI2 protocol for XI_LASTEVENT. + + inputstr includes XI2proto.h for the sole purpose of XI_LASTEVENT. + However, using XI_LASTEVENT in the server is prone to errors, if the server + is recompiled against a newer version of the protocol it would bump this + variable and associates bits, including potential ABI. + + This patch defines an XI2LASTEVENT for use in the server and removes the + XI2proto.h require. XI2LASTEVENT is the current value of XI_LASTEVENT. + + This patch is required by components that require access to inputInfo + (currently xf86-video-geode and xf86-video-cirrus) but should not have a + require for the XI2 protocol. + + Signed-off-by: Peter Hutterer + +commit 77cc816da4a2777110182ed01c22c0f5e6ac3b65 +Author: Peter Hutterer +Date: Wed Jun 10 13:54:42 2009 +1000 + + Xi: rename ProcXISelectEvent to ProcXISelectEvents. + + The request name has the plural, so let's do it here too. Purely cosmetic + change. + + Signed-off-by: Peter Hutterer + +commit 9563feeeb5309de1971c4e04419fed6fd31c9cea +Author: Peter Hutterer +Date: Tue Jun 9 16:57:09 2009 +1000 + + Xi: start checking for invalid mask bits _after_ LASTEVENT. + + Two issues that combined to false positives and false negatives. + - The checking for invalid bits must be performed when there are enough bits + that an event outside of LASTEVENT may be selected. + - The first invalid bit is LASTEVENT + 1, not LASTEVENT. + + Signed-off-by: Peter Hutterer + +commit e2fbaebb87e18198143a4b8e6be7e650563cd819 +Author: Peter Hutterer +Date: Tue Jun 9 14:38:25 2009 +1000 + + Xi: XISelectEvents returns BadValue for num_masks == 0. + + Signed-off-by: Peter Hutterer + +commit cfeb65ac45b194dead5e8b9b26192df2619d6f9c +Author: Peter Hutterer +Date: Tue Jun 9 14:37:42 2009 +1000 + + Xi: XISelectEvents needs to be at least size 3, not exactly. + + Signed-off-by: Peter Hutterer + +commit f3c26034eca98924d93a004aaa1f61ffe5d344ca +Author: Peter Hutterer +Date: Tue Jun 9 13:04:56 2009 +1000 + + Xi: XIQueryDevice should use XIFooClass instead of the old FooClass defines. + + This is merely a cosmetic change, the actual values are the same anyway. + + Signed-off-by: Peter Hutterer + +commit 482cc72aa790bd2f23c7ebe12c5549b47c737115 +Author: Peter Hutterer +Date: Tue Jun 9 13:03:38 2009 +1000 + + Xi: get the class length before swapping. + + Advancing by the already-swapped length lets our pointers point into + nirvana. + + Signed-off-by: Peter Hutterer + +commit 9974249980894f74f3ead466655da87958a43670 +Author: Peter Hutterer +Date: Tue Jun 9 13:02:52 2009 +1000 + + Xi: Swapping 32 bit keycodes requires swapl, not swaps. + + Signed-off-by: Peter Hutterer + +commit 918923e285f4e269a257bb5be4d3c8a50174aad0 +Author: Dave Airlie +Date: Wed Jun 10 15:13:45 2009 +1000 + + glx: fix open-coded linked list removal function + + OMG stab stab stab, YALL. + + removal function was made of crack, actually truncated the list from + the one after the find point. + + However fixing this makes glean makecurrent fail with a GLX error. + +commit 3ea747c0dbbec0db6761d66d4f6c680d2e9ddeaf +Author: Daniel Stone +Date: Sat Apr 25 16:53:18 2009 +1000 + + KDrive: Warning fixes + + xEvent vs. InternalEvent confusion still reigns though. + + Signed-off-by: Daniel Stone + +commit 754be1e2ec9be2486bf45000d7244d217556de07 +Author: Daniel Stone +Date: Sat Apr 25 16:51:48 2009 +1000 + + KDrive: Xephyr: DRI: Warning fixes + + Signed-off-by: Daniel Stone + +commit f534e6bea17746db952feb563ffea7320846b49d +Author: Daniel Stone +Date: Sat Apr 25 15:38:54 2009 +1000 + + OS: Fix compile warnings + + It's a marvel the sigaction() ever actually worked. + + Signed-off-by: Daniel Stone + +commit 305ab237f666936cd812c464bf43f86f6079838e +Author: Daniel Stone +Date: Sat Apr 25 22:11:19 2009 +1000 + + KDrive: Warning fixes and cleanups + + Signed-off-by: Daniel Stone + +commit 4c8812b544ce5f319a7ac59a131c626c8509ef99 +Author: Adam Jackson +Date: Wed Jun 10 12:46:19 2009 -0400 + + kdrive: undef PSEUDO8 + + Whatever that was, it no longer is. + +commit 973ef5a7086aedb88a4888e73630c96ae68078e4 +Author: Adam Jackson +Date: Wed Jun 10 12:44:45 2009 -0400 + + kdrive: Remove a lie about PCMCIA support. + +commit e3c65cf1df9bbfb126f07b4b8e1254a855fb70c7 +Author: Adam Jackson +Date: Wed Jun 10 12:05:09 2009 -0400 + + xephyr: Add -title option. + +commit 803522300344265f11ea9f869ee6747730413bae +Author: Colin Harrison +Date: Wed Jun 10 13:32:54 2009 +0100 + + Xming: Simplify logic for ownership release of native clipboard + + Make the logic simpler for the ownership release of the Windows + clipboard in winclipboardwrappers.c - We've already marked a selection + as unowned if it is owned by our clipboard window + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit c7d3965bee0edb72468a0135aaa8a081348c2b23 +Author: Jon TURNEY +Date: Wed Jun 10 13:09:44 2009 +0100 + + Cygwin/X: Add a needed inputstr.h + + Add a needed inputstr.h to fix build after commit 6d4ffcc9e066bc7c49dcff1a2ff0111801c7286d + + Signed-off-by: Jon TURNEY + +commit 6d4ffcc9e066bc7c49dcff1a2ff0111801c7286d +Author: Dave Airlie +Date: Wed Jun 10 11:15:24 2009 +1000 + + input: move inputstr.h to where its needed. + + This stops inputstr.h being needed to be included by output drivers. + + Signed-off-by: Dave Airlie + Signed-off-by: Peter Hutterer + +commit 6f59a8160042ea145514fdcb410f17f33fd437c2 +Author: Benjamin Defnet +Date: Mon Jun 8 21:45:42 2009 -0700 + + hw/xf86/modes: Set crtc mode/rotation/transform before calling set_mode_major + + This moves code out of each implementation of set_mode_major and back into + the X server. The real feature here is that the transform is now available + in the crtc for use by either xf86CrtcRotate or whatever the driver wants to + do. Without this change, the transform was lost for drivers providing the + set_mode_major interface. + + Note that users of this API will want to stop smashing the transformPresent + field, and could also stop setting mode/x/y/rotation for new enough X servers, + but there's no reason to make that change as it will break things when + running against older X servers. + + Signed-off-by: Keith Packard + Acked-by: Daniel Stone + +commit e244a5991e2cc55f5aa2f6e5255f1dabf56f0235 +Author: Federico Mena Quintero +Date: Tue Jun 9 13:28:28 2009 -0700 + + dix/randr: Add missing fields to SRR*NotifyEvent() + + Also, remove redundant field swaps and make others match the order in which + they are declared in the xRR*NotifyEvent structs. + + Signed-off-by: Federico Mena Quintero + Signed-off-by: Keith Packard + +commit 746e7b22e1bdfbf2363040367209b4c46b1c2fec +Author: Adam Jackson +Date: Tue Jun 9 16:20:11 2009 -0400 + + cvt: Allow multiple-of-60Hz refresh rates for reduced blanking. + + Doing so generates the same timings as given in the DMT spec for + 120Hz RB, so we should be set there. Other rates might be legal + too but why push our luck. + +commit 2a035600e603117a4dbe668cad50bae2a5609094 +Author: Peter Hutterer +Date: Tue Jun 9 10:14:18 2009 +1000 + + require inputproto 1.9.99.11 + +commit c5bebca46f63bcd7279f3c73ed1d50e0c1b6051f +Author: Peter Hutterer +Date: Mon Jun 8 17:54:05 2009 +1000 + + Xi: hierarchy events have a num_info now instead of num_devices. + + Signed-off-by: Peter Hutterer + +commit 810b74dbbcc1db3e68e0f95ff5223ddb2032e46d +Author: Peter Hutterer +Date: Mon Jun 8 13:41:22 2009 +1000 + + Xi: change from XICreateMaster to XIAddMaster for consistency. + + add/remove is used for slave devices and hierarchy flags. + + Signed-off-by: Peter Hutterer + +commit 0e66a443a09176b8a875195d5473b953c07aa1d7 +Author: Peter Hutterer +Date: Mon Jun 8 12:24:24 2009 +1000 + + Xi: return BadValue for XI_HierarchyChangd mask on devices. + + This mask may only be selected for XIAllDevices. + + Signed-off-by: Peter Hutterer + +commit 69a9545d1f8110841538410818df19fd960412c5 +Author: Keith Packard +Date: Thu May 28 14:43:27 2009 -0700 + + Make RANDR 'set' timestamps follow client specified time. Bug 21987. + + The lastSetTime value which indicates when the configuration within the + server was last changed was not getting set in the appropriate RandR + requests. + + Signed-off-by: Keith Packard + +commit fa18c569ed26d2fdd442af6b39723cb7e30d18df +Author: Ben Skeggs +Date: Tue Jun 9 09:14:50 2009 +1000 + + exa: driver pixmaps enabled if either CreatePixmap or CreatePixmap2 present + +commit 9390b7a133b0e17bc4d303effb7a99ff7017b086 +Author: Peter Hutterer +Date: Sun Jun 7 19:26:45 2009 +1000 + + dix: protect against missing ButtonClasses in GetPointerMapping. + + Signed-off-by: Peter Hutterer + +commit 21ee53060b4dcb5c12074cf6682ff0067021ff60 +Author: Simon Thum +Date: Fri Jun 5 19:14:48 2009 +0200 + + config: fix build after XI2 API changes to RemoveDevice. + + This patch fixes the build with --enable-config-dbus is enabled + (default disabled). + + Signed-off-by: Peter Hutterer + +commit 07c59411817c10fbcbf1bc9efa6a0818b6e0493a +Author: Jeremy Huddleston +Date: Sat Jun 6 22:17:44 2009 -0700 + + GLX: Make sure the types match for ALIAS in indirect_reqsize.c + (cherry picked from commit 31a20a573b867fb7f02da15425e3b92eccb82dec) + +commit 077556ec39ca7e0d14486005cf71fcdc70a350cf +Author: Jeremy Huddleston +Date: Sat Jun 6 21:55:51 2009 -0700 + + XQuartz: AIGLX dispatch table cleanup + + This should fix some issues when building on different versions of OSX. We only use extensions that OpenGL.framework's glext.h header tells us are supported. + (cherry picked from commit e10c53421f1e780573c8adcd8ea89d6ffa28a819) + +commit fc24a97a8d022e986082b65b5133701e7273805c +Author: Jeremy Huddleston +Date: Tue Jun 2 19:12:41 2009 -0700 + + Rootless: Use serverClient instead of NullClient + + This seems to stop the crash when moving windows. + (cherry picked from commit fcd857c8e295ac7a2b0e58d49dc71251ed9d1266) + +commit 2429daa7e6b35a4a8032e1c3736e417a5a9baa07 +Author: Jeremy Huddleston +Date: Tue Jun 2 10:19:10 2009 -0700 + + XQuartz: Default to forcing the dialog box before quitting. + + This will show the quit dialog for users of other WMs. + (cherry picked from commit 639ee0c913f892776fee40bcfb856e0d7c2c7db5) + (cherry picked from commit 09432fa5b1cc8e9a30fb8aa4f8dfcd08c4a91e30) + +commit 6d75606a9e7f6ebc4d79a5261a48f5915c71cbcd +Author: Jeremy Huddleston +Date: Mon Jun 1 22:58:40 2009 -0700 + + Rootless: Despite its name, we still want to allow rootless to mess with the root window + + This fixes the bug whereby we weren't drawing the contents of the root window since RootlessPaintWindowBackground got nuked. + (cherry picked from commit bb0e208787739fbed2a0c8d1af6b6504319fdf88) + +commit 7348bf4935c8887bca33fe340ac2548f551bee3d +Author: Peter Hutterer +Date: Sun Jun 7 09:25:51 2009 +1000 + + dix: set the generic event type for implicit XI2 grabs. + + event->type is always GenericEvent for XI2 events. Instead, XI_ButtonPress + (the generic event's evtype must be stored. + + Signed-off-by: Peter Hutterer + +commit bb1c131b785ca30cf40041db3513b7669beebd34 +Author: Simon Thum +Date: Thu May 28 16:43:42 2009 +0200 + + dix: suppress pointer acceleration on xtest devices + + Signed-off-by: Peter Hutterer + +commit 707b1241681c33401d5e0eb6edeace33f5970928 +Author: Simon Thum +Date: Sat Mar 21 18:19:19 2009 +0100 + + dix: prefer lroundf() over roundf() in axis scaling + + it's unclear whether there actually is a problem, but in a very similar + case there is (bug#21456). Also, integer addition is generally faster. + + Signed-off-by: Peter Hutterer + +commit ef0e435052b2fda598cd8670c8e892aea685a102 +Author: Jon TURNEY +Date: Fri Jun 5 19:29:02 2009 +0100 + + Cygwin/X: Remove obsolete ChangeLog files + + Remove obsolete ChangeLog files, this information is preserved in + the automatically generated top-level ChangeLog + +commit 752508577aa7f0a1d80c8b7f4d3fe2b098e5e5fa +Author: Jon TURNEY +Date: Tue Jun 2 21:19:46 2009 +0100 + + Cygwin/X: Tidy up a bodge to avoid collision between X header and native Win32 API definitions of ATOM + + Remove a bodge to avoid collision between X header and the native + Win32 API definitions of ATOM, use X11/Xwindows.h which exists to + address these issues + + Consequently, include misc.h in winclipboardthread.c, to provide the + max() macro, as previously we were using the the one from windows.h + + Signed-off-by: Jon TURNEY + +commit 7f3456a4080d1bf21010170e126128cb653bd2ac +Author: Peter Hutterer +Date: Fri Jun 5 16:44:46 2009 +1000 + + Revert "test: check from INT_MIN to INT_MAX for core type conversion" + + This patch requires extra special casing to check if the linker supports the + -wrap option. Patches to do so will follow, in the meantime, revert this + commit. It shouldn't have been pushed in the first place anyway. + + This reverts commit d979f443946011158b6a183582728a6899c33b85. + + Signed-off-by: Peter Hutterer + +commit d770d57f1701c7c8272b4ca3714f64c46c47adf1 +Author: Peter Hutterer +Date: Fri Jun 5 11:38:22 2009 +1000 + + Xi: fix XIQueryVersion major/minor swapping. + + Signed-off-by: Peter Hutterer + +commit 17d62306b602ec61e8c5b44a79c9e1edc6b63a21 +Author: Peter Hutterer +Date: Fri Jun 5 11:31:39 2009 +1000 + + Xi: add XIQueryVersion reply swapping hook. + + Signed-off-by: Peter Hutterer + +commit 2b459f44f3edaea137df9a28bc7adfeb1b9f1df7 +Author: Peter Hutterer +Date: Fri Jun 5 10:15:04 2009 +1000 + + Xi: return BadImplementation for deviceids 256 and above + + The protocol allows for 16 bit device ids, but the implementation doesn't + yet. We need to break the input ABI once more to shift the DeviceIntRec's + CARD8 to a CARD16, along with some changes in the privates. + + Once that is done, revert this patch. + + Signed-off-by: Peter Hutterer + +commit c77f42049f77417c68bbce3dd2e995d916fc5af5 +Author: Peter Hutterer +Date: Fri Jun 5 09:29:04 2009 +1000 + + Xi: fix flawed logic in XIQueryVersion return value. + + The server returned the minimum of major/minor each instead of the lower of + the combined major.minor version. As a result, a client reporting + 3.0 and a server supporting 2.7, the return value would be 2.0 (the minimum + of both). + + Reported-by: Rémi Cardona + Reported-by: Simon Thum + Signed-off-by: Peter Hutterer + +commit b6c16fc7dad5a4ffcaaab647c0e3fabed372efd5 +Author: Dave Airlie +Date: Fri Jun 5 11:57:39 2009 +1000 + + crtc/gamma: check xf86_config is valid before using it. + + If you have multiple cards, some that support randr 1.2 and some that don't + you can get a null dereference in here. + + Signed-off-by: Dave Airlie + +commit da682abc78c9a5b2fde09679061fe08a3a1c665b +Author: Eamon Walsh +Date: Thu Jun 4 17:33:25 2009 -0400 + + xace: fix a bad send access hook call. + +commit 993daf06497c85bb6a1e70592df380503d721dfb +Merge: 2bda50e e1e8c7d +Author: Peter Hutterer +Date: Thu Jun 4 15:11:36 2009 +1000 + + Merge branch 'master' into xi2 + +commit 2bda50ee14b7873f28081bf0f1bfb7b79a40de43 +Author: Peter Hutterer +Date: Thu Jun 4 14:51:32 2009 +1000 + + Xi: memset the device name padding to 0. + + Signed-off-by: Peter Hutterer + +commit 09266d6cd1bb6e09fe8bcb875c63fb4011c05b55 +Author: Peter Hutterer +Date: Thu Jun 4 13:36:29 2009 +1000 + + Xi: XIQueryVersion requires major_version of 2 or higher. + + Otherwise, a BadValue error is sent. + + Signed-off-by: Peter Hutterer + +commit 6ea76c550486bd17eb31f43757030fb44bdf1eab +Author: Peter Hutterer +Date: Thu Jun 4 12:55:59 2009 +1000 + + Xi: reply with the XI2 version that is supported by both client and server. + + XIQueryVersion must return the client's version if the client's version is + lower than or equal to the server's version, or the server's version + otherwise. + + Signed-off-by: Peter Hutterer + +commit d979f443946011158b6a183582728a6899c33b85 +Author: Peter Hutterer +Date: Thu Jun 4 11:40:14 2009 +1000 + + test: check from INT_MIN to INT_MAX for core type conversion + + ErrorF is link-wrapped to reduce the run-time of the test. + + Signed-off-by: Peter Hutterer + +commit d8471bc7a19cd248fa3e0845496c86cd9251c013 +Author: Peter Hutterer +Date: Thu Jun 4 11:32:15 2009 +1000 + + test: adjust event_to_core_conversion test for new ProximityIn/Out behaviour + + Both types now return BadMatch. + + Signed-off-by: Peter Hutterer + +commit e1e8c7ddd7fdbfd674361364295fb1cbd5f28b45 +Author: Adam Jackson +Date: Wed Jun 3 13:37:32 2009 -0400 + + s/MIN/min/, s/MAX/max/ (#2968) + +commit 6de67d3206f0a4e307070714564c19efc84da2ec +Merge: af4e658 7f027d9 +Author: Peter Hutterer +Date: Wed Jun 3 16:11:33 2009 +1000 + + Merge branch 'master' into xi2 + +commit 7f027d9dc0146e229802aeac342ea2dbab63264a +Author: Olivier Blin +Date: Thu May 28 20:57:36 2009 +0200 + + kdrive: add protocol mouse option + + kdrive probes a lot of PS/2 protocols for the mouse device, which + makes the mouse unusable for some seconds after X startup. + This new "protocol" option allows forcing the mouse protocol. + It can be used this way: + Xfbdev -mouse mouse,,protocol=ps/2 -keybd keyboard + + Signed-off-by: Olivier Blin + Signed-off-by: Peter Hutterer + +commit af4e658401ecbd2f2cc515b4c5abe5aee361cd64 +Author: Peter Hutterer +Date: Wed Jun 3 12:30:49 2009 +1000 + + mi: only process master if the SD is still attached. + + SDs may be detached during event processing (e.g. if a passive grab + activates). In this case, the event must not be processed through the master + device. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer + +commit eb3fe72cbcd10c3953d713e07c321e695194a328 +Author: Peter Hutterer +Date: Wed Jun 3 12:19:14 2009 +1000 + + dix: set the device state for XI valuator events. + + Valuator events need to include the device's state, while other device + events need to include the state of the core devices. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer + +commit 08fd2ae652883393ecff6f3d5177e63408d58472 +Author: Peter Hutterer +Date: Wed Jun 3 12:18:17 2009 +1000 + + dix: use GetMaster in PickPointer and PickKeyboard. + + GetMaster is more reliable than GetPairedDevice, it always returns the + keyboard/pointer if desired, even if the wrong device was passed in. + + Signed-off-by: Peter Hutterer + +commit a1d1dd06f8f91c1d1802f7581a4ba7568b85e69c +Author: Peter Hutterer +Date: Wed Jun 3 12:15:32 2009 +1000 + + Xi: fix wrong grabtype from ProcXGrabDevice. + + 86077f0058ce88ee9b3df5d1ab854eeca43 switched from a boolean to a grabtype + enum. ProcXGrabDevice didn't switch with it. PickPointer during an XI grab + on a slave device would thus return a wrong (or NULL) device and crash the + server. + + Signed-off-by: Peter Hutterer + +commit a371a47205fc58a587e1aecaa4a031184481c228 +Author: Peter Hutterer +Date: Wed Jun 3 11:47:16 2009 +1000 + + dix: EventToCore must return BadMatch for proximity events. + + Signed-off-by: Peter Hutterer + +commit 2bd5ea80652358565346071bed829070ddf5de85 +Author: Peter Hutterer +Date: Wed Jun 3 10:45:28 2009 +1000 + + dix: rework event conversion before delivery. + + Let EventToXI, EventToCore and EventToXI2 return BadMatch if there's no + matching event for this protocol spec. + Adjust the delivery paths to cope with BadMatch errors (and clean them up on + the way). + + As a side-effect, this fixes server crashes on proximity events for a + grabbed device. + + Signed-off-by: Peter Hutterer + +commit 20d9f11abfd6ce3630d9640ff7383c7e27196956 +Author: Adam Jackson +Date: Tue Jun 2 13:49:09 2009 -0400 + + Typo fix + +commit ab5d1ae82ebd467d0a5b39821b286097865ba0c7 +Author: Adam Jackson +Date: Tue Jun 2 13:39:55 2009 -0400 + + Remove some libXfont leftovers + +commit 75795637c7160f1579dbe81c2d7600e85b1d141f +Author: Matthias Hopf +Date: Tue Jun 2 18:41:36 2009 +0200 + + Revert "randr: Setting gamma: inverse logic looks more sane" + + This reverts commit 79138eec1b49cbaca6a16f2bdd8579b5828aeb28. + +commit fc8cfc3a055d8af4ac809799c71f3db0d5246433 +Author: Peter Hutterer +Date: Tue Jun 2 16:53:41 2009 +1000 + + dix: ensure EventIsDeliverable has inputMasks set at all times. + + For proximity events, the XI2 type is 0 and inputMasks never got set in the + preceding condition. As a result, proximity events got never delivered. + + Signed-off-by: Peter Hutterer + +commit ef9f851057a0ae214be02cb919f1e6634cead20b +Author: Peter Hutterer +Date: Tue Jun 2 16:38:32 2009 +1000 + + dix: protect against floating slaves in DeviceFocusEvent. + + Signed-off-by: Peter Hutterer + +commit b40289c8766c5e7543b7288009b4d965f57c04ce +Author: Peter Hutterer +Date: Tue Jun 2 16:22:58 2009 +1000 + + xkb: allow pointer events to pass through for floating SDs without a key class. + + Signed-off-by: Peter Hutterer + +commit 38df8351b36195070232b42a6d3369a9a08df8df +Author: Peter Hutterer +Date: Mon Jun 1 17:09:03 2009 +1000 + + test: add grab matching tests. + +commit a66686a83edd6093ed540414dda2b8700e4696fe +Author: Peter Hutterer +Date: Mon Jun 1 15:37:53 2009 +1000 + + input: add support for XIAllDevices and XIAllMasterDevices passive grabs. + + These grabs are suported through two fake devices inputInfo.all_devices and + inputInfo.all_master_devices. These devices are not part of the device list + and are only initialised for their device id, nothing else. + + Signed-off-by: Peter Hutterer + +commit f00cf7675164bb984ef310412f9e09582813adb1 +Author: Peter Hutterer +Date: Tue Jun 2 10:23:21 2009 +1000 + + dix: get the current MD keyboard for the grab modifier state. + + A passive XI2 grab always uses the paired master device as a modifier + device. After issuing a passive grab, the slave may be reattached to a + different master and hence the modifier device may change. + +commit 1cd7ed75d903b5b0ea4e1070d2c26f4f931bdec7 +Author: Peter Hutterer +Date: Mon Jun 1 17:14:06 2009 +1000 + + dix: float slave devices during passive grabs. + + Exception - implicit passive grabs. + + Signed-off-by: Peter Hutterer + +commit f56ad22e8fabdca6d9fd1e408a539696e30599fc +Author: Peter Hutterer +Date: Tue Jun 2 15:07:53 2009 +1000 + + dix: rework temporary slave detachment. + + Rework addresses two issues: + - storing the master device's pointer is a bad idea, we need to store the ID + of the device in case it disappears during the grab. + - restoring the old master did not actually reattach the device. Fixed now. + +commit b3e4810a283d369e1a2c6c3288177fe79fd1e9d6 +Author: Peter Hutterer +Date: Mon Jun 1 16:22:51 2009 +1000 + + dix: move grab device assignment into GRABTYPE_CORE block. + + grab->type is the device type and XI2 types overlap with core events (being + less than GenericEvent). Thus, for passive grabs the grab device would be + overwritten with whatever device was activating it. + + Signed-off-by: Peter Hutterer + +commit 18ae48670859d05788776e164c65985e3b35a723 +Author: Peter Hutterer +Date: Mon Jun 1 16:06:52 2009 +1000 + + dix: don't try to activate a passive grab on top of an active one. + + If we already have an active grab on the device, don't attempt to activate + another one. + + Signed-off-by: Peter Hutterer + +commit ff1d6244eba8367a8d50601ca393e951c60c94b6 +Author: Peter Hutterer +Date: Mon Jun 1 12:14:52 2009 +1000 + + input: add support for XIAnyModifier in passive XI2 grabs. + +commit eb97d125fb6adeff0b23c2460108e0587ba253e2 +Author: Adam Jackson +Date: Mon Jun 1 15:50:50 2009 -0400 + + doc: Remove mention of Kerberos replay cache from Xserver.1 + + The krb5 auth code is gone, so this is no longer relevant. + +commit 80ea32ad4f1440d068e18db65830f45498703b09 +Author: Peter Hutterer +Date: Mon Jun 1 12:06:55 2009 +1000 + + dix: switch grab checking from unsigned shorts to unsigned ints + + XIAnyModifier is outside of the unsigned short range. + + Signed-off-by: Peter Hutterer + +commit 080b0331b3d1de1bab5ecdc9df175b287616e358 +Author: Peter Hutterer +Date: Mon Jun 1 13:33:29 2009 +1000 + + input: Add grabtype to GrabParameters. + + Signed-off-by: Peter Hutterer + +commit bee02a154145c0e4ed97980f7857dc27a96b1be8 +Author: Peter Hutterer +Date: Mon Jun 1 10:49:22 2009 +1000 + + dix: ensure implicit passive grabs have the xi2mask zeroed. + + This fixes XI2 enter/leave events being sent to non-xi2 clients. + + Signed-off-by: Peter Hutterer + +commit cc71dfb4f5cf6113053951070dec9556e941aa24 +Author: Peter Hutterer +Date: Mon Jun 1 13:19:30 2009 +1000 + + test: Add GetSelectedEvents request to struct size tests. + + Signed-off-by: Peter Hutterer + +commit de5c5b1db083a9c1d23e1461b54ca646c5a5c445 +Author: Peter Hutterer +Date: Mon Jun 1 13:21:36 2009 +1000 + + test: fix compile error introduced with the removal of isMaster. + + Signed-off-by: Peter Hutterer + +commit 45530d16097459a756696e255ab4e72d6e51fbc4 +Author: Adam Jackson +Date: Fri May 29 18:07:48 2009 -0400 + + vfb: Fix depth setup. + + Initialize the depth corresponding to the root window before the + pixmap-only depths. Otherwise you end up with the root window depth in + the depth list twice, which is mildly confusing for clients and + catastrophically confusing for PanoramiXConsolidate(). + +commit 5c8540d8cf9ebaafa7572cb2879d057cd3d15190 +Author: Jeremy Huddleston +Date: Fri May 29 14:49:05 2009 -0700 + + GLX: Purge glxint.h usage + + Change (__GLXvisualConfig *) to (void *) in ABI compat stubs. + (cherry picked from commit b4adec886c65e49cfbd30d1e3a41b613f75ed3f5) + +commit da2aaee24a77e1a9e5c623af4a78ca6acc94b787 +Author: Jeremy Huddleston +Date: Fri May 29 14:27:46 2009 -0700 + + GLX: Purge some glxint.h usage in glxcmds.c + + This is related to d0b249f1c5df81f3941d638f9625fe1e16c31807 in the 1.4 branch and was ok'd by krh + (cherry picked from commit e587436cf2e1237813c924699ff0662aea3034e1) + +commit f2151f1b0dcbfec23488a29a7ea887fbfd53b760 +Author: Jeremy Huddleston +Date: Fri May 29 14:09:41 2009 -0700 + + XQuartz: Fix alpha to be 1 (screenshots bug, etc) + + This is related to: bc964ff1e3f3d8ab590eab40d767c6241e9480d4 + XQuartz: Stab at fixing the alpha 0/1 bug (screenshots, etc) by pulling in some old code that got gutted from rootless. + + which was on the 1.4 branch and implemented in fbPaintWindow. Now that fbPaintWindow is gone, this is now in miPaintWindow(). + (cherry picked from commit 032173f693f75385a40e144ffe2b7b5378bb6f2e) + +commit 7c158ffa766d32f5e8ec459693da5ef6ba0892e9 +Author: Jeremy Huddleston +Date: Fri May 29 14:02:18 2009 -0700 + + Rootless: Use miPaintWindow since PaintWindowBackground is dead + (cherry picked from commit 4975c087257b52189a5c21d93d121f183e60e4c8) + +commit ec9e9c8bcabda3d8b4ea07037fb247f7408dde8b +Author: Jeremy Huddleston +Date: Thu May 28 15:30:20 2009 -0700 + + XQuartz: English localization update for HIG compliance + (cherry picked from commit 86b319d7cbef39d75b54c9d321e5dbf097b552be) + +commit 0f47203a9a690498c18b1c04e2ef5deed23a0e3e +Author: Peter Hutterer +Date: Fri May 29 14:18:37 2009 +1000 + + dix: Set the implicit passive grab flag for keyboards too. + + Extension devices have ActivateKeyboardGrab as their grab activation + function, hence we need to ensure the implicit passive grab flag is set + accordingly in the grab for further event delivery. + + Signed-off-by: Peter Hutterer + +commit 75c73ddbfc9236bb80a3709d467674c4a1018fa3 +Author: Peter Hutterer +Date: Fri May 29 14:01:21 2009 +1000 + + dix: fix broken XI event delivery during grabs. + + If an implicit passive grab is active, the XI event mask is in + grab->deviceMask. Otherwise, for explicit grabs, the XI event mask is in + grab->eventMask. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer + +commit 29ec14625111a8ae600d245ccbf905f059074d7c +Author: Peter Hutterer +Date: Fri May 29 13:26:22 2009 +1000 + + Xi: passively grabbing slave devices must be possible. + + There's use-cases where this is useful, so take the check out preventing + that. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer + +commit 235cf5713a8fe535c439628cce9ea5b42432acb1 +Author: Peter Hutterer +Date: Fri May 29 12:09:06 2009 +1000 + + dix: init inputMasks to NULL to avoid random value dereference. + + If the XI2 type is 0 (e.g. proximity events), inputMasks is never set and + may not be NULL. + + Signed-off-by: Peter Hutterer + +commit 68d86adbe8d84099812c37a04098f2ab5ccc45a4 +Author: Peter Hutterer +Date: Fri May 29 12:03:07 2009 +1000 + + dix: GetProximityEvents doesn't need extra events for valuators. + + With internal events, we only have one event for all the data, no need to + calculate for extra events. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer + +commit 71a83d68ab07536c0778d13cd7da974c40e77457 +Author: Adam Jackson +Date: Thu May 28 15:32:03 2009 -0400 + + xfree86: Remove loader symbol list ABI stubs + + These have been nops since 2006 and functionally void since 7.0. + +commit d7aef3f663f4b5d861799f8615dcd301d5ce2906 +Merge: a25f248 e08c6a0 +Author: Peter Hutterer +Date: Thu May 28 17:20:58 2009 +1000 + + Merge branch 'master' into xi2 + + Conflicts: + Xext/geext.c + Xi/chdevcur.c + Xi/extgrbdev.c + Xi/xiproperty.c + configure.ac + dix/ptrveloc.c + hw/xfree86/common/xf86Config.c + mi/mipointer.h + test/input.c + xkb/xkb.c + +commit a25f248fc3bd0375d91ca8a44320200d445ecfbb +Author: Peter Hutterer +Date: Wed May 27 15:47:12 2009 +1000 + + Xi: Send Enter or Leave events with XIPassive(Un)grabNotify + + If a passive enter or focus in grab activates, send additional enter or + focus events with mode XIPassiveGrabNotify to the grabbing client. + Likewise, if the grab deactivates, send additional leave or focus out + events. + + Signed-off-by: Peter Hutterer + +commit 2107becb0ce2ffda001be65728c53563496d8d50 +Author: Adam Jackson +Date: Wed May 27 17:13:19 2009 -0400 + + xfree86: Remove unused (and useless) xf86{Add,Delete}ModuleInfo + +commit e08c6a0752772745f35f7afcf6c2b1c927b91cc0 +Author: Federico Mena Quintero +Date: Mon May 4 19:24:47 2009 -0500 + + randr: bug #21554 - re-probe outputs when coming back from laptop unsuspend + + Make xf86 RANDR wrap the EnterVT call chain, so it can re-probe the + outputs when a laptop comes back from suspend/unsuspend (actually, any + time that we enter our VT again). The X server should then send RR* + events to clients, so they can cope with a monitor that was unplugged + while the laptop was suspended. + + Signed-off-by: Federico Mena Quintero + +commit b12010e10f38951358b48ff1076c026f943b7cc3 +Merge: 6e69272 f1441b8 +Author: Søren Sandmann Pedersen +Date: Wed May 27 15:56:30 2009 -0400 + + Merge branch 'master' of git+ssh://sandmann@git.freedesktop.org/git/xorg/xserver + +commit 6e6927247359cc0db47501fb9d2dbb7856aa5985 +Author: Søren Sandmann Pedersen +Date: Wed May 27 15:51:19 2009 -0400 + + Fix alpha map computation in miComputeCompositeRegion() + + According to the RENDER spec, the origin of the alpha map is + interpreted relative to the origin of the drawable of the image, not + the origin of the drawable of the alpha map. + + This commit fixes that and adds an alpha-test.c test program. + + The only use of alpha maps I have been able to find is in Qt and they + don't use a non-zero alpha origin. + +commit f1441b83538e6ba8a1557c4f5ea50c53a1837087 +Author: Jeremy Huddleston +Date: Wed May 27 10:06:10 2009 -0700 + + XQuartz: More localization updates + (cherry picked from commit b107390c9f30571902556b4d053e62d345a06254) + +commit 996357e905c1082479bb238110b93bc170b8cb84 +Author: Joe Krahn +Date: Tue Jan 20 17:22:37 2009 +0000 + + Cygwin/X: Update icons directly, rather than modifying the window's class + + Update icons directly to windows rather than modifying + the window's class. Respect custom icons overriden via + the configuration file. + + fd.o bugzilla #4491 + + Signed-off-by: Jon TURNEY + +commit 9955252564922e7e8702dfb6eab52c75605a4a22 +Author: Jon TURNEY +Date: Mon Jan 5 17:55:58 2009 +0000 + + Cygwin/X: Remove unused TimeSinceLastInputEvent() + + Signed-off-by: Jon TURNEY + +commit 966c8fccf16e77c8f459b4b175718323f2ec5d58 +Author: Colin Harrison +Date: Mon Jan 5 18:04:42 2009 +0000 + + Xming: Fix some log spam + + Signed-off-by: Jon TURNEY + +commit d190a27a33ab8c198568baf184fad14df57e24ad +Author: Colin Harrison +Date: Thu Jan 29 11:00:49 2009 +0000 + + Xming: Various tidy ups in winClipboardFlushXEvents() + + Signed-off-by: Jon TURNEY + +commit fbe9ed27b1c2f932a74aa6ced134ecec021a3fc1 +Author: Colin Harrison +Date: Thu Jan 29 10:55:38 2009 +0000 + + Xming: Avoid log spam if a windows application won't provide CF_UNICODETEXT clipboard format + + Signed-off-by: Jon TURNEY + +commit 71ba9856a4f01aa7a42f1178c8da98a2e5ac23ae +Author: Colin Harrison +Date: Tue Feb 3 15:52:11 2009 +0000 + + Xming: Cache atom lookups in clipboard integration code + + Cache the CLIPBOARD atom lookups in winClipboardWindowProc() + Cache atom lookups in winClipboardFlushXEvents() + Recache on server regeneration + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit 4ec110327bdc4f2617cd6116539812d7ef96b24e +Author: Colin Harrison +Date: Sun Jan 4 18:29:49 2009 +0000 + + Xming: Prevent the mouse wheel from stalling when another window is minimized. + + Fix internal WM to prevent the mouse wheel from stalling when another window is minimized. + + Signed-off-by: Jon TURNEY + +commit 888e6961a4ee76d05d212cfb946f089caafb3f69 +Author: Jon TURNEY +Date: Wed Jan 7 18:29:16 2009 +0000 + + Cygwin/X: Correctly allow for the native window frame width in ValidateSizing() + + Fix internal WM to correctly calculate the native window border when validating window sizing + + Signed-off-by: Jon TURNEY + +commit a72865868f03b675f86990476fcee601822894b3 +Author: Joe Krahn +Date: Tue Jan 20 17:09:43 2009 +0000 + + Cygwin/X: Consolidate dialog initialization in winInitDialog() + + Changed windialogs.c to set icons via window properties rather than class + properties, and use LoadImage() for small icons, because LoadIcon() can only open + large icons. Since this code is redundant across the dialogs, I put it in the + winCenterDialog function, along with a few other redundant instructions, and + renamed in winInitDialog(). + + Also, don't bogusly put our dialogs at the center of the virtual desktop if we + are on a multimonitor system (this causes the dialog to end up split across two + monitors in a dual-monitor side-by-side setup) + + Corrections to use HWND_TOPMOST instead of HWND_TOP and not to use SWP_NOZORDER + from Colin Harrison + + fd.o bugzilla #4491 + + Signed-off-by: Jon TURNEY + +commit d053c3b35f730fdaddd22f841dbd8ed6c9a07ba0 +Author: Colin Harrison +Date: Sun Nov 2 20:46:40 2008 +0000 + + Xming: Slightly adjust the formatting of the logged command line + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit a7e23a79c1fc429aedbf9b6c0e78b1c8d7e02238 +Author: Peter Hutterer +Date: Tue May 26 14:42:25 2009 +1000 + + Xi: Add support for Enter and FocusIn grabs. + + Enter grabs are checked for in CheckMotion(), each time the sprite window + changes the current grab is deactivated (if applicable) and the new grab is + activated (if applicable). Exception - if the grab is on a parent window of + the current window since we keep the grab across descendants. + + Since CheckMotion() may change the grab status of a device, we mustn't get + "dev->deviceGrab.grab" in ProcessOtherEvents until after CheckMotion(). + FocusIn grabs are checked in much the same manner. + + The event delivery for grabs replaces the NotifyNormal on window change with + a NotifyGrab on window change. Note that this happens before the grab + activates, so the EnterNotify(NotifyGrab) is still delivered to the window, + not to the grabbing client. This is in line with the core protocol semantics + for NotifyGrab events. + + Signed-off-by: Peter Hutterer + +commit ec2fe9660dbc0c16cdaca33b3b878011857e0fe2 +Author: Peter Hutterer +Date: Wed May 27 14:18:51 2009 +1000 + + Require inputproto 1.9.99.10 + +commit 0ef6ba9f3b9e68307bfe623e12dc36d44440e97f +Author: Peter Hutterer +Date: Wed May 27 11:15:54 2009 +1000 + + Xi: set the passive grab's resource mask on ungrabbing. + + Not having the resource mask set means we never match an existing grab, + hence we never actually ungrab. + + Signed-off-by: Peter Hutterer + +commit 1f61d6647f25add487c5cae9739643a6e33ef9f7 +Author: Peter Hutterer +Date: Wed May 27 11:15:23 2009 +1000 + + Xi: use GetMaster(MASTER_KEYBOARD) to get the modifier device for XI2 pgrabs + + Signed-off-by: Peter Hutterer + +commit bedfd561fa534b65baea45c4a05b1752ef172c45 +Author: Peter Hutterer +Date: Tue May 26 15:28:33 2009 +1000 + + dix: fix wrong cast of eventMask into CreateGrab. + +commit 023f959e6812e63f9d38b078158275bc13d238ae +Author: Peter Hutterer +Date: Tue May 26 14:56:40 2009 +1000 + + Xi: fix an inputInfo.keyboard usage. + + In the case of a RevertToFollowKeyboard, the master device should be used + (since this is the closest equivalent to the VCK as before). Only if the + master keyboard is the same as the device, revert to the VCK itself. + +commit b3463fd6a89d50a7562c357aeb5314ce0fd6493d +Author: Peter Hutterer +Date: Tue May 26 13:58:04 2009 +1000 + + dix: convert window coordinates to FP1616 before calculating event_x/y + + root_x/y are already in FP1616 at this point. + + Signed-off-by: Peter Hutterer + +commit 10b5e981016132b4c07ad9ce68646d0a385e9c24 +Author: Peter Hutterer +Date: Tue May 26 11:12:08 2009 +1000 + + dix: take grabs into account for XI_Enter/Leave events. + +commit 1815defdb2f19e79f4ec0354d188ea763ff1f15e +Author: Peter Hutterer +Date: Tue May 26 10:08:46 2009 +1000 + + Xi: only deactivate passive grabs if the event type matches. + + This didn't use to be a problem when devices could only be pointers or + keyboards, not both. Nowadays, slave devices may have both buttons and + keyboards, and in this case we don't want to deactivate a passive keyboard + grab when a button release is detected. + +commit 9dc3810a034f067096d71b33b0b47f1f52092fe6 +Author: Peter Hutterer +Date: Wed May 27 13:53:46 2009 +1000 + + dix: set the right grab event type for implicit passive grabs. + + Signed-off-by: Peter Hutterer + +commit 6583477035234e23ead2fad9db7a07e5862447a4 +Author: Nicolai Hähnle +Date: Sat May 23 13:35:24 2009 +0200 + + Remove reference to non-existing requestLog and requestLogIndex + + These fields were removed in 252ec504817e05b185e4896a2d899e9c00b8aeef. + + Signed-off-by: Nicolai Haehnle + Signed-off-by: Peter Hutterer + +commit 53e821ab4a41cbc85932b9ef150311bc2e57c108 +Author: Peter Hutterer +Date: Mon May 25 12:20:37 2009 +1000 + + Xi: add request processing for XIGetSelectedEvents. + + Signed-off-by: Peter Hutterer + +commit b377994336c978875dd786f4a4a9ef2e7b20e32c +Author: Peter Hutterer +Date: Mon May 25 13:55:17 2009 +1000 + + Xi: advance by the right number of bytes when trawling XI2 event masks. + + The wire layout is [struct xXIEventMask][mask bytes]. So the pointer needs + to not only be advanced by the mask bytes, but also by the size of the + struct. + + Signed-off-by: Peter Hutterer + +commit 12e725d08b4cf7dbb7f09b9ec09fa1b621156ea9 +Author: Julien Cristau +Date: Fri May 22 09:54:38 2009 +0200 + + randr: fix server crash in RRGetScreenInfo + + We don't return rates to randr < 1.1 clients, so don't allocate space + for them. This fixes a FatalError due to not all allocated space being + used. + + X.Org bug#21861 + + Reported-by: Guillaume Quintin + Signed-off-by: Julien Cristau + +commit c70511931ca1441878daed50e710fa514f6ab077 +Author: Matthieu Herrb +Date: Sun May 24 10:32:38 2009 +0200 + + fix typo in cabff9007 which led to an unintialized memory read and a crash. + +commit 99e22b86c5f1a3653f3caaf01368a777d2b208d0 +Author: Adam Jackson +Date: Fri May 22 12:01:55 2009 -0400 + + EDID: Add modes from Established Timings III descriptor to mode pool + + EDID 1.4, section 3.10.3.9 + +commit b395da91c531d633ec47bb5a51e361d321663a3a +Author: Peter Hutterer +Date: Fri May 22 15:24:46 2009 +1000 + + Xi: silence two compiler warnings + + chdevcur.c:97: warning: ‘SecurityLookupIDByType’ is deprecated (declared at + ../include/resource.h:269) + + xiproperty.c:200: warning: passing argument 2 of ‘GetEventFilter’ from + incompatible pointer type + + Signed-off-by: Peter Hutterer + +commit 4a36db60774640ea92a2133a3b08fbf1a48d2cb6 +Author: Peter Hutterer +Date: Fri May 22 15:16:43 2009 +1000 + + os: fix compiler warning "too few arguments to format" + + Signed-off-by: Peter Hutterer + +commit da0d3baf71b34657cc235d6c6b37d548541f9449 +Author: Peter Hutterer +Date: Thu May 21 14:11:27 2009 +1000 + + dix: protect event generation against single-valuator devices. + + If we have a single-axis device and it sends events it should not access + non-existant memory. + +commit b25e29e8014927815d4fdc9c416bfeb2af0ecba6 +Author: Peter Hutterer +Date: Thu May 21 12:07:03 2009 +1000 + + mi: use GetMaster() from MIPOINTER and MISPRITE. + + Both may in some cases be called for a SD attached to a master keyboard. In + this case, we need to get the right master device (i.e. the pointer). + + Signed-off-by: Peter Hutterer + +commit c9df51b070377ca33e48644dbc842b6e3dfb2975 +Author: Peter Hutterer +Date: Thu May 21 11:16:37 2009 +1000 + + input: allow for master pointers to not have a button class. + + There's devices (e.g. some barcode readers) that have axes but no buttons. + When such a device sends a motion event, the valuator and button class is + copied into the master pointer (i.e. removing the button class). + So we need a couple of extra sanity checks for the button class to exist. + + Signed-off-by: Peter Hutterer + +commit ebe45e1a72a81ad22413e5d0514869b3e45a69b7 +Author: Peter Hutterer +Date: Wed May 20 10:55:03 2009 +1000 + + input: introduce partial class copying depending on the event. + + Copying all classes into the master device has drawbacks for hybrid devices + (devices that are both mice and keyboards). If such a device posts an event, + it's key classes are moved into the VCP. The key event itself is unaffected + by keyboard grabs and the like. + + Partial class copying copies depending on the event and copies the classes + into the right master device (i.e. the VCK for key events, the VCP for + pointer events). + + Signed-off-by: Peter Hutterer + +commit bc63c8a4570c989f19a036965854bceb9800ce19 +Author: Peter Hutterer +Date: Wed May 20 12:33:49 2009 +1000 + + dix: introduce GetMaster() + + For hybrid devices (keys + buttons/axes) the attached master device is + generally the wrong one. One shouldn't post a button event through a + keyboard and vice versa. + + GetMaster(dev) returns the right master device for the given type needed. + This may be the MD paired with this device's MD. + + Signed-off-by: Peter Hutterer + +commit d79318f269d959d566ec66239b4c985afd61b259 +Author: Peter Hutterer +Date: Thu May 21 08:29:14 2009 +1000 + + dix: Add a deviceid to the DeviceChangedEvent. + + ChangeDeviceId would actually overwrite the flags field if deviceid wasn't + present. Aside from the event of course not telling which device generated + it in the first place. + + Signed-off-by: Peter Hutterer + +commit eeffb83fea2d87070beafd0c692fb0ad54d8335b +Author: Peter Hutterer +Date: Mon May 18 20:03:07 2009 +1000 + + ABI_XINPUT_VERSION 6 + +commit 438a4eafa5d14ab676827f7a5d58782c02db4cdf +Author: Peter Hutterer +Date: Wed May 20 17:02:50 2009 +1000 + + input: remove nested union from InternalEvent. + + There's no need for internal events to be a struct with a single nested + union, we might as well make the union itself the InternalEvent. + + Signed-off-by: Peter Hutterer + +commit b12d302df8283186ce87882c29b2b0294adb2770 +Author: Peter Hutterer +Date: Wed May 20 15:28:16 2009 +1000 + + Input: rename DeviceIntRec->isMaster to ->type. + + isMaster is not enough as long as we differ between master pointers and + keyboard. With flexible device classes, the usual checks for whether a + master device is a pointer (currently check for ->button, ->valuators or + ->key) do not work as an SD may post an event through a master and mess this + check up. + + Example, a device with valuators but no buttons would remove the button + class from the VCP and thus result in the + IsPointerDevice(inputInfo.pointer) == FALSE. + + This will become worse in the future when new device classes are introduced + that aren't provided in the current system (e.g. a switch class). + + This patch replaces isMaster with "type", one of SLAVE, MASTER_POINTER and + MASTER_KEYBOARD. All checks for dev->isMaster are replaced with an + IsMaster(dev). + +commit add2defac7e59dcb355e5ba12b6de60861741d57 +Author: Peter Hutterer +Date: Wed May 20 16:23:38 2009 +1000 + + Split the signal-handler's lastSlave out into a separate variable. + + dev->u.lastSlave was not signal safe since it was accessed by the DIX and + during signal handling. + Replaced with: + 'dev->last.slave' for the signal handler's lastSlave (used to generate + DeviceChangedEvents), . + 'dev->u.lastSlave' for the DIX lastSlave (currently only used in + change_modmap) + + Signed-off-by: Peter Hutterer + +commit 525aa17f804d37d1cfcbbf6b8e6cddb45e999b20 +Author: Tomas Janousek +Date: Wed May 20 15:03:01 2009 +0200 + + Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. + + In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and + .totalVModMapKeys were not initialized, contained random values and caused + accesses to unallocated and later modified memory, causing + XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of + nonzero values, resulting in writes past the end of an array in XkbSendMap. + + This patch initializes those values sensibly and reverts commits 5c0a2088 and + 6dd4fc46, which have been plain non-sense. + + Signed-off-by: Tomas Janousek + Signed-off-by: Peter Hutterer + +commit 7db55a0806c82bd4143c8bf1b8eb2b62e456ad9a +Author: Peter Hutterer +Date: Wed May 20 14:38:25 2009 +1000 + + dix: remove superfluous loop in change_modmap. + + A device can only be attached to a single master device. So instead of + looping and searching for the master device, we can just use dev->u.master + directly. + + Signed-off-by: Peter Hutterer + +commit cabff9007a4abad026b450a4aab155c7bcd94326 +Author: Peter Hutterer +Date: Fri May 15 08:33:07 2009 +1000 + + xfree86: treat other drivers as mouse drivers in the config. + + Historically, if no input device was referenced in the ServerLayout, + the server would pick the first "mouse" device found in the xorg.conf. + This patch gives evdev, synaptics, vmmouse and void the same status. If + there is a section in the config file using this driver - use it as the core + pointer. + + Device selection is in driver-order, not in config-order. If a "mouse" + device is listed after a "synaptics" device, the "mouse" device gets + preference. This replicates the original behaviour. + + This code only takes effect if AllowEmptyInput is off and there is no core + pointer in the server layout. + + Signed-off-by: Peter Hutterer + +commit a8bd1e1f96d8e5380972a7dce8d9940cd912aa09 +Author: Søren Sandmann Pedersen +Date: Thu May 21 18:21:28 2009 -0400 + + Fix alpha map computation in miComputeCompositeRegion() + + According to the RENDER spec, the origin of the alpha map is + interpreted relative to the origin of the drawable of the image, not + the origin of drawable of the alpha map. + + The only use of alpha maps I have been able to find is in Qt and they + don't use a non-zero alpha origin. + +commit a2c5ee36b21c2ee5c0468f1b251e74c1412dbecb +Author: Adam Jackson +Date: Thu May 21 10:20:48 2009 -0400 + + EDID: Be more cautious about finding vendor blocks. + + Many old monitors zero-fill the detailed descriptors, so check for that + to avoid a useless warning like: + + (WW) RADEON(0): Unknown vendor-specific block 0 + +commit 73c7398aafa050950ad614483fb0d5bdd2da97ca +Author: Peter Hutterer +Date: Wed May 20 10:40:50 2009 +1000 + + dix: 'namespace' HAS_OLD_SLAVE and HAS_NEW_SLAVE. + + We need more flags for this in the near future, so let's namespace them now. + +commit 5b5e3fa2771383a85afff679be34df19d3a4e290 +Author: Peter Hutterer +Date: Fri May 15 08:33:07 2009 +1000 + + xfree86: treat other drivers as mouse drivers in the config. + + Historically, if no input device was referenced in the ServerLayout, + the server would pick the first "mouse" device found in the xorg.conf. + This patch gives evdev, synaptics, vmmouse and void the same status. If + there is a section in the config file using this driver - use it as the core + pointer. + + Device selection is in driver-order, not in config-order. If a "mouse" + device is listed after a "synaptics" device, the "mouse" device gets + preference. This replicates the original behaviour. + + This code only takes effect if AllowEmptyInput is off and there is no core + pointer in the server layout. + + Signed-off-by: Peter Hutterer + +commit 1cce55cc0333a026474100cf2f784e220fd96473 +Author: Peter Hutterer +Date: Wed May 20 14:07:03 2009 +1000 + + input: rename device->type to device->xinput_type. + + This type is only used in XI to give a hint of what type this device may be. + Call it xinput_type for clarity. + + Signed-off-by: Peter Hutterer + +commit 81b3b0cce088866dc3cda099d7c8d6655849fd43 +Author: Tomas Janousek +Date: Wed May 20 15:03:01 2009 +0200 + + Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. + + In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and + .totalVModMapKeys were not initialized, contained random values and caused + accesses to unallocated and later modified memory, causing + XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of + nonzero values, resulting in writes past the end of an array in XkbSendMap. + + This patch initializes those values sensibly and reverts commits 5c0a2088 and + 6dd4fc46, which have been plain non-sense. + + Signed-off-by: Tomas Janousek + Signed-off-by: Peter Hutterer + +commit 79138eec1b49cbaca6a16f2bdd8579b5828aeb28 +Author: Matthias Hopf +Date: Tue Mar 10 16:03:26 2009 +0100 + + randr: Setting gamma: inverse logic looks more sane + +commit c2785ae7eb6197bbfc75e92e99fffbb8ad8064da +Author: Peter Hutterer +Date: Wed May 20 14:29:13 2009 +1000 + + dix: refuse events from disabled devices. + + If the device is disabled ("off"), it must not send events to a client. + The driver shouldn't send events in that case anyway, but just to make sure + we simply drop events coming while the device is disabled. + + Signed-off-by: Peter Hutterer + +commit 47a89b1cba67a43ddc225f7e1b5d2b3b217c8d93 +Author: Peter Hutterer +Date: Wed May 20 13:59:22 2009 +1000 + + Xi: remove DeviceIsPointerType + + This approach is broken anyway. DIPT only checked for the XInput type + "MOUSE" and the only user of this is xf86ActivateDevice when it sets the + Activate/DeactivateGrab functions. + Since synaptics and wacom set their own types, evdev only sets MOUSE for, + well, mice half the devices didn't have this set correctly anyway. + + Instead, ActivatePointerGrab should be merged together with + ActivateKeyboardGrab. + + Signed-off-by: Peter Hutterer + +commit 7b891e450f005688e41e61016e6d3e394c67f6be +Author: Peter Hutterer +Date: Wed May 20 14:23:16 2009 +1000 + + dix: Remove obsolete comment + + CorePointerProc doesn't back up the device classes anymore. + +commit 42719ce5c715ac3a0c74c3c7df872d35e0449de9 +Author: Peter Hutterer +Date: Wed May 20 14:38:25 2009 +1000 + + dix: remove superfluous loop in change_modmap. + + A device can only be attached to a single master device. So instead of + looping and searching for the master device, we can just use dev->u.master + directly. + + Signed-off-by: Peter Hutterer + +commit 22a33a7250f879b8f3eb84176a1dc57027d8cfe4 +Author: Eamon Walsh +Date: Tue May 19 22:45:26 2009 -0400 + + glx: Register names for the GLX resource types. + + Signed-off-by: Eamon Walsh + +commit 77e90261d5f91e1170c6e02deb0e3739c24fcfd6 +Author: Eamon Walsh +Date: Tue May 19 19:36:03 2009 -0400 + + dix/events.c: Use wClient where appropriate. + + Signed-off-by: Eamon Walsh + +commit 3cea176d5abcb0f14eefbdcbe17fed0847524dd4 +Author: Eamon Walsh +Date: Tue May 19 19:30:33 2009 -0400 + + xace: Fix a bad device access hook call. + + Add a proper access mode, and reverse the logic of the return value. + Zero ("Success") is returned on success from the hook calls. + + Signed-off-by: Eamon Walsh + +commit 4addfcd633484b7f53b5df1b92bfca8bfc1dc48d +Author: Michel Dänzer +Date: Mon May 18 17:53:35 2009 +0200 + + EXA: Allocate from the end of free offscreen memory rather than from the start. + + This way we don't always need to scan over previously allocated areas when + looking for an available one, and there might be less fragmentation. + + Signed-off-by: Michel Dänzer + +commit 510cbd43cd4e34bd459e8f74ab2855714b4ca95d +Author: Michel Dänzer +Date: Mon May 18 17:48:57 2009 +0200 + + EXA: Defragment offscreen memory. + + At most once per second, under the following circumstances: + + * We can't satisfy an offscreen memory allocation, but there seems to be enough + offscreen memory available in total. + + or + + * The server has been idle for at least 100ms, and there is more than one + available offscreen area. + + Signed-off-by: Michel Dänzer + +commit 8331bde0adeccefb275c4d707e7b2cb1d95b1581 +Author: Jon TURNEY +Date: Fri May 15 21:36:28 2009 +0100 + + Cygwin/X: link with libmain.a to provide main() + + Commit 987579c930bda803427a28cb82773c389f5110d6 moves main.c into + into libmain.a to be linked with separately, and updates the various + DDXs to link with libmain.a, except Xwin, which also needs this change. + + Signed-off-by: Jon TURNEY + +commit b89dcfbfbd38f8d19f1d4f24f81820b1048572c8 +Author: Peter Hutterer +Date: Mon May 18 16:07:08 2009 +1000 + + Xi: fix length field in XIQueryPointer. + + Buttons append 4-byte units to the end of the reply, they need to be + included too. + + Reported-by: Mark Dokter + Signed-off-by: Peter Hutterer + +commit 33fcaaaea5ea30be39156ecfdbcca891b47ab465 +Author: Peter Hutterer +Date: Mon May 18 16:05:35 2009 +1000 + + Fix missing parentheses in FP1616 macro. + + Missing parens led to interesting results if an expression instead of a + constant was passed in (ProcXIQueryPointer for example). + +commit 6258bb1d6bb78ea4ba1d33470bc74e9b711b25f2 +Author: Peter Hutterer +Date: Fri May 15 20:24:45 2009 +1000 + + require inputproto 1.9.99.9 + +commit e7e94ff5fd3205a9ee01fe9342d9f3a426b0a068 +Author: Peter Hutterer +Date: Thu May 14 21:45:35 2009 +1000 + + Xi: set the right length for the XIQueryPointer reply. + +commit 00ab04d73c612ac85e024105015bdb7c79e8874b +Author: Peter Hutterer +Date: Thu May 14 16:24:35 2009 +1000 + + Include full modifier + button state in XIQueryPointer. + +commit de78aab0ea3a2d8c61222493f25911258dea65a2 +Author: Peter Hutterer +Date: Thu May 14 15:53:00 2009 +1000 + + Xi: take the paired device as modifier device only for MD pointers. + +commit 0e089f9ceb0edec532078c6e1df7f642f7220fb5 +Author: Peter Hutterer +Date: Thu May 14 15:29:20 2009 +1000 + + Xi: check cursor and grab_window before attempting the passive grab. + + Both values need to fail the request, so we need to check them before + looping through the modifier masks. Otherwise, a wrong grab_window will + show up in each failed modifier return but not actually cause an error. + +commit 5c3e7289801c958e2c70e2629d3ebee122449be8 +Author: Peter Hutterer +Date: Wed May 13 16:54:01 2009 +1000 + + dix: count must be 1 if we have an XI2 match. + + This fixes events that activated a grab not getting delivered to the client. + + Signed-off-by: Peter Hutterer + +commit e083a0d0692baa5ad29002a38293b36dd3b4c06f +Author: Peter Hutterer +Date: Wed May 13 15:23:42 2009 +1000 + + Xi: set the correct length for XIPassiveGrab replies. + +commit 8ff1bff8f462b15e05fc298704e1e40cb244587f +Author: Peter Hutterer +Date: Tue May 12 21:33:54 2009 +1000 + + Update to new XI2 names + +commit bbf266cca3de726e3eb932d66dd5b8981ef40fa8 +Author: Peter Hutterer +Date: Tue May 12 21:24:07 2009 +1000 + + mi: un-deprecate miPointerWarpCursor + + This function was deprecated in ef68273f5bdb27a492ec0b69548ec4fbede46c08 + because it didn't take a device argument. The device argument was added in + 1c7568b8a1417257fa67c7fca69aa253099b9461 though, so the deprecation is + obsolete. + + Signed-off-by: Peter Hutterer + +commit 273890924b8ed6f8b7949c0322c8258b9e6f8630 +Author: Peter Hutterer +Date: Tue May 12 16:09:35 2009 +1000 + + input: reduce the number of superfluous hierarchy events + + There's only two reasons for hierarchy events: + - device is added, removed, etc. In this case we want to send the event as + it happens. + - devices are added in a XIChangeDeviceHierarchy request. In this case we + only want one event cumulating all changes. + +commit 033a2b12fcd02fa9a2c2f20a352bec0a43074512 +Author: Peter Hutterer +Date: Tue May 12 14:50:57 2009 +1000 + + Xi: set per-device hierarchy changed flags. + + Rather than have one field per hierarchy change, XI2 has two fields - one + generic one and one per-device that include the device-specific flags. + This requires some funky handling for removed devices, but oh well. + +commit 8fb51feae222ff4f4aa1c440b6973ce7383bbc09 +Author: Peter Hutterer +Date: Mon May 11 15:45:46 2009 +1000 + + xkb: if kbd init failed, NULL out the pointers after freeing them (#21278) + + Reproducible: + Configure a server that uses the keyboard driver with an invalid ruleset, + e.g. (Option "XkbRules" "foobar"). Ensure that Option "AllowEmptyInput" is + "off" in the ServerFlags or ServerLayout section. Start the server. + After failing to init the keymap, the server will try to clean up after the + device, double-freeing some xkb structs that have not been reset properly. + + X.Org Bug 21278 + + Signed-off-by: Peter Hutterer + +commit 0cea199eda772a5ddd5ce72e4823a00ec14405d4 +Author: Peter Hutterer +Date: Mon May 11 12:53:56 2009 +1000 + + kdrive: set Activate/Deactivate grab for input devices (#21591) + + X.Org Bug 21591 + +commit fdce58ca822f4e43e03e84076190f52d7104e01f +Author: Peter Hutterer +Date: Mon May 11 12:51:40 2009 +1000 + + dix: ensure Activate/DeactivateGrab has a valid value. + + Xephyr doesn't manually set Activate/DeactivateGrab for new devices, + resulting in a NULL-pointer dereference later when a grab is activated. + Avoid the segfault by ensuring that the pointer is always valid. + + Signed-off-by: Peter Hutterer + +commit e3f296d91dfe6b827195e1d387e1a04aa73b85c3 +Author: Peter Hutterer +Date: Sat May 9 10:33:20 2009 +1000 + + xfree86: Remove superfluous ifdef DEBUG checks. + + Signed-off-by: Peter Hutterer + +commit 2f6253376df45e508284ff7766b186cfc7fb56d6 +Author: Peter Hutterer +Date: Sat May 9 10:33:20 2009 +1000 + + xfree86: Remove superfluous ifdef DEBUG checks. + + Signed-off-by: Peter Hutterer + +commit b1b5ec45c1cb650ccb8c659218f9481379c777d9 +Author: Peter Hutterer +Date: Mon May 11 12:53:56 2009 +1000 + + kdrive: set Activate/Deactivate grab for input devices (#21591) + + X.Org Bug 21591 + +commit 6f9e22049862ee9ac7f604411d005d8bb1b2dd1c +Author: Peter Hutterer +Date: Mon May 11 12:51:40 2009 +1000 + + dix: ensure Activate/DeactivateGrab has a valid value. + + Xephyr doesn't manually set Activate/DeactivateGrab for new devices, + resulting in a NULL-pointer dereference later when a grab is activated. + Avoid the segfault by ensuring that the pointer is always valid. + + Signed-off-by: Peter Hutterer + +commit c1d7deca9281ba1df0df1abcea1fe7f841b10ff9 +Author: Peter Hutterer +Date: Tue May 12 21:24:07 2009 +1000 + + mi: un-deprecate miPointerWarpCursor + + This function was deprecated in ef68273f5bdb27a492ec0b69548ec4fbede46c08 + because it didn't take a device argument. The device argument was added in + 1c7568b8a1417257fa67c7fca69aa253099b9461 though, so the deprecation is + obsolete. + + Signed-off-by: Peter Hutterer + +commit 8609a4e883e917d1652fbe810108de99bc89713f +Author: Alan Coopersmith +Date: Fri May 15 11:22:32 2009 -0700 + + Correct some Sun license notices to Sun's standard X11 license format + + Signed-off-by: Alan Coopersmith + +commit 94c5093c8bc803d0b14429b5a4d07ae46da865cc +Author: David Marx +Date: Wed May 13 17:53:30 2009 -0700 + + Solaris: Make sure non-inline versions of asm routines end with ret statements + + Signed-off-by: Alan Coopersmith + +commit 2be5eecb4b0f30b9c55d12521415edbb88c1f8fd +Author: Julien Cristau +Date: Fri May 15 17:29:32 2009 +0200 + + xfree86: add edid quirk for Samsung Syncmaster 2333HD + + It reports vertical size in cm in the detailed mode. + X.Org bug#21750 + + Reported-by: Peter Poklop + Signed-off-by: Julien Cristau + +commit 7c8327f0a75087a85864256a9cea80dd4b86def5 +Author: Michel Dänzer +Date: Fri May 15 15:48:37 2009 +0200 + + EXA: Always damage glyph cache pixmap manually after uploading a glyph. + + Signed-off-by: Michel Dänzer + +commit 850675d4de4373e5df95507dbf2cd9affaaf54bc +Author: Michel Dänzer +Date: Fri May 15 15:48:37 2009 +0200 + + EXA: Take GC client clip type into account for migration. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18950 . + + Signed-off-by: Michel Dänzer + +commit c1bbac2708bbccbec01cecba39cdf2b8160c1dc3 +Author: Matt Turner +Date: Thu May 14 16:00:41 2009 -0400 + + Fix mem_barrier() on Alpha + + Some clean up (da086901c6579e41b28b1418fa12ebb82744fc87) went a bit + too far and removed the needed mem_barrier macro on Alpha. + + This re-adds it. + +commit 4cc33190ef1a4207c0f8fc74201cdf2568a239c2 +Author: Julien Cristau +Date: Thu May 14 17:01:57 2009 +0200 + + xfree86: Add two __FreeBSD_kernel__ checks + + Debian bug#525475 + + Reported-by: Petr Salinger + Signed-off-by: Julien Cristau + +commit ed9aecf8517bf74e943e3e5dd3ee407524e8f122 +Author: Adam Jackson +Date: Thu May 14 06:55:21 2009 -0400 + + COPYING: SGI FreeB 1.1 -> SGI FreeB 2.0 + +commit c66cf7b64c7bcb31c81b9fde27cc40c1440753b1 +Author: Adam Jackson +Date: Thu May 14 06:53:08 2009 -0400 + + Update several of my and/or Red Hat's licenses to standard form. + +commit 2075d4bf9e53b8baef0b919da6c44771220cd4a5 +Author: Michel Dänzer +Date: Thu May 14 11:46:41 2009 +0200 + + glx: If a destroyed window is bound to the current context, make it not current. + + Avoids subsequent crashes due to stale pointers to the DrawableRec, see + https://bugs.freedesktop.org/show_bug.cgi?id=21132#c15 and previous comments. + + Signed-off-by: Michel Dänzer + +commit 2c1190f888515292de01e60fe74657c34b99fd9e +Author: Michel Dänzer +Date: Thu May 14 11:39:16 2009 +0200 + + randr12: Initialize and keep track of updates to VidMode extension gamma value. + + This way clients querying the gamma value via the VidMode extension at least + get the last value set via the same, rather than always something bogus. + + Signed-off-by: Michel Dänzer + +commit fc3ce861cdab8606610726ce7c53f57d950c2407 +Author: Michel Dänzer +Date: Thu May 14 11:35:25 2009 +0200 + + randr12: Fix calculation of gamma ramp values. + + The reciprocal gamma value was missed in the first copy and this mistake was + propagated to the second one. + + Signed-off-by: Michel Dänzer + +commit f3c61377d0fb1f09a18833995556fc9ffd11e097 +Author: Alan Coopersmith +Date: Tue May 12 18:27:09 2009 -0700 + + COPYING file updates for git master changes since 1.6 branch + + Signed-off-by: Alan Coopersmith + +commit b746a00cffca5c553b607a8e9c1074294a23b443 +Author: Alan Coopersmith +Date: Tue May 12 16:11:01 2009 -0700 + + Resync COPYING file with notices in code base as of xorg-server-1.6.1 + + Remove notices for code no longer in tree (Xprint, Xgl, kdrive, cfb, etc.) + Add/update notices for new/changed code in tree + + Signed-off-by: Alan Coopersmith + +commit f250eea2e90fc50bec5214c2f41132b95edc2c46 +Author: Jerome Glisse +Date: Mon May 11 22:52:46 2009 +0200 + + DRI2: update DRI2 private drawable width & height according to X drawable + +commit 0952d12717031e9dda9e48123bb922d0f4e81834 +Author: Eamon Walsh +Date: Mon May 11 15:27:46 2009 -0400 + + xselinux: Relax ownership restriction on SetSelectionUseContext. + + Instead, clients should keep track of the selection instances they use. + +commit ac13145dbcb284293582435409d8a90f276785c5 +Author: Peter Hutterer +Date: Mon May 11 15:45:46 2009 +1000 + + xkb: if kbd init failed, NULL out the pointers after freeing them (#21278) + + Reproducible: + Configure a server that uses the keyboard driver with an invalid ruleset, + e.g. (Option "XkbRules" "foobar"). Ensure that Option "AllowEmptyInput" is + "off" in the ServerFlags or ServerLayout section. Start the server. + After failing to init the keymap, the server will try to clean up after the + device, double-freeing some xkb structs that have not been reset properly. + + X.Org Bug 21278 + + Signed-off-by: Peter Hutterer + +commit ebfd6688d1927288155221e7a78fbca9f9293952 +Author: Søren Sandmann Pedersen +Date: Sun May 10 23:27:56 2009 -0400 + + Make compositing with transformed windows work again. + + The coordinate translation was broken in pretty much every way + imaginable. + +commit c2b668e6fff11c52f2a3f0dc3f4d1fc2c5bcf3e6 +Author: Jeremy Huddleston +Date: Tue May 5 20:27:53 2009 -0700 + + XQuartz: pbproxy standalone: added missing variable declarations. + (cherry picked from commit 2d947d17a3ef5fb8cef959bff0eb08b8bb5b6548) + +commit 9c5b761c8c86cca56f4b4af272f42ba89c9c3ba5 +Author: Peter Hutterer +Date: Sat May 9 16:19:13 2009 +1000 + + Revert "xkb: write the _XKB_RF_RULES_PROP to each device." + + This commit shouldn't have been pushed, we're still sorting out the API we + want to use. + + This reverts commit 876910a951053f0bd31e30098de3da15a1c1f5d6. + + Signed-off-by: Peter Hutterer + +commit 1e816065e5ec3b9394dc1fa5815457a664e15fd9 +Author: Alan Coopersmith +Date: Fri May 8 21:31:01 2009 -0700 + + Don't printf NULL pointers on HAL connection error + + Fixes Solaris bug 6801386 Xorg core dumps on startup if hald not running + http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6801386 + + Signed-off-by: Alan Coopersmith + +commit b680bda34da130ce408783f04214771471e41e8d +Author: Alan Coopersmith +Date: Thu Apr 30 18:49:06 2009 -0700 + + Fix a couple off-by-one array boundary checks. + + Error: Write outside array bounds at Xext/geext.c:406 + in function 'GEWindowSetMask' [Symbolic analysis] + In array dereference of cli->nextSib[extension] with index 'extension' + Array size is 128 elements (of 4 bytes each), index <= 128 + + Error: Buffer overflow at dix/events.c:592 + in function 'SetMaskForEvent' [Symbolic analysis] + In array dereference of filters[deviceid] with index 'deviceid' + Array size is 20 elements (of 512 bytes each), index >= 0 and index <= 20 + + Error: Read buffer overflow at hw/xfree86/loader/loader.c:226 + in function 'LoaderOpen' [Symbolic analysis] + In array dereference of refCount[new_handle] with index 'new_handle' + Array size is 256 elements (of 4 bytes each), index >= 1 and index <= 256 + + These bugs were found using the Parfait source code analysis tool. + For more information see http://research.sun.com/projects/parfait + + Signed-off-by: Alan Coopersmith + Signed-off-by: Adam Jackson + Acked-by: Peter Hutterer + +commit 00bc043fa0398a1d14d46b87da2ff3031a9535dc +Author: Peter Hutterer +Date: Fri May 8 10:10:25 2009 +1000 + + dix: export subpixel precision in XI2 events for root/event coordinates. + + Signed-off-by: Peter Hutterer + +commit bae070914fc27db122e6131ae4838559c4a72f65 +Author: Peter Hutterer +Date: Thu May 7 16:52:31 2009 +1000 + + input: update to inputproto 1.9.99.8 XI2 defines. + + Signed-off-by: Peter Hutterer + +commit 83f32d3972b8bfb0a87069dfb3fcd64b6b7c6424 +Author: Peter Hutterer +Date: Thu May 7 10:05:29 2009 +1000 + + Xi: Add XI2 property requests. + +commit 9935bec6e860cba9a3cc5baadd372ddb89d72ef0 +Author: Peter Hutterer +Date: Thu May 7 09:43:56 2009 +1000 + + Xi: split some code out of the XI 1.5 property request processing. + + This is in preparation for the XI2 property requests that can re-use much of + this code. + +commit f6f1e417063d2d61d65731a7e3ebca3ec2bdaacc +Author: Peter Hutterer +Date: Wed May 6 22:25:28 2009 +1000 + + Xi: fix copy/paste error causing sizeof against wrong struct. + + This wrong check may cause BadLength to be returned to the client even if the + length is correct. + + Signed-off-by: Peter Hutterer + +commit fc0013d744a345199f013ba5b6ef0e44201d0e68 +Author: Peter Hutterer +Date: Wed May 6 16:55:32 2009 +1000 + + Xi: don't double-swap the XListDeviceProperties reply. + + Signed-off-by: Peter Hutterer + +commit 409012061b7d361a172b20455d4aaa5e47527c42 +Author: Peter Hutterer +Date: Wed May 6 16:42:46 2009 +1000 + + Xi: add missing break in XI event swapping function + + Signed-off-by: Peter Hutterer + +commit c3c64978c4a231a3a8c18211d0716df875c75efa +Author: Peter Hutterer +Date: Wed May 6 15:05:06 2009 +1000 + + Xi: fix a couple of wrong dixLookupDevice permission tags. + + Signed-off-by: Peter Hutterer + +commit 0d947aa8e87c5d92b702c60190c8bc5d32c9ba9c +Author: Peter Hutterer +Date: Wed May 6 12:07:07 2009 +1000 + + xfree86: fix xf86PostMotionEventP type checking + + We only put internal events into the queue now, so let's check for ET_Motion + rather than the MotionNotify. + + Signed-off-by: Peter Hutterer + +commit 9457ce448988dacea9a3a1c14b6955767118ff31 +Author: Simon Thum +Date: Thu Apr 30 13:01:17 2009 +0200 + + dix: remove superfluous includes from ptrveloc.c + + Signed-off-by: Peter Hutterer + +commit ee30e1b102d779403eeda97e007b81e85f006a37 +Author: Simon Thum +Date: Thu Apr 30 12:58:48 2009 +0200 + + dix: fix warning in pointer acceleration + + newer gcc's warn against how this cast is done (though it eludes me why), + and lrintf() is also faster especially on insane processors like the P4 + (http://www.mega-nerd.com/FPcast). + + Signed-off-by: Peter Hutterer + +commit 5cf70183812541b33a6e83c7e1e3bc6198730cbe +Author: Peter Hutterer +Date: Tue May 5 21:00:31 2009 +1000 + + xkb: remove _XkbAlloc, _XkbCalloc, _XkbRealloc and _XkbFree + + We all agree that wrapping is fun, but seriously. One of these days someone + will get hurt. + + Signed-off-by: Peter Hutterer + +commit 0e31d3906deaee5d9ada66e538b9e93574a4d610 +Author: Peter Hutterer +Date: Tue May 5 21:07:07 2009 +1000 + + xkb: remove some now-useless XFUNCPROTOBEGIN + + We bring them back if we start rewriting the server in C++, promise. + + Signed-off-by: Peter Hutterer + +commit 8b583ca2b21155359c6255f406c96599b277c762 +Author: Peter Hutterer +Date: Wed May 6 22:25:28 2009 +1000 + + Xi: fix copy/paste error causing sizeof against wrong struct. + + This wrong check may cause BadLength to be returned to the client even if the + length is correct. + + Signed-off-by: Peter Hutterer + +commit 7ab5e9b97c300bba793a23fa13506b0c77c50ddf +Author: Peter Hutterer +Date: Wed May 6 12:07:07 2009 +1000 + + xfree86: fix xf86PostMotionEventP type checking + + We only put internal events into the queue now, so let's check for ET_Motion + rather than the MotionNotify. + + Signed-off-by: Peter Hutterer + +commit 50cc8adafca4ba3838d468278d6eb8a4692d2488 +Author: Peter Hutterer +Date: Wed May 6 16:55:32 2009 +1000 + + Xi: don't double-swap the XListDeviceProperties reply. + + Signed-off-by: Peter Hutterer + +commit 3fc6fcfb267888d65a22ed7c3eda175a2530a3d5 +Author: Simon Thum +Date: Wed May 6 10:39:16 2009 +0200 + + dix: add 'none' pointer acceleration profile with number -1 + + This is a shorthand for disabling acceleration, while retaining the + possiblity to use constant deceleration. If constant deceleration is + also unused, it will optimize motion processing. + + Other possiblities to deactivate acceleration were quite hidden, + and didn't always work as expected. E.g. xset m 1 1 would retain + adaptive deceleration, while xset m 1 0 would not (in the default + profile). + + Also removes the 'reserved' profile; it was unused and it's trivial + to add new ones anyway. + + Signed-off-by: Peter Hutterer + +commit 9d1597cbefea6a5e7959f2099c46f1a284def7ad +Author: Simon Thum +Date: Thu Apr 30 13:01:17 2009 +0200 + + dix: remove superfluous includes from ptrveloc.c + + Signed-off-by: Peter Hutterer + +commit 35fce4e5c7fa34f98b3e4010c6cb09ce38a9205c +Author: Simon Thum +Date: Thu Apr 30 12:58:48 2009 +0200 + + dix: fix warning in pointer acceleration + + newer gcc's warn against how this cast is done (though it eludes me why), + and lrintf() is also faster especially on insane processors like the P4 + (http://www.mega-nerd.com/FPcast). + + Signed-off-by: Peter Hutterer + +commit d220d6907d1d5138d1528c48b739e77f65616225 +Author: Peter Hutterer +Date: Mon May 4 17:38:02 2009 +1000 + + Xi: add GrabButton and GrabKeysym code. + + We don't do keycode grabs in XI2, they're pointless. + +commit 1b593ced171d02f1d00034f0f733060706bb6d41 +Author: Peter Hutterer +Date: Tue May 5 16:57:46 2009 +1000 + + Xi: access the prev_state to get group/modifier state for key events. + + Key events may change the modifier state, so we need to get the prev_state for + those (i.e. without the changes by the event already applied). + + Signed-off-by: Peter Hutterer + +commit 35a4b8e7f4526a92d44cb16a783f21030cd1f6df +Author: Peter Hutterer +Date: Tue May 5 16:51:59 2009 +1000 + + xkb: remove oldState from XkbHandleActions. + + I really don't know what the purpose of this variable is or was, aside from + potentially clobbering up our key state since there's a path where it may be + used uninitialised. + + Also, this means that xkbi->prev_state is now accessible from the DIX with + meaningful data. + + Signed-off-by: Peter Hutterer + +commit d523fbe428e4513d85402caa83e9349256b680cc +Author: Peter Hutterer +Date: Mon May 4 17:00:57 2009 +1000 + + test: add test for xi2 struct sizes. + +commit 1b1b20d6e3e696e4437a9ef56128cde70a485f66 +Author: Peter Hutterer +Date: Tue May 5 13:47:55 2009 +1000 + + Change glib require for tests to auto. + + Signed-off-by: Peter Hutterer + +commit 749cae82204f347248c815b1068ffcae9825fe70 +Author: Peter Hutterer +Date: Thu Apr 30 14:58:00 2009 +1000 + + mi: don't crash if we're trying to update the pointer for a keyboard. + + If a device doesn't have a pointer, just return. + + Signed-off-by: Peter Hutterer + +commit 7ecedb0f2ee5b53513205d1f0aa381451893b9c5 +Author: Peter Hutterer +Date: Fri May 1 14:35:12 2009 +1000 + + include: up the number of max. input devices to 40. + + With the Xtest virtual slave devices we have 4 devices for each MD + pointer/keyboard pair, plus the AllDevices and AllMasterDevices reserved + deviceids. It's quite easy to hit the current limit. + + Signed-off-by: Peter Hutterer + +commit a38d33f6ac765bc5a3296b325e2c9b4a6a10ebf1 +Author: Peter Hutterer +Date: Fri May 1 15:24:02 2009 +1000 + + Xext: shut up compiler warnings in xtest.c + + Signed-off-by: Peter Hutterer + +commit 14d5471981151b27678de826daa078977217477a +Author: Peter Hutterer +Date: Fri May 1 15:22:37 2009 +1000 + + Xext: return BadDevice from XTest if we don't have keys/buttons/valuators. + + BadDevice is an XI error, but this cannot happen for core XTest fake input + anyway since the device will be the matching virtual XTest slave device. + + Signed-off-by: Peter Hutterer + +commit f1bed0959e803784af142a0f45177ee3b675d78a +Author: Peter Hutterer +Date: Fri May 1 15:15:04 2009 +1000 + + Xext: fix core Xtest button presses, don't call PickPointer. + + We already did the device selection before, so dev should be the XTest virtual + pointer. + + Signed-off-by: Peter Hutterer + +commit 94648bb797d94b025746c60679c584e5be2fae28 +Author: Jesse Barnes +Date: Mon May 4 15:38:22 2009 -0700 + + Don't prepare outputs & crtcs if set_mode_major is present + + A driver with this hook will take care of preparing the outputs & crtcs, + so calling the prepare functions will just cause unnecessary flicker. + + Fixes bug #21077 + +commit 7d85169c7ab1d05c21fdbb2877ffd79f344dbb6b +Author: Michel Dänzer +Date: Mon May 4 10:14:43 2009 +0200 + + Fix typo in ProcRenderCreateAnimCursor. + +commit 59358de4b68a01452bf68593beb83605087ebc8f +Author: Peter Hutterer +Date: Mon May 4 17:30:19 2009 +1000 + + input: ensure various ProcUngrabKey/Buttons have the right grabtype set. + +commit 834ea071b619506e0bef5bdbf0e3c59831cf6e99 +Author: Peter Hutterer +Date: Mon May 4 15:58:15 2009 +1000 + + dix: if grab types differ, two grabs cannot be the same. + +commit 63a3c727b35d1ffd8a850a5177bd6623cd78b179 +Author: Peter Hutterer +Date: Fri May 1 15:24:02 2009 +1000 + + Xext: shut up compiler warnings in xtest.c + + Signed-off-by: Peter Hutterer + +commit 226dd90597ef29998ac5db15c5457aad3fe9729e +Author: Peter Hutterer +Date: Fri May 1 15:22:37 2009 +1000 + + Xext: return BadDevice from XTest if we don't have keys/buttons/valuators. + + BadDevice is an XI error, but this cannot happen for core XTest fake input + anyway since the device will be the matching virtual XTest slave device. + + Signed-off-by: Peter Hutterer + +commit 0fdff0a47a57a0096974ee83e07fefbad03075dd +Author: Peter Hutterer +Date: Fri May 1 15:15:04 2009 +1000 + + Xext: fix core Xtest button presses, don't call PickPointer. + + We already did the device selection before, so dev should be the XTest virtual + pointer. + + Signed-off-by: Peter Hutterer + +commit f0124ed93cdcee8d22a6690e639a3f60b9a63c54 +Author: Peter Hutterer +Date: Fri May 1 14:35:12 2009 +1000 + + include: up the number of max. input devices to 40. + + With the Xtest virtual slave devices we have 4 devices for each MD + pointer/keyboard pair, plus the AllDevices and AllMasterDevices reserved + deviceids. It's quite easy to hit the current limit. + + Signed-off-by: Peter Hutterer + +commit 08cd846000286eb5e07cc8d8cb313aff2d6e7faf +Author: Peter Hutterer +Date: Fri May 1 11:06:06 2009 +1000 + + dix: only free the old cursor if the grab was successful. + + Testcase: start thunderbird and move a message around, crashes after two or + three moves. + + Signed-off-by: Peter Hutterer + +commit 557dbadf3be273255e8fdb12d9321f4e88bf2b65 +Author: Alan Coopersmith +Date: Sat May 2 00:26:18 2009 -0700 + + XkbSetNamedIndicator should ignore SD's without LED's + + When ProcXkbSetNamedIndicator is called on a core device, and we + walk the slaves to set the LED's on each of them, ignore any slaves + that do not have either a KbdFeedbackCtrl or LedCtrl structure. + + (This is much more critical in xserver-1.5-branch, where we walk + *all* devices, not just the slaves of the specified master, and + thus return failure when setting an LED on the Core Keyboard and + hit a xf86-input-mouse device with no LED's to set.) + + Signed-off-by: Alan Coopersmith + Acked-by: Peter Hutterer + +commit 0d9d3f3e361f769822caedccf4c2a58cc9930ecc +Author: Ian Romanick +Date: Mon Apr 27 15:11:10 2009 -0700 + + DRI2: Force allocation of real-front buffer for non-windows as well + + For redirected rendering we end up with pixmaps (which the app thinks are + windows) that are double buffered. + + Signed-off-by: Ian Romanick + Tested-by: Pierre Willenbrock + +commit 3d30789a05a730a03faa6058c73a5eda36ef3779 +Author: Peter Hutterer +Date: Thu Apr 30 14:58:00 2009 +1000 + + mi: don't crash if we're trying to update the pointer for a keyboard. + + If a device doesn't have a pointer, just return. + + Signed-off-by: Peter Hutterer + +commit 876910a951053f0bd31e30098de3da15a1c1f5d6 +Author: Peter Hutterer +Date: Thu Apr 30 14:46:45 2009 +1000 + + xkb: write the _XKB_RF_RULES_PROP to each device. + + We only have one root window and writing the rules used to the same property + for each device is quite pointless if you don't have the same RMLVO on all + devices. So let's be sensible and write the same property to the device too, + so at least we know which device got loaded with which RMLVO. + +commit 44044adc92e6bb6537f48c84727523d5cb23528c +Author: Peter Hutterer +Date: Thu Apr 30 11:39:50 2009 +1000 + + xfree86: print a message if NIDR fails due to AutoAddDevices off. + + Signed-off-by: Peter Hutterer + +commit 43dbbc30327f826068bc7cd2cdaf870ed61b4522 +Author: Peter Hutterer +Date: Tue Apr 28 21:01:36 2009 +1000 + + Xi: fix typo in ProcXIGrabDevice + + Signed-off-by: Peter Hutterer + +commit 6a618929a0c06ba0d6dac13d7e644cd9658d98ed +Author: Peter Hutterer +Date: Tue Apr 28 16:49:45 2009 +1000 + + input: reshuffle CreateGrab and friends to take a GrabParameters param. + + This is cleaning up work in preparation for XI2 passive grabs. + +commit e8e26f700c9c70d3f1bb53bdb71d1100f5c43a69 +Author: Peter Hutterer +Date: Sun Apr 26 21:43:25 2009 +1000 + + Xi: split some grab parameter checking out of GrabButton and GrabKey. + +commit 57aff88c7d0761e590806d07bee1c9410680c89f +Author: Eamon Walsh +Date: Wed Apr 29 01:04:37 2009 -0400 + + Fix most remaining deprecated resource lookups. + + Callsites updated to use dixLookupResourceBy{Type,Class}. + TODO: Audit access modes to make sure they reflect the usage. + +commit 1abe0ee3da5e1268c7315f841d31337ea6524cf0 +Author: Eamon Walsh +Date: Tue Apr 28 23:51:40 2009 -0400 + + kdrive: fix Xvfb build with separate libmain. + +commit 737b49199a05299486064e6e762cf2a2f6f95be6 +Author: Peter Hutterer +Date: Thu Apr 9 15:40:24 2009 +1000 + + xfree86: restore default off for DontZap + + Zapping is triggered by xkb these days, so note in the man page that it's the + Terminate_Server action. Since it's XKB, personal preferences towards or + against zapping should be achieved through xkb rulesets. + If Terminate_Server is not in the xkb actions, then we can't zap anyway and we + don't need a default of DontZap "on". + + This patch restores the old meaning of DontZap - disallow zapping altogether, + regardless of XKB's current keymap. + Ideally, this patch should be accompanied by b0f64bdab00db652e in + xkeyboard-config. + + Signed-off-by: Peter Hutterer + +commit 98a1fa994158feca8bc80a10296a7675465c0e56 +Author: Peter Hutterer +Date: Tue Apr 21 22:18:23 2009 +1000 + + test: add InternalEvent to core event conversion tests. + + Signed-off-by: Peter Hutterer + +commit 990e8362a76fadc173e890d9052a2e5274b6eac5 +Author: Peter Hutterer +Date: Thu Apr 16 11:41:58 2009 +1000 + + test: add a simple test to verify device axis intialization. + + Signed-off-by: Peter Hutterer + +commit 4eac0df060b897470fb01cfd3b70f500da757c74 +Author: Peter Hutterer +Date: Wed Apr 15 17:21:08 2009 +1000 + + Add a test-suite for in-server unit-testing. + + This patch adds a test/ directory that contains the setup for a unit-testing + suite designed for in-server unit-testing. All functions available to the X + server are available to the test binaries through static linking. + + This test suite uses the glib testing framework. + Do not use glib calls outside of the test/ directory. + + Signed-off-by: Peter Hutterer + +commit c2c515ead38d9a6c9eae0b83aa7a82208f177b7e +Author: Peter Hutterer +Date: Wed Apr 22 13:26:40 2009 +1000 + + dix: remove all but main() from main.c + + All other functions are pushed into where they seemed to fit. + main.c is now linked separately into libmain.a and linked in by the various + DDXs. + + Signed-off-by: Peter Hutterer + +commit dc2767d1c5db60385867c76ba2de507fe0cb8a90 +Author: Peter Hutterer +Date: Tue Apr 21 22:18:23 2009 +1000 + + test: add InternalEvent to core event conversion tests. + + Signed-off-by: Peter Hutterer + +commit 1127ca097cb75450bcccfc5f5d82e435de2fb5b7 +Author: Peter Hutterer +Date: Thu Apr 16 11:41:58 2009 +1000 + + test: add a simple test to verify device axis intialization. + + Signed-off-by: Peter Hutterer + +commit 4124c465a85713fe44843a16c5e2b13ece17e9d2 +Author: Peter Hutterer +Date: Wed Apr 15 17:21:08 2009 +1000 + + Add a test-suite for in-server unit-testing. + + This patch adds a test/ directory that contains the setup for a unit-testing + suite designed for in-server unit-testing. All functions available to the X + server are available to the test binaries through static linking. + + This test suite uses the glib testing framework. + Do not use glib calls outside of the test/ directory. + + Signed-off-by: Peter Hutterer + +commit 987579c930bda803427a28cb82773c389f5110d6 +Author: Peter Hutterer +Date: Wed Apr 22 13:26:40 2009 +1000 + + dix: remove all but main() from main.c + + All other functions are pushed into where they seemed to fit. + main.c is now linked separately into libmain.a and linked in by the various + DDXs. + + Signed-off-by: Peter Hutterer + +commit 2a2a7fa6856b2e1954e904577535118f20cd9133 +Author: Alan Coopersmith +Date: Mon Apr 27 20:23:53 2009 -0700 + + Solaris: use instead of stale copy in Xorg sources + + Signed-off-by: Alan Coopersmith + +commit 707af5f8c5fae3b6c4c5125a91917667bb0ab908 +Author: Simon Farnsworth +Date: Thu Apr 23 16:15:01 2009 +0100 + + Make the cursor completely optional + + For embedded use, it's convenient to be able to disable the cursor + completely, without having to audit and fix up all your third-party + code (e.g. Mozilla Firefox). + + Add -nocursor and -cursor server options to enable and disable the + cursor. The default is still -cursor, but embedded users can run the + server with -nocursor to hide the cursor regardless of what + application developers do. + + Signed-off-by: Peter Hutterer + +commit 40a8f2f4088aa353de733a11327b628ef13a52e6 +Author: Pierre Willenbrock +Date: Sun Apr 19 21:15:22 2009 +0200 + + Fix obvious copypasta + + Reviewed-by: Ian Romanick + +commit a8cf63fd18b0ddadbadf7b47d620159854920050 +Author: Aaron Plattner +Date: Thu Apr 23 14:57:04 2009 -0700 + + Export CompositeRegisterAlternateVisuals. + + Drivers need this if they add visuals that require implicit redirection. Add a + new SDK header, compositeext.h, to contain the prototype for this function. + +commit 48573e7ea13e279593249036e6d30f1d7507882f +Author: Peter Hutterer +Date: Sun Apr 26 21:32:37 2009 +1000 + + Xi: swap stuff->cursor in SProcXIGrabDevice + +commit ff6c7764c2909e4126403b7211faa6c58556b341 +Author: Ian Romanick +Date: Fri Apr 24 12:49:19 2009 -0700 + + DRI2: Implement protocol for DRI2GetBuffersWithFormat + + This change implements the protocol for DRI2GetBuffersWithFormat, but + the bulk of the differences are the changes to the extension / driver + interface to make this function work. The old CreateBuffers and + DeleteBuffers routines are replaced with CreateBuffer and DeleteBuffer + (both singular). + + This allows drivers to allocate buffers for a drawable one at a time. + As a result, 3D drivers can now allocate the (fake) front-buffer for a + window only when it is needed. Since 3D drivers only ask for the + front-buffer on demand, the real front-buffer is always created. This + allows CopyRegion impelemenations of SwapBuffers to continue working. + As with previous version of this code, if the client asks for the + front-buffer for a window, we instead give it the fake front-buffer. + + Signed-off-by: Ian Romanick + Reviewed-by: Kristian Høgsberg + +commit 28ddfc88d8d547941c7f4713db527a3c2f9ec35a +Author: Ian Romanick +Date: Fri Apr 24 12:09:21 2009 -0700 + + DRI2: Add interface for drivers to query DRI2 extension version + + Signed-off-by: Ian Romanick + +commit a1c98f7fa9aa0cd5075ef2054c5d2be4d1e740f0 +Author: Joel Bosveld +Date: Fri Apr 24 10:12:26 2009 -0700 + + Correct fcntl(F_SETOWN) error check in non-Solaris sigio code + + commit 64b7f96dca accidentally inverted the comparison, could + result in crashes on some systems later on. + + Signed-off-by: Alan Coopersmith + +commit 64b7f96dca23d2b33e0b8a8785d628d9a2f50e7b +Author: Alan Coopersmith +Date: Fri Apr 24 00:14:12 2009 -0700 + + Add SIGIO/SIGPOLL support for Solaris + + Signed-off-by: Alan Coopersmith + +commit 0c467b1f990f156a34d5ef117bd825df6b633114 +Author: Alan Coopersmith +Date: Fri Apr 24 00:05:28 2009 -0700 + + Add casts to generated entries in sdksyms.c to silence type mismatch warnings + + Signed-off-by: Alan Coopersmith + +commit 7d0f7518c2235a9dc783029971259ddaada2db20 +Author: Alan Coopersmith +Date: Thu Apr 23 08:42:38 2009 -0700 + + Fix byte swapping of XF86VidMode{Get,Set}GammaRamp + + Fixes OpenSolaris Bug 8315: + Xorg segfaults when screensaver fades in cross-endian xdmcp session + + + Signed-off-by: Alan Coopersmith + +commit 057fc9a4f89282e440b5e11458f1dd8655879dd8 +Merge: 95628b7 932d6bc +Author: Peter Hutterer +Date: Fri Apr 24 16:15:47 2009 +1000 + + Merge branch 'master' into xi2 + + Conflicts: + Xi/chdevhier.c + include/input.h + +commit 932d6bcbb68194c5bdfeb336f700dc8b31529223 +Author: Peter Hutterer +Date: Fri Apr 24 15:28:45 2009 +1000 + + mi: remove superfluous check. + + mieqProcessInputEvents doesn't process events from MDs anymore, so we don't + need to check for pDev->isMaster. + + Signed-off-by: Peter Hutterer + +commit fab563bf8f6b63906ce9d5a568c467425843265b +Author: Benjamin Close +Date: Fri Mar 27 16:44:15 2009 +1030 + + input: propagate XTst events through virtual slave devices. + + A XTest virtual slave device pair (kbd/ptr) exists for every master + device pair. This is so XTest events are correctly propogated via slave + devices up to Master devices and the classes are correctly changed along + the way. We add the XTest slave device pair to the Virtual Core pointer + and provide a simple way of creating the devices. + + A XTest Slave Device is identified by the XTstDevicePrivateKey property + being set in the devices devProperties + + XI events are still propagated through the matching device, in the hope the + client knows what it is doing. + + Signed-off-by: Peter Hutterer + +commit ccd28ca2ad40aecf951ab058d89062828e3e5d8a +Author: Jeremy Huddleston +Date: Wed Apr 22 19:23:17 2009 -0700 + + XQuartz: Localization update + (cherry picked from commit 9435fc5e20e25ce66ec85bde033daff51f39f69c) + +commit a362d0f4fb79150f7b8e0eb3d1dc1cdee2f98d95 +Author: Jeremy Huddleston +Date: Sat Apr 11 19:06:45 2009 -0700 + + XQuartz: Make sure the bgMouseLocationUpdated state is consistent + (cherry picked from commit 8fa8a8e1db60c8ac60d10f1f15517471d2291f77) + +commit 8dc8812c226222fc64f8e489f9f123687a95d3d1 +Author: Dave Airlie +Date: Thu Apr 23 12:13:35 2009 +1000 + + exa: add missing exa.h header include + +commit 3ec6a121e110ba3cae964ee201d4d5bf818b6dff +Author: Dave Airlie +Date: Thu Apr 23 12:13:05 2009 +1000 + + exa: missed exa.h change + +commit 02ae85c4c93bbd0013c063ce0014b365a8ba061f +Author: Dave Airlie +Date: Thu Apr 23 12:04:17 2009 +1000 + + exa: add CreatePixmap2 hook for driver pixmaps. + + This adds a revised pixmap hook for driver pixmaps, which is + required to support tiling on various chips. + + Signed-off-by: Dave Airlie + +commit 9d684ba0bcab53841a17ebd521507b6df8bc4b45 +Author: Dave Airlie +Date: Thu Apr 16 10:28:36 2009 +1000 + + exa: avoid offscreen pixmap swapped out flag for driver pixmaps + +commit 0dfb97f15f591f85e079f5829c77d0c328d00464 +Author: Julien Cristau +Date: Wed Apr 22 20:01:49 2009 +0200 + + Bug#21324: Add quirk for Iiyama Vision Master 450 + + Reported-by: Jeremy Henty + Signed-off-by: Julien Cristau + +commit 44227ef1b77467c76147b9bf79bdd0e6305a522a +Author: Ian Romanick +Date: Mon Apr 20 18:20:52 2009 -0700 + + DRI2: Send the version the code actually supports + + This prevents building an older server with a new dri2proto.h from + resulting in a DRI2 extension module that lies about the version it + supports. + + Signed-off-by: Ian Romanick + +commit d1e916d29be8b470cbc8cadcf6e83991fdbc5a9f +Author: Ian Romanick +Date: Thu Apr 16 12:10:34 2009 -0700 + + DRI2: Add missing front-buffer flush callback. + + Signed-off-by: Ian Romanick + +commit 826a5bff0136b2b4d55a9e6e6bc3a7a64da9031e +Author: Benjamin Close +Date: Thu Apr 16 15:33:30 2009 +1000 + + dix: Change AllocMaster into AllocDevicePair, allow creation of SDs too. + + Allocating a slave device is essentially the same as allocating a master device. + Hence we rename AllocMaster to AllocDevicePair and provided the ability to + indicate if a master or slave device pair is required. + + Signed-off-by: Peter Hutterer + +commit e2e5932bda3f473629d4be6f3ca4dcab18993eb6 +Author: Peter Hutterer +Date: Thu Apr 16 11:06:52 2009 +1000 + + dix: don't allow more than MAX_VALUATORS on one device. + + Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the + internal event delivery relies on not having more than MAX_VALUATOR axes, so + let's cap it down. + If there's real devices that require more than the current 36, I'm sure we can + bump this up. + + Signed-off-by: Peter Hutterer + +commit 063833f3a6d9f8f657e3de309c8d6d5c3d606513 +Author: Julien Cristau +Date: Wed Dec 24 14:23:37 2008 +0100 + + Add XI 1.5 event and requests to protocol.txt + +commit 4f86ee61a4abf7a29e565d095aa08abd0ca9dc66 +Author: Julien Cristau +Date: Wed Dec 24 14:17:27 2008 +0100 + + Add RandR 1.3 requests to protocol.txt + +commit 6559f02ef89cb0ee365110d6a928ebd29632ad53 +Author: Colin Harrison +Date: Fri Apr 17 15:14:45 2009 +0100 + + xkb: set bell_func in InitKeyboardDeviceStruct. + + Signed-off-by: Peter Hutterer + +commit 95628b797e2b326ae15406df4f736e25f5d2f12f +Author: Peter Hutterer +Date: Mon Apr 20 14:04:54 2009 +1000 + + Xi: use the XI2 defines for AsyncPair, SyncDevice, etc, not the XI ones. + + And don't allow some values on SDs either. + +commit 335c63fcd6a53c1d3dffd6e00c0acd400c61e3d3 +Author: Werner LEMBERG +Date: Fri Apr 17 15:22:57 2009 +0200 + + Add newline to some LogMessage strings. + + Signed-off-by: Peter Hutterer + +commit d5ad14c8ed4d8360e1df8cd0bacf6a7c9c31df91 +Merge: 54716fd 0e0642e +Author: Peter Hutterer +Date: Sun Apr 19 22:28:22 2009 +1000 + + Merge branch 'master' into xi2 + +commit 54716fd3dbc251db9d251d1d0435942efaa63259 +Author: Peter Hutterer +Date: Sun Apr 19 22:12:11 2009 +1000 + + Convert to using int32_t fixed point values on the wire. + + Signed-off-by: Peter Hutterer + +commit 129ac9a9145323e3f126590b491e718f976f80ce +Author: Peter Hutterer +Date: Sun Apr 19 21:31:56 2009 +1000 + + dix: set root_x/y for device events. + + Signed-off-by: Peter Hutterer + +commit eeb1e4cd254c047539933c3b886037e67ef30762 +Author: Peter Hutterer +Date: Wed Apr 15 22:17:15 2009 +1000 + + Xi: add support for XIAllowEvents. + + Signed-off-by: Peter Hutterer + +commit 74d0fc3aee05bc4f505274d81dd44c0d2b4368ff +Author: Peter Hutterer +Date: Thu Apr 16 11:06:52 2009 +1000 + + dix: don't allow more than MAX_VALUATORS on one device. + + Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the + internal event delivery relies on not having more than MAX_VALUATOR axes, so + let's cap it down. + If there's real devices that require more than the current 36, I'm sure we can + bump this up. + + Signed-off-by: Peter Hutterer + +commit edb70caf21fa5da3c336c47c62218a3f05c635b8 +Author: Peter Hutterer +Date: Wed Apr 15 22:16:49 2009 +1000 + + dix: remove un-used parameter "core" from AllowSome + + Signed-off-by: Peter Hutterer + +commit bb5418d4901017c657031181d3839f58b387a2a3 +Author: Peter Hutterer +Date: Sun Apr 12 22:22:21 2009 +1000 + + Xi: Add support for XI2 active grabs and ungrabs. + + Signed-off-by: Peter Hutterer + +commit c11ef87931f920ba782ba4e9b47d9c31ad7c1cf7 +Author: Peter Hutterer +Date: Sun Apr 12 22:16:14 2009 +1000 + + Xi: take XI2 requests into account when checking opcodes. + + Signed-off-by: Peter Hutterer + +commit c94ea5bc055e4efc323e84b7a8266e8b8a4af48e +Author: Peter Hutterer +Date: Sun Apr 12 17:38:28 2009 +1000 + + input: use a GrabMask union in GrabDevice to allow for XI2 masks. + + Signed-off-by: Peter Hutterer + +commit 6bb4b5b93701535402f65ea828348ed7747c7dbf +Author: Peter Hutterer +Date: Sun Apr 12 16:20:10 2009 +1000 + + Xi: add XI2 grab protocol request handling. + + Signed-off-by: Peter Hutterer + +commit 09f9a86077f0058ce88ee9b3df5d1ab854eeca43 +Author: Peter Hutterer +Date: Sun Apr 12 16:19:45 2009 +1000 + + input: replace GrabRec's coreGrab field with grabtype. + + Don't allow grabs of different types to override each other. + + Signed-off-by: Peter Hutterer + +commit 7fbe1b7d63c94b344e8ff9d09c0bb162ca104909 +Author: Peter Hutterer +Date: Sat Apr 11 13:10:31 2009 +1000 + + Xi: remove the GetExtensionVersion hack. + + Squashing data into a request that's defined to be padding is probably not the + best idea. + + Signed-off-by: Peter Hutterer + +commit 0e0642ee9466d3268476d0084a83a9d93a4aa555 +Author: Peter Hutterer +Date: Thu Apr 16 16:17:07 2009 +1000 + + os: don't malloc memory in LogVMessageVerb. + + LogVWrite is limited to a buffer size of 1024, so we don't loose anything here + by truncating. This way we can use LogVMessageVerb (and xf86Msg and friends) + during signal handlers with the normal message types. + + Signed-off-by: Peter Hutterer + Acked-by: Alan Coopersmith + +commit 62d2fb68638e9f2aa3c1d72027619c4d38f5b812 +Author: Peter Hutterer +Date: Thu Apr 16 17:06:33 2009 +1000 + + xkb: Add XkbFreeRMLVOSet helper function. + + Signed-off-by: Peter Hutterer + Acked-by: Dan Nicholson + +commit 73e1055b1275470dcc2d53b15898c866d9721d3e +Author: Peter Hutterer +Date: Sat Apr 11 11:19:29 2009 +1000 + + Xi: fix a typo in a #ifdef + + Signed-off-by: Peter Hutterer + +commit cbbc7fed994448852961a987a8b0eadf718b24bf +Author: Simon Thum +Date: Wed Apr 1 10:53:10 2009 +0200 + + dix: correctly utilize tracker buffer and protect from timer overruns + + two small related fixes hard to split up + + Signed-off-by: Peter Hutterer + +commit ca4918ac2ff003142aefbd8ac7ec2bc398ccc6eb +Author: Peter Hutterer +Date: Thu Apr 9 19:31:04 2009 +1000 + + Xi: remove fail from SProcXISelectEvent. + + Leftover from rebasing once too often, I guess. + + Signed-off-by: Peter Hutterer + +commit 463676f016a105a790cbb386d20eb5b188c04652 +Author: Peter Hutterer +Date: Thu Apr 9 19:11:59 2009 +1000 + + Xi: remove un-used variable pXIClient + + Signed-off-by: Peter Hutterer + +commit 32b13ec4cd42842a133aa6428f49638b0448efc9 +Author: Peter Hutterer +Date: Thu Apr 9 19:11:27 2009 +1000 + + Xi: silence compiler warnings about "wrong" event types. + + Signed-off-by: Peter Hutterer + +commit f2e957c5342aefc8329e9fe282b7072f767fcd28 +Author: Peter Hutterer +Date: Thu Apr 9 19:07:36 2009 +1000 + + mi: add prototype for CopyGetMasterEvent. + + Signed-off-by: Peter Hutterer + +commit d80798ba2ae018086aaf230fcd8bc71d3bf06b11 +Author: Peter Hutterer +Date: Thu Apr 9 20:27:00 2009 +1000 + + mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec. + + Signed-off-by: Peter Hutterer + +commit 4dedb900f4fbd3bdc9538b1e82cab2044438a770 +Author: Peter Hutterer +Date: Thu Apr 9 08:42:06 2009 +1000 + + xfree86: shut up compiler warnings - typecast to InternalEvent + + Reported-by: Eric Anholt + Signed-off-by: Peter Hutterer + +commit 4fa7fcf610d2ab91c1158f8034bbc0531060a86f +Author: Peter Hutterer +Date: Thu Apr 9 08:40:20 2009 +1000 + + mi: fix compiler warning - explicitly typecast to InternalEvent. + + Signed-off-by: Peter Hutterer + +commit 8bf2f562678107c346e8664f18c10f315c2768f5 +Author: Peter Hutterer +Date: Thu Apr 9 08:14:39 2009 +1000 + + dix: fix dev/keybd variable mixup. + + Reported-by: Eric Anhold + Signed-off-by: Peter Hutterer + +commit 012cb1956a69f6cf2a878c5331e792fb12c73e9d +Author: Peter Hutterer +Date: Thu Apr 9 08:06:32 2009 +1000 + + xfree86: fix use of uninitialized variable in DGAProcessPointerEvent. + + Reported-by: Eric Anholt + Signed-off-by: Peter Hutterer + +commit 73b01a9aac5fde46ccd90c08a070e9d2496092b9 +Author: Simon Thum +Date: Wed Apr 8 14:35:01 2009 +0200 + + dix: fix pointer accelerations remainder handling + + This didn't really work as intended, but did amazingly well thanks + to roundf() hiding the defect. Cheers! + + Signed-off-by: Peter Hutterer + +commit 4318075140cc287871d3c3b9f777289ea4ffa23a +Author: Peter Hutterer +Date: Tue Apr 7 21:51:02 2009 +1000 + + dix: store subpixel precision and send it down the wire to the client. + + For the valuator data, not yet for root x/y and event x/y. + + Signed-off-by: Peter Hutterer + +commit 9212948461c5e053abb61fff73ced4a00f138544 +Author: Simon Thum +Date: Sat Mar 21 18:19:19 2009 +0100 + + dix: allow relative motion buffer to accumulate in a natural way + + Since with XI2 we pass sub-pixel motion, anything else is broken. + + Signed-off-by: Peter Hutterer + +commit ad76656f8869e2065f0c4e66cfbeef0b42c61769 +Author: Adam Jackson +Date: Fri Apr 17 17:46:58 2009 -0400 + + randr: Accept gamma set requests from XF86VidMode clients too + +commit d9bf52b4abd29a3c206cd1e765b680659ddac1c6 +Author: David Jander +Date: Fri Apr 17 01:34:18 2009 -0400 + + [kdrive] Fix rotation of pointer + + Rotation matrix for pointer coordinates was incomplete and pointers with + absolute coordinates did not work correctly in xserver (kdrive) when the + sceen was rotated other than by 0 degrees. + + Signed-off-by: David Jander + Signed-off-by: James Cloos + +commit 4559d2ace6ac55fe361f572ded0769cdd1f3b545 +Author: Eamon Walsh +Date: Thu Apr 16 22:48:11 2009 -0400 + + security: Grant untrusted windows remove access on all windows. + + This allows untrusted clients to destroy their own windows when they + have been reparented by a trusted window manager. + +commit 3481b32ab971c41cb972f6819ae049f3e9f7033b +Author: Eamon Walsh +Date: Thu Apr 16 22:39:54 2009 -0400 + + security: Fix a crash caused by wrong ordering of format arguments. + +commit 6045506be0cebca4ebbe943ae77f020aafa703d4 +Author: Eamon Walsh +Date: Thu Apr 16 22:33:12 2009 -0400 + + security: Revert behavior of extension access for compatibility. + + Previously, three extensions were defined as "trusted" by the extension: + BIG-REQUESTS, XC-MISC, and XPrint. No other extensions were permitted + to be used by untrusted clients. + + In commit 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 this was changed for + some reason. Return to the old, compatible behavior. + +commit 56a5955c8cd87137248edb2cbc65d384376d72ad +Author: Peter Hutterer +Date: Tue Apr 14 17:05:04 2009 +1000 + + xkb: strdup the values returned by XkbGetRulesDflts + + XkbGetRulesDftls may get a copy of what will later be freed when passed into + XkbSetRulesDftls. + + On the second run of XkbGet/SetRulesDflts: + XkbGetRulesDflts(rmlvo) + rmlvo->rules = current-rules + + XkbSetRulesDflts(rmlvo) + free(current-rules) + current-rules = strdup(rmlvo->rules) + + Leaving us with garbage in current-rules. + + This patch requires callers of XkbGetRulesDflts to free the associated memory. + + See also + http://lists.freedesktop.org/archives/xorg-devel/2009-February/000305.html + + Reported-by: Benjamin Close + Signed-off-by: Peter Hutterer + Acked-by: Benjamin Close + Signed-off-by: Daniel Stone + +commit b406886bbffadaa52864a99f2a0520999eadc15d +Author: Peter Hutterer +Date: Tue Apr 14 16:57:29 2009 +1000 + + input: allow NULL as XkbRMVLOSet in InitKeyboardDeviceStruct. + + Virtually all callers use + XkbGetRulesDefault(&rmlvo); + InitKeyboardDeviceStruct(..., rmlvo); + + Let's save them the trouble and accept NULL as a hint to take the + default RMLVO. + + Signed-off-by: Peter Hutterer + Acked-by: Benjamin Close + Signed-off-by: Daniel Stone + +commit 4e4e263bc073bf452f19c932b937c4881ae71f64 +Author: Peter Hutterer +Date: Wed Apr 15 22:16:49 2009 +1000 + + dix: remove un-used parameter "core" from AllowSome + + Signed-off-by: Peter Hutterer + +commit dd6e8a14ec1c8f4ed9c51ca2764261e6e48d13b3 +Author: Peter Hutterer +Date: Sat Apr 11 11:19:29 2009 +1000 + + Xi: fix a typo in a #ifdef + + Signed-off-by: Peter Hutterer + +commit de1e43181bd670877b994db221ad8a04b5d63324 +Author: Ian Romanick +Date: Wed Apr 15 11:13:48 2009 -0700 + + DRI2: Don't leave empty entries in private->buffers + + This should fix bug #21130. + + Signed-off-by: Ian Romanick + +commit b3e3154cce47add97f5561088036ce3b9e7dc937 +Author: Robert Noland +Date: Wed Apr 15 12:06:19 2009 -0500 + + One = is more than adequate here. Make is sh safe. + +commit 74d27c8b5bac7c8d2ed02ba86e09bf09924ce05c +Author: Samuel Thibault +Date: Wed Apr 15 15:44:17 2009 +0200 + + Fix build on hurd-i386 + + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523970 + +commit faf7dfa099f5b42a703313fbd1bf8afdad07a179 +Author: Dave Airlie +Date: Wed Apr 15 18:26:06 2009 +1000 + + randr12: looking up these bits if randr isn't initialised is bad. + + When xinerama is enabled we don't get randr protocol, but the + driver might still want randr internals + +commit efa31092d6703397121a0ada4f7205a8ecad3d3d +Author: Ander Conselvan de Oliveira +Date: Mon Apr 6 16:01:20 2009 -0300 + + xfree86: Remove device from inputInfo.devices if ActivateDevice failed. + + After the call to xf86ActivateDevice, the new device will be added to + inputInfo.devices. However, if the subsequent call to ActivateDevice + fails, the correponding InputInfoRec for the device is deleted but an + entry still remains in inputInfo.devices. This might lead to a server + crash later on (on InitAndStartDevices for instance) when the device + control proc would be called for an invalid device. + + Signed-off-by: Peter Hutterer + +commit d79bad0aa70403ead8ec87bac8463a6e2005802c +Author: Peter Hutterer +Date: Mon Apr 13 17:49:00 2009 +1000 + + xfree86: don't synthesise a mouse section if synaptics devices are found. + + Signed-off-by: Peter Hutterer + +commit 4a27618565f3151ab17f0ca9ecbde12fa7ba13c0 +Author: Kristian Høgsberg +Date: Tue Apr 14 16:21:04 2009 -0400 + + composite: Fix resource lookups + +commit e7785e8af3e34f9d1089d8499d16802984ab9823 +Author: Kristian Høgsberg +Date: Tue Apr 14 14:24:31 2009 -0400 + + xfixes: Fix a couple of resource lookups + +commit 0eb19f9437b7d8c19592e49eedb028771d300d80 +Author: Adam Jackson +Date: Tue Apr 14 10:54:25 2009 -0400 + + xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675) + + You could be more clever than this, but the wire protocol says this + really is an array of not more than 255 ARRAY8, so it's not just a + matter of changing the types. + +commit f0543ae4ec0fcb5d696e7b2983653bd779f1eddc +Author: Eric Anholt +Date: Wed Apr 8 14:17:41 2009 -0700 + + Fix unused var warning from pci cleanups. + +commit 181cc08c8908a119fc403f970dea8cc98d3e0b9b +Author: Eric Anholt +Date: Wed Apr 8 14:17:40 2009 -0700 + + Add shave so that we can see the steaming piles of warnings generated. + + The old style output can be reenabled for build system debugging using + "make V=1", or --disable-shave at configure time. + +commit 4474c200a102feda72f9572a96cb588009aa0147 +Author: Eric Anholt +Date: Wed Apr 8 14:17:39 2009 -0700 + + Move VENDOR_* defines from AC_SUBST to a header to avoid angering shave. + + This is more sane anyway, as it ensures a rebuild when changing them. + +commit e72c85547b405fbd0117dc1236e5ca5a2126063c +Author: Eric Anholt +Date: Wed Apr 8 14:17:38 2009 -0700 + + Move contributed m4 to a subdir so we can more easily update contributions. + +commit bef1cfb2395df47458159a0b7ae27b9db15025ef +Author: Peter Hutterer +Date: Tue Apr 14 16:54:42 2009 +1000 + + xnest: remove unused variable 'names'. + + Signed-off-by: Peter Hutterer + +commit 7b6400a1b8d2f228fcbedf17c30a7e3924e4dd2a +Author: Kristian Høgsberg +Date: Thu Apr 9 13:16:37 2009 -0400 + + glx: Fix drawable private leak on destroy + + When a drawable goes away, we don't destroy the GLX drawable in full, + since it may be current for a context. This means that when the drawable + is destroyed in full later, the backend doesn't get a chance to + destroy resources associated with the drawable (the DRI2Drawable). + + With this patch, we destroy the GLX drawable in full when it goes away + and then track down all contexts that reference it and NULL their + pointers. + +commit 140463a197fb93d0a4bfad924efc35b860e8cc54 +Author: Jeremy Huddleston +Date: Sat Apr 11 16:53:59 2009 -0700 + + XQuartz: Use correct values for ProximityIn and ProximityOut + + This was the other underlying cause of teh 100% CPU tablet issue. + (cherry picked from commit a9cecf34c23fbcd59b56b380c51d31a9fabc3eb7) + +commit 80a7bb2605f9b439d6221c0495a629a39177a018 +Author: Jeremy Huddleston +Date: Sat Apr 11 17:26:07 2009 -0700 + + XQuartz: Solve the tablet 100% CPU bug + + This happened because we put a byte in the fd to wake up dispatch, but we never actually enqueued anything in mieq because the num_events was 0. + (cherry picked from commit c21ca7558d2faf93c61f5feaafd7c878e9e21942) + +commit 6f8f7c78f1b722bc70a0ea8f6340116a1e09e858 +Author: Jeremy Huddleston +Date: Sat Apr 11 16:13:42 2009 -0700 + + XQuartz: Re-enable background window checking + + since that code was not the culprit for the wacom tablet, background 100% CPU bug + (cherry picked from commit fc1dc5d71b2a488a8a94d953dd8e67353161a590) + +commit 8522a759c9e78478bb399b91d3a0af2d23ea6766 +Author: Jeremy Huddleston +Date: Sat Apr 11 16:12:23 2009 -0700 + + XQuartz: Only set MotionNotify on activation if it is updated. + (cherry picked from commit ae8077a251ef27381a755d57ff974767bda16148) + +commit 5e55becddccc376ab7338789562ad6d6cd750de9 +Author: Jeremy Huddleston +Date: Sat Apr 11 14:23:41 2009 -0700 + + XQuartz: Make sure the Fn doesn't trigger unneccessary calls to DarwinUpdateModKeys() + (cherry picked from commit 70a18558c6b0a02b633fd8974f002cdf3cdc713e) + +commit bd1d9179094657865b0606ed0ac835a8b8df3be1 +Author: Jeremy Huddleston +Date: Sat Apr 11 13:53:38 2009 -0700 + + XQuartz: Re-enable Fn as an option for 3button mouse simulation. + + Patch from Martin Otte + (cherry picked from commit b5ec3be6b5449b5d575bc1472fdd1c9cb15cb8be) + +commit 1b5758bef0840c6614244e321790231b3c9477c9 +Author: Maarten Maathuis +Date: Thu Apr 9 15:45:57 2009 +0200 + + exa: implement UTS based upload through CopyArea + + - Some image viewers (eog, gqview) trigger the CopyArea path of Xext/shm.c + - I'm not aware of any code path that wouldn't like UTS and trigger this code. + - miDoCopy should handle src coordinate clipping. + - Overlapping blits are obviously not an issue (both would have to be offscreen or not). + +commit 567cf67959b30432ae30f4851ec17b3a375ab838 +Author: Ian Romanick +Date: Thu Apr 9 14:38:24 2009 -0700 + + DRI2: Synchronize the contents of the real and fake front-buffers + + Signed-off-by: Ian Romanick + +commit f1a995d1496d73741731e32f475097c44a8da972 +Author: Ian Romanick +Date: Thu Apr 9 14:31:01 2009 -0700 + + DRI2: Do not send the real front buffer of a window to the client + + Signed-off-by: Ian Romanick + +commit aa2928325fe51d94a636dde9c090e8f54a311a12 +Author: Ian Romanick +Date: Wed Apr 8 15:44:34 2009 -0700 + + DRI2: Add fake front-buffer to request list for windows + + If a front-buffer is requested for a window, add the fake front-buffer + to the list of requested buffers. + + Signed-off-by: Ian Romanick + +commit 808fd2c67f303cb721769375b11ce8b90ffc1909 +Author: Jeremy Huddleston +Date: Thu Apr 9 20:00:37 2009 -0700 + + XQuartz: xprSetWindowLevel updated to store the level requested by the WM + (cherry picked from commit c28c2ddc3a8f3c5b9beec396953bb3ac9ee4714b) + +commit dfb0d7aefbbdfc0db966e3a84d52f638135d9138 +Author: Jeremy Huddleston +Date: Thu Apr 9 18:51:22 2009 -0700 + + XQuartz: Update window levels when changing rootless state + (cherry picked from commit 1359ded5bfc14a80fb998b01a54ecacb96c4ff88) + +commit d5ef88d7543ed787093099ab18db766c446b47d1 +Author: Jeremy Huddleston +Date: Thu Apr 9 18:27:22 2009 -0700 + + XQuartz: Fix window levels for rooted mode to allow showing the menu bar. + (cherry picked from commit 80759a4186bf0335edc85aecea2faf11fe09f491) + +commit 15146b863759640e7a73fab2301fb28ef4dead84 +Author: Jeremy Huddleston +Date: Thu Apr 9 17:47:41 2009 -0700 + + XQuartz: Properly set the window level for the root window + (cherry picked from commit bdf9286d1cbfeaaf8eaf03d28091e91ee587ee25) + +commit 8d5dcfe2154f217bd8fde5509d78f3383add8725 +Author: Jeremy Huddleston +Date: Thu Apr 9 04:36:26 2009 -0700 + + XQuartz: Properly set the menu bar and hotkey state when changing rootless mode. + + Currently no code path exhibits the broken behavior since we only toggle into rootless if we don't have the root. + (cherry picked from commit 970f100ca3c5fc0662ae7658d49d118fbd9de943) + +commit 82d7cf5cdcbc5e451a87f8c2f64cd5d2e3627d54 +Author: Jeremy Huddleston +Date: Thu Apr 9 03:55:13 2009 -0700 + + XQuartz: In rooted mode, make sure we start in the hidden state. + (cherry picked from commit 5ecc497f71c2133f773f6c56ad76cb778862ddd6) + +commit e86f4e93020d56385418850a9eebae8076dcb9ac +Author: Jeremy Huddleston +Date: Mon Apr 6 21:34:14 2009 -0700 + + XQuartz: Send MotionNotify before button presses when X11 is in the background + (cherry picked from commit c80d0ec18ef5b842447d31360406d0b5b9424222) + +commit 5ccfad8df099e8ebc4bf2dd53c3db1460903b135 +Author: Jeremy Huddleston +Date: Mon Apr 6 19:21:46 2009 -0700 + + XQuartz: Revert most of the previous override redirect patch + + The changes actually caused all windows to move to the current space. Instead, we're going with a fix entirely within Xplugin that depends on quartz-wm being the window-manager for now. + (cherry picked from commit 997b6f3142c622541bb5bac98652abae75d1101d) + +commit ff7f019bbcbc52618cc478db7baed57aa5b7c3d3 +Author: Simon Thum +Date: Wed Apr 1 10:53:10 2009 +0200 + + dix: correctly utilize tracker buffer and protect from timer overruns + + two small related fixes hard to split up + + Signed-off-by: Peter Hutterer + +commit 06aebecb19dd9d90d73b742a09b6068b862f1d05 +Author: Simon Thum +Date: Wed Apr 8 14:35:01 2009 +0200 + + dix: fix pointer accelerations remainder handling + + This didn't really work as intended, but did amazingly well thanks + to roundf() hiding the defect. Cheers! + + Signed-off-by: Peter Hutterer + +commit 98f4179156391752e6688339487458ad7828abf4 +Author: Alan Coopersmith +Date: Thu Mar 26 23:04:24 2009 -0700 + + Use RTLD_DI_SETSIGNAL to catch runtime dynamic loader errors and clean up + + Based on fix for Sun bug 6813925: Xorg needs to catch ld.so.1 failure + so it can close down devices cleanly + + + Signed-off-by: Alan Coopersmith + +commit a0b6a363dca8ce0dc6f4eb79333e48496153cd67 +Author: Alan Coopersmith +Date: Mon Mar 9 13:22:57 2009 -0700 + + Lift fatal signal handlers from DDX'es up to a common DIX implementation + + Signed-off-by: Alan Coopersmith + +commit fcc19e673e3ef33d64916dd933853f8aa667c4d7 +Author: Peter Hutterer +Date: Thu Apr 9 20:27:00 2009 +1000 + + mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec. + + Signed-off-by: Peter Hutterer + +commit 4fee979d0632751d3d54d2115e84e9654edf0622 +Author: Peter Hutterer +Date: Thu Apr 9 19:11:27 2009 +1000 + + Xi: silence compiler warnings about "wrong" event types. + + Signed-off-by: Peter Hutterer + +commit 6b467bf879eeb77d167ef321e6dda97ca9d7010a +Author: Peter Hutterer +Date: Thu Apr 9 08:42:06 2009 +1000 + + xfree86: shut up compiler warnings - typecast to InternalEvent + + Reported-by: Eric Anholt + Signed-off-by: Peter Hutterer + +commit 8a2a184da78a3e9cbeae8290431f40d5ec7f3636 +Author: Peter Hutterer +Date: Thu Apr 9 08:06:32 2009 +1000 + + xfree86: fix use of uninitialized variable in DGAProcessPointerEvent. + + Reported-by: Eric Anholt + Signed-off-by: Peter Hutterer + +commit 011cee3103c146c8096b7098a27993f99e07a824 +Author: Peter Hutterer +Date: Thu Apr 9 08:14:39 2009 +1000 + + dix: fix dev/keybd variable mixup. + + Reported-by: Eric Anhold + Signed-off-by: Peter Hutterer + +commit 630a6e9d14ffbf036fa72f580c72c0172d7c20bd +Author: Peter Hutterer +Date: Thu Apr 9 08:40:20 2009 +1000 + + mi: fix compiler warning - explicitly typecast to InternalEvent. + + Signed-off-by: Peter Hutterer + +commit e3bb7dea06b9ab0e30d801bf6c3a59f94290aaed +Author: Peter Hutterer +Date: Thu Apr 9 19:07:36 2009 +1000 + + mi: add prototype for CopyGetMasterEvent. + + Signed-off-by: Peter Hutterer + +commit 346e71525fc545c6ca4ad79425722282d1544459 +Author: Michel Dänzer +Date: Thu Apr 9 09:36:41 2009 +0200 + + EXA: If the driver can't composite to an a8 mask, try an argb mask for glyphs. + + Signed-off-by: Michel Dänzer + +commit 682d7b55699cacbb2dbcd84a5e816bf6e2d2f02a +Author: Eamon Walsh +Date: Thu Apr 9 02:48:04 2009 -0400 + + xselinux: Don't BadAlloc in List* requests if there are no items to list. + +commit 3a0ee199dcec39596756a995996eac388acf6315 +Author: Eamon Walsh +Date: Thu Apr 9 02:26:24 2009 -0400 + + config: fix crash caused by strdup(NULL) + +commit 7b3982eb6518da33ab01c2fbf7ceb45b89f841df +Author: Michel Dänzer +Date: Thu Apr 9 08:21:09 2009 +0200 + + glx: Test the error value, not its address... + +commit 03aebed519986c4dd03e02b3b3d4af1f64595ca7 +Author: Ian Romanick +Date: Wed Apr 8 14:54:30 2009 -0700 + + Use a #define instead of a magic number + + The number of buffers is likely to change in the future, so having + this as a define is the right way to go. + + Signed-off-by: Ian Romanick + +commit 0d9f3ca7eabd4c514808114d30627f682c8bd030 +Author: Ian Romanick +Date: Wed Apr 8 14:53:46 2009 -0700 + + Allow GLX sources to build against Mesa 7.4 sources + + Signed-off-by: Ian Romanick + +commit e8b324102f6e21ae2b8292a6f50d016dd6254dd6 +Author: Eamon Walsh +Date: Wed Apr 8 15:10:16 2009 -0400 + + xselinux: Don't require incoming context strings to be null-terminated. + +commit df27b870a8db7a5153b18a556fe77efa590f9eee +Author: Kristian Høgsberg +Date: Tue Apr 7 16:28:08 2009 -0400 + + Convert remaining GLX LookupIDByType() calls + +commit 92562747a0fdbef1dbedf734cb55dd6a9e1d2994 +Author: Kristian Høgsberg +Date: Tue Apr 7 13:58:53 2009 -0400 + + Add validGlxDrawable() and use dixLookupResourceByType(). + + Fixes deprecation warnings, and fixes a couple of GLX error codes + for failing drawable lookups. + +commit f70cfc8f90091ef0f5ed0a5b2e023e7fd6369b36 +Author: Kristian Høgsberg +Date: Thu Apr 2 17:30:19 2009 -0400 + + Don't stomp on dixLookupDrawable() return value in DoCreateGLXPixmap(). + +commit 30d81ad72e870cc37754bd8c8aadf605450ec16e +Author: Kristian Høgsberg +Date: Thu Apr 2 17:24:12 2009 -0400 + + Make GLX context lookup use dixLookupResourceByType() + +commit 66539cc05d0b017b9feb4a038499907810140623 +Author: Alan Coopersmith +Date: Thu Mar 26 22:22:32 2009 -0700 + + Don't leak default font path when appending built-ins + + Signed-off-by: Alan Coopersmith + +commit 6c3b633299f12051fcf37fb8439f358de876cf03 +Merge: adf21db 0cfd481 +Author: Peter Hutterer +Date: Tue Apr 7 19:36:27 2009 +1000 + + Merge branch 'master' into xi2 + +commit 0cfd48130842685828e0662a27272a3a65facd23 +Author: Peter Hutterer +Date: Mon Mar 23 11:41:16 2009 +1000 + + dix: Dont change the keyboard mapping on non-keyboard devices. + + Signed-off-by: Peter Hutterer + +commit 69e73e5ce0e3971eceed71216d2d7e7d9cd57cc2 +Author: Adam Jackson +Date: Mon Apr 6 17:56:49 2009 -0400 + + config: Remove useless xf86conf{{m,c,re}alloc},free} macros + +commit 485946120a6522db9298111752de9be3d675e0b3 +Author: Adam Jackson +Date: Mon Apr 6 17:51:35 2009 -0400 + + config: s/xf86configStrdup/strdup/ + +commit 5f769b73441cf29c05a05c728ab81bdde1fc00b6 +Author: David Jander +Date: Mon Apr 6 13:01:08 2009 -0400 + + kdrive: Fix segfault in tslib support + +commit 843166b033dc0544b9f3cf3c91fc3ae3650bda14 +Author: Adam Jackson +Date: Mon Apr 6 11:05:17 2009 -0400 + + os: signal handlers return void. + +commit aa6fbc2a3679896181610aee7ce2844d4322a5ce +Author: Adam Jackson +Date: Mon Apr 6 10:58:47 2009 -0400 + + Remove some OS/2 leftovers. + +commit 2c03a63ff6855272d587b4972a67f64115a1ce4c +Author: Jeremy Huddleston +Date: Sun Apr 5 03:20:40 2009 -0700 + + XQuartz: Use updated Xplugin API to send overide-redirect windows to the current space when they're ordered in + + This fixes the annoying "using a menu moves me to another space" bug + (cherry picked from commit 9e6dab89e08a26d764ba1aeaeb804c3d25c667da) + +commit 67621f3b39c387b3f7bfc65781051aea51c0b83f +Author: Jeremy Huddleston +Date: Sun Apr 5 00:06:57 2009 -0700 + + XQuartz: Send a MotionNotify event for the mouse cursor when activating X11.app + + Otherwise if X11.app was activated with a mouse click, the location of the even is the last location of the cursor before X11 was deactivated + (cherry picked from commit c7457d7b31ddd2ddfd04dd6294bed4532664e1ab) + +commit e1338d27141125af61634597c5dea880692c4017 +Author: Julien Cristau +Date: Sat Apr 4 23:43:28 2009 +0200 + + xfree86: Remove unused DEFAULT_UNRESOLVED and DEFAULT_BEST_REFRESH macros + +commit e25d55ad546905c4921f0a26385bdb9f22038429 +Author: Adam Jackson +Date: Fri Apr 3 22:38:00 2009 -0400 + + Revert accidental Makefile change from previous commit + +commit 472811dc4ba741ab09db184216878700f4adf745 +Author: Adam Jackson +Date: Fri Apr 3 22:27:51 2009 -0400 + + DPMS: Re-export the various DPMS variables. + + The drivers might not need them but extmod does. Should move it to + builtin though. + +commit cbb165ab88cb0810268001e84d87671440baf837 +Author: Adam Jackson +Date: Fri Apr 3 18:34:45 2009 -0400 + + os: Remove the useless -x option + +commit 6574ab092fb80b7731e06ede653b6af92fa7684e +Author: Adam Jackson +Date: Fri Apr 3 18:03:43 2009 -0400 + + DPMS: Remove the defaultDPMS* variables + +commit c1cf36ee29e41901ecd382f0258110ebb4a0124e +Author: Adam Jackson +Date: Fri Apr 3 17:51:55 2009 -0400 + + DPMS: Simplify command line parsing + +commit 2d0a4fff7985f58c21023cc4757090ee67067593 +Author: Adam Jackson +Date: Fri Apr 3 13:44:37 2009 -0400 + + DPMS: Remove unused DPMSGet() + +commit d52fddefaeb43f15b677eefbea4a288a9948373b +Author: Adam Jackson +Date: Fri Apr 3 13:33:03 2009 -0400 + + DPMS: Align the default timeouts with the default screensaver timeout. + + On a typical LCD, a black screensaver is actually worse for power + consumption than a normal screen, because it takes more energy to turn + the crystals opaque. Also, the intermediate DPMS states are essentially + useless and most monitors alias them to the 'off' state, so we may as + well do the same. + + As a pleasant side effect, this brings the default DPMS timeouts in line + with the EnergyStar Program Requirements for Computers: + + http://www.energystar.gov/index.cfm?c=revisions.computer_spec + + which state that products must be "shipped with the display's Sleep mode + set to activate within 15 minutes of user inactivity". + +commit 38576dc3ae8ddec2baedd2f7e64abdfc56bedf93 +Author: Adam Jackson +Date: Fri Apr 3 11:55:41 2009 -0400 + + DPMS: Simplify some macro silliness. + +commit 1c01127a214731a21c4784249a429c74f17bd424 +Author: Adam Jackson +Date: Fri Apr 3 11:39:18 2009 -0400 + + DPMS: Unexport all the various setup variables. + + The drivers don't need to know any of this. + +commit a99b0ab918998c9a1b9f8692591b8cb59a12eb9e +Author: Adam Jackson +Date: Fri Apr 3 11:32:00 2009 -0400 + + DPMS: Fix cast abuse + +commit 4da347adb1fcc39e8f4fb2cadd98e887d7ac877a +Author: Adam Jackson +Date: Fri Apr 3 11:18:21 2009 -0400 + + DPMS: Code motion. + +commit 1731882341c191b4ffd78e0c1fd9297c636e0401 +Author: Havoc Pennington +Date: Fri Mar 27 12:30:37 2009 -0400 + + Set bg pixmap of composite overlay window to None (#20912) + + Otherwise it's impossible to get the COW without a white + flash on the screen, because it's on top, mapped immediately, + and unaffected by composite redirection. This makes + initial login ugly when it doesn't need to be. + +commit d2690375dfd994817f004cda133ca2a492c0b956 +Author: Adam Jackson +Date: Fri Apr 3 11:06:50 2009 -0400 + + kdrive: s/KdSaveString/strdup/g + + This isn't even funny anymore. + +commit 91b697efdefba125348dbcaf584ee51a7f8c9bf6 +Author: Kristian Høgsberg +Date: Wed Apr 1 17:42:33 2009 -0400 + + Support setTexBuffer2 in AIGLX. + + Fixes broken GLX_tfp, specifically, lets compositors ignore un-defined + alpha channel for pixmaps. + +commit 1c101d75d4855b2698e3fc8d2dd662f20585812f +Author: Alan Coopersmith +Date: Thu Mar 26 22:25:08 2009 -0700 + + Don't leak canonical module name and patterns if module is built-in + + Signed-off-by: Alan Coopersmith + Acked-by: Peter Hutterer + +commit 9180081ec32b6c655d193de4c89b59d222a72579 +Author: Jeremy Huddleston +Date: Wed Apr 1 13:45:02 2009 -0700 + + XQuartz: Still send mouse events while X11 is in the background if we have test extensions enabled + (cherry picked from commit f393fb686cfbedb11a1539d4eaf5c491af8b3a64) + +commit 029307e79a14cad5bde8f1f4a5d0a2f740271f06 +Author: Jeremy Huddleston +Date: Wed Apr 1 13:07:15 2009 -0700 + + XQuartz: Return BadRequest when SendPSN isn't implemented rather than success + (cherry picked from commit 49871e99179d5176a1ec516c8f449e2dc219faea) + +commit 0603fbc1d3b2db5c25faabbfb5e04914110b4d0e +Author: Jeremy Huddleston +Date: Wed Apr 1 12:46:51 2009 -0700 + + XQuartz: Pad xAppleDRINotifyEvent to 32bytes to match sizeof(xEvent) + (cherry picked from commit 276ee3bb087c772f57a987519aa4d94afeceadaa) + +commit b1dab580bdfb4acfe3feddeda6e760098ec4922a +Author: Tormod Volden +Date: Wed Apr 1 19:32:21 2009 +0200 + + xfree86: edid quirk for Philips LCD LP154W01-TLAJ + + This panel reports its vertical size in cm. + + X.Org bug#21000 + + Signed-off-by: Tormod Volden + Signed-off-by: Julien Cristau + +commit 7d94414cf4b16501ce4c4291846498f393f150a4 +Author: Adam Jackson +Date: Wed Apr 1 09:42:06 2009 -0400 + + input: Remove xf86ReloadInputDevs hack + + We have input hotplug now, no need to fake it. + +commit 3311ef6ec93df4325d198715e0fce73af19f0781 +Author: Jeremy Huddleston +Date: Tue Mar 31 18:11:19 2009 -0700 + + XQuartz: Don't report mouse events while X11 is not the foreground application + (cherry picked from commit 5d1dd35096334b59564d77caef7a97bd58845c5d) + +commit 89887fadc97f6fd5059886396a6d7cf61de1982f +Author: Adam Jackson +Date: Tue Mar 31 15:09:57 2009 -0400 + + APM: Don't carp if not available. + +commit 2e145989d10ef454581f8aa60358ed3782fd6442 +Author: Adam Jackson +Date: Mon Mar 30 17:22:28 2009 -0400 + + dix: Simplify InitClient() + +commit 252ec504817e05b185e4896a2d899e9c00b8aeef +Author: Adam Jackson +Date: Mon Mar 30 15:18:30 2009 -0400 + + Document which bits of ClientRec are currently unused + +commit 0b6e14d46feaf8c46fd3768ee5353b844391b79b +Author: Jeremy Huddleston +Date: Mon Mar 30 20:37:25 2009 -0700 + + XQuartz: Fix mouse tracking for quake, et. al. in wine + + Patch courtesy of Codeweavers + + Fix mouse movement tracking. For a non-window-related mouse-move event, + calculate the new position by adding the event's delta-x and delta-y values + to the previous mouse position. Do not rely on the current mouse position + because it may have been changed by a XWarpPointer call. + (cherry picked from commit 7a67935b05a475215b9bdbb959e4f7e15f32416f) + +commit c74220b853cd99d03e33cc62d32431ca3a879483 +Author: Adam Jackson +Date: Mon Mar 30 14:56:15 2009 -0400 + + APM: Use general handlers, not input handlers. + + Otherwise APM events get treated as input events, which messes up idle + time accounting and screensavers and such. Not, we hope, that anyone + is using APM anymore. + +commit 283a081572d8db787c77d09e5ba6bcadebf4f7fe +Author: Adam Jackson +Date: Fri Mar 27 15:56:15 2009 -0400 + + selinux: Only activate if policy says to be an object manager + +commit 8e7facfe3013abda12a0c39ad8b4d025618077a7 +Author: Adam Jackson +Date: Fri Mar 27 15:48:17 2009 -0400 + + config: Fall back to vesa for Intel Poulsbo. + +commit 17239c8e3163fef0159835d43c0dde20e78192a1 +Author: Adam Jackson +Date: Fri Mar 27 12:44:20 2009 -0400 + + misprite: Remove private header, fold into misprite.c + +commit bb89fc2771d2e54d7e0cd0371db68ddb754a64e5 +Author: Adam Jackson +Date: Fri Mar 27 12:36:42 2009 -0400 + + misprite: Fix software cursor on multiple ScreenRecs + +commit 2c000f4980d30015e6da95de3c77c0fdda0090e4 +Author: Adam Jackson +Date: Fri Mar 27 11:54:52 2009 -0400 + + misprite: Do window check first for Get{Image,Spans} too + +commit 8beced6c02610444105f3d0b8ee3a49e1072096d +Author: Adam Jackson +Date: Fri Mar 27 11:43:33 2009 -0400 + + misprite: RECT_IN_REGION -> miRectIn + +commit a232116b9ecd41ce55f8eeee9dfe2b67d76479d6 +Author: Adam Jackson +Date: Fri Mar 27 11:41:40 2009 -0400 + + misprite: Fix a typo + +commit 1f0eaf886d88f3935e43985d2c889b374f412e43 +Author: Adam Jackson +Date: Fri Mar 27 11:29:40 2009 -0400 + + misprite: Fix cast abuse + +commit e3c1096273446bb7eb993b179ceb989617d149cc +Author: Peter Hutterer +Date: Mon Mar 23 13:20:22 2009 +1000 + + dix: build_modmap_from_modkeymap needs to bounds-check its argument. + + Signed-off-by: Peter Hutterer + Signed-off-by: Daniel Stone + +commit 45baef0b77f6f0e5e6230eca045dfcbb1e48c647 +Author: Peter Hutterer +Date: Mon Mar 23 13:32:32 2009 +1000 + + dix: return BadValue as error in SetModifierMapping. + + Signed-off-by: Peter Hutterer + Signed-off-by: Daniel Stone + +commit 603db34337a61754e0c5f71525011d10eab78411 +Author: Peter Hutterer +Date: Wed Mar 25 15:51:43 2009 +1000 + + Xext: set POINTER_SCREEN flag in XTestFakeInput if necessary. (RH #490984) + + The POINTER_SCREEN flag must be set explicitly for XTest core events to avoid + out-of-range events when the lastSlave was an SD with an explicit axis range. + Device events sent through XTest don't need this flag, they are expected to be + in the valuator range of the device anyway. + + Red Hat Bug 490984 + + Signed-off-by: Peter Hutterer + +commit 4ab93f05664890ff6738ef1089bcd956ce3f06e9 +Author: Adam Jackson +Date: Mon Mar 23 15:19:47 2009 -0400 + + misprite: In SourceValidate, check that it's a Window first + + It almost never is. However, you have _lots_ of input devices now, and + walking them all on every Composite operation is not the cheapest thing + in the world. + +commit d698e62690e0a52fa537f1cd792cab7a5b1bafdf +Author: Maarten Maathuis +Date: Thu Mar 19 21:35:25 2009 +0100 + + xkb: plug a memory leak in XkbCopySrvLedInfo (#20756) + + X.Org Bug 20756 + + Signed-off-by: Peter Hutterer + +commit e26f79335bb7a9ad34fe9b23c283a214202f89ed +Author: Peter Hutterer +Date: Tue Mar 17 16:22:00 2009 +1000 + + xkb: put a few extra checks in against non-keyboards + +commit 844bb629fe786ecf536039df3f5f4b3b214c9d40 +Author: Peter Hutterer +Date: Thu Mar 19 15:44:34 2009 +1000 + + dix: remove a truly useless a = (foo) ? bar : bar; statement. + + Signed-off-by: Peter Hutterer + +commit 62183a06e5f72a18abc3d58c4bf5658a20ece217 +Author: Tomas Carnecky +Date: Fri Mar 20 16:19:33 2009 +0100 + + Remove two unused defines in C files + + These two defines were defined in C files but not used anywhere: + + dix/window.c #define DeviceEventMasks (KeyPressMask | [...] + os/connection.c #define MAXFD 500 + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit 4e0d7cc506b661b5e5cedf8be6e17aa4c8075aa8 +Author: Tomas Carnecky +Date: Fri Mar 20 16:19:34 2009 +0100 + + FID, whatever that was, isn't anymore + + No traces of FID in the xserver nor in the modules listed in + util/modular/xorg.modules + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit adf21dba7617542f08309415e315d4b2699c10e0 +Author: Peter Hutterer +Date: Thu Mar 19 20:40:43 2009 +1000 + + include: un-export a bunch of server-only functions. + + Signed-off-by: Peter Hutterer + +commit 111ef10375204a6981a5be5c045860854c4da4e6 +Author: Peter Hutterer +Date: Thu Mar 19 09:33:02 2009 +1000 + + dix: move ProcGrabPointer guts into GrabDevice. + + Yes, this means we have even more arguments to GrabDevice. But it beats having + a copy of most but not all of GrabDevice in ProcGrabPointer. + Also, reshuffle the order of parameters, the CARD* status is a return value + and should be last. + + Signed-off-by: Peter Hutterer + +commit dc153271b6458cacd63a4bc0208594011c6460b0 +Author: Peter Hutterer +Date: Wed Mar 18 15:13:00 2009 +1000 + + Xi: purge old device enter/leave masks. + +commit 15a969c0fcd4f19f3c560a7037c1a6a58bce51f0 +Author: Peter Hutterer +Date: Wed Mar 18 10:21:59 2009 +1000 + + dix: remove now obsolete mskidx parameter from DeliverEventsToWindow. + + mskidx would always be dev->id anyway, so if we're already passing in the + device, mskidx is superfluous. + +commit f5409aa026b2cb501170867d04c6e220f3fe0a44 +Author: Peter Hutterer +Date: Fri Mar 13 15:51:50 2009 +1000 + + mi: remove deprecated miPointerAbsoluteCursor + + Functions that don't specify the device are so last year. + +commit 46145a9312eaf5dcd0e8b6788ed8219e086f790e +Author: Peter Hutterer +Date: Fri Mar 13 15:12:55 2009 +1000 + + dix: remove coreMods field from GrabRec. + + Nobody uses it anyway, and it's taking up a whole bit! + +commit 40e2a61e37109cd9c2ab57954ee40dcf4a062e31 +Author: Peter Hutterer +Date: Thu Mar 12 16:53:56 2009 +1000 + + Add Get/SetDeviceFocus handling. + +commit d9b7343eac1157490442cc0fb3b5b6d7d6e9a705 +Author: Peter Hutterer +Date: Thu Mar 12 12:56:18 2009 +1000 + + dix: even if we don't get a XI1 event, continue processing. + +commit e11dc10f01603b181e224c90d1dd4abe940f2ce7 +Author: Peter Hutterer +Date: Thu Mar 12 10:21:00 2009 +1000 + + dix: Send HierarchyEvents when devices are added/removed/enabled/disabled. + +commit 8634e1bcbae9317fc22132f7c9bde1a4a881b9a7 +Author: Peter Hutterer +Date: Thu Mar 12 10:42:05 2009 +1000 + + dix: send presence events when floating and unfloating SDs + +commit c9483a53bea1f721d2902ac11467f67317e7de14 +Author: Peter Hutterer +Date: Wed Mar 11 16:20:22 2009 +1000 + + include: add a few prototypes to silence compiler warnings. + +commit a4b61cfc78d81de02a71fa6ad8a44a06616f6794 +Author: Peter Hutterer +Date: Wed Mar 11 16:08:24 2009 +1000 + + dix: un-static FixUpEventFromWindow and deal with focus events too. + +commit 4cc6a96d7171e567a9bd5a10f552bb953077aafb +Author: Peter Hutterer +Date: Tue Mar 10 16:08:14 2009 +1000 + + input: add support for RawDeviceEvents. + +commit a668d91e28d5a3042a8ce0d087474883b046869a +Author: Peter Hutterer +Date: Mon Mar 9 16:36:07 2009 +1000 + + dix: store the xi2mask on grabs and pass it around as needed. + + This enables passive and implicit passive grabs for XI2 events, except that we + don't have the protocol spec yet to request them. + +commit 32f338263ff7de1a2e76d570c98f5be979c18d4e +Author: Peter Hutterer +Date: Sun Mar 8 21:32:31 2009 +1000 + + Xi: Deliver XI2 HierarchyEvents when the hierarchy changes. + + Signed-off-by: Peter Hutterer + +commit 97e89a59572a4be6757510a317c142ec1d82e8f8 +Author: Peter Hutterer +Date: Fri Mar 6 23:22:00 2009 +1000 + + Allow XI2 event selection for AllDevices and AllMasterDevices. + +commit 808a158182b0a3b985385899252c190947b4dbbd +Author: Peter Hutterer +Date: Fri Mar 6 14:45:26 2009 +1000 + + dix: Enable XI2 delivery for events and focused events. + + No support for grabbed events yet. + +commit 87ff1159b497c66554a4036ae619f92d5631f00f +Author: Peter Hutterer +Date: Wed Mar 11 09:01:23 2009 +1000 + + dix: deliver device enter/leave events. + +commit 04ed0bcb2530866f7248b412974ecd15f0fbf6ac +Author: Peter Hutterer +Date: Mon Feb 23 17:07:55 2009 +1000 + + xkb: remove Device/Enter leave handling - XI2 enter/leave don't have compat state. + +commit 3f37923a727d5fc4b1880a53dac1145884ba7140 +Author: Peter Hutterer +Date: Mon Feb 23 16:12:25 2009 +1000 + + Xi: send XI2 focus events. + +commit daf7dd3bfecc9029bdd10c7a4ea5d2c875a89c41 +Author: Peter Hutterer +Date: Wed Mar 11 09:01:12 2009 +1000 + + dix: Add GetWindowXI2Mask helper + +commit 8b6a370058ad5a20e0a0e49ec9443daf03775de8 +Author: Peter Hutterer +Date: Mon Feb 23 15:58:07 2009 +1000 + + Add XI2 masks and XISelectEvent() request handling. + + XI2 event masks are simply stored in the OtherEventMasks as a separate field. + This replaces the XiSelectEvent code. + +commit 38bba0c1b75b84e8bbdfa7975cf701a9414a3afd +Author: Peter Hutterer +Date: Fri Feb 20 16:07:33 2009 +1000 + + Xi: Change ChangeMasterDeviceClasses to new XI2 events. + + Split ChangeMasterDeviceClasses into an extra XISendDeviceChangedEvent that + assembles the XI2 wire event for the DeviceChanged event. Re-use this when + detaching the last SD. + + Not quite perfect yet, we still copy the device classes from the slave now + rather than from the data we had when the event occured. But it's a start. + + (We can now unexport SizeDeviceInfo and CopySwapDevices, not needed anymore) + + Signed-off-by: Peter Hutterer + +commit 181e41511d5772962b8bc998a1940d2a9ba62d5e +Author: Peter Hutterer +Date: Mon Feb 23 16:14:51 2009 +1000 + + dix: fix up device enter/leave for XI_Enter/XI_Leave. + +commit 0befeb36c175b14eac8d5416851f1556af90dd86 +Author: Peter Hutterer +Date: Tue Feb 24 15:27:07 2009 +1000 + + dix: Add device info to DeviceChangedEvent, and fill in CCCE. + + We need to fill the info here, as the device may change until we get a chance + to process it. + + Signed-off-by: Peter Hutterer + +commit b2ba77bac4fc3edab39372dfdc529e745ae74f77 +Author: Peter Hutterer +Date: Thu Mar 5 14:23:47 2009 +1000 + + dix: add EventToXI2 and GetXI2Type. + + Signed-off-by: Peter Hutterer + +commit dfa2e8e966b699f9d292628119d5a9cbd2dbdf5a +Author: Peter Hutterer +Date: Mon Feb 23 15:12:32 2009 +1000 + + Xi: add XIQueryDevice request handling. + +commit 560c58b53e4e60ebd26e0c66dd00399c438bd619 +Author: Peter Hutterer +Date: Fri Feb 20 15:17:52 2009 +1000 + + Xi: name-space and fix XI2 requests + + All XI2 requests have XI prefixes. + Requests affected: + ChangeDeviceCursor + QueryDevicePointer + WarpDevicePointer + SetClientPointer + GetClientPointer + XIChangeDeviceHierarchy. + +commit 903449615b1a1188955c0287a552aec8ac5b3fbb +Author: Peter Hutterer +Date: Fri Feb 20 15:03:35 2009 +1000 + + Xi: add XIQueryVersion request handling. + +commit 77d51b94bd264be5a8625a2bdd98f2bfb2aa33d3 +Author: Peter Hutterer +Date: Sun Mar 8 11:47:26 2009 +1000 + + dix: FixUpEventForWindow needs to handle XI2 events. + +commit 95ed2ab715fa881d36d508adf4ae5dadd92ae7b2 +Author: Peter Hutterer +Date: Thu Mar 12 11:46:07 2009 +1000 + + Add XI2_EVENT check. + +commit 92e0a324b5c738166ed4046cb00fe85ab8aea5a0 +Author: Peter Hutterer +Date: Thu Mar 12 14:15:02 2009 +1000 + + require inputproto 1.9.99.7 + +commit 906fe9547957917ac463d646935473ceca10a72b +Author: Peter Hutterer +Date: Fri Mar 20 09:36:09 2009 +1000 + + Xi: don't allow OpenDevice on any MD. + + This restores the original behaviour of XI 1. Any slave device may be opened, + but none of the MDs. + + Signed-off-by: Peter Hutterer + +commit c7eb27f3927ba9a36f9904938996f346cca33021 +Author: Peter Hutterer +Date: Wed Mar 4 18:45:09 2009 +1000 + + Xi: always only list VCP/VCK and the SD's in XListInputDevices. + + If a client wants other MDs, it should use XI2's XQueryDevice() instead. + + Signed-off-by: Peter Hutterer + +commit 801f14d4b742e506201b619d472087a7e82bd018 +Author: Peter Hutterer +Date: Tue Mar 3 17:04:08 2009 +1000 + + Xi: don't send attachment info down with ListInputDevices. + +commit 66dd8879b3527f30309fb747cad4a161d0709d91 +Author: Peter Hutterer +Date: Fri Feb 20 15:01:05 2009 +1000 + + Xi: purge ExtendedGrabDevice request handling. + +commit 43e48900fccd245e98d6d697e4cdbb6fa866a0dd +Author: Peter Hutterer +Date: Fri Mar 6 22:27:54 2009 +1000 + + dix: Force deviced ids of 2 and higher for actual devices. + + 0 is now reserved for the "AllDevices" virtual device. + 1 is now reserved for the "AllMasterDevices" virtual device. + + This also means that wherever we passed in (mskidx = 0), we now need to pass + in the deviceid. + +commit 70896f6127e2c12c13479a027fdd6e67853d1f8b +Author: Peter Hutterer +Date: Fri Feb 13 16:42:02 2009 +1000 + + dix: abstract event filters through GetEventFilters. + + Don't let everyone acces the filters[] array directly. This is necessary once + we start dealing with GenericEvents, where the filters are a bit more + complicated. + + Signed-off-by: Peter Hutterer + +commit 8a8763f1502c9ddd1961f96f2cc7c73fbc0b49b5 +Author: Peter Hutterer +Date: Thu Feb 12 16:07:15 2009 +1000 + + dix: restructure DeliverEventsToWindow, a little bit anyway. + + Desperate attempt of making the code easy to read and understand. A failed + desparate attempt, possibly. + +commit 891cfc802028c3e008ee6c2d3e2438a31f57f39f +Author: Peter Hutterer +Date: Thu Feb 12 10:12:45 2009 +1000 + + dix: clean up DeliverDeviceEvents. + + Move mask checking into external function and streamline the code. + + Signed-off-by: Peter Hutterer + +commit 6b6b660c3633af75a94302725137549df0dbe446 +Author: Peter Hutterer +Date: Tue Mar 10 10:15:45 2009 +1000 + + Xext: remove ev_fill from GEExtensions. + +commit 445daa62e720fe58fa2d6c3cdc26663671b2bc48 +Author: Peter Hutterer +Date: Thu Jan 15 17:16:22 2009 +1000 + + Xext: purge XGE event masks. + + The masks were originally designed to generically handle event masks for + extensions. Since all that is in-server anyway, it's much better writing + custom event masks for those extensions that need it and not providing a + unified mechanism. + XI2 needs more than the current implementation, which is already too complex + for most other extensions. good riddance. + + Signed-off-by: Peter Hutterer + +commit 6fe4c28bf4f3a9f7c341b9403213470e9ded5cb3 +Author: Peter Hutterer +Date: Mon Feb 16 16:34:05 2009 +1000 + + Add agressive event type checking. + + Best to FatalError if a wrong event comes in. At least that forces me to fix + it really quickly. + + Signed-off-by: Peter Hutterer + +commit 836864b65794dc0954a01245e418e714cead8125 +Author: Peter Hutterer +Date: Fri Mar 13 12:43:17 2009 +1000 + + xkb: don't overrun the map index when accessing symbols. + + Signed-off-by: Peter Hutterer + +commit 497a12533905b98f388775b6ba49adf21017cc75 +Author: Peter Hutterer +Date: Fri Mar 13 11:52:33 2009 +1000 + + dix: remove duplicate PickKeyboard() command. + + Signed-off-by: Peter Hutterer + +commit 7d4df0ee4414779ad5e519e7bd297c5dfec409a3 +Author: Peter Hutterer +Date: Thu Mar 19 20:24:06 2009 +1000 + + dix: fix device sync state when calling SyncBoth during AllowEvents. + + This did access the wrong device's sync state, potentially freezing or not + thawing the actual device that was supposed to be thawed. + + Signed-off-by: Peter Hutterer + +commit f1c7b95d83948160a0d5796ef6c16fc0d1bf5c5d +Author: Peter Hutterer +Date: Fri Mar 20 13:55:00 2009 +1000 + + dix: do percentage check before device check in ProcBell + + This is just for correctness. The server should return BadValue for anything + not in [-100, 100]. + + Signed-off-by: Peter Hutterer + +commit d60391d8ca9918d2089c23c0baef5c91177325f0 +Author: Peter Hutterer +Date: Fri Mar 20 14:01:30 2009 +1000 + + dix: fix uncredible fail in PostSyntheticMotion. + + Signed-off-by: Peter Hutterer + +commit 1a71862d333282e2d251ff0036866cec22bcce85 +Author: Simon Thum +Date: Sat Feb 28 22:17:47 2009 +0100 + + dix/xfree86: simplified velocity approximation algorithm + + Replace multi-stage filtering with simple linear velocity, + tracked several instances backwards. A heuristic ensures + only approximately linear motion is considered, so velocity + remains valid in any case. Numerical stability is much + better, and nothing changes to people who didn't tune the + advanced features of the previous algorithm. + + Signed-off-by: Peter Hutterer + +commit 5ae129baef85b47590c02e4cf61b23904d8f7aa9 +Author: Peter Hutterer +Date: Tue Mar 17 15:47:57 2009 +1000 + + Xi: check for existence of the button class before accessing it + + Signed-off-by: Peter Hutterer + +commit e8094d8f3f69f45850af031efd79a3928e584638 +Author: Peter Hutterer +Date: Thu Mar 19 10:09:04 2009 +1000 + + dix: ProcSendEvent shouldn't use inputInfo.keyboard directly. + + Signed-off-by: Peter Hutterer + +commit 12aeddf5ad41902a180f8108623f356642b3e911 +Author: Maarten Maathuis +Date: Thu Mar 19 19:07:59 2009 +0100 + + exa: Accept scratch pixmaps with offscreen memory as such. + +commit a635bb5357648779815ec6729d55f6b478493213 +Author: Maarten Maathuis +Date: Tue Mar 17 19:34:45 2009 +0100 + + exa: round of fb_pitch to the next byte + +commit ec328783593339e33772301a8c5fea35fd63c0a2 +Author: Maarten Maathuis +Date: Tue Mar 17 10:45:21 2009 +0100 + + exa: check if the pixmap is pinned for unsupported AUX indices. + +commit 3992dd38caf33b343affd8d732c94880d1099dcf +Author: Adam Jackson +Date: Mon Mar 16 13:24:48 2009 -0400 + + selinux: Add support for avc_acquire_netlink_fd() + + Requires libselinux 2.0.79 or newer. Without this, libselinux will + check for policy updates on the netlink socket on basically every policy + lookup. Statistically speaking, they never happen, and the check + translates to at least one more syscall on basically every operation. + + Instead, take control of the fd from the library, and check it in + WakeupHandler if it polls readable. + +commit be6dc9023b5fb3995a9ce56d607627e247918aef +Author: Peter Hutterer +Date: Fri Mar 13 16:29:36 2009 +1000 + + xfree86: remove a superfluous assignment. + + If dev is NULL, we don't have a VCP and that means we have other issues + anyway. + +commit bfab422dcdbb9c009b2a91fe0dba288fac9bc859 +Author: Peter Hutterer +Date: Fri Mar 13 16:27:49 2009 +1000 + + xfixes: useless (void) typecast removal + + Signed-off-by: Peter Hutterer + +commit 4eeaee1e5a05ea973cbeb653abf99f2a352edc70 +Author: Peter Hutterer +Date: Fri Mar 13 16:25:12 2009 +1000 + + xkb: xkbi has a pointer to the device - use this instead of inputInfo.pointer. + +commit 3f801ba62ac493d4aeb664a5ae638e3fb0c9a262 +Author: Peter Hutterer +Date: Fri Mar 13 16:23:50 2009 +1000 + + xkb: the VCP can post device events, don't stop xkb filtering on it. + +commit 23686e5680d565c36e0b6320ce62c38c7830d06b +Author: Peter Hutterer +Date: Fri Mar 13 16:20:56 2009 +1000 + + xkb: Fix a mis-use of inputInfo.keyboard. + +commit c97c6c3de337f247406eaffd5845a847630ee6c1 +Author: Peter Hutterer +Date: Fri Mar 13 16:17:20 2009 +1000 + + xkb: fix a couple of device checks when looping through all devices. + + Generally, we want to apply stuff to the device and to all attached slave + devices. + +commit d21a546e9604ce2d3c914900f6e6ff2df9f5ca8b +Author: Peter Hutterer +Date: Fri Mar 13 16:02:22 2009 +1000 + + Xi: VCP and VCK may register for ext. events, so delete them if necessary. + +commit 6ec49098f7ef259b43870139511006627b308bb6 +Author: Peter Hutterer +Date: Fri Mar 13 15:57:27 2009 +1000 + + render: replace a wrong inputInfo.pointer with pDev + + Signed-off-by: Peter Hutterer + +commit 0b2b330f6fbf8633ae682a17fbd95f6b5db2c112 +Author: Peter Hutterer +Date: Fri Mar 13 15:54:27 2009 +1000 + + mi: remove a bunch of useless inputInfo.pointer assignments. + + Signed-off-by: Peter Hutterer + +commit 31301861c1dd87a2f55c5c4300ac7c8f54154bf8 +Author: Peter Hutterer +Date: Fri Mar 13 15:49:22 2009 +1000 + + dix: remove wrong InputInfo.pointer usage - should be pDev instead. + +commit 639658b2eab480a5bfb943dff51e4bdfc1e16e3b +Author: Peter Hutterer +Date: Fri Mar 13 15:34:29 2009 +1000 + + dix: use GetPairedDevice in ProcQueryPointer rather than inputInfo.keyboard. + +commit f01ee198ff0cbd7ca418217a84248d1c6131a0c6 +Author: Peter Hutterer +Date: Fri Mar 13 15:22:23 2009 +1000 + + dix: don't use inputInfo.keyboard to get the focus window in ActivateKbdGrab + + I'm not sure if that's the right solution, but the other one is wronger. + +commit de415743f4c1878df2de79f84f5fe087a88d5241 +Author: Peter Hutterer +Date: Fri Mar 13 15:19:23 2009 +1000 + + dix: fix XACE checks in ProcWarpPointer + +commit 18430616cfd5d0bc5a3efe61fcc2982b1726b0de +Author: Peter Hutterer +Date: Fri Mar 13 14:59:18 2009 +1000 + + dix: use PickPointer() and PickKeyboard instead of inputInfo.pointer/keyboard. + + Affected calls: + ProcChangeKeyboardControl + ProcBell + ProcUngrabKey + ProcUngrabButton + +commit e31727158cda7729283233cfdc9bc5bcb59a52c1 +Author: Peter Hutterer +Date: Fri Mar 13 14:51:55 2009 +1000 + + dix: fix ProcChangePointerControl's wrong inputInfo.pointer usage. + + Signed-off-by: Peter Hutterer + +commit fc5e8dc4a24c2b5bed4e6b5d00670c4401ec92d9 +Author: Adam Jackson +Date: Fri Mar 13 14:00:37 2009 -0400 + + Unexport xf86SetPriority + +commit 89d7b88f32f9227fa72a043675367b94c4c9283c +Author: Maarten Maathuis +Date: Fri Mar 13 00:40:43 2009 +0100 + + exa: allow exaModifyPixmapHeader to set sys_ptr for EXA_HANDLES_PIXMAPS + + - exaModifyPixmapHeader would save sys_ptr if needed, but it would be NULL'ed afterwards. + - This is needed to support pixmaps that are not offscreen. + +commit 544cd9e7b50cd9905afc52404de1a5a2bcff91b5 +Author: Ander Conselvan de Oliveira +Date: Thu Mar 5 12:57:28 2009 -0500 + + Honour Option "DPMS" "off" on xorg.conf + + Signed-off-by: James Cloos + +commit 7abb72c5c711a26a27a82604bd2398bcb6df0a99 +Author: Simon Thum +Date: Wed Feb 25 10:55:36 2009 +0100 + + xfree86: remove obsolete code + + remove a few lines which redo part of the pointer acceleration + init. Properties is the way to go for them. + + Signed-off-by: Peter Hutterer + +commit 97cb3cc28e4a5694d17f156276efd84555a96d18 +Author: Peter Hutterer +Date: Thu Mar 12 10:17:16 2009 +1000 + + dix: Merge DevicePresence notify events generation into a single function. + + Signed-off-by: Peter Hutterer + +commit 7f1ba804a1c1aef725e20a04e5f6ef74478ecf44 +Author: Peter Hutterer +Date: Tue Mar 10 11:55:04 2009 +1000 + + dix: s/numEvents/num_events/ in GetKeyboardValuatorEvents + + GPE and GProxE use the same. + + Signed-off-by: Peter Hutterer + +commit 067f26f7ba4c8cf37af7ddf0eb204b7e1d06096d +Author: Peter Hutterer +Date: Fri Mar 6 19:42:27 2009 +1000 + + Xi: set the modifier + group state during POE. + + Signed-off-by: Peter Hutterer + +commit da724e8f1d1867c36c9550a153c58829939800fc +Author: Peter Hutterer +Date: Fri Mar 6 15:50:05 2009 +1000 + + Xi: Set the button state on the event during POE. + + Signed-off-by: Peter Hutterer + +commit b368dd1720c708aaec492b4a67fb7e4f87569c11 +Author: Peter Hutterer +Date: Thu Mar 5 15:22:41 2009 +1000 + + dix: remove a few pointless (void) casts of return values. + + Signed-off-by: Peter Hutterer + +commit cadf65a6e190a8952ad3cc216dc9ea55241de91a +Author: Matthias Hopf +Date: Tue Mar 10 15:49:49 2009 +0100 + + randr: Nuke broken set_origin shortcut + + Shortcut is impossible to implement this way, because we don't know for sure + whether the crtc of an output has changed or not. + +commit 6544490700051b3b5e88ac1890d71b35634c9100 +Author: Eamon Walsh +Date: Mon Mar 9 17:28:40 2009 -0400 + + Correct access mode in call to dixLookupWindow() within RRSelectInput. + + Reported by Alan Coopersmith. + +commit f8dd80d13bb5313a11b38b280f8ad3e22f0a6300 +Author: Keith Packard +Date: Wed Aug 6 15:26:24 2008 -0700 + + Replace dixLookupResource by dixLookupResourceBy{Type,Class} + + dixLookupResource attempted to automatically detect whether the caller + wanted a lookup by-type or by-class, unfortunately, it guessed wrong for + RT_NONE. Instead of trying to make the guess better, this patch just reverts + the unification and creates separate functions for each operation. + +commit 0d9a42dc0380d1583889b6b6521bd5a2451735d4 +Author: Peter Hutterer +Date: Mon Mar 9 08:59:01 2009 +1000 + + Xi: don't crash on a NULL property name, just return None. + + strcmp doesn't like NULL-pointers. + + Signed-off-by: Peter Hutterer + +commit 432a95032eb10f82fb59caa29e52d3f56dfb363c +Author: Peter Hutterer +Date: Sun Mar 8 21:34:02 2009 +1000 + + Remove useless (void) typecasts. + + Signed-off-by: Peter Hutterer + +commit f508446a2bcd887df9cf5db786b15fc3cbc435a0 +Author: Peter Åstrand +Date: Fri Mar 6 19:41:35 2009 -0800 + + Composite: Uninitialized borderClipX/borderClipY + + Valgrind warned me about two other uninitialized variables, which are not + padding. Valgrind output at the end. I'm a bit unsure of what these should + be initialized to, is zero fine? + +commit d1338a94805cc774fe0a5d00c2225a3ee9673a9f +Author: Winfried Grünewald +Date: Fri Mar 6 12:59:35 2009 -0500 + + [hw/xfree86] Fix StaticGray cmap. + + Fix this bug report: + + ,----< from http://bugzilla.freedesktop.org/show_bug.cgi?id=20504 > + | Using the Visual StaticGray (8 bit depth) is missing one gray level. + | The gray level of index zero and index one are the same and all + | other levels are shifted by one. The max level (255) cannot be used. + `---- + + Signed-off-by: James Cloos + +commit eba3bab71ff26d58bb0e49e4a9726fc21ff07258 +Author: Alan Coopersmith +Date: Thu Mar 5 15:09:28 2009 -0800 + + Remove #ifdef macII code left over from ancient A/UX 3.0 support + + Signed-off-by: Alan Coopersmith + +commit daa9727a02701cfac7b92f3e61d752be6fcc005e +Author: Jeremy Huddleston +Date: Wed Mar 4 11:33:00 2009 -0800 + + XQuartz: Implement SendPSN for AppleWM + (cherry picked from commit 779e9fdc2de9bfebc5f0a4c9d5f42e389fdd8593) + +commit ce6e1771be5f2c21af6f72a9705795df26210413 +Author: Maarten Maathuis +Date: Mon Mar 2 17:05:28 2009 +0100 + + exa: fix a serious issue in exaChangeWindowAttributes (and some more related things) + + - fbChangeWindowAttributes can create pixmaps (and access them) without use preparing access. + - Also handle the destroyed pixmaps by finishing them first. + - Switch to DEST indices again in exaCreatePixmapWithPrepare, because they are obviously being rendered to. + - Also avoid calling FinishAccess on pixmaps that are destroyed (and their memory potentially invalid). + +commit 7fb68e8b31d259325ce311ad67befc43a933f009 +Author: Maarten Maathuis +Date: Sat Feb 28 22:29:42 2009 +0100 + + exa: remove a few pExaPixmap checks. + + - And make some fatal for a debug build. + +commit bd2f35ef0d4b8c56eb205b8694b4fe5d2fa2c049 +Author: Maarten Maathuis +Date: Sat Feb 28 22:15:04 2009 +0100 + + exa: fix unwrapping of ModifyPixmapHeader upon CloseScreen. + + - Cleanup wrapping too. + +commit da8ea41a542787691ea1120e5c8c7dc3182cbea5 +Author: Maarten Maathuis +Date: Sat Feb 28 21:59:09 2009 +0100 + + exa: increase/rework safety checks in Prepare/FinishAccess. + +commit 3ea3d505e8128ab3e878edcef697fd5656b0c917 +Author: Maarten Maathuis +Date: Sun Mar 1 01:15:28 2009 +0100 + + exa: avoid a potential Prepare/FinishAccess inbalance. + +commit 10334cf7e64e2e633cd507f2aa216027e840c8e5 +Author: Maarten Maathuis +Date: Sat Feb 28 21:46:00 2009 +0100 + + exa: simplify exaPixmapIsOffscreen + + - This includes properly handling the framebuffer. + +commit 57bed76e218471b60d340b18c346d492f37798c2 +Author: Tomas Carnecky +Date: Wed Mar 4 10:29:34 2009 -0500 + + Remove dead EXTENSION_PROC_ARGS define + + Signed-off-by: Tomas Carnecky + +commit a6fb9f4ccfc69dc090b152e29142e3159f812166 +Author: Tomas Carnecky +Date: Wed Mar 4 10:27:30 2009 -0500 + + Remove dead XTest code from extmod + + Signed-off-by: Tomas Carnecky + +commit c4081fee0995dae691665a00ea9bfdb8b8043b8c +Author: Topi Kanerva +Date: Wed Mar 4 10:23:10 2009 -0500 + + Make DGA optional. + +commit c7ebb4bef152b47880abb6ea4819416e89e6522c +Author: Eamon Walsh +Date: Tue Mar 3 14:02:36 2009 -0500 + + Fix 2 const warnings. + +commit c7cf926d25523d5d0d8e5c83671c901660070d71 +Author: Eric Paris +Date: Tue Mar 3 13:15:39 2009 -0500 + + This patch changes all places in the X code to use _raw functions. The + X server should never see, translate, or deal with a munged context. + Display managers which show contexts to the user should take care of + translating these to human readable form. + +commit d84a2f855da9fd293e984084168c1e27f5a5115c +Author: Peter Hutterer +Date: Sun Mar 1 16:59:14 2009 +1000 + + xfree86: Add linebreak to two debug statements. + + Signed-off-by: Peter Hutterer + +commit e0ed9f16d0ab871f3209837f54055446503c4108 +Author: Jason Vas Dias +Date: Tue Mar 3 13:24:54 2009 +1000 + + Fix build with --enable-debug. + + [amended by Peter Hutterer] + Signed-off-by: Peter Hutterer + +commit 6093d3eb1d7d1e9cbacc2c2f4d376352f787dd53 +Author: Peter Hutterer +Date: Thu Feb 26 15:38:45 2009 +1000 + + dix: fix two compiler warnings (old-style function definition). + + Signed-off-by: Peter Hutterer + +commit b874a5c0aafc766891c9e567af48b891ea14be4f +Author: Peter Hutterer +Date: Thu Feb 26 14:40:22 2009 +1000 + + mi: only print the "EQ overflowing" error once. + + Signed-off-by: Peter Hutterer + +commit a706dd8771f87cf0a73578755552124d162baa5d +Author: Peter Hutterer +Date: Thu Feb 26 10:04:14 2009 +1000 + + include: add a range of button labels. + + Mostly the same buttons as defined by linux/input.h, with five exceptions: + "Button Unknown" for a button that cannot be labelled. + "Button Wheel Up", "Button Wheel Down" for buttons 4/5, traditionally the + wheel buttons. + "Button Horiz Wheel Up", "Button Horiz Wheel Down" for buttons 6/7, + traditionally the horiz. wheel buttons. + + Signed-off-by: Peter Hutterer + Acked-by: Daniel Stone + +commit 8a6ed44a8b2fc5f14729dc54fec17607ced03859 +Author: Adam Jackson +Date: Mon Mar 2 14:26:23 2009 -0500 + + randr: Fix thinko in xf86TargetPreferred + + The only-one-output case would only work right if that also happened to + be the zeroth output. Oops. + +commit 7bfad37f7706da5a76174c0da78dce4d6c6a585b +Author: Maarten Maathuis +Date: Fri Feb 27 22:26:52 2009 +0100 + + exa: fixup aux indices and ensure that the indices are used as they should be. + + - In a previous patch i forgot to add a FALSE somewhere it seems. + - Rename AUX indices so the driver (think of driver managed pixmaps) can do optimisations based upon them. + - Fix one abuse of DEST index now that we have the AUX indices (same reason as above). + +commit 8c6b4a827624aa70aea94b449fee6d5df8504105 +Author: Adam Jackson +Date: Fri Feb 27 12:42:43 2009 -0500 + + DDC: Redo extended device probe slightly. + + We'll now only mention the E-EDID segment register if the device is + actually E-EDID-capable. While we're here, check for DDC/CI and + standard EEPROM support too. + +commit b030f858f2f1ce1fd27a73ebf7f9ec5db541a668 +Author: Adam Jackson +Date: Sat Feb 21 19:56:20 2009 -0500 + + selinux: Don't bother relabeling resources that are being destroyed + + Makes window destroy about 40x faster in Xvfb. + +commit f028b14876dc536b575d4b6e1df7f37ee525acec +Author: Maarten Maathuis +Date: Fri Feb 27 13:06:28 2009 +0100 + + exa: whitespace + +commit ed00515ec54b294f304b8ae2857e3073f97860d2 +Author: Maarten Maathuis +Date: Thu Feb 26 22:18:03 2009 +0100 + + exa: fixup exaAssertNotDirty. + + - Do the right thing based on prepare access. + +commit 2e88b6004f09dbcb888abf05d4d5554231b2bd1a +Author: Maarten Maathuis +Date: Thu Feb 26 21:14:23 2009 +0100 + + exa: minor glyphs cleanup. + + - This should fix subtle coordinate bugs and make the code a bit cleaner to read. + +commit 265d20068af5434489752b6dba0bf0065b3cc3ec +Author: Michel Dänzer +Date: Fri Feb 27 16:41:39 2009 +0100 + + EXA: Fix check for whether the glyph we're evicting from the cache is in use. + + Since commit f07f18231a921d3ae9dd9b75881c9e58e9e2e235 ('EXA: Allow using + exaCompositeRects also when we can't use a mask in exaGlyphs.') we were + checking the wrong set of coordinates in the buffer where glyphs to be rendered + are accumulated when no mask is used in exaGlyphs. + + This fixes occasional glyph corruption which can be corrected with redraws, in + particular with Qt4. + + Thanks to Maarten Maathuis for asking the right question: 'where do we protect + against evicting glyphs that are still needed?' + + Signed-off-by: Michel Dänzer + +commit 9d5141f7bcfed36417873b47f850332506af83ac +Author: Michel Dänzer +Date: Fri Feb 27 16:37:28 2009 +0100 + + EXA: No longer use the driver UploadToScratch hook. + + See http://bugs.freedesktop.org/show_bug.cgi?id=20213 . + + Signed-off-by: Michel Dänzer + +commit 4cfb36f6ad2df01215028fec48d99239a0e4496b +Author: Michel Dänzer +Date: Fri Feb 27 16:37:28 2009 +0100 + + EXA: Handle separate alpha maps properly in Composite fallback, take two. + + Preserve the EXA ABI by introducing a new driver flag EXA_SUPPORTS_PREPARE_AUX. + If the driver doesn't set this flag, we have to assume any Prepare/FinishAccess + driver hooks can't handle the EXA_PREPARE_AUX* indices, so we move out such + pixmaps at PrepareAccess time. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . + + Signed-off-by: Michel Dänzer + +commit 4bf707f01822abe99286909fd561da7e7a4211d6 +Author: Michel Dänzer +Date: Fri Feb 27 16:37:27 2009 +0100 + + Revert "Fix up Xephyr build for recent EXA changes." + + This reverts commit 4e8d98b61e1f763c187e7994c683b543cca1a33c. + +commit de022f8e634baf5a7acd186934b370647df58355 +Author: Michel Dänzer +Date: Fri Feb 27 16:37:27 2009 +0100 + + Revert "EXA: Handle separate alpha maps properly in Composite fallback." + + This reverts commit 170cf1270dff38d3cce7f5ba5b940d1c0d70eff5. + + Conflicts: + + exa/exa_render.c + +commit d0dd649035fc3698c5b436f9d9d248116aa106a3 +Author: Jon TURNEY +Date: Thu Feb 12 16:03:16 2009 +0000 + + Remove references to rgb.txt from files section of Xserver and Xorg man pages + + The references to this file in the server code were removed in commit dda10c9066a660b647384179f82e1da8e063264f + + Signed-off-by: Jon TURNEY + +commit b0ad9e1ced9619f37acf77764c395c57b86cf463 +Author: Jon TURNEY +Date: Thu Feb 12 16:02:17 2009 +0000 + + Remove long-gone '-co' option from Xserver man page + + The '-co' option was removed in commit dda10c9066a660b647384179f82e1da8e063264f + + Signed-off-by: Jon TURNEY + +commit 7907b37d96dc81f333351a6fedd6a9f4e31ae66a +Author: Jeremy Huddleston +Date: Thu Feb 26 21:22:48 2009 -0800 + + XQuartz: Don't erase the mode_switch+keysym if it's the same as shift+keysym + (cherry picked from commit 3e2427e6e9675dd655c8ad328b82e12191b064f2) + +commit f07f18231a921d3ae9dd9b75881c9e58e9e2e235 +Author: Michel Dänzer +Date: Thu Feb 26 10:35:44 2009 +0100 + + EXA: Allow using exaCompositeRects also when we can't use a mask in exaGlyphs. + + This should give the full benefits of the glyph cache even when we can't use a + mask. + + This also means we no longer need to scan the glyphs to see if they overlap, + we can just use a mask or not as the client asks. + + Signed-off-by: Michel Dänzer + +commit b26c136ee9bf7015c583136af53d0c9e9da67ace +Author: Michel Dänzer +Date: Thu Feb 26 10:35:44 2009 +0100 + + EXA: Stop tracking damage for pixmaps subject to ModifyPixmapHeader. + + Signed-off-by: Michel Dänzer + +commit 812e8d681a49b33d8748983843799ef692b8b148 +Author: Keith Packard +Date: Wed Feb 25 11:08:01 2009 -0800 + + Oops. 62fc98c had crtc offsets applied backwards (fix from server-1.6-branch) + + Crtc offsets are in screen space, not crtc space, and hence should be + applied relative to the screen->crtc transform, not the crtc->transform. + + This fix was found in the 'cherry pick' of 62fc98c on server-1.6-branch, + clearly some new definition of 'cherry pick' that I am unaware of. + + Signed-off-by: Keith Packard + +commit c090f5514d28e1602a6ebbe7c909e98a0e3374d7 +Author: Keith Packard +Date: Wed Feb 25 10:14:36 2009 -0800 + + Pre-clip panning coordinates to keep crtc within panning region + + There is a separate panning region check, but that doesn't work under + transformation, so just pre-clip the mouse coordinates when computing the + panning offsets. This leaves the case where panning constants are changing + unresolved. + + Signed-off-by: Keith Packard + +commit 77c7a64e8885696665556c9fbcb3cffb552e367a +Author: Keith Packard +Date: Wed Feb 25 10:12:23 2009 -0800 + + RandR rotations and reflections offset by one pixel + + The matrix computation for rotation and reflection resulted in dropping a + row or column of pixels as the offsets used in the matrix computations used + width and height rather than width-1 and height-1. + + Signed-off-by: Keith Packard + +commit 4e8d98b61e1f763c187e7994c683b543cca1a33c +Author: Michel Dänzer +Date: Wed Feb 25 10:26:04 2009 +0100 + + Fix up Xephyr build for recent EXA changes. + + Signed-off-by: Michel Dänzer + +commit d6976e1436c035b8e4a6d1e10971b083b1b4184b +Author: Jeremy Huddleston +Date: Tue Feb 24 23:12:57 2009 -0800 + + XQuartz: Re-enable support for capslock + (cherry picked from commit 4901b8147e593d26d7a31a9b73a201254b948916) + +commit 4b63f88b0ad5f6614fee5b7af4f97ce4581ab935 +Author: Jeremy Huddleston +Date: Tue Feb 24 18:54:16 2009 -0800 + + XQuartz: Comment out the background pointer interaction that seems to be causing CPU spinning on some configurations + (cherry picked from commit 1d479fa4f3bca9cbd81808a6c87582422fd2a257) + +commit 5672e2d66444be74125c71b81373b82f8e1b7dd2 +Author: Peter Hutterer +Date: Fri Feb 20 14:55:51 2009 +1000 + + Xi: remove AllExtensionVersions. + + Keeping an AllExtensionVersions array to save all versions of + all extension is rather pointless if only one extension uses it. + Rename to XIVersion, reduce to a single struct. + + Signed-off-by: Peter Hutterer + +commit 59bc615ed2e60c595887dcc11fe04935b49bcaff +Author: Peter Hutterer +Date: Tue Feb 24 15:26:20 2009 +1000 + + dix: set the valuator mode in set_valuators + + We only have per-device mode for now anyway. + + Signed-off-by: Peter Hutterer + +commit cffa3c499a0495e132557bd6b08a8c0b858cdf3b +Author: Peter Hutterer +Date: Tue Feb 24 15:25:49 2009 +1000 + + dix: remove unused variable 'tmp' + + Signed-off-by: Peter Hutterer + +commit 8d6dd83a38020080808705a156d32ec2a135633c +Author: Peter Hutterer +Date: Fri Feb 20 13:13:58 2009 +1000 + + include: fix indentation for lastSlave/master. + + Yeah! + + Signed-off-by: Peter Hutterer + +commit b3412adca8b2ba3fff348bceb4f01b9e968c0afc +Author: Peter Hutterer +Date: Sun Feb 22 20:53:46 2009 +1000 + + Xi: don't need to set the XKB settings for new core devices. + + This is done by the XKB code these days anyway, so we might as well ignore it + and keep using the stanard stuff. + + Signed-off-by: Peter Hutterer + +commit a180c2367974abe2ccdc88bb5c6f138c7df4d2e9 +Author: Peter Hutterer +Date: Mon Feb 23 16:38:41 2009 +1000 + + dix: remove ConvertBackToXI. + + This was a temporary solution for the internal-events rework and is not needed + anymore. + + Signed-off-by: Peter Hutterer + +commit 26cf709e712573548990d165e71137f28271a8bb +Author: Peter Hutterer +Date: Mon Feb 23 22:39:08 2009 +1000 + + Doxygenify events.h and eventconvert.c + + Should have done that before pushing, but oh well. + + Signed-off-by: Peter Hutterer + +commit 170cf1270dff38d3cce7f5ba5b940d1c0d70eff5 +Author: Michel Dänzer +Date: Tue Feb 24 09:22:09 2009 +0100 + + EXA: Handle separate alpha maps properly in Composite fallback. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . + + As this can't work without new EXA_PREPARE_AUX* indices, this requires a major + version bump, so we can also drop the UploadToScratch driver hook and + ExaOffscreenSwap*(). So this also fixes + http://bugs.freedesktop.org/show_bug.cgi?id=20213 . + + Moreover, introduce EXA_DRIVER_KNOWN_MAJOR to break compilation of drivers + which may not be able to handle EXA_PREPARE_AUX*, giving instructions how to + make them build again in the #error message. + + Signed-off-by: Michel Dänzer + +commit d3b355875ac46104a174966e1974e6af99e40fd6 +Author: Peter Hutterer +Date: Tue Feb 24 11:14:14 2009 +1000 + + dix: fix wrong condition for setting valuators on the event. + + Signed-off-by: Peter Hutterer + +commit ef320bdd5ec3419abba77041d3a4d96a3ff87563 +Author: Michel Dänzer +Date: Mon Feb 23 16:49:51 2009 +0100 + + DRI1: Make DRICreateDrawable return TRUE for pixmaps. + + GLX_EXT_texture_from_pixmap was broken since commit + a26c77ff432d2e85a2665fc36fca25143460c476 ('glx: fix retval checks when failures + occur for drawable creation.') + + Signed-off-by: Michel Dänzer + +commit 1df6716281579e2937743d840ab1079343c503ac +Author: Adam Tkac +Date: Mon Feb 23 09:28:26 2009 +1000 + + xfree86: don't try to UnInit virtual devices in DIDR. (#20087) + + DeleteInputDeviceRequest function doesn't handle "virtual" devices well. + TightVNC libvnc.so module to X (which makes bare Xorg VNC capable) uses such + kind of devices. + + Bare Xvnc (it is something like Xvfb) simply uses AddInputDevice & + RegisterDevice functions. Xvnc uses DeleteInputDeviceRequest from Xi/stubs.c + so everything works fine (now I see that DeleteInputDeviceRequest in + Xi/stubs.c should call RemoveDevice function, shouldn't it? :) ) + + Situation is quite different when you use libvnc.so module. It uses same + schema as Xvnc, so it simply calls AddInputDevice & RegisterDevice. Thus + device is created correctly. When server is terminated it calls + DeleteInputDeviceRequest (now from hw/xfree86/common/xf86Xinput.c) for each + device. Here is the difference - Xvnc calls DeleteInputDeviceRequest from + Xi/stubs.c as I wrote above. Thus Xorg gets sigsegv because "VNC" devices + don't have real input driver. + + X.Org Bug 20087 + + [This isn't really a fix (libVNC should behave correctly) but not crashing the + server sounds like an improvement.] + Signed-off-by: Peter Hutterer + +commit a50c40be1f28467bcef7dc71fab54ebdddacffdf +Author: Peter Hutterer +Date: Sat Feb 21 08:09:40 2009 +1000 + + dix: don't apply button mappings to SDs, or the device's MD. (#20122) + + Only ever change the button map on the device we actually care about, not the + attached SDs, not the current MD of the device. + + X.Org Bug 20122 + + Signed-off-by: Peter Hutterer + Acked-by: Daniel Stone + +commit 36583a49965c0bb40a84284939b1539b3cb9fc9c +Author: Peter Hutterer +Date: Tue Feb 10 12:45:49 2009 +1000 + + mi: split EQ popping and event processing into two functions. + + mieqProcessInputEvents() - pop an event off the EQ and pass it to + mieqProcessDeviceEvent() - process the event according to the MD/SD hierarchy. + + This way, we can use mieqPDE() from Xtest, xkb, and others to post an event. + + Signed-off-by: Peter Hutterer + +commit 47f136ed6fd80310f715a2555501d1b271dd084c +Author: Peter Hutterer +Date: Fri Feb 6 12:08:43 2009 +1000 + + mi: change custom handlers to internal events + + This should re-enable DGA, but XQuartz needs to be changed to internal events + too now. + + Signed-off-by: Peter Hutterer + +commit bdc262701a37a0c12ead810d63fa99a26cbb82ec +Author: Peter Hutterer +Date: Mon Feb 2 22:39:37 2009 +1000 + + dix: remove un-used getValuatorEvents and countValuatorEvents from getevents.c + + Signed-off-by: Peter Hutterer + +commit 763848d3ab84b4e33a0254120c44b5a1877c819d +Author: Peter Hutterer +Date: Mon Feb 2 17:20:17 2009 +1000 + + Input: change processing API to InternalEvents. + + Don't pass xEvent* and count through to processing, pass a single + InternalEvent. + + Custom handlers are disabled for the time being. And for extra fun, + XKB's pointer motion emulation is disabled. But stick an error in there so + that we get reminded should we forget about it. + + Signed-off-by: Peter Hutterer + +commit 0b4066c116e07918a13dc6b4159df7ac9eb92b4b +Author: Peter Hutterer +Date: Mon Feb 2 17:18:16 2009 +1000 + + xkb: _XkbFilterRedirectKey needs to pass InternalEvents down. + + Signed-off-by: Peter Hutterer + +commit 085d50360863ccc8280cd3eccea2bcb4f3dd9a14 +Author: Peter Hutterer +Date: Mon Feb 2 16:56:52 2009 +1000 + + dix: Fix PostSyntheticMotion to use a DeviceEvent for posting. + + Signed-off-by: Peter Hutterer + +commit 155986a93dc78d6aa060ca3038d5fafa3d8753c2 +Author: Peter Hutterer +Date: Mon Feb 2 16:06:15 2009 +1000 + + dix: CheckPassiveGrabsOnWindow moved to internal events. + + Signed-off-by: Peter Hutterer + +commit 1c38abd4b136301008ba77d4e68aea34508f4c22 +Author: Peter Hutterer +Date: Mon Feb 2 14:54:34 2009 +1000 + + dix: switch DeliverGrabbedEvent to internal events. + + Signed-off-by: Peter Hutterer + +commit fb858774b80eb75c2f8e81fe893bbbdd37065fbd +Author: Peter Hutterer +Date: Mon Feb 2 14:44:13 2009 +1000 + + dix: switch DeliverDeviceEvents to internal events. + + Signed-off-by: Peter Hutterer + +commit 3aa9404fcd161e94a80b057a77ef47afe428a56d +Author: Peter Hutterer +Date: Mon Feb 2 14:00:41 2009 +1000 + + dix: switch DeliverFocusedEvent to internal events. + + And because of xfree() macro hilarity, rename "pointer" to "ptr". Oh, how we + laughed. + + Signed-off-by: Peter Hutterer + +commit 8c873e7f514844d1056f2b20e653f1dd75f4c327 +Author: Peter Hutterer +Date: Sun Feb 1 20:41:16 2009 +1000 + + dix: Switch DeliverGrabbedEvents to use internal events. + + Signed-off-by: Peter Hutterer + +commit a3718536989fa7d3358e0b2d859c25fde0a2d93e +Author: Peter Hutterer +Date: Sun Feb 1 20:18:33 2009 +1000 + + dix: Deliver{Grabbed|Focused|Device}Events API changed to InternalEvents. + + With the API change, we can now purge the XI conversion from POE. + + Note: this commit breaks DGA even more. + + Signed-off-by: Peter Hutterer + +commit 8f94ec6f788565474931cc7d5e3d4672f0f31670 +Author: Peter Hutterer +Date: Sun Feb 1 09:58:15 2009 +1000 + + dix: convert passive grabs to use internal events. + + deviceGrab.sync.event is now an internal event, and CheckDeviceGrabs and + friends is changed over. + + Note that this currently breaks some frozen grabs. See towards the end of + ComputeFreezes(). + + Signed-off-by: Peter Hutterer + +commit daa3245c479b19d445a070b5b76ee005915b5335 +Author: Peter Hutterer +Date: Sat Jan 31 08:46:43 2009 +1000 + + dix: fix EnqueueEvent to work with internal events. + + Note that we're only partially switched to internal events. The event in the + devices' event queue (dev->deviceGrab.sync.event) is still an XI event. The + events in syncEvents are InternalEvents only now. + This also implies fixing CheckVirtualMotion to work with internal events. + + Signed-off-by: Peter Hutterer + +commit 75595ba4aa9c3823ffe3b3388ce088929824816f +Author: Peter Hutterer +Date: Fri Jan 30 15:14:46 2009 +1000 + + Xi: make ProcessOtherEvents more InternalEvent aware. + + Get rid of the deviceValuator processing and a few other things, but still + drop back into XI before checking device grabs or doing anything else. + + NoticeEventTime now needs to take InternalEvents, and while we're at it, + change NoticeTime from a macro to a function. + + Signed-off-by: Peter Hutterer + +commit 3a02e538dbdb3cd482e01baeaf2aba2ddb7731df +Author: Peter Hutterer +Date: Fri Jan 30 14:59:22 2009 +1000 + + dix: update CheckMotion to deal with DeviceEvents. + + Signed-off-by: Peter Hutterer + +commit 8829d966a6bacb05d322b60531c59366b58f4514 +Author: Peter Hutterer +Date: Fri Jan 30 13:33:55 2009 +1000 + + Xi: support InternalEvents in UpdateDeviceState, parts of POE and EnqueueEvent + + Note that this breaks DGA. Life is tough. + + EnqueueEvent is a somewhat half-baked solution, we immediately drop back into + XI and store them. But it should in theory work. + + Signed-off-by: Peter Hutterer + + Don't let the dcce be random data. + +commit 007e93c869325cafcc29d975b356dbb8e7cd2ac1 +Author: Peter Hutterer +Date: Fri Jan 30 14:35:22 2009 +1000 + + xkb: Switch the xkb event processing path over to InternalEvents. + + Before dropping down into the DIX, convert back into XI events. This is a + temporary solution only, until the DIX is capable of handling InternalEvents + anyway. + + Signed-off-by: Peter Hutterer + +commit 64ea6078105f73d1b727619fc123920bc7e4a06c +Author: Peter Hutterer +Date: Mon Feb 2 14:15:52 2009 +1000 + + dix: change eventconvert to always return an array of xEvents + + Just alloc the memory on demand rather than doing things with EventListPtrs + etc. + + Signed-off-by: Peter Hutterer + +commit 4026c63e4eb16481bafc1a41ad67cd2556728d40 +Author: Peter Hutterer +Date: Fri Jan 30 14:34:02 2009 +1000 + + mi: switch the EQ to contain InternalEvents only. + + This gets rid of the nevents parameter, InternalEvents are always a single + item per event. Also remove the special DeviceValuator handling in both + enqueueing and dequeueing. + + Custom callback handlers are now broken until fixed. + + For bisectability, we copy the InternalEvent back into the XI required during + POE and friends. Consider this a temporary solution. + + Note: Because of misc linker bonghits, Xvfb won't link in this revision. + + Signed-off-by: Peter Hutterer + +commit 5a827593f9517fd5593751dd8bd90c611de06c5d +Author: Peter Hutterer +Date: Thu Jan 29 15:26:57 2009 +1000 + + dix: switch event generation to InternalEvents. + + GPE, GKVE, GProxE generate InternalEvents now. + DeviceClassesChangedEvents generates an InternalEvent now, but incomplete! We + need to tack on the information about the new SD in the ClassesChanged events. + + Note: To make the progress bisectable, we drop back into XI events at the end of the + Get*Events functions. So the rest of the server still uses XI events. + + Signed-off-by: Peter Hutterer + +commit 00b03683d0e5cda40fa23b9fe6a83d7227f86f5d +Author: Peter Hutterer +Date: Fri Jan 30 14:31:08 2009 +1000 + + dix: Add temporary conversion function ConvertBackToXI. + + Until the InternalEvents are used throughout the server, we can use this one + to drop us back into XI la-la land where every event is the wire format. + + Signed-off-by: Peter Hutterer + +commit 269d4d9f2e86fde8c6a28ef0293fb0e44b577886 +Author: Peter Hutterer +Date: Sun Feb 1 09:57:27 2009 +1000 + + dix: add GetCoreType and GetXIType. + + Convert from an InternalEvent type to the matching core/XI type. Currently + only for a few events, those we actually need in the server. + + Signed-off-by: Peter Hutterer + +commit 656491921e17b2371057041f4551ad6165067551 +Author: Peter Hutterer +Date: Wed Jan 28 15:27:38 2009 +1000 + + dix: add InternalEvent -> core/xi event conversion routines. + + Signed-off-by: Peter Hutterer + +commit e7867d12541ef9683d5d7fc766e918c13a742981 +Author: Peter Hutterer +Date: Fri Jan 23 15:37:23 2009 +1100 + + include: add XInternalEvent. + + This is the event we want to feed into the EQ and process on the way through. + Only applies for input events for now. + + Signed-off-by: Peter Hutterer + +commit 10dcf3ed9c543a6811340567e586ec0e476fcf61 +Author: Jon TURNEY +Date: Fri Feb 20 15:22:35 2009 +0000 + + Cygwin/X: Fix keyboard layout mapping for Latin American keyboards + + Fix keyboard layout mapping table entry for Windows keyboard layout 0x80a + (Latin American), layout should (now) be 'latam', not 'la' which is Laos + + Signed-off-by: Jon TURNEY + +commit 9531b96470a2fd812eb3fa0d1e10419331842496 +Author: Jeremy Huddleston +Date: Sun Feb 22 00:41:52 2009 -0800 + + XQuartz: DefineInitialRootWindow is gone + +commit c7c50157b5137a147e69abb70b43a28fac4a9ffa +Author: Jeremy Huddleston +Date: Sun Feb 22 00:29:48 2009 -0800 + + XQuartz: quartzKeyboard compile fixes for recent XKB Changes + + Seems we're less divorced from XKB than we'd like for now... hopefully not having any rules installed will still let us override things the way we want to... + +commit 61abf3189f3f97ec5228d45c035dbfd0c249f844 +Author: George Staplin +Date: Sat Feb 21 22:33:10 2009 -0700 + + XQuartz: GL: Change from xalloc to xcalloc to potentially avoid + uninitialized data in the __GLXAquaContext. + (cherry picked from commit d3120241f9f48d21f9a6ecfb848434a4a0270855) + +commit 5587f9b771f5b5427a81d4d657f403667d20f310 +Author: George Staplin +Date: Sat Feb 21 22:22:52 2009 -0700 + + XQuartz: GL: Fix a bug with an uninitialized GLX data structure. + + This was causing a crash randomly, due to random memory contents. + Use xcalloc to prevent this in the future, due to future changes or mistakes. + + Set the drawableType to include GLX_PIXMAP_BIT and GLX_PBUFFER_BIT. + The new libGL supports these. + + Set the max Pbuffer width/height, based on the results of a test program. + We may someday want to revisit this depending on what users need, so that + we create a CGLContextObj, make it current, and call glGetIntegerv to + gather the information at runtime. + (cherry picked from commit c7e338330943e0d03a99328c740540d03f018d20) + +commit ab61033700b5383a7a15370dd054eaa80e72e811 +Author: Alan Coopersmith +Date: Thu Feb 19 13:57:28 2009 -0800 + + Add Extensions section to xorg.conf man page + + Extensions section was added in X11R6.8.0 and documented in the release notes: + http://www.x.org/archive/X11R6.8.0/doc/RELNOTES2.html#3 + but never made it into the man page. + + Also fix a bonus typo. + + Signed-off-by: Alan Coopersmith + +commit 372977354c3a09ca77ca13ba0aec00a61046f60d +Author: George Staplin +Date: Wed Feb 18 21:43:19 2009 -0700 + + XQuartz: Fix the new ProcAppleDRIDestroyPixmap code REQUEST_SIZE_MATCH. + + It had a copy and paste mistake that I didn't notice. :/ + It was using the CreatePixmapReq. + + Also add a missing B16 to the end of the length for the DestroyPixmapReq struct. + + Now the AppleDRIDestroyPixmap request seem to work. + (cherry picked from commit 295fe25bd8fa2d141291a9d9b6ef7b75fcccb4dd) + +commit 225853d51d1fb610261ab0c295b1b5a96ce177d5 +Author: Dan Nicholson +Date: Thu Feb 19 06:45:05 2009 -0800 + + xkb: Use cached XKB keymap when rules haven't changed + + Rather than compiling a new keymap every time InitKeyboardDeviceStruct + is called, cache the previous keymap and reuse it if the rules have not + changed. + + Signed-off-by: Dan Nicholson + Acked-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 64e595d12e05c4df56b0230cc57924b9beb274d3 +Author: Peter Hutterer +Date: Thu Feb 19 09:18:53 2009 +1000 + + dix: check if keybd->key is valid before getting the keyboard state. + + For floating SDs, GetPairedDevice() returns the SD itself, hence keybd->key + may be NULL. + + Signed-off-by: Peter Hutterer + +commit e0a451eb7cc812f11db3614b730ba0f07d6ae18c +Author: Alan Coopersmith +Date: Tue Feb 17 19:37:22 2009 -0800 + + Obsolete InputDevices keyword in xorg.conf Files section + + Was only used to provide a list of input devices that XF86-Misc could use, + now that XF86-Misc is gone, was parsed and logged, then completely ignored. + + (Depends on previous patch that introduces OBSOLETE_TOKEN in parser to + make obsolete keywords like InputDevices & RgbPath be non-fatal errors.) + + Signed-off-by: Alan Coopersmith + Acked-by: Adam Jackson + +commit d2cf562bbad553d7f09b70202134f5b6ada0114e +Author: Alan Coopersmith +Date: Tue Feb 17 18:48:52 2009 -0800 + + Make RgbPath keyword in xorg.conf a non-fatal error + + Xorg shouldn't refuse to run just because the user has an xorg.conf that + had the previously-used RgbPath keyword in it. + + Signed-off-by: Alan Coopersmith + Acked-by: Peter Hutterer + +commit 344b1f2b25d627bdf7d802c5831b6a72d22ffe34 +Author: Jeremy Huddleston +Date: Tue Feb 17 23:25:14 2009 -0800 + + configure.ac: Support version strings like W.X.Y.Z-XXXXXX + (cherry picked from commit 43967514cd57ad836d7fb85c8c9e58ada07e0232) + +commit 67faf41b3f3e0cd66e35e3c176a9adb37ff1a759 +Author: Jeremy Huddleston +Date: Tue Feb 17 23:24:25 2009 -0800 + + XQuartz: Don't need GlxSetVisualConfig any more + + Fixes build failure resulting from 516f8e2cad1311a09764e2633644188d1e3c31bb + (cherry picked from commit 066b17028a35956a089815716e38571f305469c5) + +commit b349a764e98f0d8f221190157ffa0904b91beca5 +Author: Eric Anholt +Date: Tue Feb 17 09:59:17 2009 -0800 + + xinerama: Put the proto version in the code instead using proto headers. + + Proto headers updating resulting in the server advertising new versions is + broken. This should be applied to every extension. + + This fixes the build against slightly-older xineramaproto. + +commit 5394b7e66224d20888dd4020f5cb8ca930720fb4 +Author: Keith Packard +Date: Fri Feb 6 06:34:35 2009 +0100 + + Eliminate the shadow clear on transform change + + When the crtc transformation changes, the entire crtc must be repainted. + This was being done by clearing the shadow and then painting the rectangle + containing the screen image; the clear being required as the screen image + may not fill the crtc. When changing the transform rapidly, this leads to + flashing. Eliminate the clear by painting the entire crtc instead of just + the screen rectangle. + + Signed-off-by: Keith Packard + +commit 76f18b94bd2719a8199334742d021c4d0806187d +Author: Keith Packard +Date: Mon Feb 9 13:09:11 2009 +0100 + + Add XkbDir to Files config file section + + The XKB base directory was not configuable through the config file. + + Signed-off-by: Keith Packard + +commit 123093996507c4d3b6dc457240ce00f8ac42f410 +Author: Adam Jackson +Date: Tue Feb 17 12:59:16 2009 -0500 + + RANDR: Fail softly on GetPanning if the screen can't do it. + + Just return a zeroed-out reply in that case. This is unambiguous, and + distinguishes "you didn't name a CRTC" from "you named a CRTC that can't + do panning". + +commit b2ceea3635ec05dca9d4aa2f823b96ae9fce7fe8 +Author: Maarten Maathuis +Date: Tue Feb 17 19:40:59 2009 +0100 + + Revert "exa: the extent of the valid region is probably much larger than that of the pending damage." + + This reverts commit 97c1cbc70216366e92b9371de608ce94e60aa874. + + - Sorry for the thinko, pending damage is often not fragmentated. + - Should the dst region become fragmentated, you actually want to copy more to unfragmentate it. + +commit 3175646b10c602d17d5dd37bdace7c1c7ee92b3d +Author: Maarten Maathuis +Date: Tue Feb 17 19:06:35 2009 +0100 + + exa: exaPixmapDirty should use official damage functions. + + - Otherwise other users will not be notified of damage. + +commit 97c1cbc70216366e92b9371de608ce94e60aa874 +Author: Maarten Maathuis +Date: Tue Feb 17 19:01:44 2009 +0100 + + exa: the extent of the valid region is probably much larger than that of the pending damage. + + - Since the default has been changed from nothing to everything. + +commit 4039603413f9f46d7f725463a70b4a51838e0049 +Author: Ian Romanick +Date: Tue Feb 17 08:27:32 2009 -0800 + + glx: Inialize best_score before calculating visual scores + + This bug was pointed out by Peter Åstrand. + + Signed-off-by: Ian Romanick + +commit bac13e54b164ceff7b921a2d17c4a198b42aeccf +Author: George Staplin +Date: Mon Feb 16 17:33:19 2009 -0700 + + XQuartz: Add driWrap.h that I missed in the last commit. + + This should complete the GLXPixmap commits for now. + (cherry picked from commit 7e99b55651bf7f6275bb227d02f203fb885a67a2) + +commit 95052caa2c8a79981cdc7936888a8a47e09415e0 +Author: George Staplin +Date: Mon Feb 16 17:22:18 2009 -0700 + + XQuartz: Add support for GLXPixmaps to the AppleDRI. + + This involved wrapping some GCOps to get the proper behavior + when using X11 raster ops mixed with OpenGL (see driWrap.c). + + This extends the AppleDRI protocol with create and destroy pixmap + functions. + + The dri.c code has been extended quite a bit to enable this, and + to initialize the wrapping of CreateGC for GCOps. + + This has been tested with tests/glxpixmap and proven to work with + the new libGL. Existing applications seem to work fine too. Redraws + all appear to be correct. + + There may be some bugs lurking that I haven't found yet. I plan + to drive them out by extending the libGL test suite. + (cherry picked from commit 630518766b01022c49fe3a9e7d501808f71b06e2) + +commit 970725d23e83285d41e3f7cab678a825d9cc25cf +Author: Adam Jackson +Date: Mon Feb 16 18:44:00 2009 -0500 + + kdrive: Nuke dead AGP and VGA code. (#19921) + +commit a932744d983845f81791045cf0dfb6a359790158 +Author: Chris Ball +Date: Mon Feb 16 18:27:26 2009 -0500 + + Build fix, remove export of pciBusAddrToHostAddr + + a9d7d659.. (PCI: Remove pciBusAddrToHostAddr and associated nonsense) + removes pciBusAddrToHostAddr(), but not its prototype, resulting in: + + ./.libs/libxorg.a(sdksyms.o):(.data.rel+0xe64): undefined reference to + `pciBusAddrToHostAddr' + + Signed-off-by: Chris Ball + +commit ab331aa76f0bc6a85a519b2deaafa4ce8a070c53 +Author: Julien Cristau +Date: Mon Feb 16 21:56:03 2009 +0100 + + xfree86: ModeDebug is a boolean, not a string + + Signed-off-by: Julien Cristau + +commit f5bf1fdaf36163d5c2f1b9b51df96326ebbb0e9c +Author: Peter Hutterer +Date: Fri Feb 13 09:56:22 2009 +1000 + + xkb: Fix wrong colour reference in XKB geometry copying. #20081 + + base_color and label_color need to reference the color in the destination, not + in the source. + + X.Org Bug 20081 + + Signed-off-by: Peter Hutterer + Signed-off-by: Daniel Stone + +commit a9d7d659a05e4b6b25e6acd2ce59926911aac0f7 +Author: Adam Jackson +Date: Fri Feb 13 18:36:27 2009 -0500 + + PCI: Remove pciBusAddrToHostAddr and associated nonsense + + This was all a glorified no-op. We rely on pciaccess to create device + maps anyway, so we should have no reason to care about what the host + address is. + + Acked-by: Ian Romanick + Signed-off-by: Adam Jackson + +commit be8c3d4022faa7d169778ea10d1f11e8f90e1c0c +Author: Adam Jackson +Date: Fri Feb 13 17:54:33 2009 -0500 + + Linux: Remove dead USE_DEV_FB #ifdefs + +commit 51ae4d6bbfd95cac8a9cdefcd6f22fbe21a6cb9d +Author: Ian Romanick +Date: Mon Feb 16 12:08:28 2009 -0800 + + glx: Add comments around some extension string weirdness + +commit caa5310e163b040689383f6d25ccab5ef1b2e215 +Author: Maarten Maathuis +Date: Mon Feb 16 20:41:14 2009 +0100 + + exa: reintroduce src rect optimisation, with a slightly higher threshold. + + - I got some feedback on gtkperf line test regression. + - The increased threshold should ensure the destination optimisation is dominant. + +commit 46eeaf82e228df1c5971a24dc815566516e19be9 +Author: Maarten Maathuis +Date: Mon Feb 16 17:17:14 2009 +0100 + + exa: fix performance regression from 736b6fbd2c941b6276066cd1503523edebe7bf3d + + - The src optimisation is more aggressive and possibly harmful in light of the new initial state of pixmaps. + - There is now actually a performance improvement by almost always keeping the number of rects low. + +commit 6198373ff2a8e36113bb1dcaebe975530ff01b86 +Author: David Nusinow +Date: Sun Feb 15 18:36:01 2009 -0500 + + xorg.conf (5) refer to mousedrv (4). Debian #394058 + + Signed-off-by: Julien Cristau + +commit 2a8b8077d8f6001eb57deba60e1009fc99c28668 +Author: Alan Hourihane +Date: Mon Feb 16 11:39:34 2009 +0000 + + dri2: support glXWaitGL & glXWaitX by copying fake front to front and + vice-versa. + +commit ddb8d8945d1f44d16adc366b6612eef20ae813f7 +Author: Peter Åstrand +Date: Fri Feb 13 10:23:28 2009 +0100 + + xserver: Avoid sending uninitialized padding data over the network + + Signed-off-by: Peter Hutterer + +commit b735a4b4951b607e614682836f24d5fd86c1f7fb +Author: Peter Hutterer +Date: Thu Feb 12 14:29:23 2009 +1000 + + dix: Remove lastEventMask variable, substitute with a #define. + + Signed-off-by: Peter Hutterer + +commit 772e0f9159ca3ab8fb4e03ed6feee3cc93697724 +Author: Peter Hutterer +Date: Thu Feb 12 13:38:34 2009 +1000 + + dix: Don't set core events in SetMaskForEvent. + + Rather, modify the two callers to call separately for the two different. + events. Unexport SetMaskForEvent too. + And while we're at it, get rid of the MotionFilter macro, because it's one + half confusing and one half pointless. + + Signed-off-by: Peter Hutterer + +commit 58f3127919ba5fcb3bb467b6913c28ee1127c82b +Author: Peter Hutterer +Date: Thu Feb 12 08:37:49 2009 +1000 + + Xi: remove dynamic mask assignment for XI events. + + They end up being the same anyway on startup, so let's not have a dynamic mask + assignment mechanism and instead just hardcode them already. + Also unexport SelectForWindow and remove the valid_masks parameter. We can + check that before calling, since there's only one caller anyway. + + Signed-off-by: Peter Hutterer + +commit 7057a9a97b9316b1de954d05451e04223fdd9fd8 +Author: Peter Hutterer +Date: Thu Feb 12 22:14:48 2009 +1000 + + Remove two more define XKB leftovers. + + Signed-off-by: Peter Hutterer + +commit 736b6fbd2c941b6276066cd1503523edebe7bf3d +Author: Michel Dänzer +Date: Sun Feb 15 17:44:51 2009 +0100 + + EXA: Try to prevent the valid regions from growing too many rects. + + This helps contain region management overhead in some pathological cases, see + e.g. http://bugs.freedesktop.org/show_bug.cgi?id=16647 . + + Signed-off-by: Michel Dänzer + +commit 45e14f515337159e600a47ebf349692751552af8 +Author: Chris Ball +Date: Fri Feb 13 20:32:02 2009 -0500 + + Build fix for xf86EdidModes.c + + Commit 20ac314.. forgets to declare hsize/vsize/refresh. + +commit ae68be312619ad3bcb2d550a6267d38cce3284f5 +Author: Adam Jackson +Date: Fri Feb 13 17:25:32 2009 -0500 + + Input: Don't re-block SIGIO in xf86SigioReadInput() + + It's already blocked on the way in, because we asked for it to be + blocked at sigaction() time. + +commit c18f454e4a9cab03e5d55b6d761a4a735c943b6b +Author: Aaron Plattner +Date: Thu Feb 12 18:27:48 2009 -0800 + + Query the DDX in ProcRRGetScreenInfo. + + This is the RandR 1.1 version of GetScreenResources and needs to re-query the + DDX to see if the mode pool changed. + + Fixes Launchpad bug #325115. + Signed-off-by: Adam Jackson + (cherry picked from commit 660c2a7d4c6cb52fd0992e9d2008a24805dc8c02) + +commit 20ac3140ce16af460992b83aa8aeff4afe28c2ee +Author: Adam Jackson +Date: Mon Feb 9 13:36:05 2009 -0500 + + EDID: Hack for 1366x768 in standard timing descriptors + + All you get for standard timing descriptors is horizontal size in + multiples of 8 pixels (which means you can't say 1366) and height in + terms of aspect ratio (which means you can't say 768). You'd like to + just fuzzy-match this by walking the DMT list for sufficiently close + modes, but you can't because DMT is useless and only defines a 1360x768 + mode, because it's _also_ specified in terms of character cells despite + providing pixel exact timings. Neither can you use CVT or GTF to + generate the timings, because they _also_ believe that modes have to be + a multiple of 8 pixels. + + You'd also hope you could find a timing definition for this in CEA, but + you can't because CEA only defines transmission formats that actually + exist. So there's 480p, 720p, and 1080p, but no 768p. And why would + there be, after all, the encoded signal is never 768p so obviously no + one would ever make a display in that format. + + So instead, make a CVT mode since that's likely to be handled well by + just about everything, smash the horizontal active down by 2, and shift + the sync pulse by 1. Underscanning the hard way. + + Pass the suicide. + +commit bcafdfbed6f1e1f901c2459f60f94a0da506bd90 +Author: Adam Jackson +Date: Fri Feb 13 14:06:07 2009 -0500 + + RANDR: Validate entire mode list for interlace and doublescan + + Otherwise drivers have to refuse interlace twice: once in the output + config, and once in ->valid_mode() to catch output and config modes. + If you can't do interlaced modes, asking nicely for it in the config + isn't going to suddenly make it work. + +commit a26c77ff432d2e85a2665fc36fca25143460c476 +Author: Alan Hourihane +Date: Fri Feb 13 13:45:08 2009 +0000 + + glx: fix retval checks when failures occur for drawable creation. + +commit a38ca0063c91ef221f20bf0c4ac0dc84ce07d557 +Author: Benjamin Close +Date: Fri Feb 13 14:44:53 2009 +1030 + + xext: Use proto header rather than the Xext include file, this prevents userspace being pulled in causing issues + + Signed-off-by: Benjamin Close + Acked-by: Peter Hutterer + Acked-by: Daniel Stone + +commit d62c085f36892c327785e85571bd2c7c70513ac6 +Author: Benjamin Close +Date: Fri Feb 13 14:44:09 2009 +1030 + + dix: Remove includes which are not actually used directly + + Signed-off-by: Benjamin Close + Acked-by: Peter Hutterer + Acked-by: Daniel Stone + +commit 340f1576afcdaf883d185da356e5d6282aa65e19 +Author: Peter Hutterer +Date: Thu Feb 12 10:44:27 2009 +1000 + + dix: remove DefineInitialRootWindow() + + Obsolete. + + Signed-off-by: Peter Hutterer + +commit c178c3f814f7666f43cbf47d24c7543b289f9b1a +Author: Peter Hutterer +Date: Thu Feb 12 15:29:38 2009 +1000 + + dix: doxygen-ify enterleave.c + + Signed-off-by: Peter Hutterer + +commit cc696a2b7928ec497b6a0df3602fc70dec83a629 +Author: Peter Hutterer +Date: Thu Feb 12 15:05:57 2009 +1000 + + Doxygen-ify bits of events.c + +commit 8364bf7374aa5f6d991700f0c02921dc6c638c9f +Author: Peter Hutterer +Date: Wed Feb 11 16:06:36 2009 +1000 + + Document the event masks. + + Signed-off-by: Peter Hutterer + +commit ed9d58c3c25ee1b3dedbc4c116823c263ccf164d +Author: Simon Thum +Date: Sun Feb 8 17:21:09 2009 +0100 + + dix: refactor pointer acceleration + + The algorithm is split in a 2D-specific and a general part. + This potentially allows to accelerate more than just screen motion. + A state machine is intoduced to make code more explicit and readable. + It also improves handling of 'phase 1' mickeys when axial correction + kicks in (corner case). + + Signed-off-by: Peter Hutterer + +commit ac470dfb4fadaa0b28b6f8b57f4f13a20842b897 +Author: Alan Coopersmith +Date: Thu Feb 12 18:34:22 2009 -0800 + + Check for and report errors writing xorg.conf.new from Xorg -configure + + Signed-off-by: Alan Coopersmith + +commit bd713794ceaa1b2890522554562103c0a2d50f04 +Author: Alan Coopersmith +Date: Thu Feb 12 18:23:59 2009 -0800 + + Correct error message if specified config file is not found + + By making the "Unable to open config file" header a warning, it was + not appearing with the filename when a config file was specified and + not found. Now we make it an error message again, but only issue + the error if a filename was specified - if none was specified, then + we don't even issue a warning, just the "Using autoconfig" info message. + + Signed-off-by: Alan Coopersmith + +commit d229ba7068f0adf1bc8b30b7ccf2fce2c7e8b97b +Author: George Staplin +Date: Fri Feb 6 12:55:09 2009 -0700 + + XQuartz: xpr: The dri.c code for pixmaps was wrong in several ways. They weren't + being exported correctly by Xplugin. + + This should fix a bug with the surface for a window, when an export fails. + Before the export could fail and leave behind an invalid (freed) pointer in the dix privates. + + I have an idea of how to fix the GLXPixmaps now without using CGLSetOffScreen. + + This work is a step towards that. The Xplugin will need a small patch to fix an + issue that this change brought forth. + (cherry picked from commit 58c4116c47543b5e30c2232e7bee8efc0b9be176) + +commit b17d6bed97eddd0773d0845f93f842444b7de0ae +Author: Jeremy Huddleston +Date: Thu Feb 12 15:33:47 2009 -0800 + + XQuartz: Fix copyright info in Info.plist to be prettier when viewed in Finder + (cherry picked from commit 8b607c9c507a68a6abda63831d227d0f8947028c) + +commit d1ad43a8bc3a93a9cddcb4b0be1d722993bf5dd6 +Author: Ian Romanick +Date: Thu Feb 12 14:05:10 2009 -0800 + + Enable pbuffers + + If a driver does not actually support pbuffer rendering, it can just + not enable any pbuffer fbconfigs. + +commit 0065896e1ae6d419a42b318b66d6e4d5f17a40ca +Author: Colin Harrison +Date: Sun Nov 2 20:46:37 2008 +0000 + + Xming: Update keyboard layouts mapping table + + An update to the keyboard layout mapping table which updates some no longer valid keyboard layout names + (e.g. de_CH -> ch -variant de) and adds a few more reported layouts + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit d7c27bfe553235e55eb48799129ff9f8e7e0d4f6 +Author: Colin Harrison +Date: Tue Feb 3 15:57:29 2009 +0000 + + Xming: Check clipboard selection ownership after taking it + + When you take ownership of a selection you should always check you got + it (X11 ICCCM gospel). + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit cb6315072ff23740bdc5fc2f95dd960601df5664 +Author: Colin Harrison +Date: Tue Feb 3 15:54:31 2009 +0000 + + Xming: Fix a memory leak in clipboard integration code + + Free the memory allocated for ReturnData in FlushXEvents(). + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit d54d24dd5f25188b951b82b1c95eb9d36b5be970 +Author: Colin Harrison +Date: Tue Feb 3 15:53:43 2009 +0000 + + Xming: Fix prototype for winProcessXEventsTimeout() in clipboard integration code + + Function 'winProcessXEventsTimeout()' is declared 'static Bool' and + defined 'static int' (correct) in 'winclipboardwndproc.c'. This has been + wrong since dot, but luckily was of no significance + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit d8bae80305057acfb8e82341f68090eac0dccb90 +Author: Colin Harrison +Date: Tue Feb 3 15:52:57 2009 +0000 + + Xming: Improve clipboard integration startup in XDMCP mode + + Improve clipboard integration startup in XDMCP mode + Stop the "Clipboard not yet started, aborting" message from spamming the log. + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit 7cb1622ce44754d9dcd6f405fb8403bd79c3e7e4 +Author: Colin Harrison +Date: Tue Feb 3 15:51:02 2009 +0000 + + Xming: Select events correctly in clipboard integration code + + The clipboard should only select PropertyChange events and do this on + the correct window, the messaging window for the clipboard not the root + window! + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit b997b3849d902894dd5b38673b73a23a47edf502 +Author: Colin Harrison +Date: Tue Feb 3 15:48:04 2009 +0000 + + Xming: Add Colin Harrison to copyright and authors list for clipboard integration files + + Add Colin Harrison to copyright and authors list + Adjust license text for multiple authors + + Signed-off-by: Jon TURNEY + +commit 5ff289834d7445cc6f60dbb1cf18423e7236311a +Author: Jon TURNEY +Date: Mon Jan 19 17:42:54 2009 +0000 + + Cygwin/X: Place prototype for winSelectIcons() in a header file + + Fixes warning as prototype is now in scope for the definition + + Signed-off-by: Jon TURNEY + +commit ab2c98b86f1c3968581dfdad8b67432082feec78 +Author: Jon TURNEY +Date: Mon Jan 19 17:36:58 2009 +0000 + + Cygwin/X: Place prototypes for winCheckKeyPressed() and winFixShiftKeys() in a header file + + Fixes warnings as they are now in scope at the definition + + Signed-off-by: Jon TURNEY + +commit cc7a4c7c6e051fceacb32997740d83fc0655414e +Author: Jon TURNEY +Date: Mon Jan 19 17:29:28 2009 +0000 + + cygwin/X: Remove an unused variable to fix a warning + + Signed-off-by: Jon TURNEY + +commit 7c2fb098b206c0fb97c18cce8f88387cd0c0e82a +Author: Jon TURNEY +Date: Mon Jan 19 17:22:59 2009 +0000 + + Cygwin/X: Fix several prototypes to return HICON + + Fix prototypes of winOverrideIcon(), winTaskbarIcon() and winOverrideDefaultIcon() to return HICON + Also use HICON type in WINPREFS stucture + Remove various casts these changes make unnecessary + + Signed-off-by: Jon TURNEY + +commit 19b3e44ce51cc2f74ba388cb2cd3a26467848e9a +Author: Jon TURNEY +Date: Mon Jan 19 17:03:23 2009 +0000 + + Cygwin/X: Fix -Wold-style-definition warnings + + Fix old-style definition warnings caused by definitions with empty + parameter lists "()", which should be "(void)" to indicate the function + takes no parameters, rather than unspecified parameters + + Signed-off-by: Jon TURNEY + +commit 734b23e5982e171031077a2d5d6b5dc2a12e1a70 +Author: Maarten Maathuis +Date: Wed Feb 11 14:31:17 2009 +0100 + + fb: add fbDoCopy and fbCopyRegion compatibility wrappers. + +commit 619c4d60eb3a8a51a8300ccf8ab5b98a688e6e12 +Author: Eric Anholt +Date: Sun Feb 8 12:37:50 2009 +0100 + + glx: Replace broken GLX visual setup with a fixed "all" mode. + + With trying to match depths so that you didn't end up with a depth 24 + fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth + 24 X visual, which angered other applications. But in fixing that, the + pickFBconfigs code for "minimal" also could end up breaking GLX visuals if + the same FBconfig was chosen for more than one X visual. + We have no reason to not expose as many visuals as possible, but the old + "all" mode didn't match any existing X visuals to GLX visuals, so normal + GL apps didn't work at all. + + Instead, replace it with a simple combination of the two modes: Create GLX + visuals by picking unique FBconfigs with as many features as possible for + each X visual in order. Then, for all remaining FBconfigs that are + appropriate for display, add a corresponding X and GLX visual. + + This gets all applications (even ones that aren't smart enough to do FBconfigs) + get all the options to get the visual configuration they want. The only + potential downside is that the composite ARGB visual is unique and gets a + nearly full-featured GLX visual (except that the root visual might have taken + the tastiest FBconfig), which means that a dumb compositing manager could + waste resources. Write compositing managers using FBconfigs instead, please. + +commit 7bbf05d9aa75b536a5321abf51f37852b8f109ed +Author: Shunichi Fuji +Date: Tue Feb 10 14:44:18 2009 +0900 + + dix: build fix if PANORAMIX is not defined. + + Signed-off-by: Shunichi Fuji + Signed-off-by: Peter Hutterer + +commit 4844bff58f296b2851be4e6b955c3a68d02437a9 +Author: Peter Hutterer +Date: Wed Feb 4 11:50:18 2009 +1000 + + config: if we can't connect to HAL, listen for a startup notification. + + If HAL isn't available when we try to connect, the registered NameOwnerChanged + signal handler waits until HAL is available. Once we connected to HAL, we + unregister the signal handler again. + This allows HAL to be started in parallel or after the server has started. + + Signed-off-by: Peter Hutterer + +commit 5b2bbffc12cd7d29e4200943f8736bd6336ae4aa +Author: Peter Hutterer +Date: Fri Jan 30 16:46:27 2009 +1000 + + dix: deduplicate SyntheticMotion. + + Signed-off-by: Peter Hutterer + +commit 34820f9c1304891bebb4bff6a492288aec4fc0d1 +Author: Peter Hutterer +Date: Fri Jan 30 16:37:19 2009 +1000 + + dix: remove XineramaChangeToCursor. + + It's nearly identical to ChangeToCursor now anyway. + + Signed-off-by: Peter Hutterer + +commit 942eae6868b8b0f343b6aa921ddf77e8bb70798a +Author: Peter Hutterer +Date: Fri Jan 30 16:25:22 2009 +1000 + + dix: Remove XineramaCheckPhysLimits. + + Signed-off-by: Peter Hutterer + +commit bf044f6d10ad9f2baca91a2f04e82dc1af2657cd +Author: Peter Hutterer +Date: Fri Jan 30 16:14:54 2009 +1000 + + dix: reduce redunancy in XineramaConfineCursorToWindow. + + Signed-off-by: Peter Hutterer + +commit cdce5699f085e717ee1a2ed8390746dfcb9ddadf +Author: Peter Hutterer +Date: Fri Jan 30 16:09:23 2009 +1000 + + dix: Get rid of XineramaCheckVirtualMotion. + + Yes, this is an ugly piece mess of #ifdefs, but it beats having two nearly + identical functions. + + Signed-off-by: Peter Hutterer + +commit 1cb5afdf1ef53e72e0eef28ff6197bf5e86ef758 +Author: Maarten Maathuis +Date: Sun Feb 8 18:59:17 2009 +0100 + + dix: always NULL pGC->tile.pixmap in Create{Scratch}GC. + +commit 6fd8fe9cb993f9b733cf7d878bc324acd09aa48d +Author: Maarten Maathuis +Date: Sun Feb 8 18:43:15 2009 +0100 + + exa: fix exaValidateGC. + + - use DEST in the createPixmap wrapper, because stipple already takes MASK (in case someone uses swappers). + - Anticipate some of the less common situations when fbValidateDrawable will access tile related pixmaps. + +commit 30daba6903378dd47f386c0012a0667fd2368f3e +Author: Maarten Maathuis +Date: Sun Feb 8 02:08:13 2009 +0100 + + exa: All fallbacks should have a GC, remove some code. + + - I did some testing with full fallbacks forced by the driver. + - I ran rendercheck, expedite and the (full) x11perf test suite. + - Thanks to ajax for pointing out this should be unneeded. + +commit d591c7d1b87c61ee8add2fce689e35cf097eed4f +Author: Maarten Maathuis +Date: Sat Feb 7 20:47:54 2009 +0100 + + mi: kill a few warnings + +commit 00226d0b589595cdd45c75e7e28237334a8883b1 +Author: Maarten Maathuis +Date: Fri Feb 6 20:56:49 2009 +0100 + + mi: clip exposures to pGC->clientClip. + +commit ffa72793e25f19a388a1369708f472921f721284 +Author: Maarten Maathuis +Date: Fri Feb 6 20:47:01 2009 +0100 + + exa: Calling exaMarkSync after UTS is the drivers responsibility. + +commit da086901c6579e41b28b1418fa12ebb82744fc87 +Author: Matt Turner +Date: Fri Feb 6 18:31:12 2009 -0500 + + Remove unused barrier macros on alpha. + +commit 68665d78e72c4c564073d66a0f59ac8d3f5fd756 +Author: Maarten Maathuis +Date: Thu Feb 5 17:07:31 2009 +0100 + + exa: don't use fbCopyNtoN + +commit 2e76958d304a3c4080d62f32449724eeb9b95d93 +Author: Maarten Maathuis +Date: Wed Feb 4 19:48:03 2009 +0100 + + fb: move some code to mi + +commit f06bde3d4bf9a0f245dfa6c65cd98f8e0c7dfdfc +Author: Maarten Maathuis +Date: Sat Jan 31 19:57:07 2009 +0100 + + exa: create ExaCheckGetImage + +commit 258fc4b106dfd7b583999f97caf4d4a7a11569b6 +Author: Maarten Maathuis +Date: Sat Jan 31 19:40:48 2009 +0100 + + exa: wrap the remainder of exa_unaccel.c + +commit 6fabf249494bf38b69e3c9c6c9718ee8b12fc6e1 +Author: Maarten Maathuis +Date: Sat Jan 31 19:25:20 2009 +0100 + + exa: use proper wrapping in exa.c + +commit 015c99a4ad572f5a1b68054efb070e1ffee1fed0 +Author: Maarten Maathuis +Date: Sat Jan 31 18:53:52 2009 +0100 + + exa: properly wrap GC functions + +commit 5e6a06fe691db63ccf2dc7161a1f6c71c09741b7 +Author: Maarten Maathuis +Date: Sat Jan 31 16:30:31 2009 +0100 + + exa: add GC private + +commit 5cc67ae94c066dcac78072ad8a819c3b602d8bab +Author: Maarten Maathuis +Date: Fri Jan 30 19:32:33 2009 +0100 + + exa: kill of exaImageGlyphBlt + + - It serves no obvious purpose, yet it directly accesses many fb + symbols. + +commit 6483834200fab90164c27c72d4710014edeb4479 +Author: Maarten Maathuis +Date: Fri Jan 30 18:40:46 2009 +0100 + + exa: Remove one of the many calls directly into the fb layer. + +commit f112d6bf59964f317ab236221f7bce7fe2603ab8 +Author: Michel Dänzer +Date: Fri Feb 6 18:30:43 2009 +0100 + + EXA: Try harder to keep current pixmap copy up to date in exaMigrateToward*. + + This is probably required, but apparently not sufficient, for making migration + heuristics other than "always" work correctly again. Not that I really care + about them... + +commit 3948b523893d3d44b6a088340c4252e969613769 +Author: Michel Dänzer +Date: Fri Feb 6 11:37:53 2009 +0100 + + EXA: Guard empty pending region warning by DEBUG_MIGRATE. + + It isn't very useful yet while the damage layer calls us for empty operations, + mostly confuses users. + +commit 9a1d07ecb74b7c3267a6910af66ada917a525110 +Author: Tomas Carnecky +Date: Wed Feb 4 20:20:24 2009 +0100 + + Fix "warning: cast from pointer to integer of different size" + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit 0e15697b53c9448ce9911aa6499b2ea0bda92af6 +Author: Peter Hutterer +Date: Wed Feb 4 10:11:13 2009 +1000 + + dix: die if we can't activate or init the VCP/VCK. + + If we have a busted xkb setup, the XKB initialization on the core devices + fails and leaves us with dev->key->xkbInfo == NULL. This in turn causes + segfaults lateron. + + Return BadValue when the XKB configuration for a master device failed, and if + that happens for the VCP/VCK, die semi-gracefully. + The VCP init can only fail on OOM. + + Reported by Aaron Plattner. + + Signed-off-by: Peter Hutterer + Acked-by: Daniel Stone + Acked-by: Dan Nicholson + Signed-off-by: Aaron Plattner + +commit db836715198a445dc3b32c3df0610f700930483f +Author: Adam Jackson +Date: Wed Feb 4 23:27:32 2009 -0500 + + Revert "Bus: Remove xf86SetAccessFuncs() and related machinery" + + This reverts commit 2fe79990e31ac684637ca3c47198ee0cead10abe. + + Reminder: nvidia uses this, because other parts of RAC are broken in + worse ways, and it needs to disable that. + +commit 2fe79990e31ac684637ca3c47198ee0cead10abe +Author: Adam Jackson +Date: Mon Jan 26 07:11:49 2009 -0500 + + Bus: Remove xf86SetAccessFuncs() and related machinery + + Only mga was using this, and even then only behind an ifdef that no one + ever built. Not a great idea in the first place. + +commit 9ff6180161267e71ae750498da0ec4889cd5c260 +Author: Adam Jackson +Date: Mon Jan 26 06:23:09 2009 -0500 + + Bus: Delete some obfuscatory macros + +commit 8eca37cb8934e79f02291460eb7b49a5d528f391 +Author: Adam Jackson +Date: Wed Feb 4 22:48:52 2009 -0500 + + Bus: Remove unused xf86ExtractTypeFromList + +commit b013111e98d50f5962e9b275eb28d969d5c9576e +Author: Adam Jackson +Date: Mon Jan 26 03:14:18 2009 -0500 + + Bus: make the resource list static. + +commit bde028dd8d856f8d47c39e3c6d3731c34c398c74 +Author: Adam Jackson +Date: Mon Jan 26 22:58:58 2009 -0500 + + loader: Remove icache flushes on alpha. + + If libdl doesn't already get this right for you, you have two problems. + +commit 910a1e88d23e0b7e4ca4679ab50a883a918f2590 +Author: Adam Jackson +Date: Mon Jan 26 07:54:07 2009 -0500 + + loader: Remove a vestige of archive support + +commit 366f23c6eb504fc23112f121769bcb719948474f +Author: Adam Jackson +Date: Mon Jan 26 07:53:05 2009 -0500 + + loader: Remove useless call to LoaderGetOS + + We know what OS you're running on anyway, it's printed in the uname + string at the top of the log. + +commit 05e415a5a3f376e28955be3bf976390e8631e25f +Author: Adam Jackson +Date: Mon Jan 26 07:52:07 2009 -0500 + + loader: Simplify loader magic + +commit bf1ca06a1693cbe5415a152936939ce3b088a022 +Author: Adam Jackson +Date: Mon Jan 26 07:51:35 2009 -0500 + + loader: Make a comment slightly less stupid + +commit 499908aeca9a31692c787070e23bfaa92d1b32a4 +Author: Adam Jackson +Date: Mon Jan 26 07:50:00 2009 -0500 + + loader: code motion. + +commit 28b6b1519c4c526662302fac4ed9b7f540bafd4a +Author: Adam Jackson +Date: Mon Jan 26 07:47:46 2009 -0500 + + loader: Simplify handle allocation and refcounting. + +commit 0bad0552bfd4d10529ab51d618af8d08c5aeea71 +Author: Adam Jackson +Date: Wed Feb 4 17:20:24 2009 -0500 + + XKB: Remove -kb and +kb from -help text and man page. + +commit 7968823cbc02615e1080c0d3f34dcebe14ea1771 +Author: Keith Packard +Date: Tue Feb 3 20:18:37 2009 -0800 + + Handle the combination of panning and crtc transforms + + This patch gets the shadow scanout buffer repainted on panning area changes. + It does not, however, track the mouse correctly. + + Signed-off-by: Keith Packard + +commit 763df9eec79a867978efc5138d8635a46c1a0d17 +Author: Keith Packard +Date: Tue Feb 3 20:15:41 2009 -0800 + + Damage re-used shadow scanout buffer using new transforms. + + When the shadow scanout buffer can be re-used, the underlying framebuffer + area must be damaged so that the scanout will be repainted. This patch + delays the addition of that damaged area until after the transform in the + crtc has been updated, otherwise the old transform would have been used and + the wrong area repainted. + + Signed-off-by: Keith Packard + +commit 62fc98cb88e4e8b636f343453fc1168a87c58972 +Author: Keith Packard +Date: Tue Feb 3 20:12:42 2009 -0800 + + Handle matrix computation overflow in RRTransformCompute + + If the computation of the composite fixed-point transform for RandR + overflows at any point, take the resulting floating point transform and + scale that back to fit in a fixed point matrix. This ensures that a matrix + will always be available, although perhaps at reduced precision. Someday we + should add floating point matrices to Render. + + Signed-off-by: Keith Packard + +commit 7a3ddef3bc27982f3558183c74fc8e365cf2e7fd +Author: Tomas Carnecky +Date: Wed Feb 4 00:07:02 2009 +0100 + + fbdevHWGetRec() doesn't return the private data + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit e04d9ab999978995b06f4b702293b96f69b0e8c3 +Author: Tomas Carnecky +Date: Wed Feb 4 00:08:21 2009 +0100 + + DBUS_API_SUBJECT_TO_CHANGE is already defined on the command line + + dbus-core.c:30:1: warning: "DBUS_API_SUBJECT_TO_CHANGE" redefined + : warning: this is the location of the previous definition + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit 9f60d127b5371f2853dcc53903c6ff8c7670ad1b +Author: Tomas Carnecky +Date: Wed Feb 4 00:07:40 2009 +0100 + + Fix "warning: braces around scalar initializer" + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit a88995dfb88719ae4a03483dc571dbbe83565285 +Author: Tomas Carnecky +Date: Wed Feb 4 00:03:58 2009 +0100 + + Make gcc happy: correct third argument of CopyGetMasterEvent() + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit dd3f4e829286e62f4c5c07ee93f9f576876acbf9 +Author: Tomas Carnecky +Date: Wed Feb 4 00:02:24 2009 +0100 + + Fix "warning: cast to pointer from integer of different size" + + Add parenthesis around the whole expression. + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit 731a907ac21a753f306b53706f689469cefeb953 +Author: Tomas Carnecky +Date: Tue Feb 3 23:58:25 2009 +0100 + + Fix "warning: XXX defined but not used" + + generic.c:80: warning: ‘read_legacy_video_BIOS’ defined but not used + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit bc57efffe654c493ceb62555cccb7926f4a646f1 +Author: Tomas Carnecky +Date: Tue Feb 3 23:54:53 2009 +0100 + + Fix "warning: unused variable XXX" + + events.c:4614: warning: unused variable ‘kbd’ + xkbUtils.c:361: warning: unused variable ‘maxKeysPerMod’ + xf86Events.c:409: warning: unused variable ‘ke’ + generic.c:131: warning: unused variable ‘cs’ + generic.c:130: warning: unused variable ‘size’ + xf86RandR12.c:591: warning: unused variable ‘crtc’ + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit 111fdef74dfc7e288cef675b171b673bf64fe056 +Author: Tomas Carnecky +Date: Tue Feb 3 21:18:53 2009 +0100 + + ISO C90: Move declaration to the beginning of the function + + devices.c: In function ‘DoChangeKeyboardControl’: + devices.c:1768: warning: ISO C90 forbids mixed declarations and code + + Signed-off-by: Tomas Carnecky + Signed-off-by: Peter Hutterer + +commit 9fe9b6e4ef669b192ee349e3290db5d2aeea273c +Author: Peter Hutterer +Date: Mon Feb 2 10:20:13 2009 +1000 + + mi: don't call UpdateSpriteForScreen if we have Xinerama enabled. #18668 + + In Xinerama all windows hang off the first root window. Crossing the screens + must not reset the spriteTrace, otherwise picking fails and events are sent to + the root window. + + X.Org Bug 18668 + + Signed-off-by: Peter Hutterer + +commit f80332a04d0714a74f16b2552cccf3457e6494af +Author: Peter Hutterer +Date: Mon Feb 2 14:28:16 2009 +1000 + + dix: for core events, pass the core filter into DeliverEventsToWindow + + Signed-off-by: Peter Hutterer + +commit 01879e583b0ce0d8fddc37e36d9b69fe4f1d1e72 +Author: Aaron Plattner +Date: Tue Feb 3 13:49:19 2009 -0800 + + Don't enable XAA offscreen pixmaps with Option "XaaOffscreenPixmaps" "no". + + xf86IsOptionSet is rarely the right function to use for boolean options because + it returns TRUE whenever the option is present, even if its value is "no", + "off", "0", etc. + +commit 5623c27700b7b23a8dbbd8c8f45e5d4fa0c667e3 +Author: Alan Coopersmith +Date: Mon Feb 2 19:25:14 2009 -0800 + + Constify atom name strings + + Changes MakeAtom to take a const char * and NameForAtom to return them, + since many callers pass pointers to constant strings stored in read-only + ELF sections. Updates in-tree callers as necessary to clear const + mismatch warnings introduced by this change. + + Signed-off-by: Alan Coopersmith + Acked-by: Peter Hutterer + +commit 6869efae74381e5305b2d6517bf286e3ef7fdcb7 +Author: Jeremy Huddleston +Date: Tue Feb 3 09:58:51 2009 -0800 + + XQuartz: Accept bundle version 2.1.6 to work with our startup method + (cherry picked from commit 7f2966557374cb5ea22bc7b73d5ca04891eb5e78) + +commit 43a1c91a3dac4f0c8cea5de1b9785e349e09978a +Author: Peter Hutterer +Date: Sun Feb 1 20:44:27 2009 +1000 + + Xext: fix typo in GEEventFill macro + + Signed-off-by: Peter Hutterer + +commit 412e09e1e37b74421abd4dd9606536d2785da440 +Author: Peter Hutterer +Date: Thu Jan 15 11:03:03 2009 +1000 + + dix: Use GenericEvent instead of LASTEvent to check for core events. + + Signed-off-by: Peter Hutterer + +commit 9f3c5d46f81887b2b413b3e6cc9df8282f06522c +Author: Peter Hutterer +Date: Mon Feb 2 12:55:39 2009 +1000 + + Xi: initialize the device before applying button map changes. + + This part got lost in bc909f71367a0. + Reported by Tomas Carnecky. + + Acked-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 6bf6a4c47e94780bf0eef47702f21a505c336556 +Author: Simon Thum +Date: Fri Jan 23 12:06:16 2009 +0100 + + Xi: create well-known atoms on demand, rather than preinit them + + Signed-off-by: Peter Hutterer + +commit 32adf8d34fb7db9b78859241f2670349b75c3f7e +Author: Peter Hutterer +Date: Wed Jan 28 20:52:45 2009 +1000 + + Xi: If the MD doesn't have a key/kbdfeed class, init the keyboard. + + This fixes crashes on mouse/keyboard combos where the mouse is both a keyboard + and a mouse. Upon copying the SD's key info into the VCP, the NULL xkbInfo of + the VCP would crash the server. + + Signed-off-by: Peter Hutterer + +commit caade11b8465a743b2ecc890a4d180277e9ca716 +Author: Peter Hutterer +Date: Wed Jan 28 20:44:47 2009 +1000 + + Xi: remove now obsolete oldXkbInfo. + + Signed-off-by: Peter Hutterer + +commit 5e0967f5fc2e0fcf2a55128eb03931cf6f5709e9 +Author: Peter Hutterer +Date: Fri Dec 12 10:49:53 2008 +1000 + + dix: add SetBit(arr, bit) and ClearBit(arr, bit) to include/inputstr.h + + Signed-off-by: Peter Hutterer + +commit faeb18eb7eb20f15528f9c8004d843146ebc2a50 +Author: Peter Hutterer +Date: Tue Jan 27 15:40:31 2009 +1000 + + Xext: rename shape's EventType to ShapeEventType to avoid name clashing. + + Signed-off-by: Peter Hutterer + +commit cfd3443fe81685e91a53063dee58e24a5684dc29 +Author: Peter Hutterer +Date: Wed Jan 28 13:34:10 2009 +1000 + + Xext: rename saver's EventType to SaverEventType. + + Avoid namespace clashing with the internal events. + + Signed-off-by: Peter Hutterer + +commit 8460425740c72e58bcb897557f033e2836251160 +Author: Peter Hutterer +Date: Wed Dec 10 12:31:59 2008 +0000 + + render: rename SetBit to RenderSetBit. + + Avoiding namespace collision with the SetBit macro soon to be used in the + input code. + + Signed-off-by: Peter Hutterer + +commit 940a7aeebc9b042b0208ee475ef162c485ac2274 +Author: Peter Hutterer +Date: Tue Jan 27 15:52:49 2009 +1000 + + include: remove now-unused sempahore macros. + + Obsolete with the new enter/leave model. + + Signed-off-by: Peter Hutterer + +commit f5c7f8a3ab5723b6c1c3cd21b90a87fd7f37cb7f +Author: Jeremy Huddleston +Date: Mon Feb 2 12:30:57 2009 -0800 + + XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on Leopard + (cherry picked from commit 8620579483789ae9ac1b68dbefe32b70011386de) + +commit 5100d829a4d71ce4a9fbc2b81694a1fb90066ccf +Author: Eric Anholt +Date: Mon Feb 2 10:13:46 2009 -0800 + + glx: Don't match fbconfigs to visuals with mismatched channel masks. + + This fixes at least one known bug, where the depth 32 visual would end up + with a depth 24 fbconfig attached, angering compiz. + +commit 4475ae036c3d5a06a6ce88a359ce2a9a8ae9b4f1 +Author: Jon TURNEY +Date: Mon Jan 26 13:15:07 2009 +0000 + + Cygwin/X: Fix compilation for mandatory XKB + + Fix a stray '}' + Update to use RMLVO interface + Remove g_winInfo.xkb.disable, can never be set since noXkbExtension has been removed + Change to retrieve modifier key state using XkbStateFieldFromRec() from Colin Harrison + Update to use XKB defaults from xkb-config.h + + Signed-off-by: Jon TURNEY + +commit e2b4d3d4a1994347979508fbb483cd55c2232502 +Author: Jeremy Huddleston +Date: Sun Feb 1 15:08:02 2009 -0800 + + XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXT + (cherry picked from commit e01662cadcaa4052e3a5aa82cbaed00a2d0220e0) + +commit 66a6fbbfa3a1fd0d91fe61cf2ab299d0e3df46b9 +Author: Jim Huang +Date: Sun Feb 1 09:19:20 2009 -0800 + + kdrive: Move a close() to the right place so we don't close(-1) normally. + + Bug #18343 + +commit 0055fe66d5f73742cafab868ccdb7a6f36ea1dd5 +Author: Manuel Bouyer +Date: Sun Feb 1 09:14:19 2009 -0800 + + netbsd: Force the use of ev56 instructions for register access on ev56. + + This avoids 32-bit access which might affect other registers. The linux code + uses gcc flags to get this to happen, but this seems like more of a sure thing. + +commit 1375c1b07df114d864a0a06786bc75a3a4f65177 +Author: Manuel Bouyer +Date: Sun Feb 1 09:12:21 2009 -0800 + + netbsd: Fix alpha ev6 support. + + Bug #19721 + +commit ad8ffbe7cb50387e6a9cc4a24fea0d9c13b7bfc8 +Author: John Hein +Date: Fri Jan 30 21:30:35 2009 -0800 + + Actually require bigfontproto when it's enabled. Bug #13710. + +commit 29b3b88dc744f4919c6709747ddb7baac47486c5 +Author: Pierre Willenbrock +Date: Fri Jan 30 21:16:48 2009 -0800 + + Prevent double unref of glxdrawables + + Found by valgrind. Bug #18917. + +commit 60bcdd687040db76490851d4b459284ce37020e0 +Author: Alan Coopersmith +Date: Fri Jan 30 21:44:08 2009 -0800 + + x11-input.fdi: Add options needed to handle adding USB devices on Solaris + +commit 4de5705545792d77c9990bbec3e263a517757a2a +Author: Keith Packard +Date: Fri Jan 30 20:17:10 2009 -0800 + + RandR crtcs not fetched correctly when primary output is set. + + Primary outputs may not have a CRTC. + Loops fetching CRTCs respecting primary output were broken. + + Signed-off-by: Keith Packard + +commit f716e3f3445d443cbc6507d27f806e9ad387120a +Author: Eric Anholt +Date: Fri Jan 30 20:10:21 2009 -0800 + + modes: Protect xf86_crtc_supports_gamma() from non-RandR 1.2 drivers. + +commit 317f2b4a9fe4b606975711bc332166a82db5087d +Author: Eric Anholt +Date: Fri Jan 30 19:06:17 2009 -0800 + + randr: Avoid re-querying the configuration on everything but GetScreenResources. + + The new path should only re-query on the other requests when we haven't + gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX). + + Bug #19037. + +commit c1f2be1f3fd0c80cb4c85b98140b98aa9311242b +Author: Keith Packard +Date: Fri Jan 30 19:14:36 2009 -0800 + + RandR SetOutputPrimary should work with or without a crtc connected + + The test was inverted from the protocol spec, and besides, the test is bogus + anyways. + + Signed-off-by: Keith Packard + +commit dd098501d800571e71d06ffc936635a6c9d44e05 +Author: Eric Anholt +Date: Fri Jan 30 16:17:58 2009 -0800 + + Move the apple fat binary hacks back to a header file, and make it apple-only. + +commit 6e49fdd2c839b6244c23ce95c3ae76a1a265b986 +Author: Keith Packard +Date: Fri Jan 30 15:43:04 2009 -0800 + + Make RandR CRTC info report panning area instead of just crtc area + + This makes the RandR info consistent with the Xinerama info. + + Signed-off-by: Keith Packard + +commit ea309e47457156b60aadbf113f04e5b6851029c8 +Author: Keith Packard +Date: Fri Jan 30 14:19:41 2009 -0800 + + Make crtc_notify wrap/unwrap code do nothing unless mode code is inuse + + Drivers not using the new hw/xfree86/modes code would crash in DRI due to + that code trying to monitor CRTC changes. + + Signed-off-by: Keith Packard + +commit fff00df94d7ebd18a8e24537ec96073717375a3f +Author: Keith Packard +Date: Fri Jan 30 14:16:12 2009 -0800 + + Ignore EDID-supplied monitor physical sizes for core screen size + + We report the EDID values in RandR, and we let people configure whatever + they like for the screen in xorg.conf. Reporting the EDID values in the core + means applications get inconsistent font sizes in the default configuration. + + Signed-off-by: Keith Packard + +commit 4e7bc2d7a9879297aff0924febeca9bd3b6c336d +Author: Paulo Cesar Pereira de Andrade +Date: Fri Jan 30 03:56:39 2009 -0200 + + Work around inclusion of + + The X Server build only needs the macros PANORAMIX_MAJOR_VERSION + and PANORAMIX_MINOR_VERSION from that header. + Addition of extra prototypes to + caused a X Server build failure. + +commit 15ac25627e7239629be59adedda5d8a9deb330ef +Author: Matt Turner +Date: Thu Jan 29 14:40:27 2009 -0500 + + Remove extra / from Loading module line + + In the X log, upon module load, it prints a line similar to the following. + + > (II) Loading /usr/lib64/xorg/modules/extensions//libdbe.so + + The attached patch removes the extra / before the module name. + + Code already exists in hw/xfree86/loader/loadmod.c:InitPathList to add a + trailing slash if needed, removing the one added by sprintf is harmless. + + Signed-off-by: James Cloos + +commit 3903e23153a0d47704050944fa83a7b31bc2eebc +Author: Maarten Maathuis +Date: Thu Jan 29 12:42:57 2009 +0100 + + XKB: ifdef XKB is dead, yet it was still present in a few places. + +commit 756a2c848305aa06bfe636314e28ad7f97c1168a +Author: Pierre Willenbrock +Date: Wed Jan 28 22:18:50 2009 +0100 + + Fix duplicate code, off-by one in space calculation, not initialized members + +commit b55db937fee5ddf34518a54f352c0ee9b8cc2c2c +Author: Søren Sandmann Pedersen +Date: Wed Jan 28 17:33:25 2009 -0500 + + [shadow] Store the closure in the buffer + +commit 82fc102568b3d6b0daeb6c5f5b3a1310a7f14fcd +Author: Peter Hutterer +Date: Wed Jan 28 07:51:32 2009 +1000 + + Disable Xnest by default. + + Xneest doesn't build right now and is in the process of being removed. So + let's not build it by default. + +commit f7585d020593345e7a61b1fe1a517c38da8f6d79 +Author: Paulo Cesar Pereira de Andrade +Date: Tue Jan 27 03:13:28 2009 -0200 + + Convert kdrive libraries to libtool convenience libraries. + + Also correct a link failure due to unresolved symbols. This + is arguably a libtool/ranlib/ld bug, that "may" be corrected + by linking all convenience libraries in a single one. But in + this case, it was preferred to just add a linker option to + Xfake_LDFLAGS, to force linkage of all libraries. + + This corrects #19725. + +commit b43a4e2d38adb9ff16204218f24df93cfd820d1b +Author: Magnus Kessler +Date: Tue Jan 27 09:30:37 2009 +1000 + + Xvfb: add missing include for new xkbsrv.h + + Commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e added call to + XkbGetRulesDflts defined in xkbsrv.h + + Signed-off-by: Magnus Kessler + Signed-off-by: Peter Hutterer + +commit a7e6424d992151c504a75bb807fa34c57ad52cad +Author: Peter Hutterer +Date: Fri Jan 23 17:11:57 2009 +1100 + + dix: remove obsolete comment. Event lists should not be allocated by the DDX + +commit b137a0cdb1d517a807d081fbde8e8dc0539fb3ca +Author: George Staplin +Date: Mon Jan 26 03:02:38 2009 -0700 + + XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks. + (cherry picked from commit 143224405ba74929c702a95de52b56df140b0d1b) + +commit 34b896e50fa154ad890a458c60932964421e739f +Author: Jeremy Huddleston +Date: Fri Jan 16 19:26:07 2009 -0800 + + XQuartz: SnowLeopard: Help system book name changed in 10.6 + (cherry picked from commit b57cb05c69acbedb00a97234099ea104309aa2cb) + +commit c7d62d74bbd6e0067f511fd910b9e633576befb7 +Author: Paulo Cesar Pereira de Andrade +Date: Sun Jan 25 19:19:01 2009 -0200 + + Explicitly add libxorg_la_LIBADD to libxorg_la_DEPENDENCIES + + Otherwise, for example, when hacking config/*.c, it is required to + run make clean on that directory, to ensure the proper libconfig.a + will be linked in the generated Xorg binary. + +commit 0eec7348875035792097f606487a558422774e2c +Author: Magnus Kessler +Date: Fri Jan 23 12:11:00 2009 -0200 + + .gitignore: ignore sdksyms.dep + + Signed-off-by: Magnus Kessler + +commit 88efe9c76f85423d952ff38e0cfd8b690439902a +Author: Magnus Kessler +Date: Fri Jan 23 11:25:00 2009 -0200 + + Xvfb: Remove unused function GetLK201Mappings in InitInput.c + + Silence a gcc warning. After commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e + GetLK201Mappings is no longer needed. + + Signed-off-by: Magnus Kessler + +commit 6ef46c40e62def4841a4cff4e0b443516a2ed782 +Author: Paulo Cesar Pereira de Andrade +Date: Sun Jan 25 19:01:10 2009 -0200 + + Update xnest keyboard code to match xephyr/kdrive. + + Xnest was not updated in the last batch of xkb changes. This + patch is basically cut&paste from hw/kdrive/src/kinput.c and + hw/kdrive/ephyr/ephyr.c, and appears to generate a Xnest as + functional as before the xkb changes. + +commit 759348f13ffa02fb1804238189ffce1c92d33e2a +Author: Adam Jackson +Date: Thu Jan 22 22:09:11 2009 -0500 + + Xephyr: Add some rudimentary Xnest command line compat + +commit 01ffaf6834fd6a3b1ddbd33d0f0b8d086be0737e +Author: Peter Hutterer +Date: Mon Jan 19 21:11:05 2009 +1100 + + Xi: define a range of axis labels. + + This is copied from linux/input.h, presumably that's the ones at least the + Linux kernel can give us for any device. + + Signed-off-by: Peter Hutterer + +commit 132b464d734b077038e19b21e46d3a6258f4b998 +Author: Adam Jackson +Date: Thu Jan 22 02:11:16 2009 -0500 + + Remove a bunch of useless casts. + + We've had void * for twenty years now people let's try to act like we + know how it works. + +commit 0fb4390526bb829ab17ff4635d41a3012f63c1b2 +Author: Adam Jackson +Date: Thu Jan 22 01:13:17 2009 -0500 + + Remove xorgcfg 'Options' list. + +commit b5ece46b76c9182a077141505cc0e788c0fca3ea +Author: Daniel Stone +Date: Sat Jan 17 20:07:40 2009 +0200 + + Input: Clarify valuator FatalError messages + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit ddb46c1421a98190313b79621c0f5ae43b97d3f6 +Author: Daniel Stone +Date: Sat Jan 17 20:03:10 2009 +0200 + + Input: Use previous state in valuator events + + Make valuator event state match other events by using the device state + from before processing the event, not after. Also, we already check the + number of valuators in UpdateDeviceState, so no need to do it again. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 18e51911f5748f9a27a18cd6bb421c899f5b048f +Author: Daniel Stone +Date: Sat Jan 17 13:44:47 2009 +0200 + + Input: Add postdown to ButtonClassRec + + This mirrors that in KeyClassRec: the state of the buttons as posted to + GetPointerEvents, rather than the state of the buttons as processed by + ProcessOtherEvent and friends. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit c05f3bc935bef4d98216d38c0e98bd57ced382df +Author: Daniel Stone +Date: Sat Jan 17 19:35:15 2009 +0200 + + Input: Don't allow DDX to generate repeat events + + We always use soft-repeat at the moment; XKB posts a release/press sequence, + which admittedly needs cleaning up, but that's for another day. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 6aef4e96affcc26b9415c6bc9c9bebb5af05a1a7 +Author: Daniel Stone +Date: Sat Jan 17 13:42:46 2009 +0200 + + XKB: Fix logic error + + Use logical or instead of bitwise or. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 0ec9b1069aeeaf66fd104c09f08202f7ebccd170 +Author: Daniel Stone +Date: Sat Jan 10 14:44:28 2009 +0200 + + XKB: Remove unused XkbProcessOtherEvent + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 7af53799ccefe27b996bdc6073075b7f12353d3a +Author: Daniel Stone +Date: Sun Jan 4 16:39:18 2009 +1100 + + Input: Remove unused CoreProcess{Keyboard,Pointer}Event + + Everything goes through XKB's Process{Keyboard,Pointer}Event on its way + through to ProcessOtherEvent now, so get rid of the old, useless functions. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 7c4c00649cae855e141ec9a3667bfe399e3156d0 +Author: Daniel Stone +Date: Thu Jan 1 05:25:52 2009 +1100 + + XKB: Remove unused DDX functions + + They were complete no-ops anyway. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 4fa3872dc2bcfd6d1fc88d0a94c7071683eea899 +Author: Daniel Stone +Date: Sat Oct 18 20:26:00 2008 +0100 + + Input: Remove core keysyms from KeyClassRec + + Instead of always keeping two copies of the keymap, only generate the + core keymap from the XKB keymap when we really need to, and use the XKB + keymap as the canonical keymap. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit bc909f71367a02297e725bb5769c2bcadab22395 +Author: Daniel Stone +Date: Tue Aug 12 00:35:56 2008 +0300 + + Input: Centralise pointer map changing + + Replace both core and Xi functions with one function that validates the + proposed map, and sends out both kinds of notification. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit f06a9d2e05e13466c115fc706966a90b1fb0518e +Author: Daniel Stone +Date: Sat Oct 18 20:59:30 2008 +0100 + + Input: Clean up keymap change notifications + + Keyboard map notifications are always generated from within XKB code, + which also takes care of copying the keysyms, etc. If you need to + mangle the keymap yourself, generate a new core keymap/modmap, and pass + it to XkbApplyMappingChange. + + SendMappingNotify is renamed to SendPointerMappingNotify (and ditto its + Device variants), which still only _sends_ the notifications, as opposed + to also doing the copying a la XkbApplyMappingChange. + + Also have the modmap change code traverse the device hierachy, rather + than just going off the core keyboard. + + Signed-off-by: Daniel Stone + +commit 1d1a0f67eee330a286fbdef17e967ce8ea201548 +Author: Daniel Stone +Date: Tue Oct 28 16:27:37 2008 +1100 + + Xi: Introduce XIShouldNotify + + XIShouldNotify just lets you know if you should send an event for a + keymap change (or similar) concerning a given device to a given client; + at the moment, this is only for devices which are sending events to that + client. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit b5242789edb726bb539e4d42fa35bfdaca0025c9 +Author: Daniel Stone +Date: Sat Aug 9 17:02:02 2008 +0300 + + XKB: Simplify keymap writing a bit + + We don't need no temporary variable. + + Signed-off-by: Daniel Stone + +commit feb757f384382c7782ceac55f99d54c7caadbd9d +Author: Daniel Stone +Date: Fri Apr 25 19:54:29 2008 +0300 + + XKB: Sanitise vmods for redirected keys + + Turn two unsigned chars into one unsigned int for both vmods and the + vmod mask. As a bonus, remove broken unused accessor macro for setting + the vmods. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit b5f49382fe48f0a762d9a15fb10a7d7e1183fc8d +Author: Daniel Stone +Date: Fri Apr 25 19:52:11 2008 +0300 + + XKB: Sanitise ctrls action + + Turn four unsigned chars into one unsigned long. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 1bd7fd195d85681e722161f8c636a28f11b40abb +Author: Daniel Stone +Date: Fri Apr 25 19:50:12 2008 +0300 + + XKB: Sanitise pointer actions + + Turn two unsigned chars into one int. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 61c508fa78aa08ea2666fde950fbafad95d65056 +Author: Daniel Stone +Date: Fri Apr 25 19:47:16 2008 +0300 + + XKB: Sanitise vmods in actions + + Turn vmods from two unsigned chars into one int. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 4f3078df2acf07364a17f738bc5c32f9a5962723 +Author: Daniel Stone +Date: Sat Aug 9 16:50:22 2008 +0300 + + XKB: Add a hell of a lot more FIXMEs + + For some reason, we insist on having daft internal representations that + make no sense, that always have to be converted to be used. We should + really sort this one out. + + Also, comment the hojillion members of XkbStateRec. + + Signed-off-by: Daniel Stone + +commit edeb033f29ae2d52e86c543ccbf22fb7ae1fdb7f +Author: Daniel Stone +Date: Wed Oct 15 18:07:52 2008 +0100 + + XKB: Explicitly decode action data + + Rather than requiring a one-to-one correspondence between XKM and struct + formats in action data, explicitly fill the action data, so we can break + API. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 699824a35791735b4b4378adf8648e3aaa599ace +Author: Daniel Stone +Date: Fri Jul 18 16:41:29 2008 +0300 + + XKB: Remove descriptions from maprules + + We don't use them, as they're not up to the task. We'll get a better + solution someday, promise. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 1ad80678d88525159e55bb814205fd4eaca060a3 +Author: Daniel Stone +Date: Fri Jul 18 16:29:35 2008 +0300 + + XKB: Remove support for setting combined keymaps + + We don't do full keymaps anymore. Deal. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 133e0bd6f1cc147a2ddbbe1519d10300e7dbe669 +Author: Daniel Stone +Date: Fri Jul 18 16:27:57 2008 +0300 + + XKB: Remove 'extra' functionality from rules parsing + + When we find something weird in the rules, don't stash it as an extra + freeform component, just state that the rules file is likely broken and + move on with our lives. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit cc5c6d628aa0dc87c2cc9d063972e09ad747a596 +Author: Daniel Stone +Date: Fri Apr 25 18:45:37 2008 +0300 + + XKB: Remove unsupported Xi operation flags + + We support every XKB operation on Xi devices, so always report that we + support everything, and that nothing is ever unsupported. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 32db27a7f867b503c2840ca7b815e96d10be9210 +Author: Daniel Stone +Date: Thu Apr 17 12:42:01 2008 -0700 + + Input: Remove modifierMap from core + + We already have modmap (in the exact same format!) in XKB, so just use + that all the time, instead of duplicating the information. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit f062e90a95f9b7ae5458ef2100615e8ace9b66a7 +Author: Daniel Stone +Date: Wed Apr 16 19:15:30 2008 +0300 + + Input: Remove modifierKeyMap + + Since modifierKeyMap is generated from modifierMap, just remove it, and + only generate it when we need to send the modifier map to the client. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit cf6a2fc2bd94b392cfea120444d5e032d26f1d37 +Author: Daniel Stone +Date: Sun Mar 30 17:25:39 2008 +0300 + + Input: Ignore modifiers in core input processing + + Modifiers get cleared by the XKB code when we drop down into core input + processing, so just delete the dead code path to simplify things a bit. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 6727ee94086d238f9f99379280d4e4827f388cce +Author: Daniel Stone +Date: Sat Aug 9 16:45:45 2008 +0300 + + Input: Remove state from KeyClassRec + + We already have state fully stored within XKB, so instead of duplicating it, + just generate the values to send to clients when required. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e +Author: Daniel Stone +Date: Fri Dec 26 18:38:25 2008 +1100 + + Input: Overhaul keyboard initialisation process + + XkbInitKeyboardDeviceStruct is now the only valid keyboard + initialisation: all the details are hidden behind here. This now makes + it impossible to supply a core keymap at startup. + + If dev->key is valid, dev->key->xkbInfo->desc is also valid. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 40877c6680863bd6a8475f2bb0c54df55bcf0b0e +Author: Daniel Stone +Date: Tue Mar 18 10:05:57 2008 +0200 + + XKB: Make XKB mandatory + + No more #ifdef XKB, because you can't disable the build, and no more + noXkbExtension either. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit f9da417163b6b2d6234d2542c1f375e33db7159a +Author: Daniel Stone +Date: Fri Mar 28 19:26:42 2008 +0200 + + Xephyr: Disable state inheritance hack + + Prepare for the impending removal of the state field by disabling this hack + for a while: it's hell of nasty and I'm amazed it ever really worked. + + Basically, on focus out, it should do as current DDXes do and fake releases + for all keys (not just mangle the core state) that are currently down; + buttons too. When focus comes back in, we already have a KeymapNotify that + lets us know what's currently down, so we can use this to fake the + appropriate keypresses, and send it through the event routing layer. + + Signed-off-by: Daniel Stone + +commit 5c281446d2a8c38511d45baee6f0d25a640f12e1 +Author: Daniel Stone +Date: Fri Mar 28 11:56:34 2008 +0200 + + XKB: Remove lock actions disabling + + For some reason, XKB allows clients to set a global (!) flag that simply + turns lock keys into state no-ops. Ignore this flag. + + Signed-off-by: Daniel Stone + +commit 2f7cb7306709d5266688e05a066701d309323035 +Author: Daniel Stone +Date: Fri Dec 26 18:36:30 2008 +1100 + + XKB: Add XkbRMLVOSet + + XkbRMLVOSet is just a set of strings for rules, model, layout, variant + and options; use that in preference to XkbRF_VarDefsRec, which is a + hideously complicated monster that somehow managed to not include the + actual rules. + + While we're at it, clean up xkbrules.h so it doesn't require xkbstr.h. + + Signed-off-by: Daniel Stone + +commit 3208eff2d7b856a4ac0d650498ccb36e7e62e034 +Author: Alan Coopersmith +Date: Wed Jan 21 14:45:06 2009 -0800 + + Update xorg-server.h.in & Xnest to use new XKB default #defines + +commit cdf216aa17b776130a91fa6792c321620e810a18 +Author: Alan Coopersmith +Date: Tue Jan 20 16:50:43 2009 -0800 + + Fix XKB default configure options to use the right variables + +commit 0d3c3dad21857ef502fe0d0235620a1228248e13 +Author: Adam Jackson +Date: Tue Jan 20 23:46:48 2009 -0500 + + Don't include fontmod.h + +commit 4f004ab9a83e209943760e1faa39f06c8eeb27af +Author: Benjamin Close +Date: Thu Jan 22 01:36:31 2009 +1030 + + XNest: Fix the build caused by __XKBDEFRULES__ -> XKB_DFLT_RULES in 23862ede59a9ce11a06ec5151bde460fb836c603 + +commit e45a8a498d1ee8e40fc334805c38c05cb04b49d0 +Author: Adam Jackson +Date: Tue Jan 20 22:07:07 2009 -0500 + + Remove CreateUnclippedWinSize from window.h + + This is utterly wrong, but then, so is sdksyms.sh + +commit 20d2117eb82fb7ce91afd4f01fe1b9d4b1bf0459 +Author: Adam Jackson +Date: Tue Jan 20 00:17:42 2009 -0500 + + Move CreateUnclippedWinSize to mbuf + + It's the only user, so. + +commit e1611d8d55ade35bf8c2e1da7bc2dbf05b011301 +Author: Daniel Stone +Date: Thu Nov 27 13:34:05 2008 +1100 + + XKB: Be more verbose about XkbCopyKeymap failure in debug mode + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 5ee504cae5f17d16ee7599beaa4b1944a9a8aee6 +Author: Daniel Stone +Date: Thu Nov 27 13:31:18 2008 +1100 + + XKB: Trying to copy to the same keymap is not fatal + + Humour the user if they run XkbCopyKeymap(foo, foo). + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit d929ba6886c6f121b101c0bf0f7c63ef9d851a3e +Author: Daniel Stone +Date: Fri Dec 26 18:32:41 2008 +1100 + + XFree86: Input: Fail NIDR if we can't enable devices + + If we can't enable a device, bail out of NewInputDeviceRequest rather than + blithely continuing. Also, be more verbose when initialization failed. Also, + be more verbose when initialization failed. Also, be more verbose when + initialization failed. Also, be more verbose when initialization failed. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 534669b376a6a703fbc97269d279a5418cf60c98 +Author: Daniel Stone +Date: Sun Jan 4 16:24:44 2009 +1100 + + XKB: Remove unnecessary prototype + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 27ea1a7e4e7eca394e052791c64bc6be515e075e +Author: Daniel Stone +Date: Sun Jan 4 16:40:46 2009 +1100 + + XKB: Only Xi events are processed + + Core events aren't run through these functions, so don't bother testing + for them. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 2762cafc321166ac48f80146720709b1011e6894 +Author: Daniel Stone +Date: Thu Nov 27 13:35:42 2008 +1100 + + XkbCopyKeymap: inputInfo.keyboard is not a special case + + The device-walking code is still depressing, though. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 07c3bb922b8c1ae8fe28198f6c451430b836f21e +Author: Daniel Stone +Date: Sun Jan 4 14:12:19 2009 +1100 + + XKB: Move XkbCopyKeymap definition to xkbsrv.h + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 4f35a34f3cd3df3c8af129936d1808dcc063d8a7 +Author: Peter Hutterer +Date: Thu Aug 14 17:26:02 2008 +0930 + + dix: Remove traces of CoreDevicePrivateKey + + Obsolete with MPX. + + Signed-off-by: Peter Hutterer + Signed-off-by: Daniel Stone + +commit 58a6b5b9eff25b1b9c6de239d6f5a952a31dfd15 +Author: Peter Hutterer +Date: Thu Aug 14 17:21:28 2008 +0930 + + Xi: don't care about CoreDevicePrivateKey when copying keys + + If we get here, we must copy. + + Signed-off-by: Peter Hutterer + Signed-off-by: Daniel Stone + +commit 23862ede59a9ce11a06ec5151bde460fb836c603 +Author: Daniel Stone +Date: Sat Jan 10 14:36:16 2009 +0200 + + XKB: Allow build-time configuration of XKB defaults + + Instead of hardcoding base/pc105/us, allow users to change the defaults at + ./configure time. Change the default model to be evdev on Linux. + + Signed-off-by: Daniel Stone + +commit 57a5eb2583bdf1069861fe2184de9739c0d0c7c1 +Author: Colin Harrison +Date: Sun Jan 4 17:40:54 2009 +0000 + + Xming: Update .rc file to tidy About and Exit dialogs + + Tidy up About and Exit dialogs, add keyboard accelerators + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit df3f701ef2d41ff4be4839f473ae71d33777bea3 +Author: Colin Harrison +Date: Sun Nov 2 20:17:23 2008 +0000 + + Xming: Ensure we dont try to print a null value when displaying xkb configuration + + Signed-off-by: Jon TURNEY + +commit c612f0df45d388c98108e1e0c80afdfae05e338e +Author: Colin Harrison +Date: Sun Nov 2 20:46:41 2008 +0000 + + Xming: Add styles keyword and attributes. + + Add handling for style keyword and atttributes in .XWinrc + Update man page to document these additions + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit 847a91ad2e8c9b0992c09f0ec38466885d6d25d4 +Author: Colin Harrison +Date: Sun Jan 4 19:57:56 2009 +0000 + + Xming: Notify X when the keyboard focus is lost to a pure Windows window in -multiwindow mode. + + Fix internal WM to notify X when the keyboard focus is lost to a pure Windows window in -multiwindow mode. + + Signed-off-by: Jon TURNEY + +commit 6c3e7e4d0568ecb7d10b814593bbbd817b7d2aab +Author: Colin Harrison +Date: Sun Jan 4 18:28:34 2009 +0000 + + Xming: Only allow WM_MOUSEWHEEL messages to act on the client area of a focused window. + + Fix internal WM so it only allows WM_MOUSEWHEEL messages to act on the client area of a focused window. + + Signed-off-by: Jon TURNEY + +commit d84e0e387764236c7e97509baf4606d96cfc19d4 +Author: Colin Harrison +Date: Sun Jan 4 18:20:44 2009 +0000 + + Xming: Correctly parent XA_WM_TRANSIENT_FOR windows in -multiwindow mode when a windows window is created. + + Fix internal WM to correctly parent XA_WM_TRANSIENT_FOR windows in -multiwindow mode when a windows window is created, + and to de-iconize parent windows when a child window acquires focus. + + XXX: Perhaps we should also shuffle parent(s) forward through Z-order when a child acquires focus? + + Signed-off-by: Jon TURNEY + +commit 8d82d806ee38d45ec7cdbf8b1f671ec1e4437567 +Author: Colin Harrison +Date: Sun Nov 2 20:46:38 2008 +0000 + + Xming: Correct the way display and screen number is reported in window titles and tooltips + + Correct the tooltip text for the toolbar X icon to be strictly correct, 'display-number:screen' should be ':display-number.screen'. + Also for the default window title. + Adjust the style of the Windows title in XDMCP mode from 'Xming - hostname' to 'hostname:display-number.screen'. + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit 656f92e247f2f257105daf1e0e6998e1b3d10eba +Author: Jon TURNEY +Date: Sun Nov 2 20:17:02 2008 +0000 + + Cygwin/X: should also use GetTickCount(), just like Xming + + Signed-off-by: Jon TURNEY + +commit 7f781e780ee2b261c5cb688a8e6c5dc1a53bdb6f +Author: Yaakov Selkowitz +Date: Wed Dec 17 19:13:30 2008 +0000 + + Cygwin/X: Cygwin doesn't have RTLD_LOCAL + + RTLD_LOCAL is not defined on Cygwin + + Signed-off-by: Jon TURNEY + +commit 5630ff809676ab6b4833757060e48e201e8768a5 +Author: Dan Nicholson +Date: Mon Dec 22 13:53:43 2008 -0800 + + Ignore generated dmx manpages + + Signed-off-by: Dan Nicholson + +commit 64f924fbf513b5f91b3f2bcf5767f6fe927d3f7a +Author: Dan Nicholson +Date: Mon Dec 22 13:43:30 2008 -0800 + + Kill off --with-mesa-source completely + + There were a few spots left in the source that were using the + --with-mesa-source defined headers or the now removed $(top_srcdir)/GL + directory. These aren't needed anymore as all the necessary source for + GLX is in $(top_srcdir)/glx. + + Signed-off-by: Dan Nicholson + +commit e1c8ee215797fa8c6a3a5421bb6f99b58064248b +Author: Dan Nicholson +Date: Sun Dec 14 14:18:58 2008 -0800 + + Don't reuse PKG_CHECK_MODULES identifiers + + Using GL for the PKG_CHECK_MODULES identifier multiple times means only + the first call will actually be used. Later calls will be skipped due to + GL_CFLAGS and GL_LIBS already being set. This changes DRI to using a + different identifier and DMX to just reusing GL_CFLAGS. + + Signed-off-by: Dan Nicholson + +commit ca46c01869768a8661a9d8a71493ed5f0760a8ab +Author: Jeremy Huddleston +Date: Fri Jan 16 13:58:20 2009 -0800 + + XQuartz: mieq: Wait for the server to finish initializing before letting other threads mieqEnqueue + + Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes + (cherry picked from commit 94e417ac87a98cd5c6bf2d7c495d702748398931) + +commit b33905234025f005819c7e2acd653a3a0ecfeb82 +Author: Peter Hutterer +Date: Fri Jan 9 14:32:14 2009 +1000 + + xfree86: always force RAW mode under linux. + + The previous check for AEI on left us with the possibility that AEI is forced + off in the config, but devices are added through evdev nonetheless. A keyboard + added this way can CTRL+C the server. Even when we use kbd, we can set the + mode to RAW, so it's safer alround to to so. + + Signed-off-by: Peter Hutterer + +commit 646add4eb47c01c045ef64405510a08ecfb5bfd6 +Author: Peter Hutterer +Date: Fri Jan 16 16:04:07 2009 +1000 + + dix: remove XineramaCheckMotion, merge into CheckMotion. + + For 5 lines difference, we don't need to duplicate the whole function. really. + +commit e76f904abe530df9ddaa09510088c545298b0b91 +Author: Peter Hutterer +Date: Fri Jan 16 15:53:50 2009 +1000 + + dix: remove "notyet" conditional compilation. + + If it's "notyet" for 3 years, then "yet" won't arive anytime soon. + +commit 5c41b3f9c8b72f0115019237f812d74610b82c24 +Author: George Staplin +Date: Mon Jan 12 19:30:43 2009 -0700 + + XQuartz: xpr: Cleanup some of the code and possibly fix part of the GLX Pixmap problem. + + Split DRICreateSurface into 3 functions. + + Make CreateSurfaceForPixmap use xp_configure_surface. I suspect this is partly why + GLXPixmaps never worked. + + It will require some more work and thoughts for pbuffers, unless we fake those with + pixmaps and surfaces. + (cherry picked from commit 9cf264e67744262b9f45079e6cd752eb3e3b0e08) + +commit c5d52d4c37ebec92cb668b0653bf3de2bdfc5782 +Author: George Staplin +Date: Mon Jan 12 14:14:44 2009 -0700 + + XQuartz: GL: Make indirect.c build and work in the 1.6 branch. + + Reorder some header files and provide some types earlier on. + + Remove the static __GLXextensionInfo __glDDXExtensionInfo; that isn't + used in 1.4 or 1.5, and seems to have been removed from 1.6. Remove + the data structures associated with that too. + + Remove __glXAquaDrawableResize. The GLX structure doesn't use + it anymore, and the Apple version did nothing useful before. + + __glXAquaDrawableSwapBuffers(): base no longer contains a drawGlxc + member. Now provide the the Apple/Aqua context in the __GLXAquaDrawable + struct. Add the context member to the __GLXAquaDrawable struct. + + Remove the fallback configs. They aren't used in 1.4 or 1.5 either. + + Remove init_visuals(). It's not used in 1.4 or 1.5 either. + + In the drawable constructor initialize the state properly, including + the new context member. + + Remove glAquaResetExtension() -- it's not used anymore. + + This has been tested remotely and proven to work with glxgears, + fire, various texture programs I wrote, and various Mesa demos. + (cherry picked from commit d514152195452ae11ec7769c76489651620ad380) + +commit 1c504dff8a84804888f18ee9b184f0c4584185d7 +Author: Jeremy Huddleston +Date: Thu Jan 15 21:03:27 2009 -0800 + + XQuartz: Fix builddir != srcdir issues and undef _XSERVER64 where appropriate on fat binary compilation + +commit 717a961528ec69a6e630d536e15568670e0b398a +Author: Thomas Jaeger +Date: Sat Dec 20 16:17:02 2008 +0100 + + Don't release grabs unless all buttons are up + + Previously, only buttons <= 5 would count here, but the core protocol + allows for 255 buttons. + + http://lists.freedesktop.org/archives/xorg/2009-January/042092.html + + Signed-off-by: Peter Hutterer + +commit f7f85f696570541e2dd43462675de9e6ee46f545 +Author: Thomas Jaeger +Date: Mon Dec 22 00:55:09 2008 +0100 + + Count the number of logically down buttons in buttonsDown + + This fixes the following bug. Assuming your window manager grabs + Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping, + then press the physical button 3 (this shouldn't have any effect), press + Alt and then button 1. The press event is delivered to the application + instead of firing the grab. + + Signed-off-by: Peter Hutterer + +commit 6f065a26db62aaf1d7aab9f9a3d0e6cd09d1c1dd +Author: Colin Harrison +Date: Thu Jan 15 21:42:26 2009 +0000 + + Xming: Reduce MOUSE_POLLING_INTERVAL + + Reduce MOUSE_POLLING_INTERVAL from 500ms to 50ms + + In -multiwindow mode, this determines how quickly X windows can track the mouse + when it is outside any X window... Move the cursor around an xeyes, and you will + see what this timing effects. + +commit c745db1674c3cb55249c9eb6e74939b74c42409c +Author: Jon TURNEY +Date: Mon Jan 5 13:52:45 2009 +0000 + + GLX: Avoid a crash when we have an uninitialized GL context + + If the GL dispatch table pointer points to glapi_noop_table, + (due to some kind of GL initialization failure), DoGetString(GL_VERSION) + (for example as invoked by glxinfo) will crash as it tries to + do atof() on the null pointer returned by the noop dispatch function + + Signed-off-by: Jon TURNEY + +commit e30032d0bbbf0bf71e1b53a4ac388f3bd6f68e53 +Author: Peter Hutterer +Date: Mon Dec 1 21:14:01 2008 +1000 + + Xext: clean up XGE macros. + + Signed-off-by: Peter Hutterer + +commit 1ae529bef50a8ccc4a8a264ed120aeae544b21e7 +Author: Peter Hutterer +Date: Wed Jan 14 14:56:10 2009 +1000 + + dix: replace manual check for event types with IsPointerEvent() + +commit 1d54479cb3c8b4f75b7564f8b5e1c5da940b20f4 +Author: Simon Thum +Date: Tue Nov 25 14:12:02 2008 +1000 + + xfree86: init properties when ptraccel configuration is found. + + Signed-off-by: Peter Hutterer + Signed-off-by: Simon Thum + +commit 19275ea8e9dd93d5e61906943706dfe49003dd9c +Author: Simon Thum +Date: Wed Nov 19 16:01:21 2008 +1000 + + dix: add property support for pointer acceleration. + + Note: properties don't need to be cleaned up, the DIX does it for us anyway. + Data that is stored in properties is cleaned up by the property system. + Handlers, etc. don't need to be unregistered while cleaning up, as they get + deleted when the device is removed anyway. + + Signed-off-by: Peter Hutterer + Signed-off-by: Simon Thum + +commit d645721170b1196e5064b397cfbffd1da8c79bb1 +Author: Peter Hutterer +Date: Thu Jan 8 11:53:30 2009 +1000 + + mi: ensure chained button mappings from SD -> MD (#19282) + + After copying the master event, flip the detail field to the mapped button of + the SD, not the physical button. This way if the SD has a mapping 1:3 and the + MD has a mapping of 3:4, a press on button 1 on the SD results in a core event + on button 4. + + X.Org Bug 19282 + + Signed-off-by: Peter Hutterer + +commit 639f289dcdbe00a516820f573c01a8339e120ed4 +Author: Michel Dänzer +Date: Tue Jan 13 13:05:32 2009 +0100 + + EXA: Declare glyph cache picture as component-alpha when necessary. + + Without this, rendering component-alpha glyphs may break without a mask. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=19233 . + +commit f4e00b783d3f824058a5f140e6462142688f5116 +Author: Michel Dänzer +Date: Tue Jan 13 11:03:27 2009 +0100 + + Fix build with --enable-visibility --disable-xdmcp. + +commit d36adf52a2b2711d22b11105f7bd907d4493fb9b +Author: Peter Hutterer +Date: Mon Jan 12 15:29:36 2009 +1000 + + dix: fix WarpPointer calls for devices with custom valuator ranges (#19297) + + If the MD's lastSlave was a devices with custom axes ranges, then a + WarpPointer would position the cursor at the wrong location. A WarpPointer + request provides screen coordinates and these coordinates were scaled to the + device range before warping. + + This patch consists of two parts: + 1) in the WarpPointer handling, get the lastSlave and post the event through + this device. + 2) assume that WarpPointer coordinates are always in screen coordinates and + scale them to device coordinates in GPE before continuing. Note that this + breaks device-coordinate based XWarpDevicePointer calls (for which the spec + isn't nailed down yet anyway) until a better solution is found. + + X.Org Bug 19297 + + Signed-off-by: Peter Hutterer + +commit 488d45295105daf10ccd17ca93ae6a6f4d0104f1 +Author: Peter Hutterer +Date: Mon Jan 12 16:16:24 2009 +1000 + + dix: EnqueueEvent and PlayReleasedEvent need to handle DeviceMotionNotifies + + No MotionNotify events in the processing anymore, so let's have them treat DMN + instead. + + Reported by Thomas Jaeger. + +commit 1e470645983ad18fa38c0885d674bc9d1dc1e560 +Author: Julien Cristau +Date: Tue Jan 13 00:12:56 2009 +0100 + + require randrproto 1.2.99.3 + +commit a48c81dcdf569a3f634ac23e08d2491354de6a36 +Author: Peter Hutterer +Date: Fri Dec 5 16:24:57 2008 +1000 + + Xi: add XATOM_FLOAT to server-defined properties. + + This property is used to denote type float for input properties. Such + properties can be accessed easily through the XIPropToFloat() function. + + Code originally written by Simon Thum. + + Signed-off-by: Peter Hutterer + +commit 669f6810af9a89187d6149841925fe765f3988ff +Author: Peter Hutterer +Date: Wed Nov 19 15:50:57 2008 +1000 + + Xi: add XIPropToInt() auxiliary function. + + Converts an XIPropertyValuePtr to an integer, provided that type and format is + right. + + Code originally written by Simon Thum. + + Signed-off-by: Peter Hutterer + +commit 56efbc0986e782da45addb05ece9f456d41d7a90 +Author: Peter Hutterer +Date: Fri Jan 9 13:46:20 2009 +1000 + + dix: drop x/y back into last.valuators before updating the history (#19285) + + positionSprite needs to scale to screen coordinates and in the process of + doing so alters dev->last.valuators[0:1]. Drop the real coordinates back after + finishing and before updating the motion history. This way, we don't push the + screen coordinates into the motion history. + + X.Org Bug 19285 + +commit 67710ad1d172cc4d53e28e5cc7dab2efb57a9a85 +Author: Jeremy Huddleston +Date: Sun Jan 11 16:34:36 2009 -0800 + + XQuartz: Don't need explicit Activate/EnableDevice in InitInput + (cherry picked from commit b1d29784410b3b93037e5636f336ba608d8ad6e3) + +commit dde5c591be74139ec6f2a90a3fdc7904d7342554 +Author: Jeremy Huddleston +Date: Sun Jan 11 16:10:45 2009 -0800 + + mieq: Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes + + This is more of a hack around the problem. This is something that will need to be addressed in a + more structured manner with the multi threaded input efforts. + (cherry picked from commit 3c596c061e75848cfa76dd9259c23a3f3a67444c) + +commit 0720816aea20971ee94b5df3faa9cb9f16e93f82 +Author: Jeremy Huddleston +Date: Sun Jan 11 14:49:39 2009 -0800 + + XQuartz: Only call DarwinUpdateModKeys when needed + + Previously, we were calling it on almost every itteration through sendX11Event + (cherry picked from commit 6461729647ff4441d80811e73f0c0d2f108f2700) + +commit c8bf582db8111f71b9250a602a9d5aa7bd828136 +Author: Jeremy Huddleston +Date: Thu Oct 23 11:41:22 2008 -0700 + + XQuartz: Comment explaining the 0x10 flag for [e data2] + (cherry picked from commit 3c695280641c1205b97d3bb9f1d5e15a19cfa45f) + +commit 5339c22a8ca8bce6cd2b51e97c904292e7c40e74 +Author: Jeremy Huddleston +Date: Sun Jan 11 01:56:45 2009 -0800 + + XQuartz: Add locking to make mieq thread safe on OSX + (cherry picked from commit 7a8d2266861e74176b5310b83652a9c10a170494) + +commit 1beff89810cd193e45d437846929b3938cee6d96 +Author: Jeremy Huddleston +Date: Sun Jan 11 01:55:26 2009 -0800 + + XQuartz: misc 1.6 updates (still --disable-glx) + rlAccel is not longer compatable, and it's not worth fixing + Don't override DeviceCursorInitialize with a noop + Don't do a SwitchCoreKeyboard (which wasn't even needed in the first place) + (cherry picked from commit c137f681680e1d04b1513a8be68aeda4d1c56fd5) + +commit 2d917cfe56af1e74205f80ddbaddfb5c6ce82f0a +Author: Jeremy Huddleston +Date: Sat Jan 10 01:39:08 2009 -0800 + + Apple: Don't use DRI2 + (cherry picked from commit a1d35cee5907a76977ee43c49cb55c8f411c9794) + +commit 7a8abb9c8554d7967d912dcd427804f65906dc5c +Author: Jeremy Huddleston +Date: Tue Jan 6 15:32:44 2009 -0800 + + XQuartz: Bundle version 2.4.0 + (cherry picked from commit 3a3ccf5354e4275abe9d01f41a92602df5d690dc) + +commit 63ff7d236f67e159943312e1a551fcf5bb3f463a +Author: Julien Cristau +Date: Sun Jan 11 08:45:24 2009 +0100 + + os: don't mix declarations and code + +commit f43a3c61ab1eab8aecdc0e4bdee9f3bae2cab234 +Author: Julien Cristau +Date: Sun Jan 11 08:44:53 2009 +0100 + + os: backtrace() returns int, not size_t + +commit 5321ae76cffc5fcfe4bebcfb10e08eecaf640503 +Author: Julien Cristau +Date: Sun Jan 11 08:44:29 2009 +0100 + + os: ANSI cleanups + +commit 47438a2161a92fec08081d2de28966cf8d31654a +Author: Julien Cristau +Date: Sun Jan 11 08:43:48 2009 +0100 + + randr: RRSetPrimaryOutput can be static + +commit 7f82114b1dc738f98b9f22f6e61d6d5191383b67 +Author: Julien Cristau +Date: Sun Jan 11 08:43:35 2009 +0100 + + xkb: ANSI cleanup + +commit 46f3c1b937002f9a860878b359dcf5756a82dcf2 +Author: Julien Cristau +Date: Sun Jan 11 08:42:57 2009 +0100 + + mi: don't mix declarations and code + +commit 5aa9483d3ee306a79a9235610ce6b2754d697585 +Author: Julien Cristau +Date: Sun Jan 11 08:42:28 2009 +0100 + + mi: ANSI cleanups + +commit 359ed32c9b013ed88e14c99aa7fd7a617a85e2c5 +Author: Julien Cristau +Date: Sun Jan 11 08:40:58 2009 +0100 + + xnest: only define ddxBeforeReset if needed + +commit 9651cd8d7ac26635b6fb1826806ac9f4e2bddb63 +Author: Julien Cristau +Date: Sun Jan 11 08:40:47 2009 +0100 + + xnest: ANSI cleanups + +commit 31439195c51f183f5a8989a8d4f95b3e6326eda0 +Author: Julien Cristau +Date: Sun Jan 11 08:37:06 2009 +0100 + + xfree86: linuxPci.c needs a prototype for xf86AccResFromOS + +commit a00dbd0015845e08ef2af9480cc3833819cf86f5 +Author: Julien Cristau +Date: Sun Jan 11 08:36:16 2009 +0100 + + xfree86: use %zu to format size_t arguments + +commit 17c8cb50990a9ad20bbd3f8ce14c149dac9d72ad +Author: Julien Cristau +Date: Sun Jan 11 08:34:56 2009 +0100 + + xfree86: don't mix declarations and code + +commit aec4c0caca41a06832536ba82ba5bcdccf4a0aea +Author: Julien Cristau +Date: Sun Jan 11 08:33:18 2009 +0100 + + xfree86: ANSI cleanups + +commit dba3b1944d04232f88bb310277639f2c1adcbe08 +Author: Julien Cristau +Date: Sun Jan 11 08:28:23 2009 +0100 + + Xvfb: ANSI cleanups + +commit a2a760e33c17e211650b1f53c05a89c013916cf3 +Author: Julien Cristau +Date: Sun Jan 11 08:25:39 2009 +0100 + + dix: don't mix declarations and code + +commit 466dddbb83aa37ae93fb32976d51ecaa947c3616 +Author: Julien Cristau +Date: Sun Jan 11 08:25:17 2009 +0100 + + dix: fix cast from pointer to integer + +commit 54332e4732577dc49e440d9c9f8dd7d791f03f8e +Author: Julien Cristau +Date: Sun Jan 11 08:20:06 2009 +0100 + + dix: ANSI cleanups + +commit ef9902652b8a1c716ea3851565d6e2a98bd30eb0 +Author: Julien Cristau +Date: Sun Jan 11 08:18:56 2009 +0100 + + config: ANSI cleanups + +commit e64473b14e091e4b75e6ac2bf9a35e9aaa907258 +Author: Julien Cristau +Date: Sun Jan 11 08:17:41 2009 +0100 + + Xi: fix missing declaration of XkbSetRulesDflts + +commit 6e20a4ae731b7bc72266e5809faa0ecfde2bdfe4 +Author: Julien Cristau +Date: Sun Jan 11 08:16:55 2009 +0100 + + xsync: make SyncAlarmCounterDestroyed static + +commit 292311b421e53ead53c7df67d735a3d6d3e5b515 +Author: Julien Cristau +Date: Sun Jan 11 08:16:12 2009 +0100 + + Xext: ANSI cleanups + +commit 7a05c8b1e70680ddd3b3e09ad448788f8d70a428 +Author: Julien Cristau +Date: Tue Dec 23 13:08:49 2008 +0100 + + xfree86/linux: fix log flood on acpid open error + + When we can't open the acpid socket, warn once, not once every second + +commit 0d8184de591c75794083c8a8ca3fb8459e9394bc +Author: George Staplin +Date: Fri Jan 9 16:08:26 2009 -0700 + + XQuartz: GL: Set the __GLXconfig renderType to GLX_RGBA_BIT. + (cherry picked from commit 3c14546f58f8a138fe67c9cacc3bd0b7fa90c29a) + +commit 9c3975d63e129ad7230cae585f08a962d45fb861 +Author: George Staplin +Date: Fri Jan 9 15:53:39 2009 -0700 + + XQuartz: GL: Make many more fbconfigs and visuals available for the 1.5 branch. + + Use a __GLXconfig linked list struct to store the configurations for the + fbconfigs and visuals in a pGlxScreen. + + Also, remove the __GLXvisualConfig/GlxSetVisualConfigs code that isn't used + anymore. There is more code we can remove later, but I want to do that in + separate commits. + (cherry picked from commit 94162b0f8a25267aca280d25e216cc6bde47da6e) + +commit a68373994f4957a73f4eab52c90ebcfb96f285f8 +Author: Jeremy Huddleston +Date: Wed Jan 7 18:27:21 2009 -0800 + + XQuartz: Update padding in appledristr. This shouldn't change how the struct ends up in memory, but should make it more obvious for human eyes + (cherry picked from commit f7b6c1907c326a1befd8b5c8a1d311d551e8670f) + +commit 5f3188228eb988bd8f08b62c84f98a8ff66ee283 +Author: Xiang, Haihao +Date: Tue Jan 6 10:03:19 2009 +0800 + + avoid a potential endless loop. + + Previously it is possible that creating rotation data, then cleaning + up and creating again so that pScreen->BlockHandler and + xf86_config->BlockHandler all point to xf86RotateBlockHandler. + See bug #19343. + +commit b2756a71a432f7cf7c870a48676c98625512558d +Author: Thomas Jaeger +Date: Fri Jan 9 02:02:38 2009 -0500 + + Xext: Send out correct events in ProcXTestFakeInput + + Signed-off-by: Peter Hutterer + +commit 9bf77569cc8f9b0cc25c99487672d375d7c32f99 +Author: Peter Hutterer +Date: Thu Jan 8 16:32:24 2009 +1000 + + Xi: call CheckMotion for floating SDs too. + + CheckMotion updates the sprite position so we need to call it for all devices + that have a sprite - including floating SDs (which have an invisible sprite). + +commit 83eb863e3cfcd62549b836f3195107d8908b36d0 +Author: Peter Hutterer +Date: Fri Jan 9 11:39:02 2009 +1000 + + Xext: don't accept DeviceValuator if the dev doesn't have valuators (in xtest) + + Reported by Chris Ball. + +commit a3f9e887d9ff5fdee6c35ccc0f7b324723a83a46 +Author: Peter Hutterer +Date: Fri Jan 9 11:40:18 2009 +1000 + + dix: don't accept Button 0 presses in GPE. + +commit 0c6987df3b9b3a37d201d740d8248c326449835e +Author: Adam Jackson +Date: Tue Jun 17 16:10:51 2008 -0400 + + XAA: Disable offscreen pixmaps by default. + + Say Option "XaaOffscreenPixmaps" to turn them back on. + + Apropos of bugs #13795 and #15098. But this still isn't correct. + +commit eb2d7b3d700952ba88c77deacf687b251300e660 +Author: Peter Hutterer +Date: Fri Dec 19 21:05:47 2008 +1000 + + dix: move focus handling into enterleave.c. + + This commit moves the focus handling from events.c into enterleave.c and + implements a model similar to the core enter/leave model. + For a full description of the model, see: + http://lists.freedesktop.org/archives/xorg/2008-December/041740.html + + This commit also gets rid of the focusinout array in the WindowRec, ditching + it in favour of a local array that keeps the current focus window for each + device. + + Signed-off-by: Peter Hutterer + +commit 673eb23aac578dcdc04e2a99d1fa5c2987eb58b8 +Author: Peter Hutterer +Date: Fri Dec 19 21:05:09 2008 +1000 + + dix: add a few auxiliary functions for the updated focus model. + + SetFocusIn and SetFocusOut, including the static array to keep all focus + windows. + + Signed-off-by: Peter Hutterer + +commit 38b28dcadd0990cb43f50db4300eebb8f044db96 +Author: Peter Hutterer +Date: Thu Dec 18 15:55:11 2008 +1000 + + dix: reduce FirstPointerChild complexity + + Instead of keeping a flag on each window for the devices that are in this + window, keep a local array that holds the current pointer window for each + device. Benefit: searching for the first descendant of a pointer is a simple + run through the array. + + Signed-off-by: Peter Hutterer + +commit 72ad4a85cc0ffe60a90011d65ef718d5852beae4 +Author: Peter Hutterer +Date: Thu Dec 18 15:43:18 2008 +1000 + + dix: remove now unused "exclude" parameter from FirstPointerChild + + Signed-off-by: Peter Hutterer + +commit 0aa4460c3b4f9bb17d5412d76fa8c4c501132429 +Author: Peter Hutterer +Date: Wed Dec 17 16:14:41 2008 +1000 + + dix: re-implement enter/leave model. + + The old model was implemented based on a misunderstanding of NotifyVirtual and + NotifyNonlinearVirtual events. It became complicated and was broken in some + places [1]. This patch wipes this model completely. + + A much simplified implementation is provided instead. Rather than a top-down + approach ("we have a tree of windows, which ones need to get which event") + this one uses a step-by-step approach. For each window W between A and B + determine the pointer window P as perceived by this window and determine the + event type based on this information. This is in-line with the model described + by Owen Taylor [2]. + + [1] http://lists.freedesktop.org/archives/xorg/2008-December/041559.html + [2] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html + +commit f8ecc2f08fc375b14d60a74e2fdd7830bfdcd74f +Author: Christian Beier +Date: Tue Jan 6 11:31:03 2009 +1000 + + Xi: fix typo in WarpDevicePointer handling. + + Signed-off-by: Peter Hutterer + +commit 3d549438c29004d78032ecc50ab45ca0e3f49623 +Author: Thomas Jaeger +Date: Mon Jan 5 01:26:42 2009 -0500 + + Don't alter device button maps in DoSetPointerMapping + + Currently, if a device map differs from the core pointer map, then the + request may return MappingBusy, even though all the affected core + buttons are in the up state. + + Signed-off-by: Peter Hutterer + +commit b72c6b083baeadfd7b18b6025df054be502d6e28 +Author: Peter Hutterer +Date: Tue Jan 6 09:01:48 2009 +1000 + + dix: remove inputInfo.keyboard reference in QueryPointer handling. + + PickKeyboard() is to be used instead. + +commit 30d2cfcd3851870178d62e5067211aa36f87fbd2 +Author: Kim Woelders +Date: Mon Jan 5 19:35:18 2009 +0100 + + dix: Fix handling of do_not_propagate_mask window attribute. + + This was broken in 32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2. + + Signed-off-by: Kim Woelders + Signed-off-by: Peter Hutterer + +commit 515ce3e4ba42605a1ee9979e8bb5acd3cf6470a3 +Author: Peter Hutterer +Date: Mon Jan 5 15:48:45 2009 +1000 + + xkb: fix typo - missing negation when checking button state. + + Introduced with a85f0d6b98237d8a196de624207acf1983a1859a. + + Reported by Thomas Jaeger. + + Signed-off-by: Peter Hutterer + +commit 9a313fb03153eb764aab3e9cb9988b6603541637 +Author: Paulo Cesar Pereira de Andrade +Date: Wed Jan 7 23:07:01 2009 -0200 + + Don't call free, use xfree macro. + + There are several other direct calls to free, check + % egrep '\ +Date: Wed Jan 7 19:37:03 2009 -0200 + + Default to use standard bitmap fonts, with builtins as fallback + + The builtin-fonts configure option was removed, as it at best should + have been a runtime option. Instead, now it always register all "font + path element" backends, and adds built-ins fonts at the end of the + default font path. + This should be a more reasonable solution, to "correct" the most + common Xorg FAQ (could not open default font 'fixed'), and also don't + break by default applications that use only the standard/historical + X Font rendering. + +commit 4f004231871c830e16c4525cfaab183fad0aee86 +Author: Jeremy Huddleston +Date: Wed Jan 7 10:55:08 2009 -0800 + + XQuartz: Fat binary buildfixes + + Let Xarch.h set X_BYTE_ORDER for us. + Determine _XSERVER64 at build time. + (cherry picked from commit f54736c2b0b537c8322ecb2db8e9cee5eea68165) + +commit fbf44d85bd59bfa629193d6494b16812a7343cab +Author: Jon TURNEY +Date: Mon Jan 5 23:18:11 2009 +0000 + + Cygwin/X: Tidy up an unused #define + + Signed-off-by: Jon TURNEY + +commit 1badeb78b0b974a381e563e3d4f4cf37debd4266 +Author: Rémi Cardona +Date: Wed Jan 7 09:31:17 2009 -0500 + + Include Xmd.h from edid.h + +commit fc14d52297f8f408693ed867ab649ea5b210b0b3 +Author: Jeremy Huddleston +Date: Sun Nov 16 15:35:17 2008 -0800 + + XQuartz: Use AvailabilityMacros.h instead of availability.h for Tiger + (cherry picked from commit 91f3c3435716195e6d606c8e2f6b0de52eb5972d) + +commit 4c326c4d342bede0de57e71c1431f56188f812ce +Author: Keith Packard +Date: Tue Jan 6 08:36:39 2009 -0800 + + Make cvt complain about invalid arguments more often. + + cvt doesn't correctly parse 'cvt -vr 1920 1080'. This patch doesn't fix + that, but it does at least generate an error message now. + + Signed-off-by: Keith Packard + +commit 1da4a41b0881b605c7cfa4c4bf637efa132c58fc +Author: Paulo Cesar Pereira de Andrade +Date: Tue Jan 6 05:01:32 2009 -0200 + + Add sdksyms.sh to EXTRA_DIST to correct make distcheck + + Thanks to for noticing the problem. + +commit 200230535fa80c04faaa562bbbd8272713e2763b +Author: Paulo Cesar Pereira de Andrade +Date: Mon Jan 5 16:49:57 2009 -0200 + + Update sdk headers to export new symbols. + + All symbols in installed sdk headers should be explicitly tagged + as exported symbols. Otherwise, to ensure it is not a mistake, one + could write it as something like: + extern /* NOEXPORT */ type name ...; + but the proper procedure really should be to use a non sdk header + (or a "noinst_" one). + This patch also removes prototypes to some functions that existed + only temporarily. + +commit af6152499654a7146250d4ad0df89f611345434e +Author: Jon TURNEY +Date: Wed Dec 17 14:15:34 2008 +0000 + + Cygwin/X: Add *.exe pattern to .gitignore + + Signed-off-by: Jon TURNEY + +commit 8428b92fcb478b041f778c0e8c66fdeb96c807f3 +Author: Colin Harrison +Date: Sun Jan 4 20:12:16 2009 +0000 + + Xming: Fix a couple of warnings + + Signed-off-by: Jon TURNEY + +commit f6f97419bd2db651384ecaec0b296840810463a4 +Author: Jon TURNEY +Date: Mon Jan 5 18:35:52 2009 +0000 + + Cygwin/X: Add -static back to linker flags + + Add -static back to linker flags to avoid screwing things up for + people who don't know that they need to avoid dynamically linking + with libXfont, as weak symbol handling requires static linking to + work correctly on Cygwin... + +commit 2ec0ac08addb938a3d5aa5b9888ce7c79a0daada +Author: Jon TURNEY +Date: Wed Dec 17 19:18:38 2008 +0000 + + Cygwin/X: Fix some remaining build issues + + Fixes for a few remaining build issues, omitted from commmit 6e85a8304b50c0bfd16a400a05d257f0168fb99b in error + + Provide VENDOR_RELEASE in XORG_VERSION_CURRENT for XWin + Remove -static from linker flags for XWin + + Signed-off-by: Jon TURNEY + +commit e351d10773742d1570e1111976b7c8b6adda5ae6 +Author: Daniel Stone +Date: Mon Jan 5 17:41:38 2009 +0200 + + RandR: Only export Xinerama symbols when building Xinerama support + + Otherwise compilation fails due to sdksyms. + + Signed-off-by: Daniel Stone + +commit 3387cbb7c13636eb62b22640d28df7011c2268f0 +Author: Daniel Stone +Date: Mon Jan 5 11:25:57 2009 +0200 + + XFree86: Xv: Add ClipNotify helper + + Add a ClipNotify helper that lets the driver know about changes in the + clipping of an Xv backing drawable. + + Signed-off-by: Daniel Stone + +commit 55c4ec0a1ef78481b4d82153c19c20fbf88f1624 +Author: Daniel Stone +Date: Mon Jan 5 11:24:24 2009 +0200 + + XFree86: fbdevhw: Add helper function to get fd + + Most devices need to do custom weird ioctls, so let them know what the + fd is. + + Signed-off-by: Daniel Stone + +commit 7da4e901e078e5597b8dbcb7ee39b949edf7ef03 +Author: Daniel Stone +Date: Mon Jan 5 11:23:39 2009 +0200 + + XFree86: Fix build with DGA disabled + + It's optional, so we might as well work when it's disabled. + + Signed-off-by: Daniel Stone + +commit 13ce7b98d48261b061da5768a6405bdbe9caa1fb +Author: Dan Nicholson +Date: Mon Dec 22 14:31:03 2008 -0800 + + dmx: Require newer libXi for XQueryInputVersion + + Signed-off-by: Dan Nicholson + Signed-off-by: Peter Hutterer + +commit 27011254c4de4e573a0851bf46892fb488db6522 +Author: Peter Hutterer +Date: Tue Dec 23 09:59:28 2008 +1000 + + xfree86: If an input device failed to activate, return immediately. + + Devices are only activated once - right after they've been added to the + server. If a device failes activation, it's dead. There's no reason to + continue. Return the error code from ActivateDevice() without setting up + sprite information or even sending a event to the client. + + Then - in the DDX - just remove the device again. + + Signed-off-by: Peter Hutterer + +commit e1a3a1a0d85c9971aea65c2228b5fd4dbf3bf57a +Author: Peter Hutterer +Date: Tue Dec 23 10:00:34 2008 +1000 + + xfree86: don't call CheckMotion if a device hasn't been enabled. #19176 + + X.Org Bug + +commit af820259a06a6e8dbd299fe22347aa83b0c985b0 +Author: Jeremy Huddleston +Date: Fri Jan 2 11:06:12 2009 -0800 + + XQuartz: Copyright Update... happy new year + (cherry picked from commit 9f1c26ae8d9ccf81cba0ab946326968a701f8c36) + +commit d8c9ba37abd0d63ea2c5394af434b46ec3b647fd +Author: Jeremy Huddleston +Date: Fri Jan 2 10:58:40 2009 -0800 + + XQuartz: pbproxy: Push dpy init and CFRunLoop hook setup into the pbproxy thread to avoid possible deadlock + (cherry picked from commit 49e59d32b88e4fad070f230b5efaa261b47f78db) + +commit 2f361186f93a791e446c4a9471bb0c3b9b818d98 +Author: Jeremy Huddleston +Date: Wed Dec 31 12:40:02 2008 -0800 + + XQuartz: Don't use NX_SECONDARYFNMASK, NX_NUMERICPADMASK, NX_HELPMASK + + We don't have keycodes for them, so don't try to use them + (cherry picked from commit cb912aca3a2834c4ad8e386c8a0d05c1bb31b0e7) + +commit a2abaa9fd3a5ad713c1f946e9d7f598825ad3a84 +Author: Jeremy Huddleston +Date: Wed Dec 31 11:57:49 2008 -0800 + + XQuartz: Make sure to reset the saved key state when deactivating X11.app + (cherry picked from commit 3eef78eb321f4f7dbca5a10c80666c621e28a1e0) + +commit 3986b683adc4f6f967cc5f643e973d89764234c7 +Author: Jeremy Huddleston +Date: Wed Dec 31 12:44:43 2008 -0800 + + XQuartz: Honor system key repeat rate + (cherry picked from commit 4303c9be39a86f5a21de108f72b90a989435905e) + +commit 1a69d56afda082298edc76271d2cb71af00526ce +Author: Jeremy Huddleston +Date: Mon Dec 29 19:54:12 2008 -0800 + + XQuartz: Better avoid stuck keys on context switches + (cherry picked from commit e9963f1a4f4f12f253eae9d4f01694b6cabe35ad) + +commit f464b5a9164b24f74adea198bcabe9affaf5552c +Author: Jeremy Huddleston +Date: Mon Dec 29 19:38:31 2008 -0800 + + XQuartz: Workaround OSX VNC server bug for modifier key state + + A better approach which ensures we have a L modifier key down if we are told neither are down and atleast one is down... =/ + (cherry picked from commit bc13dda345f716bf4de9bfe4e1d85969263b60c2) + +commit 3ead9aa2602cab9c883aa7bcbd2a8d82c5c88f5a +Author: Jeremy Huddleston +Date: Mon Dec 29 00:30:31 2008 -0800 + + XQuartz: Updated man page fullscreen_hotkeys fullscreen_menu + (cherry picked from commit 00f3a2e33c8e91da5f855821313a04ea97445656) + +commit 48dbaf173a82693fd72953983da9fc556cd1c6ed +Author: Daniel Stone +Date: Tue Dec 30 12:17:14 2008 +1100 + + XKB: Also copy keyboard feedback when copying the keymap + + When updating the XKB keymap, make sure the keyboard feedback is also + copied, to preserve autorepeat settings etc. + + Signed-off-by: Daniel Stone + +commit cf85a32b5f80694f3c2f434e91cf77edb33a7c17 +Author: Jeremy Huddleston +Date: Sun Dec 28 15:57:59 2008 -0800 + + XQuartz: pbproxy: We explicitly need libX11 for pbproxy + (cherry picked from commit 32824120da0749b8369c2592f851bb1030dea9f1) + +commit 997e8c321bb11067591785ba38103a3a5029301d +Author: Jeremy Huddleston +Date: Sun Dec 28 01:53:38 2008 -0800 + + XQuartz: Try harder to get the user's login environment + (cherry picked from commit 6bedaddd78aa04bd303df434a4c49bb87bd7deaa) + +commit ae8dc47fd910ec4b9edd64bf3b7ba33e212c5942 +Author: Jeremy Huddleston +Date: Wed Dec 24 00:39:06 2008 -0800 + + XQuartz: Reposition windows when we enter fullscreen to ensure our root window + (cherry picked from commit 7617d3659b5481ef85aecc1f936e7dd2662bdfbd) + +commit 895186e026881196ac9383aa165e123055d9cf09 +Author: Jeremy Huddleston +Date: Tue Dec 23 20:33:27 2008 -0800 + + XQuartz: Re-enable rlAccel + + It was incorrectly blamed for some crashes a few months ago, and it should be + safe to use until we get an EXA driver to replace it. + (cherry picked from commit 8121f30bd29591fc74fbc680fbbf20210271fa58) + +commit dc4498ec5cb7f25f710bdec8793746da2d2324ed +Author: Jeremy Huddleston +Date: Sun Dec 28 22:16:52 2008 -0800 + + Updated .gitignore + (cherry picked from commit 06964c322e4da81f3146022049a2de13f6b2892d) + +commit 3534a5e5d9c5af85149c799f324257f89507fa23 +Author: Maarten Maathuis +Date: Fri Dec 26 16:38:27 2008 +0100 + + exa: Allow drivers to set non-NULL devPrivate.ptr for !offscreen pixmaps. + +commit 027b440d4f9f0cdd46addff46fd2d5c44cd5c847 +Author: Maarten Maathuis +Date: Fri Dec 26 15:51:55 2008 +0100 + + exa: preparing as source and finishing access as mask is a bad idea + +commit 89bbd07e9ddd688df81405151f9c6284fa3367a8 +Author: Alan Coopersmith +Date: Tue Dec 23 21:40:21 2008 -0800 + + Remove obsolete XF86_DATE & xf86Date.h + +commit 8dc3a7d6817b7371bbfece1108ef856788256853 +Author: Alan Coopersmith +Date: Tue Dec 23 14:59:46 2008 -0800 + + Remove unused CLOG_DATE (leftover from pre-git ChangeLog) + +commit fe05a46f191ebd36251dda7a9703d90c25efec11 +Author: Alan Coopersmith +Date: Tue Dec 23 14:55:26 2008 -0800 + + Remove powerpc load/store functions from export list on other platforms + +commit a1b201bcb01e702f8f0a5889a3d49317503b9475 +Author: Jeremy Huddleston +Date: Tue Dec 23 12:39:38 2008 -0800 + + XQuartz: Use depth=24 instead of FatalError if we can't figure out our depth + (cherry picked from commit 80b65c5b78d125c4ad3620b87b121c9e666299c3) + +commit 86dc660588a615baefb1799d78a501c95a931d77 +Author: Paulo Cesar Pereira de Andrade +Date: Tue Dec 23 18:07:54 2008 -0200 + + Improve sdksyms.c automatic generation (Fix #19245). + + Since it is already parsing cpp output, create a dependency file + in the same process. This will cause sdksyms.c to be regenerated + whenever a sdk header is modified. + This also uses the gmake 'sinclude' directive (don't fail if + included file doesn't exist). This should not cause any problems + given that gmake only constructs are used in several other Makefiles. + +commit 477c32708718f4470ac2e786b2446d7a44e45b9c +Author: Peter Hutterer +Date: Fri Dec 19 08:56:35 2008 +1000 + + dix: don't disable uninitialized devices. + + If a device hasn't been initialized, it doesn't have a cursor yet. So don't + set the cursor to the NullCursor, and don't try to DisableDevice either. + + Signed-off-by: Peter Hutterer + +commit 25aac8b5793caa92116b766d5a9e12dbecdb0290 +Author: Peter Hutterer +Date: Tue Dec 2 16:16:58 2008 +1000 + + xkb: don't treat groups with different no of symbols as identical. + + Signed-off-by: Peter Hutterer + +commit f141c1b4bb9482f188783dd6f161d3c7960a3329 +Author: Peter Hutterer +Date: Tue Dec 2 14:54:50 2008 +1000 + + xkb: explicitly check for group replication in the core representation. + + Single-group keys may get replicated amongst all groups. Check explicitly for + this case and squash it down to one group. + + Signed-off-by: Peter Hutterer + +commit 70a977c021e107c4fabe46ec2f619be9fb55abeb +Author: Peter Hutterer +Date: Tue Dec 2 15:36:51 2008 +1000 + + xkb: don't replicate past the number of groups we have. + + Signed-off-by: Peter Hutterer + +commit a157575eeeb523cd43197c5caeb00cb3d56f9988 +Author: Peter Hutterer +Date: Tue Dec 2 13:31:58 2008 +1000 + + xkb: ensure enough symbols for core Group1 replication. + + A single-group key on a multi-group keyboard has to be replicated across all + three groups (see Section 12.4 of the XKB protocol spec). Ensure that there's + enough symbols available to actually do that. + + e.g. a key ABCD on a 3 group keyboard needs to be replicated as ABABCDCDABCD, + hence requiring space for 12 symbols, even if maxSymsPerKey is less than that. + + Signed-off-by: Peter Hutterer + +commit b5736d237a21d5e65d839c4d213dd3bda5a11e9d +Author: Maarten Maathuis +Date: Mon Dec 22 19:53:14 2008 +0100 + + randr/xfree86: Fix initial gamma computation. + + - The previous version overflowed sometimes. + +commit ba9dc353a60e9a6bba64e854b23271011bff7015 +Author: Jeremy Huddleston +Date: Sun Dec 21 21:03:59 2008 -0800 + + XQuartz: Don't use keycode 0 to determine !swallow since our most common key to swallow is actual keycode 0 (a) + (cherry picked from commit 33f43a7f03023bfbab25a957cb81fc25b4afa4ca) + +commit f0cdccd1e22198f4f5e1aa0d0617441b79ffbc44 +Author: Jeremy Huddleston +Date: Sun Dec 21 20:40:36 2008 -0800 + + XQuartz: Update our "screens" when we toggle rootless rather than when we toggle fullscreen + + This old behavior was used as a workaround for the menubar behavior in the older server, + but we handle it better now and need to update our screens when we toggle the rootless + state instead. + (cherry picked from commit 508aa95bc2cd3fdc3dff448ec090919bf807d153) + +commit 8f04a5237384fa97ff960b4607a79b688ea03fc1 +Author: Jeremy Huddleston +Date: Sun Dec 21 14:54:11 2008 -0800 + + XQuartz: Run applications via '/bin/sh -c ...' to support users who expect shell parsing + (cherry picked from commit 67455e716e3ecffd528930479192785958d37988) + +commit 029d255a654eca6401c374d145f63bbb923554b5 +Author: Jeremy Huddleston +Date: Sun Dec 21 14:43:12 2008 -0800 + + XQuartz: pbproxy: Release display notification lock when not needed to avoid deadlock + (cherry picked from commit 22f664ab95a0cae981e9cefad6f075d051583ca5) + +commit b1f166f2981595aea6f8e2a336d6d25436f8a07d +Author: Jeremy Huddleston +Date: Sun Dec 21 14:42:26 2008 -0800 + + XQuartz: update quoting in case X11.app is moved to a directory with a space. + (cherry picked from commit cc805dc799efa37c8dcefa3db04d87e9b835ffbd) + +commit 2f47bda645eb43c60b71315e8d265190acce481d Author: Jeremy Huddleston Date: Thu Dec 18 09:14:16 2008 -0800 - XQuartz: Changed X11.sh to allow use of a ~/.x11run as requested by users of alternate shells - (cherry picked from commit b62ed1f8eaf041a946bb591165bb18ee481dedbf) - (cherry picked from commit c3812aec973b7341a600e5d2d07d5a7f15abd609) + XQuartz: Changed X11.sh to allow use of a ~/.x11run as requested by users of alternate shells + (cherry picked from commit b62ed1f8eaf041a946bb591165bb18ee481dedbf) + +commit 83edcc08de4c815c5cbe815f521b3b728441cad6 +Author: Jeremy Huddleston +Date: Wed Dec 17 15:09:35 2008 -0800 + + XQuartz: Get rid of white rectangle bug + (cherry picked from commit 3269959033ed0c675a3a906666454df34086896a) + +commit 1335a300b9cd03208a583acfdb7f7153eaef4ea6 +Author: Jeremy Huddleston +Date: Wed Dec 17 14:43:02 2008 -0800 + + rootless: Make expose_1 static + (cherry picked from commit 60c8d2697036a125ca5381df8e2eaedabad4d242) + +commit 22b2811e6aa0bdbfa6a0682ac862063e52ec0c62 +Author: Jeremy Huddleston +Date: Wed Dec 17 13:54:53 2008 -0800 + + XQuartz: Name the startup shell script X11 for better compatability + (cherry picked from commit f84613d6fcbbb5f769ee34cff0900353a13693cf) + +commit 82fba7697fbbb6f66cc22424ba99755b99ff482e +Author: Maarten Maathuis +Date: Mon Dec 22 00:33:55 2008 +0100 + + xfree86/randr: Avoid a crash when xf86CrtcConfigPrivateIndex is -1. + +commit 1567b7243f4799808ab93fbd962df14ce3af2d49 +Author: Maarten Maathuis +Date: Sun Dec 21 00:08:56 2008 +0100 + + exa: A more correct fix. + +commit 2db7b66863ae6055c3ce13c88b36d620de8a4d75 +Author: Maarten Maathuis +Date: Fri Dec 19 23:12:37 2008 +0100 + + exa: a few cleanups + + - Some warnings silenced. + - Some whitespace cleanup. + +commit aedd2f566df585db7a1614f302cc8d3feda54275 +Author: Maarten Maathuis +Date: Fri Dec 19 19:10:23 2008 +0100 + + randr/xfree86: Fix a one off error in the panning calculations. + + - Example: mode 1280x1024, panned area 1281x1024 + panned_area.x2 = 1281 + mode.width = 1280 + If you substract 1280 from 1281, then that leaves you with one. + Which is the one pixel that you need to move to actually see the last pixel collumn. + Substracting 1 from this will consistently prevent you from seeing the right and bottom edge. + +commit 332d65ec7a6e94d75efe95d53742f137835274de +Author: Maarten Maathuis +Date: Fri Dec 19 18:59:27 2008 +0100 + + randr: Consider panned crtc's when calculating xinerama screen sizes. + + - This will allow window managers and applications to actually use the panned area. + +commit f2d1de6c2a3e6e50db6d9714c293eb26324fbd3d +Author: Adam Jackson +Date: Fri Dec 19 10:27:37 2008 -0500 + + xv: remove useless XVCALL macro + +commit 5a072c55350f4b73d911ea6a2aeddad844924834 +Author: Adam Jackson +Date: Fri Dec 19 09:51:52 2008 -0500 + + dmx: Fix calloc macro confusion. + +commit 8c488ac3b3990cd203baed7f2127b9bed8aab534 +Author: Alan Coopersmith +Date: Thu Dec 18 19:47:49 2008 -0800 + + Fix linking of Xorg with dtrace probes on Solaris + +commit 396433d0da721951e6e7abc02dc3b2f682495154 +Author: Alan Coopersmith +Date: Thu Dec 18 18:49:47 2008 -0800 + + Fix sdksyms.sh to work with Solaris/Sun compiler builds + + - Pass $(CPP) & $(AWK) settings from configure to sdksyms.sh + - Only reset sdk variable (tracks if header is part of sdk) if + a filename is included on the cpp # line, + since Sun compilers omit filename when it is unchanged from + previous line. + +commit aea6f19f25e13768b1d09fac4991d6a5e6c2cdac +Author: Peter Hutterer +Date: Tue Dec 16 17:10:03 2008 +1000 + + xfree86: don't restore the TTY mode if we didn't initialize it ourselves + + Restoring it unconditionally means we restore to whatever tty_mode has as + default value (i.e. 0). K_RAW happens to be 0x00, so we always restore to raw + mode if allowEmptyInput is off. + + Signed-off-by: Peter Hutterer + Signed-off-by: Adam Jackson + Signed-off-by: Julien Cristau + +commit 5d065a889074558634216eebd4bba35a60db9a09 +Author: Eamon Walsh +Date: Thu Dec 18 13:59:36 2008 -0500 + + xselinux: Use xace Xtrans wrappers instead of the now-inaccessible wrapees. + +commit f87e66486c3610c56888915b66ae5ab0af03da8b +Author: Eamon Walsh +Date: Thu Dec 18 13:58:35 2008 -0500 + + xace: Export wrappers around two Xtrans functions used by modules. + + Don't know a better way to do this, since Xtrans isn't a library that + can be linked into modules. + +commit 777408914dbf395e9969e3f34720286e6f740369 +Author: Eamon Walsh +Date: Thu Dec 18 12:35:57 2008 -0500 + + Add xace headers to the SDK when enabled and export the XaceHooks symbol + to modules. + +commit 9e4ef3cfe5ee178c266edd64a8edd767827aa0d7 +Author: Paulo Cesar Pereira de Andrade +Date: Thu Dec 18 15:00:25 2008 -0200 + + Use regex pattern understood by all known awk variants. + + Ubuntu uses mawk by default, but it doesn't understand posix character + classes (which are locale dependent, and this patch uses only valid C + identifiers). + Also make sure awk runs with LC_ALL=C to match the regex patterns. + +commit 3d3c234b434a3443a00c3be9f32c698bcced111c +Author: Maarten Maathuis +Date: Thu Dec 18 16:26:38 2008 +0100 + + randr: add some notes about the stuff that changed in driver ABI 2 + +commit 1b244feb4cf11d1cdba79fbead50035965535552 +Author: Maarten Maathuis +Date: Thu Dec 18 16:11:21 2008 +0100 + + randr: check for malloc failure + +commit 21a2df9f359584e634dc12d8602401d54defd7db +Author: Colin Harrison +Date: Sun Nov 2 20:46:44 2008 +0000 + + Xming,Cygwin/X: Fix crashes when using the DirectDraw '-refresh rate-in-Hz' option in -fullscreen (#11128) + + fd.o bugzilla #11128 + + Fix crashes when using the '-refresh rate-in-Hz' option in -fullscreen mode and using a DirectDraw engine. + On failure (typically 0x80004001 DDERR_UNSUPPORTED), use the default refresh rate for the driver, instead of the + entered value. + + Also fix some nearby error reporting + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY + +commit b0ed1567c1782041cf3d14ec6dd4d622915c7d0c +Author: Colin Harrison +Date: Wed Dec 17 17:16:02 2008 +0000 + + Xming, Cygwin/X: Tidy up warnings, headers and unused variables (#11132) + + Tidy up various warnings, include headers and unused variables, etc. + + Signed-off-by: Jon TURNEY + +commit 15c4a6e088039e14b4f2387ff204cb5448916b39 +Author: Colin Harrison +Date: Wed Dec 17 16:44:07 2008 +0000 + + Xming, Cygwin/X: Fix crash in function winMultiWindowGetTransientFor() (#11147) + + The function winMultiWindowGetTransientFor() crashes, due to a bogus pointer + dereference, but this fact was previously hidden by the function not being called! + + Signed-off-by: Jon TURNEY + +commit 08a3d6928c87032998b6113d67f69b79b09eecee +Author: Peter Hutterer +Date: Tue Dec 16 14:19:12 2008 +1000 + + dix: Allocate the space for the DCCE when the last SD is removed. + + This still doesn't fix reset the MD's classes (a TODO that's been here for + ages), but at least we don't segfault anymore when detaching the last SD. + + Signed-off-by: Peter Hutterer + +commit 689be0cb4b259840208c17f974066a942196793a +Author: Peter Hutterer +Date: Tue Dec 16 14:19:38 2008 +1000 -commit 87df8e681988e546ed943b0f3e7df2851ada4712 -Author: Jeremy Huddleston -Date: Wed Dec 17 15:09:35 2008 -0800 + dix: set the correct length in CreateClassesChangedEvent. + + Fallout from aeff14d5f208d02f211b8b2a1a98999624e8c2cf. Yes, we don't malloc + anymore because we are inside a SIGIO and the memory is already there anyway. + But we still need to set the event length correctly, otherwise + mieqEnqueue/mieqProcessInputEvent don't know how much memory to copy. + + Signed-off-by: Peter Hutterer - XQuartz: Get rid of white rectangle bug - (cherry picked from commit 3269959033ed0c675a3a906666454df34086896a) - (cherry picked from commit fd6fb6a2771df152b57f9dfb159fa42a3b1d37cd) +commit 1001403301001fcc84ce6833938590956df40d2a +Author: Maarten Maathuis +Date: Thu Dec 18 00:19:06 2008 +0100 -commit 5ff6b1e7ed11a37b2878f2f9a37b2afce00baeb0 -Author: Jeremy Huddleston -Date: Wed Dec 17 13:54:53 2008 -0800 + Forgot to fix a comment. - XQuartz: Name the startup shell script X11 for better compatability - (cherry picked from commit f84613d6fcbbb5f769ee34cff0900353a13693cf) - (cherry picked from commit 102abeda37d6b62971a9952efa0453e38504ae0b) +commit 9fa15bef59881bdcf087889f16ab3c8d953da8f1 +Author: Maarten Maathuis +Date: Wed Dec 17 23:42:30 2008 +0100 + + randr: some improvements, fixes and crtc abi bump + + - Add active field to crtc. + - Set gamma (only) whenever a crtc becomes active. + - Check for xf86_config being NULL. + - Increase crtc abi to 3. + - A few other fixes. + +commit bf65523ab0b39774f07a7ae478ff3f5653fad469 +Author: Joe Krahn +Date: Sun Nov 2 20:17:03 2008 +0000 + + Cygwin/X: Fix for mis-aligned icon data creates bad background masks (#4491) + + fd.o bugzilla #4491 + + Transparent icon backgrounds appear with black stripes as mask data is incorrectly aligned. + Modified the icon DDB bitmap data alignment to 16 bits + + Signed-off-by: Jon TURNEY -commit ffdf0139051c51f94d6a7a9a5fc2ccc68959d14b +commit 91f73b79b7ae64e5b846d1efeb470bb61a913720 Author: Maarten Maathuis -Date: Fri Dec 19 19:10:23 2008 +0100 +Date: Wed Dec 17 16:56:26 2008 +0100 - randr/xfree86: Fix a one off error in the panning calculations. + randr: Improve per-crtc gamma support. - - Example: mode 1280x1024, panned area 1281x1024 - panned_area.x2 = 1281 - mode.width = 1280 - If you substract 1280 from 1281, then that leaves you with one. - Which is the one pixel that you need to move to actually see the last pixel collumn. - Substracting 1 from this will consistently prevent you from seeing the right and bottom edge. - (cherry picked from commit aedd2f566df585db7a1614f302cc8d3feda54275) + - The Gamma values from the monitor section are now used during initial config. + - The old colormap system is disabled when gamma set hook is available. + - Gamma values are now persistent for the lifetime of the xserver. + - This requires no driver changes and should be driver ABI compatible. + +commit 1556815d34cecb4b4b62d2a4ce813b1435a937ec +Author: Jon TURNEY +Date: Sun Nov 2 18:27:18 2008 +0000 + + Cygwin/X: Initialize native HWND atom when built !XWIN_MULTIWINDOWEXTWM + + Fix the native HWND atom identifier to be initialized correctly, when built without external WM support + + This is neccessary for native window naming to work correctly in multiwindow internal WM mode. + + Signed-off-by: Jon TURNEY + +commit 92082a0a00f05ecdc90814a8104828853c9c8f29 +Author: Jon TURNEY +Date: Sun Nov 2 18:27:15 2008 +0000 + + Cygwin/X: update to use standard DPMS stubs + + Bring Cygwin/X up to date with DPMS API changes by using the standard stubs + + Signed-off-by: Jon TURNEY + +commit 2850f26bb2999ef3fb2a10adb80fe358463aecb5 +Author: Jon TURNEY +Date: Sun Nov 2 18:27:14 2008 +0000 + + Cygwin/X: update for changes to shadow framebuffer + + Bring Cygwin/X up to date with the change to damage-based shadow framebuffer. + + Register the screen bitmap as the shadow framebuffer after screen resources + are created. + + Signed-off-by: Jon TURNEY + +commit 35d76028304f910edeaf642376df71b8134ec02c +Author: Jon TURNEY +Date: Sun Nov 2 18:27:13 2008 +0000 + + Cygwin/X: enqueue a pointer motion event on mouse movement + + Signed-off-by: Jon TURNEY + +commit 816e0d243df068bc06d328874b5655d4530fe16a +Author: Jon TURNEY +Date: Sun Nov 2 18:27:12 2008 +0000 + + Cygwin/X: update for changes in mieq API + + Bring Cygwin/X up to date with mieq event API changes + + Signed-off-by: Jon TURNEY + +commit bca7483c4e95ad450fb09048a3b85bb3056a0518 +Author: Jon TURNEY +Date: Sun Nov 2 18:27:11 2008 +0000 + + Cygwin/X: update for MPX device changes + + Bring Cygwin/X up to date with MPX device API changes + + Signed-off-by: Jon TURNEY + +commit 829a8a970dd17623ef3cb5022d34190744f74741 +Author: Jon TURNEY +Date: Sun Nov 2 18:27:10 2008 +0000 + + Cygwin/X: update for MPX cursor API changes + + Bring Cygwin/X up to date with cursor API changes + + Signed-off-by: Jon TURNEY + +commit d61e902aab92c262e6c8ee9cd70aec4493cf6cae +Author: Francis Giraldeau +Date: Wed Dec 17 09:49:39 2008 +0200 + + Don't log audit messages when -audit 0 specified + + make the auditTrailLevel check more general and don't log when not + using DTRACE and -audit 0 is set. + +commit 295a3fa721ee2f2226891de308c0c4b0ee26fe72 +Author: Paulo Cesar Pereira de Andrade +Date: Wed Dec 17 02:04:12 2008 -0200 + + Ensure symbols required by swrast_dri.so are visible. + +commit 6d8ea5104cf97dbf64612f58fc06f94f869ed5ec +Author: Colin Guthrie +Date: Tue Dec 16 17:44:27 2008 -0500 + + Fix compilation with -Werror=format-security + +commit 1bb5a919f4bf38ac96c73077021b0cdc82965f31 +Author: Adam Jackson +Date: Tue Dec 16 13:46:59 2008 -0500 + + config: Add vboxvideo and tga to the magic driver list + + Also sort the list while I'm here. + +commit 8511a964f81b3b06a526f0fca4232afb2152f405 +Author: Matthias Hopf +Date: Tue Dec 16 18:21:20 2008 +0100 + + randr: Update EDID_ATOM_NAME to reflect RandR 1.3 name change + +commit a058192d970f7417b06334aa666c17e9891795c6 +Author: Owen W. Taylor +Date: Wed Oct 22 16:12:53 2008 -0400 + + Xephyr: Fix crash with control-shift and GLX (#18185) + + When we are looking up the screen for an event, we need to take + into account the fact that the event may have been delivered to the + "peer window" that we create when implementing GLX. Since we only + ever create one such window per screen, just add a single peer_win + field to EphyrHostScreen. + +commit 6e85a8304b50c0bfd16a400a05d257f0168fb99b +Author: Jon TURNEY +Date: Sun Nov 2 18:27:09 2008 +0000 + + Cygwin/X: build machinery fixes + + The Cygwin/X build has been broken for a long time, probably since modular X + This patch fixes up configure/makefile and some general build issues (#18568) + + Signed-off-by: Jon TURNEY + +commit 7aa29b9d66c3cd0f8af4fafbe92efd0c0556d225 +Author: Robert Noland +Date: Tue Dec 16 00:07:42 2008 -0500 + + Support -sharevts on FreeBSD + + Bugzilla #11179 + + Submitted-by: Nathan Whitehorn + + Signed-off-by: Robert Noland + +commit 063eb6743cd0d98dd52d1a9559b804381ee5144d +Author: Keith Packard +Date: Mon Dec 15 19:53:45 2008 -0800 + + Patch brown-bag fix for bug 19017 (scrn->virtualX/virtualY 0 before PreInit) + + When a driver uses a crtc during device detection, the scrn has not yet been + configured and virtualX/virtualY are still zero. This caused the X server + to try and allocate a shadow frame buffer, which couldn't work. + + Detect this by checking for zero virtualX/virtualY values. + + Signed-off-by: Keith Packard + +commit fde2f961035609cfff8761ef1e0f23e6a9761be2 +Author: Keith Packard +Date: Mon Dec 15 11:39:24 2008 -0800 + + Use scrn->virtualX/virtualY in xf86CrtcFitsScreen. Fix bug 19017. + + pScreen->width/height are not initialized when doing initial mode setting, + which makes this function incorrectly fail. Using scrn->virtualX should work + in all cases though. + + Bug 19017 reports a crash in xf86CrtcSetModeTransform when doing a modeset + for output probing, long before the screen array is initialized; that was + caused by a work-around to set pScreen->width/height so that xf86CrtcFitsScreen + could find the right values. + + Signed-off-by: Keith Packard + +commit 29a5b0596b396d3e4a8a014cacd3e3ef77467ab7 +Author: Keith Packard +Date: Mon Dec 15 11:38:00 2008 -0800 + + When disabling SIGIO tracking, use SIG_IGN instead of SIG_DFL. + + This avoids a race condition for drivers which mis-order the fd close and + signal disable. + + Signed-off-by: Keith Packard + +commit 1ba4cbb15919759aadd71960c5c057af9ba94fe3 +Author: Keith Packard +Date: Mon Dec 15 11:36:43 2008 -0800 + + Clean up rotation data when crtc is turned off + + The shadow frame buffer and other data used for rotation need to be freed + when the crtc is disabled, not just when rotation is disabled. + + Signed-off-by: Keith Packard + +commit 2a61397d17339113b9e37995b06ca543589814ce +Author: Cooper Yuan +Date: Mon Dec 15 10:29:34 2008 -0500 + + Fix typo in xf86PickCrtcs() + +commit 3db60add6671f766f9360e7d03492dfd51eba225 +Author: Jon TURNEY +Date: Mon Dec 15 12:42:10 2008 +0000 -commit 2a822c231145afd2b99498d5d4bf96be7dff92c5 + Cygwin/X: Update the native icon to one based on the X.Org logo + + Update the native icon for the X server to one created from the X.Org logo by Colin Harrison. + +commit 450739efa904a0fce5024372da7236bb7b84b67a +Author: Jeremy Huddleston +Date: Sat Dec 13 00:45:27 2008 -0800 + + XQuartz: Updated menu item ordering for better HIG compliance + (cherry picked from commit 4c9bb241ce5fb856fab20ae96fa89bd2b71ef242) + +commit aee27be2785d8b09ac10f5be040b4d573190de0e +Author: Jeremy Huddleston +Date: Wed Dec 10 23:04:30 2008 -0800 + + XQuartz: Tiger fix, don't call Xplugin code in the Appkit thread if Xplugin isn't threadsafe. + (cherry picked from commit 748d9e5bd756513d42c4046f3b31e1fdc55bccb6) + +commit a939368ab8140d48c1da4ba0bb229d13b221189c Author: Jeremy Huddleston Date: Mon Dec 15 03:18:13 2008 -0800 @@ -2788,701 +14693,1006 @@ Date: Mon Dec 15 03:18:13 2008 -0800 Signed-off-by: Peter Hutterer Signed-off-by: Jeremy Huddleston - (cherry picked from commit a939368ab8140d48c1da4ba0bb229d13b221189c) -commit a067bd907e9d3e55edd6ca61279968b6cb96236c +commit f1c9b5ab230cbb4124d8d476ae4886d05022adcb +Author: Ian Romanick +Date: Sun Dec 14 18:58:33 2008 -0800 + + GLX: Changes resulting from changes to Mesa generator scripts / data + + Several recent Mesa commits (listed below) make modifications to the + protocol generator data and scripts. This commit represents the + changes to the generated files resulting from the previous changes. + + - 0f73302d24f4201813da2939742c5bcb6964b3b1 + GLX: Fix protocol for glTexSubImage#D + + - 1709ab01ef24279c782e420568e9257b4b92b224 + Return 0 as the request size when the pixels parameter is NULL + + - 63cca2ba10ce7dcc8481cfa4be3872dfc269dded + GLX: Include glapi.h before glapitable.h + + This is the server-side part of the fix for bugzilla #11003. + +commit 6383bc93b2ae76361a58653bc7e291df0d6ddfec +Author: Peter Hutterer +Date: Sat Dec 13 15:44:52 2008 +1000 + + dix: Init DeviceEnterLeave event's type before FixUpEventFromWindow (#19064) + + X.Org Bug 19064 + +commit 49d38ab2328c409b2a98465b52677af057121513 +Author: Eric Anholt +Date: Tue Dec 2 15:09:57 2008 -0800 + + Warning fix: Remove dead glXDisp{,Swap}_DrawArraysEXT definitions. + + Signed-off-by: Eric Anholt + Acked-by: Ian Romanick + +commit 2c5bfffc832e3818bbf0c0a96522865ce1ef2653 +Author: Eric Anholt +Date: Tue Dec 2 14:59:04 2008 -0800 + + Warning fix (GL likes to call strings GLubyte * instead of char *). + + Signed-off-by: Eric Anholt + Acked-by: Ian Romanick + +commit 7be6520d94df874c6bbd46d06a1830a12d0967f2 +Author: Stuart Bennett +Date: Fri Dec 12 00:08:44 2008 +0000 + + dolt: allow older versions of bash to compile the xserver (#19031) + + Signed-off-by: James Cloos + +commit aeff14d5f208d02f211b8b2a1a98999624e8c2cf Author: Peter Hutterer -Date: Mon Dec 1 21:20:48 2008 +1000 +Date: Tue Nov 25 20:23:50 2008 +1000 - mi: Clean up CopyGetMasterEvent, re-use the memory. + dix: don't alloc in ChangeMasterDeviceClasses. - Alloc an EventList once and then re-use instead of allocing a new event each - time we need a master event. - There's a trick included: because all the event processing handlers only take - an xEvent, init a size 1 EventList and squash the events into this one. + We mustn't realloc as we are inside a signal handler. With + SetMinimumEventSize, this code should never be hit anyway, as the event list + should have the required memory before this code is hit. - Events that have count > 1 must be squished into an xEvent array anyway before - passing into the event handlers, so we don't lose anything here. + Signed-off-by: Peter Hutterer + +commit fb2a8d0e59a3d187255538f6add22ec67551507a +Author: Peter Hutterer +Date: Mon Dec 8 15:58:15 2008 +1000 + + Xi: silence compiler warning + + Don't mix declarations and statements. + +commit d961abb59f0a8bee4bd11b1540aa43ff83cddbb8 +Author: Peter Hutterer +Date: Thu Dec 11 15:54:15 2008 +1000 + + dix: fix compiler warning (mixing declarations + statements) + + Signed-off-by: Peter Hutterer + +commit cb95642dc8edebb2935dd471f8b339cb98aa8481 +Author: Peter Hutterer +Date: Fri Nov 28 22:28:32 2008 +1000 + + Remove #define NEED_EVENTS and NEED_REPLIES + + A grep on xorg/* revealed there's no consumer of this define. + + Quote Alan Coopersmith: + "The consumer was in past versions of the headers now located + in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, + all the event definitions were only available if NEED_EVENTS were + defined, and all the reply definitions required NEED_REPLIES. + + Looks like Xproto.h dropped them by X11R6.3, which didn't have + the #ifdef's anymore, so these are truly ancient now." - Signed-off-by: Peter Hutterer - Acked-by: Daniel Stone - (cherry picked from commit d281866b74f7067f2704c278fe9720eafc0ee5ef) + Signed-off-by: Peter Hutterer + Signed-off-by: Adam Jackson -commit 3519f83f509dd0363f574d3a68b21df98d5f2732 -Author: Peter Hutterer -Date: Wed Dec 10 11:35:09 2008 +1000 +commit 920b7622be4a68ebb5d8432f55c5362fbe964fce +Author: Simon Thum +Date: Tue Nov 25 14:28:26 2008 +1000 - dix: move MAX_VALUATOR_EVENTS into include/input.h + xfree86: dump the ptraccel filter setup to the log on init. - Signed-off-by: Peter Hutterer - (cherry picked from commit 0b4fef6337d88ae8ef05b8b73941350a9007565c) + Signed-off-by: Peter Hutterer -commit 3ec3b502e3c6f0b74f8d96f7dda4f872156589a1 -Author: Francis Giraldeau -Date: Wed Dec 17 09:49:39 2008 +0200 +commit fbb57a2c54b141ccbb50833143b0b7cb2c4cb903 +Author: Simon Thum +Date: Tue Nov 25 13:43:28 2008 +1000 - Don't log audit messages when -audit 0 specified + dix: ptraccel - Add GetAccelerationProfile() - make the auditTrailLevel check more general and don't log when not - using DTRACE and -audit 0 is set. - (cherry picked from commit d61e902aab92c262e6c8ee9cd70aec4493cf6cae) + Signed-off-by: Peter Hutterer -commit 053f32d92864870cd5714befb419810976729df3 -Author: Colin Guthrie -Date: Tue Dec 16 17:44:27 2008 -0500 +commit beb749c87f383a62172a9ffa36373438e7a12d8e +Author: Adam Jackson +Date: Thu Dec 11 17:04:37 2008 -0500 - Fix compilation with -Werror=format-security - (cherry picked from commit 6d8ea5104cf97dbf64612f58fc06f94f869ed5ec) + Fix syncsrv.h guard define + +commit 9fba808b4f43f5dc69d85a48fa40cb83dd4d9f9d +Author: Colin Harrison +Date: Thu Dec 11 13:22:53 2008 -0500 + + xsync: Prototype fix. -commit 8ed4ca2801ece271a4ad7c73a7c0e1329f69ade8 +commit dce887ff53222652c397bc96a1dd3566f5847745 Author: Adam Jackson -Date: Tue Jun 17 16:10:51 2008 -0400 +Date: Thu Dec 11 13:16:02 2008 -0500 - XAA: Disable offscreen pixmaps by default. - - Say Option "XaaOffscreenPixmaps" to turn them back on. + xsync: build fix - Apropos of bugs #13795 and #15098. But this still isn't correct. - (cherry picked from commit 0c6987df3b9b3a37d201d740d8248c326449835e) + argh protocol header disaster -commit 32e81074b967716865aef08b66ec29caf0fec2c5 -Author: Robert Noland -Date: Tue Dec 16 00:07:42 2008 -0500 +commit d41b8960be8ad316504ef5657c0abfe6d76d3b5e +Author: Matthias Hopf +Date: Thu Dec 11 18:48:02 2008 +0100 - Support -sharevts on FreeBSD - - Bugzilla #11179 - - Submitted-by: Nathan Whitehorn + randr: Fix initial panning border copy - Signed-off-by: Robert Noland - (cherry picked from commit 7aa29b9d66c3cd0f8af4fafbe92efd0c0556d225) + Thanks to Julien Cristau for finding this. -commit 4c68079c2ae8a2f04363623c44d17bc8c255c3bf -Author: Ian Romanick -Date: Sun Dec 14 18:58:33 2008 -0800 +commit fd77ce9f884f5ac4d36736f3a99ba86101f133ea +Author: Matthias Hopf +Date: Thu Dec 11 17:51:20 2008 +0100 - GLX: Changes resulting from changes to Mesa generator scripts / data - - Several recent Mesa commits (listed below) make modifications to the - protocol generator data and scripts. This commit represents the - changes to the generated files resulting from the previous changes. - - - 0f73302d24f4201813da2939742c5bcb6964b3b1 - GLX: Fix protocol for glTexSubImage#D + randr: Oops, miscalculated panning rectangle's coordinates + +commit f8e52f1b6d7c59d007de99a1c9c69c053d4f3cbe +Author: Matthias Hopf +Date: Thu Dec 11 16:48:40 2008 +0100 + + randr: Update initial screen size if panning information is present + +commit 24d6b7d1c5fc5d07c2eb06a9fc4406e393d59b17 +Author: Matthias Hopf +Date: Thu Dec 11 16:48:11 2008 +0100 + + randr: Fix error message for bad panning config + +commit fdbbe65a7e777b7777bfae5a161efb89d4fb9a8d +Author: Matthias Hopf +Date: Thu Dec 11 14:56:51 2008 +0100 + + randr: Add monitor option "Panning" for initial panning configuration + +commit 27261a950d91c352eac25a3036656c3e4f81fb12 +Author: Paulo Cesar Pereira de Andrade +Date: Thu Dec 11 14:43:04 2008 -0200 + + Modify sdksyms.sh to receive $top_srcdir as first argument. - - 1709ab01ef24279c782e420568e9257b4b92b224 - Return 0 as the request size when the pixels parameter is NULL + If the basename of header file processed by cpp matches $top_srcdir, + check for extern symbols in the output, and add to the xorg_symbols + vector. + Possibly a better solution then using this script would be to somehow + tell the linker to not drop any symbols from the binary being generated. + +commit 1f4fb0225b278d1cf4145aebeb0bdd23dc8f62d5 +Author: Adam Jackson +Date: Wed Dec 10 16:13:20 2008 -0500 + + xsync: Fix wakeup storm in idletime counter. - - 63cca2ba10ce7dcc8481cfa4be3872dfc269dded - GLX: Include glapi.h before glapitable.h + Wakeup scheduling only considered the threshold values, and not whether + the trigger was edge or level. - This is the server-side part of the fix for bugzilla #11003. - (cherry picked from commit f1c9b5ab230cbb4124d8d476ae4886d05022adcb) + See also: + https://bugzilla.redhat.com/show_bug.cgi?id=474586 + http://svn.gnome.org/viewvc/gnome-screensaver/trunk/src/test-idle-ext.c?view=markup -commit 75bad86992338f5ce0ade6986b758cd6af2a5b9a -Author: Cooper Yuan -Date: Mon Dec 15 10:29:34 2008 -0500 +commit 1a99110f0c221b79045ea26d61c4a1ec1e0d7341 +Author: Adam Jackson +Date: Wed Dec 10 14:18:59 2008 -0500 - Fix typo in xf86PickCrtcs() - (cherry picked from commit 2a61397d17339113b9e37995b06ca543589814ce) + xsync: ANSI cleanups -commit f427d3aaa7ca58822033ac5486b46671a937b68a -Author: Jeremy Huddleston -Date: Sat Dec 13 00:45:27 2008 -0800 +commit e0d8f6a8084a3fe6c549c1dee11e4502e316c382 +Author: Adam Jackson +Date: Wed Dec 10 13:32:04 2008 -0500 - XQuartz: Updated menu item ordering for better HIG compliance - (cherry picked from commit 4c9bb241ce5fb856fab20ae96fa89bd2b71ef242) - (cherry picked from commit 73987010b2ef9c67b6614e226c6fae65d834d8f3) + xsync: Use a local header for server API definitions -commit d0eb4337e3468a5854e4801fcb1d2bc7d5c4d81f -Author: Jeremy Huddleston -Date: Wed Dec 10 23:04:30 2008 -0800 +commit 1208a1dbcaecbc218a77bf51068f9c0c768e16c5 +Author: Adam Jackson +Date: Wed Dec 10 11:47:35 2008 -0500 - XQuartz: Tiger fix, don't call Xplugin code in the Appkit thread if Xplugin isn't threadsafe. - (cherry picked from commit 748d9e5bd756513d42c4046f3b31e1fdc55bccb6) - (cherry picked from commit fd31984e0c0f9a37087cd1cffaa3ba116b12c2e5) + xsync: remove cast abuse. -commit d9e1fdcd40bf12378c9fa05a8adbe3aefca65676 +commit 119d9c46e841f5fa35610f557e6fa1ec58587c24 Author: Jeremy Huddleston Date: Wed Dec 10 01:56:01 2008 -0800 XQuartz: Fix path to executable (cherry picked from commit 7e9d3698e070a0c63dd2556651373c3aca58e2fe) - (cherry picked from commit 5926b213b39a90601c73f026dc0699723f5ed10d) -commit e93daf4e7140115f9485c8c0cdc358d50c9575be +commit c46b564c47fde3474e948aa1b188a975836cba47 Author: Jeremy Huddleston Date: Wed Dec 10 00:00:29 2008 -0800 XQuartz: fixed make dist (cherry picked from commit 2d52367ab92429e58596d1a1ed3ef52a0a38a7aa) - (cherry picked from commit 13eff12902be1b25d0ccc2089e08305f88949f32) -commit 1cf76f23c7d210d75a401568c5ad788a2fd268d1 +commit 23156a21d8e2f1be7d19d69cb91dae1b885ef671 +Author: Jeremy Huddleston +Date: Tue Dec 9 23:48:18 2008 -0800 + + XQuartz: Make debugging output for invalid depths a bit more detailed + (cherry picked from commit 609fb166b7062c76f0561df12ffe893811f6ac8f) + +commit 76351d2faf9ceb79aaa00b374c203b8b279c58f3 Author: Jeremy Huddleston Date: Tue Dec 9 23:47:32 2008 -0800 XQuartz: Avoid using login /bin/sh blech. Just use a bash script to start the app, so it will inherit the right environment (cherry picked from commit f4b7ad9cc6b0c99fc7ee8516c4bf858ece938148) - (cherry picked from commit fdf64256127b2661bd6aa81ac694350028d36c43) -commit 22d3ecda18ba799966d08237d8041ad80b20d0f2 +commit e5ce6e198f4c245f4dc840c5e9e90a7ef80fb6e9 Author: Jeremy Huddleston Date: Mon Dec 8 21:59:49 2008 -0800 XQuartz: unset DISPLAY if we didn't get a launchd socket handoff (cherry picked from commit b959727f38733009c6381cc8ca06b5984257bdac) - (cherry picked from commit 9cbed0a325175e7ddb751db54fe6c0f5a5cedd16) -commit 9eb5f3092984206ac7cab9a9fdb4b19448db3a24 +commit ecaaf0462d6c70cabfcaf6868a526e5415505e2c Author: Jeremy Huddleston Date: Mon Dec 8 21:00:11 2008 -0800 XQuartz: unsetenv(DISPLAY) if we're not org.x.X11 Also some prefix related fixes. (cherry picked from commit fd459e96581a883e30323c840b71004aa0747169) - (cherry picked from commit 99b2cbf061a9d074e66e6220dc08f8b4624ea6bb) -commit 19e6f73710776aee0b76dcbd62596a448029611e +commit ea94995982d1cc585768d52fec75cae018457fa5 Author: Jeremy Huddleston Date: Sat Dec 6 12:01:28 2008 -0800 XQuartz: Removed some debug spew (cherry picked from commit 370dcf11b360b87aa24cace35eb615419057fda0) - (cherry picked from commit 8065953ea8c3b7d10c775f6b7fec629bb5a2c83c) - -commit ced368287bad65c126cd6a5304969d0a0f9dc4eb -Author: Jeremy Huddleston -Date: Sat Dec 6 14:11:25 2008 -0800 - - XQuartz: darwinPointer reports the actual pixel position now rather than a relative position - (cherry picked from commit a41e7f75decd340d064fdc0d2c4fe6c88d7dbc82) - (cherry picked from commit 70930f6d31cc2ca16b40c17e101b106506a8337a) -commit b5687a9d129f6eea7ebe590120f9d90f9d7ed48b -Author: Jeremy Huddleston -Date: Fri Dec 5 12:42:31 2008 -0800 +commit 86c64ddf21763972aa7fc8c5770259123c9907b3 +Author: Adam Jackson +Date: Mon Dec 8 17:42:47 2008 -0500 - XQuartz: Corrected name/command labels in the customization widget - (cherry picked from commit a689c23f17eb445c36b97eb617ef4b8bd157985f) - (cherry picked from commit 9ac2e68d86ed1eb6e3f6c900c60908813eca140e) + randr: clear primaryOutput when the output is deleted -commit 53d93d0d29f0bef6b2b7e312fb09e498b68636f9 -Author: Jeremy Huddleston -Date: Tue Dec 2 14:54:10 2008 -0800 +commit fe65f400ed16cb39db8c9518b9446f590c34db1a +Author: Adam Jackson +Date: Mon Dec 8 17:40:07 2008 -0500 - Removed unised option from configure.ac for launchd - (cherry picked from commit 87e4de0a9a8af6e5e0cbba74e585761f1160a6ab) - (cherry picked from commit 451050b1e2dc0f2f6356d74ddb6f52183a794e8f) + randr: use primary output for RRFirstOutput() -commit df3f23fe8d13be74e58c894c44683024a190b0f6 -Author: Jeremy Huddleston -Date: Tue Dec 2 14:53:21 2008 -0800 +commit cdcb516e561e2f65eb2fa523ca001c57674d5caf +Author: Adam Jackson +Date: Mon Dec 8 17:37:17 2008 -0500 - XQuartz: pbproxy: Simplify linking - (cherry picked from commit 909cc5c4dca0f63e90505575bbd454b46a4670cc) - (cherry picked from commit cbb9ee57f8f29d2a1c39946381471fcd3b8e495e) + randr: Mangle GetScreenResources sort order based on primary output -commit 6e8626f2eb31a3699bf49597974e01ea4757f31e -Author: Peter Hutterer -Date: Mon Dec 8 15:58:15 2008 +1000 +commit d7b316e82bc7051f8829b4f4a640f50ae91c2db9 +Author: Adam Jackson +Date: Mon Dec 8 17:28:55 2008 -0500 - Xi: silence compiler warning - - Don't mix declarations and statements. - (cherry picked from commit fb2a8d0e59a3d187255538f6add22ec67551507a) + randr: Mangle compat Xinerama reply based on primary output -commit e56059dfa5f2835625b9f74a2af1f128d6eaf265 -Author: Peter Hutterer -Date: Thu Dec 4 09:47:25 2008 +1000 +commit 9d58d2a319059989ccdfa758f586149ccdc16df6 +Author: Adam Jackson +Date: Tue Dec 9 10:51:37 2008 -0500 - xfree86: fix compiler warning (use of uninitialized variable) - - drv and idev are only set for SDs, but are only dereferenced for SDs too, so - initializing them to NULL is safe. - - Signed-off-by: Peter Hutterer - (cherry picked from commit 8e3279134987a45f2a89c963ef2d33bc3d3c8179) + randr: Add [GS]etOutputPrimary -commit 0d12c44d832b98da10dccc3b8bac7676d8ea2c96 +commit d281866b74f7067f2704c278fe9720eafc0ee5ef Author: Peter Hutterer -Date: Mon Dec 1 16:57:06 2008 +1000 +Date: Mon Dec 1 21:20:48 2008 +1000 - xfree86: don't render SW cursors for devices attached to VCP (#16805) - - When leaving 3D games such as quake3 or sauerbraten, a cursor may stay on the - screen. This is caused by one run of SW rendering for the SD, even though the - SD was attached to the VCP and thus has HW rendering capabilities. + mi: Clean up CopyGetMasterEvent, re-use the memory. - Check for the SD's attachment (like in all other functions) before deciding on - SW or HW rendering. + Alloc an EventList once and then re-use instead of allocing a new event each + time we need a master event. + There's a trick included: because all the event processing handlers only take + an xEvent, init a size 1 EventList and squash the events into this one. - X.Org Bug 16805 + Events that have count > 1 must be squished into an xEvent array anyway before + passing into the event handlers, so we don't lose anything here. - Signed-off-by: Peter Hutterer - (cherry picked from commit bb072019fa8dd292a50ef433d05caeefd1304a73) + Signed-off-by: Peter Hutterer + Acked-by: Daniel Stone -commit 63b3bf85ed4e11ace433e6aa21b311cce7144007 -Author: Peter Hutterer -Date: Wed Dec 3 15:06:37 2008 +1000 +commit 0b4fef6337d88ae8ef05b8b73941350a9007565c +Author: Peter Hutterer +Date: Wed Dec 10 11:35:09 2008 +1000 - xkb: Allow NULL as rulesFile in XkbSetRulesDflts. - - If no rules file is given, simply re-use the previous one. If no RF is given - the first time this function is called, use the built-in default. - This includes fixing the built-in default to something that actually exists. + dix: move MAX_VALUATOR_EVENTS into include/input.h - Signed-off-by: Peter Hutterer - (cherry picked from commit 463e02e7de5da3e582a3a049110a476713c7210e) + Signed-off-by: Peter Hutterer -commit 9a44cc619f3296b0faca97b0959e19c208f143bb +commit b36c398b11321a908cfe217108b26a32ffc1d850 Author: Peter Hutterer -Date: Mon Dec 8 14:16:00 2008 +1000 +Date: Mon Dec 8 16:41:20 2008 +1000 - Xi: don't update VCP's valuators from DeviceValuator events #18882 + dix: purge dead device-based window access code. - The VCP doesn't need to update the valuators anyway since it cannot send XI - events. Just skip that bit. - - X.Org Bug 18882 - - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit c7fffe9e1354f816b6e2adedff045999fba9f1be -Author: Stuart Bennett -Date: Fri Dec 12 00:08:44 2008 +0000 +commit aa71ac1dd4697738752c73fe4c106b665ea3ec25 +Author: Paulo Cesar Pereira de Andrade +Date: Wed Dec 10 00:32:34 2008 -0200 - dolt: allow older versions of bash to compile the xserver (#19031) + Add dependency tracking to sdksyms.c and export composite wrapper. - Signed-off-by: James Cloos - (cherry picked from commit 7be6520d94df874c6bbd46d06a1830a12d0967f2) + Thanks to David Miller for noticing a make problem with sdksyms.c + not being regenerated when sdksyms.sh is updated. This is not yet the + best solution; automake generates dependency for sdksyms.o, but the + build really should also regenerate sdksyms.c when sdksyms.o needs to + be regenerated. + Export the symbols in miext/cw/cw.h. These symbols are in libxaa, and + at least the nvidia driver uses them. Maybe cw.h should be installed + in the sdk. -commit ca56d764d2be28c64fe15c9e37d534ef00117ad2 -Author: Adam Jackson -Date: Wed Dec 10 16:13:20 2008 -0500 +commit 090f63123975220819d531f569df6e5787607ec6 +Author: Peter Hutterer +Date: Mon Dec 8 11:53:20 2008 +1000 - xsync: Fix wakeup storm in idletime counter. + mi: always update the sprite for master devices. - Wakeup scheduling only considered the threshold values, and not whether - the trigger was edge or level. + Follow-up to 9ce995373e4a. This re-enables cursor rendering if the MD is + controlled through software (e.g. synergy). - See also: - https://bugzilla.redhat.com/show_bug.cgi?id=474586 - http://svn.gnome.org/viewvc/gnome-screensaver/trunk/src/test-idle-ext.c?view=markup - (cherry picked from commit 1f4fb0225b278d1cf4145aebeb0bdd23dc8f62d5) + Reported by John Tapsell: "I use Xorg with no mouse attached, but use synergy + to control the mouse. The commit means that I no longer have a visible mouse + cursor. The mouse cursor is still 'there' in terms that I can click buttons + etc with it, but it's just not visible." + + Signed-off-by: Peter Hutterer -commit a82f10c5dd9fa74ff18759ab288bbd9c8b7ac4de -Author: Adam Jackson -Date: Mon Dec 8 17:42:47 2008 -0500 +commit 7c8720c1433d2c3b85bbf4b811cc54c2df4c0080 +Author: Paulo Cesar Pereira de Andrade +Date: Mon Dec 8 22:11:50 2008 -0200 - randr: clear primaryOutput when the output is deleted - (cherry picked from commit 86c64ddf21763972aa7fc8c5770259123c9907b3) + Correct wrong symbol reference on sparc. + + The awk script was incorrectly referencing the struct name, and + not the struct variable. + Also added some comments to sdksyms.sh, for the reason it generates + the "symbol table" and add a message to the generated file, telling + is was automatically generated. -commit 2bc53ce66828b6c177e3298fa2f326c77c93e136 +commit 58a27d2932164e43c0db42b1286ec2f95250b420 Author: Adam Jackson -Date: Mon Dec 8 17:40:07 2008 -0500 +Date: Mon Dec 8 16:28:00 2008 -0500 - randr: use primary output for RRFirstOutput() - (cherry picked from commit fe65f400ed16cb39db8c9518b9446f590c34db1a) + Default to x86emu even on i386 linux + + vm86 mode is a bad idea anyway, and using the emulator everywhere + means we get a consistent set of bugs. -commit f0234a9eb88ed103bca7db73a833c472ab95b48f -Author: Adam Jackson -Date: Mon Dec 8 17:37:17 2008 -0500 +commit bbf811514d3cdf84790bad5b852942a4e636902b +Author: Sascha Hlusiak +Date: Mon Dec 8 12:24:39 2008 +0100 - randr: Mangle GetScreenResources sort order based on primary output - (cherry picked from commit cdcb516e561e2f65eb2fa523ca001c57674d5caf) + ddxCtrls.c: XkbDDXUsesSoftRepeat always returns 1 now + + We'd like to do soft repeat in the server for all keys. Remove obscure check, that'd + prevent the server from autorepeating when delay is set to exactly 660ms and rate is + set to exactly 25 (interval=40). + + Signed-off-by: Daniel Stone -commit 2ef02833d614c42693e019a444560e84f501b5dc -Author: Adam Jackson -Date: Mon Dec 8 17:28:55 2008 -0500 +commit 8c1dd40a04693f09f4fcea6e7f905af34c7589de +Author: Benjamin Close +Date: Mon Dec 8 14:49:38 2008 +1030 - randr: Mangle compat Xinerama reply based on primary output - (cherry picked from commit d7b316e82bc7051f8829b4f4a640f50ae91c2db9) + Don't use gnu specific extensions to awk when builing symbols + + Traditional posix awk doesn't know about \W and whilst we check that + awk exists in configure.ac we don't check which awk we are using. + This corrects symbol generation for posix only awk. -commit 0bdfdaa7df8105c7ffc3248a4fdd5f64da67103c -Author: Adam Jackson -Date: Tue Dec 9 10:51:37 2008 -0500 +commit 39db182b637041255ed6dac739ff77c8e4e07c30 +Author: Peter Hutterer +Date: Mon Dec 8 12:12:39 2008 +1000 - randr: Add [GS]etOutputPrimary - (cherry picked from commit 9d58d2a319059989ccdfa758f586149ccdc16df6) + xfree86: init EQ before trying to initialise the devices (#18890) + + The kbd driver may send events during device initialisation, and these events + need the EQ set up already. + + X.Org Bug 18890 + + Signed-off-by: Peter Hutterer -commit 09039fb89f3fd047f10b575e019bba6762448456 -Author: Keith Packard -Date: Mon Dec 15 19:53:45 2008 -0800 +commit 78a62d7713c708d067d8824ec41b0a0225c1997f +Author: Tom Jaeger +Date: Mon Dec 8 11:38:12 2008 +1000 - Patch brown-bag fix for bug 19017 (scrn->virtualX/virtualY 0 before PreInit) - - When a driver uses a crtc during device detection, the scrn has not yet been - configured and virtualX/virtualY are still zero. This caused the X server - to try and allocate a shadow frame buffer, which couldn't work. + Xi: XIGetDevice needs to ignore the MORE_EVENTS flag. - Detect this by checking for zero virtualX/virtualY values. + Reported in X.Org Bug 18882, Comment 5. + - Signed-off-by: Keith Packard - (cherry picked from commit 063eb6743cd0d98dd52d1a9559b804381ee5144d) + Signed-off-by: Peter Hutterer -commit ae2cbbff9fa0f458e133bf1894d8a7f9fb3fbb72 -Author: Keith Packard -Date: Mon Dec 15 11:39:24 2008 -0800 +commit ee1a6c28418a6dad6c89f79a994f27bfbaa77368 +Author: Peter Hutterer +Date: Fri Dec 5 10:12:57 2008 +1000 - Use scrn->virtualX/virtualY in xf86CrtcFitsScreen. Fix bug 19017. - - pScreen->width/height are not initialized when doing initial mode setting, - which makes this function incorrectly fail. Using scrn->virtualX should work - in all cases though. + dix: fix calculation of valuator events. - Bug 19017 reports a crash in xf86CrtcSetModeTransform when doing a modeset - for output probing, long before the screen array is initialized; that was - caused by a work-around to set pScreen->width/height so that xf86CrtcFitsScreen - could find the right values. + Follow-up to 4971315296cb. countValuatorEvents was copied from GKVE where it + was obviously broken but nobody noticed. GPE had the correct version, but that + one got lost during de-duplication. Restoring the correct calculation - if we + have 6 valuators, we want 1 valuator event, not 2. - Signed-off-by: Keith Packard - (cherry picked from commit fde2f961035609cfff8761ef1e0f23e6a9761be2) + Signed-off-by: Peter Hutterer -commit 6d671b2dee7d2e5481399f0bdb3323a0250a075d -Author: Keith Packard -Date: Mon Dec 15 11:38:00 2008 -0800 +commit 13de7511b17b57a28668e1a60b196ccfe61dbcbe +Author: Peter Hutterer +Date: Thu Dec 4 10:30:02 2008 +1000 - When disabling SIGIO tracking, use SIG_IGN instead of SIG_DFL. + xfree86: Only use the evdev ruleset on linux. - This avoids a race condition for drivers which mis-order the fd close and - signal disable. + As suggested by Julien Cristau - Signed-off-by: Keith Packard - (cherry picked from commit 29a5b0596b396d3e4a8a014cacd3e3ef77467ab7) + This is an follow-up to + commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a + Author: Peter Hutterer + Date: Wed Dec 3 14:24:25 2008 +1000 + + Let the DDX decide on the XkbRulesDefaults. + + Signed-off-by: Peter Hutterer + Acked-by: Julien Cristau + Signed-off-by: Daniel Stone -commit 8f17a31aa721e42925cd6b4616ccad90497818f3 -Author: Keith Packard -Date: Mon Dec 15 11:36:43 2008 -0800 +commit 8e3279134987a45f2a89c963ef2d33bc3d3c8179 +Author: Peter Hutterer +Date: Thu Dec 4 09:47:25 2008 +1000 - Clean up rotation data when crtc is turned off + xfree86: fix compiler warning (use of uninitialized variable) - The shadow frame buffer and other data used for rotation need to be freed - when the crtc is disabled, not just when rotation is disabled. + drv and idev are only set for SDs, but are only dereferenced for SDs too, so + initializing them to NULL is safe. - Signed-off-by: Keith Packard - (cherry picked from commit 1ba4cbb15919759aadd71960c5c057af9ba94fe3) + Signed-off-by: Peter Hutterer -commit be21199f550d9a19c10df16ed23c6f9ed94e55da -Author: Matthias Hopf -Date: Thu Dec 11 18:48:02 2008 +0100 +commit 22d4ddcc3d63b7fbf2a23f5162075e4ee06db781 +Merge: d2dad38 c3bf15b +Author: Matthieu Herrb +Date: Sun Dec 7 23:56:15 2008 +0100 - randr: Fix initial panning border copy + Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver + +commit d2dad384f5725a36e593fd75f03d712f53b20620 +Author: Matthieu Herrb +Date: Sun Dec 7 23:52:26 2008 +0100 + + Fix build in separate build directory. + +commit c3bf15ba85fd3ab2e1fe809428b75bf34db25cc8 +Author: Paulo Cesar Pereira de Andrade +Date: Sun Dec 7 18:52:23 2008 -0200 + + Require macros 1.2.0 or newer for XORG_CHANGELOG and XORG_CWARNFLAGS. + +commit 5a8068b390b7d30eb526e954443d8e43a199b971 +Author: Paulo Cesar Pereira de Andrade +Date: Sun Dec 7 18:31:32 2008 -0200 + + Convert libx86emu.a to a "libtool convenience library". + +commit ed4a17274015ecd8040ae85bd5cd9d1dbcc9460a +Author: Paulo Cesar Pereira de Andrade +Date: Sun Dec 7 14:59:25 2008 -0200 + + Export some symbols from libxf86config when installing it. - Thanks to Julien Cristau for finding this. + These are private symbols, but used by the X Server. + The newly exported symbols were not added to the sdk headers. + Optionally, libxf86config could be compiled without hidden symbols + when being installed. + Thanks to Maarten Maathuis for noticing the problem. -commit 19a978359d7358501cccb79965b78a3f8ec18743 -Author: Matthias Hopf -Date: Thu Dec 11 17:51:20 2008 +0100 +commit bf4c29ab48a166eb158cf4be7c597982d65ef214 +Author: Paulo Cesar Pereira de Andrade +Date: Sun Dec 7 05:12:41 2008 -0200 - randr: Oops, miscalculated panning rectangle's coordinates + Correct xf86acpiDisableFlag symbol. + + It is declared as + ifdef HAVE_ACPI + Bool xf86acpiDisableFlag = FALSE; + endif + in hw/xfree86/common/xf86Globals.c + but not protected by the ifdef in the sdk header xf86Priv.h, what + caused a build failure in the tinderbox, due to the address of the + symbol being taken (to ensure it is available) in sdksyms.c. -commit ab56607a0855e88de2ad2d7eb43e1d806db0c47b -Author: Matthias Hopf -Date: Thu Dec 11 16:48:40 2008 +0100 +commit b1dac41fb3853ca8182048ea57b88b6e84ecceb3 +Author: Paulo Cesar Pereira de Andrade +Date: Sun Dec 7 02:22:19 2008 -0200 + + Use libtool convenience libraries and better "symbol" table. + + All .a libraries were converted to .la, and instead of linking the + Xorg binary with a mix of .a and .la, and adding some libraries more + then once in the command line, etc, now it generates a single libxorg.la + from all the required convenience libraries, and links with a dummy + xorg.c (that should usually be the file with the main function...). + This removes the requirement of some things like libosandcommon and + libinit, that existed to circumvent problems when linking multiple + .a and .la in the final Xorg binary. + + The "symbol table" is now generated dynamically, by a shell script, + with an embedded gawk parser that parses cpp output. The new file + sdksyms.sh is generated by hand by analyzing all Makefile.am's and + making it create a sdksyms.c file, that includes all sdk headers that + will add symbols for the Xorg binary. Module headers aren't read, and + a in 2 files it was required to add a "ifndef XorgLoader" around + declarations shared between the Xorg binary and libextmod. A few + other changes were added to other sdk headers, like preventing + multiple inclusion, or including other headers to satisfy dependencies. + + This should be a lot more portable, and better (hopefully properly) + using libtool to generate convenience libraries. + +commit ccd2c668c13863ed704f86b29fc6b3ee628e56a2 +Author: Jeremy Huddleston +Date: Sat Dec 6 14:11:52 2008 -0800 - randr: Update initial screen size if panning information is present + XQuartz: darwinPointer reports the actual pixel position now rather than a relative position + (cherry picked from commit a41e7f75decd340d064fdc0d2c4fe6c88d7dbc82) -commit 657d963a663a189d3c8068a39528b2d73af5fe70 -Author: Matthias Hopf -Date: Thu Dec 11 16:48:11 2008 +0100 +commit 7ebd0c7e8d42a13079957d9bacf5cb30d7855a59 +Author: Jeremy Huddleston +Date: Fri Dec 5 12:42:31 2008 -0800 - randr: Fix error message for bad panning config + XQuartz: Corrected name/command labels in the customization widget + (cherry picked from commit a689c23f17eb445c36b97eb617ef4b8bd157985f) -commit 44b89dc0a5aa23df69539754fb76c67c310530db -Author: Matthias Hopf -Date: Thu Dec 11 14:56:51 2008 +0100 +commit 027ff97a1354ab4c83fecb615f6bc2a6b739b871 +Author: Alan Coopersmith +Date: Fri Dec 5 12:00:08 2008 -0800 - randr: Add monitor option "Panning" for initial panning configuration + Make sure _X_EXPORT is defined in edid.h + + Fixes build error in xf86-video-intel utilities -commit 523aae1fa6d8002e55e85aee49f113b7eb9a6df3 -Author: Keith Packard -Date: Tue Dec 9 22:10:56 2008 -0800 +commit 466b0fca9ba5d5e7fb36e47a6d1bd60218f51c75 +Author: Paulo Cesar Pereira de Andrade +Date: Fri Dec 5 17:01:09 2008 -0200 - Bump version to 1.5.99.3 (1.6 beta3) + Add back a simplified version of the loader static address tables. - Signed-off-by: Keith Packard + If not taking the symbol addresses, linkage will break badly, as not + all symbols will be present, and it also requires changing library order, + and/or making some changes like the "libosandcommon". + + This table should be modified to be generated automatically, as + it is required to "fool" the compiler/loader into adding all required + symbols to the X Server. -commit 4810226dfc52ef798b507d284030b4b3aec020a6 +commit 44bef8b850c5a78a3d3eca5f0d92b71bdd0a87e2 Author: Matthias Hopf Date: Fri Dec 5 15:37:15 2008 +0100 randr: Update SProcRandrVector for panning - (cherry picked from commit 44bef8b850c5a78a3d3eca5f0d92b71bdd0a87e2) + +commit 44c8c3cf7de589fb8e987f4ab931294eaf0b405f +Author: Paulo Cesar Pereira de Andrade +Date: Fri Dec 5 04:26:57 2008 -0200 + + Remove static symbol address tables in hw/xfree86/loader/*sym.{c,h} + + Those tables were once used to decide what symbols are visible to + modules, but they were outdated. The only real usage was that, since + it was taking the address of symbols, linkage should fail if the + symbols were not available. + Now the proper way to make symbols available to modules should + be to use the _X_EXPORT macro, or not compile with hidden symbols, + so that all symbols would be available. + All symbols in the tables were revised to ensure they are exported, + and only symbols that were not exported are ClientSleepUntil() and + DuplicateModule(), that were not in the sdk for quite some time + already, and should not have any users outside of the X Server + (and/or builtin modules). + +commit 091a50d1260c70055aba1fa6a2d1b1a36de1114e +Author: Paulo Cesar Pereira de Andrade +Date: Thu Dec 4 18:23:25 2008 -0200 + + Move _X_EXPORT attribute to header file. - Signed-off-by: Keith Packard + The attribute should be set on header files to make it easier to + manage what symbols are available to modules. + _X_EXPORT should be used in sources only for special cases, like + symbols that must be visible by non video/input driver/modules but + should not be "advertised" in the sdk. -commit 798a4878a4ffb03024e77ea6ddbd9b170b9c3fe4 +commit e5ab9e66628cde081757cf2a1013a78e927a622e Author: Matthias Hopf Date: Thu Dec 4 18:13:40 2008 +0100 randr: Allow panning to be disabled per axis - (cherry picked from commit e5ab9e66628cde081757cf2a1013a78e927a622e) - - Signed-off-by: Keith Packard -commit 5fa2cce83cc2df560ce62ec4bbf88233ee70e64a +commit bad118ace6c5bae5a5ed8a35129c90c38f1c1932 Author: Matthias Hopf Date: Thu Dec 4 16:55:14 2008 +0100 randr: Rework panning area verification - (cherry picked from commit bad118ace6c5bae5a5ed8a35129c90c38f1c1932) - - Signed-off-by: Keith Packard -commit 97e8a75ce3c70e7a83028b256b6884084f5e196b +commit 219c26ce0c65625d55cfd943ec66fe94a1a0ddfd Author: Matthias Hopf Date: Thu Dec 4 16:28:40 2008 +0100 randr: Don't change panning parameters if verification fails. - (cherry picked from commit 219c26ce0c65625d55cfd943ec66fe94a1a0ddfd) - - Signed-off-by: Keith Packard -commit 6189f0832ecd6930608f5b253e534bb104174694 +commit 18a8bac1a1567b6215928f96870554ea63f39aab Author: Matthias Hopf Date: Thu Dec 4 16:30:38 2008 +0100 randr: Rename pan() to set_origin(), and xf86CrtcPan() to xf86CrtcSetOrigin() - (cherry picked from commit 18a8bac1a1567b6215928f96870554ea63f39aab) - - Signed-off-by: Keith Packard -commit 68858b202a0c32e8cc3fb22ca4714c1baa05b44c +commit 825b2c2f4a59ac4852f90bbbddf18ab832297fdd Author: Matthias Hopf Date: Thu Dec 4 16:11:21 2008 +0100 randr: Nuke config-timestamp for panning - (cherry picked from commit 825b2c2f4a59ac4852f90bbbddf18ab832297fdd) - - Signed-off-by: Keith Packard -commit 7cbded550d3bebc35e2322a89d0afbb57b37b3da +commit eeeb98d1df59baaaec954b6318d788a37e388d11 Author: Matthias Hopf Date: Fri Nov 28 17:51:20 2008 +0100 randr: Protocol bits for panning support - (cherry picked from commit eeeb98d1df59baaaec954b6318d788a37e388d11) - - Signed-off-by: Keith Packard -commit bc05471d1184ebf72b793b1dceff9856eba616d2 +commit b929d721efdb17bcc94b9984c4f34d0df3d267d5 Author: Matthias Hopf Date: Fri Nov 28 17:49:31 2008 +0100 randr: Panning support - (cherry picked from commit b929d721efdb17bcc94b9984c4f34d0df3d267d5) - - Signed-off-by: Keith Packard -commit f7e2fee8fe9b47f1e898feb8419aacd9a32c1f01 +commit 834cbc16f3eb539704faade7bff347b161ce69d9 Author: Matthias Hopf Date: Fri Nov 28 17:39:23 2008 +0100 randr: Crtc interface update for panning support. - (cherry picked from commit 834cbc16f3eb539704faade7bff347b161ce69d9) - - Signed-off-by: Keith Packard -commit 27ca32eb05101e0e5624422dd25e1aa95b129d77 +commit a475eb9feec75e9ce1e316da0f1679acd7dd3aa8 Author: Matthias Hopf Date: Fri Nov 28 17:38:52 2008 +0100 randr: Weird enough, crtc->version was never set upon creation. Fix that. - (cherry picked from commit a475eb9feec75e9ce1e316da0f1679acd7dd3aa8) + +commit 9db84fac0cc767e23986223d22bc085cde0cc86f +Author: Jeremy Huddleston +Date: Tue Dec 2 14:54:10 2008 -0800 + + Removed unised option from configure.ac for launchd + (cherry picked from commit 87e4de0a9a8af6e5e0cbba74e585761f1160a6ab) + +commit fa4f2527a5002711fe47c02b14097032fd845dc4 +Author: Jeremy Huddleston +Date: Tue Dec 2 14:53:21 2008 -0800 + + XQuartz: pbproxy: Simplify linking + (cherry picked from commit 909cc5c4dca0f63e90505575bbd454b46a4670cc) + +commit 126d8a4c8a72b039903023dce0da64b251080e1d +Author: Paulo Cesar Pereira de Andrade +Date: Thu Dec 4 02:43:29 2008 -0200 + + Update .gitignore. - Signed-off-by: Keith Packard + Add files left by make distcheck and remove files that no longer + are generated. -commit 0d27dd23cf08a2dc3581f9db81371c2cdb798db0 -Author: Adam Jackson -Date: Mon Dec 8 16:28:00 2008 -0500 +commit 9826b95c198e74f89680cc247b9bd9dd884d72be +Author: Paulo Cesar Pereira de Andrade +Date: Thu Dec 4 02:05:05 2008 -0200 - Default to x86emu even on i386 linux + Correct make distcheck by removing dolt files. + +commit 5dbe70dd52fd8daf8d0797951cc5a758d2c3b44c +Author: Paulo Cesar Pereira de Andrade +Date: Thu Dec 4 01:57:46 2008 -0200 + + Remove dummylib. - vm86 mode is a bad idea anyway, and using the emulator everywhere - means we get a consistent set of bugs. - (cherry picked from commit 58a27d2932164e43c0db42b1286ec2f95250b420) + Only cvt required it, and only used XNF{,c}alloc + via xnf{,c}alloc macros. + Based on patch by Eric Anholt. + +commit f841d4e3cccbde02e91c948f5ffb9e32c8c3b3cc +Author: Julien Cristau +Date: Wed Dec 3 23:02:03 2008 +0100 + + Move RELEASE_DATE closer to AC_INIT so it's more likely to be updated + +commit 75b02dd0be2ef64c0f8e3138c90b5c5e48b17913 +Author: Paulo Cesar Pereira de Andrade +Date: Wed Dec 3 14:46:30 2008 -0200 + + Include if _X_EXPORT is not defined. + +commit dd128ddcdcbe254a9cdd973590f6a979a7f0427e +Author: Timo Aaltonen +Date: Wed Dec 3 18:40:29 2008 +0200 + + If AEI is on, disable 'vmmouse' in addition to 'kbd' and 'mouse'. - Signed-off-by: Keith Packard + Signed-off-by: Timo Aaltonen + Signed-off-by: Peter Hutterer -commit ff9b55d8cbc19e0e31a91034e332058acd967cd1 -Author: Sascha Hlusiak -Date: Mon Dec 8 12:24:39 2008 +0100 +commit 0b5ecabfb803cd820338fb0364521fe39b05578b +Author: Julien Cristau +Date: Wed Nov 26 21:19:55 2008 +0100 - ddxCtrls.c: XkbDDXUsesSoftRepeat always returns 1 now + randr: add swapped dispatch for RR[GS]etCrtcTransform - We'd like to do soft repeat in the server for all keys. Remove obscure check, that'd - prevent the server from autorepeating when delay is set to exactly 660ms and rate is - set to exactly 25 (interval=40). + Fix a memory leak in ProcRRGetCrtcTransform() while I'm at it. - Signed-off-by: Daniel Stone - (cherry picked from commit bbf811514d3cdf84790bad5b852942a4e636902b) + Signed-off-by: Julien Cristau + Cc: Keith Packard + +commit 110a71d11ab7a1a55a6a24d792457fdef0b0746d +Author: Kristian Høgsberg +Date: Wed Dec 3 11:22:38 2008 -0500 + + Test for DRI2 extension in dri_internal.h and only enable AIGLX DRI2 if found. + +commit fd2d40b7ec5d685dac55453eb1f2da672dc83126 +Author: Peter Hutterer +Date: Wed Dec 3 11:31:48 2008 +1000 + + Xi: change XIUnRegisterPropertyHandler to XIUnregisterPropertyHandler + + CamelCase can be taken too far, and AFAICT there's no consumers of that + function yet anyway. + + Signed-off-by: Peter Hutterer + +commit 49f77fff1495c0a2050fb18f9b1fc627839bbfc2 +Author: Paulo Cesar Pereira de Andrade +Date: Wed Dec 3 05:43:34 2008 -0200 + + Rework symbol visibility for easier maintenance + + Save in a few special cases, _X_EXPORT should not be used in C source + files. Instead, it should be used in headers, and the proper C source + include that header. Some special cases are symbols that need to be + shared between modules, but not expected to be used by external drivers, + and symbols that are accessible via LoaderSymbol/dlopen. + + This patch also adds conditionally some new sdk header files, depending + on extensions enabled. These files were added to match pattern for + other extensions/modules, that is, have the headers "deciding" symbol + visibility in the sdk. These headers are: + o Xext/panoramiXsrv.h, Xext/panoramiX.h + o fbpict.h (unconditionally) + o vidmodeproc.h + o mioverlay.h (unconditionally, used only by xaa) + o xfixes.h (unconditionally, symbols required by dri2) + + LoaderSymbol and similar functions now don't have different prototypes, + in loaderProcs.h and xf86Module.h, so that both headers can be included, + without the need of defining IN_LOADER. + + xf86NewInputDevice() device prototype readded to xf86Xinput.h, but + not exported (and with a comment about it). + +commit 0b8f8b24f718820a72ebdc52423c2e6a44e848c5 +Author: Stuart Bennett +Date: Tue Dec 2 22:52:53 2008 -0800 + + xf86Cursors: xf86_reload_cursors shouldn't unconditionally show hwcursor (#14820) + + Also, no need to call ShowCursor when SetCursorPosition already does it + Based on a previous patch by Maarten Maathuis Signed-off-by: Keith Packard -commit b0c64725526338cbc02708415e1aa9497cdc3a38 +commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a Author: Peter Hutterer -Date: Wed Nov 26 14:15:04 2008 +1000 +Date: Wed Dec 3 14:24:25 2008 +1000 - xfree86: don't FatalError on "too many input devices". + Let the DDX decide on the XkbRulesDefaults. - Just ignore devices after MAXDEVICES has been reached, but warn the user that - the devices are ignored. + Rather than assuming rules in the CoreKeyboardProc, init the default rules in + InitCoreDevices, then re-use them later. + + In the xfree86 DDX, set the rules to "base" or "evdev", depending on whether + we'll load kbd or evdev. + + If we create a new MD, use pc105,us as default and re-use the rules file used + previously. Signed-off-by: Peter Hutterer - Signed-off-by: Keith Packard -commit db5abde7ea0e482041d16d7d5f3715cd4f6222d3 +commit 463e02e7de5da3e582a3a049110a476713c7210e Author: Peter Hutterer -Date: Fri Dec 5 10:12:57 2008 +1000 +Date: Wed Dec 3 15:06:37 2008 +1000 - dix: fix calculation of valuator events. + xkb: Allow NULL as rulesFile in XkbSetRulesDflts. - Follow-up to 4971315296cb. countValuatorEvents was copied from GKVE where it - was obviously broken but nobody noticed. GPE had the correct version, but that - one got lost during de-duplication. Restoring the correct calculation - if we - have 6 valuators, we want 1 valuator event, not 2. + If no rules file is given, simply re-use the previous one. If no RF is given + the first time this function is called, use the built-in default. + This includes fixing the built-in default to something that actually exists. Signed-off-by: Peter Hutterer - (cherry picked from commit ee1a6c28418a6dad6c89f79a994f27bfbaa77368) + +commit e670fd889607fa712876218882cd4a9b46937661 +Author: Peter Hutterer +Date: Wed Dec 3 11:55:13 2008 +1000 + + dix: fix GetMaximumEventsNum(), may return a DCCE event too. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit d679cf70a79aa53e823f4fa51a7ab19837f26525 -Author: Tom Jaeger -Date: Mon Dec 8 11:38:12 2008 +1000 +commit 85d84c7cf2d368d1803dc2cdd03d6c9df8cc0430 +Author: Eric Anholt +Date: Tue Dec 2 17:33:43 2008 -0800 - Xi: XIGetDevice needs to ignore the MORE_EVENTS flag. + Fix GLX after 180bad84774493d48f2793a6281d825560944863. - Reported in X.Org Bug 18882, Comment 5. - + Sigh. + +commit 4a61ad427c634bcc38a31ce0f14ff5c2d3f706c7 +Author: Alan Coopersmith +Date: Tue Dec 2 14:35:45 2008 -0800 + + Update sample xorg.conf file + +commit c1db925d10fd37077bed90612ed95c3fd20cd2e2 +Author: Alan Coopersmith +Date: Tue Dec 2 14:32:48 2008 -0800 + + Add atKeynames.h to libdmxinput_a_SOURCES so it's included in tarballs - Signed-off-by: Peter Hutterer - (cherry picked from commit 78a62d7713c708d067d8824ec41b0a0225c1997f) + Reported by geearu in #xorg-devel + +commit 8561514574b3540c729bcc3acca9c943adcdc778 +Author: Alan Coopersmith +Date: Tue Dec 2 13:32:34 2008 -0800 + + Don't need to check uid/euid for every commandline argument - Signed-off-by: Keith Packard + Check uid/euid only when handling the arguments that are restricted + to root/non-setuid users -commit 480caacbdd20d47770cc9a698be9f7c98e87783d -Author: Peter Hutterer -Date: Mon Dec 8 12:12:39 2008 +1000 +commit 6de6ffff35ac03d49fa61de195d4a0605e0ef8bf +Author: Alan Coopersmith +Date: Tue Dec 2 13:19:08 2008 -0800 + + Remove unused config flags from FlagValues & FlagOptions + + FLAG_DISABLEMODINDEV, FLAG_MODINDEVALLOWNONLOCAL, & FLAG_HANDLE_SPECIAL_KEYS + +commit bb072019fa8dd292a50ef433d05caeefd1304a73 +Author: Peter Hutterer +Date: Mon Dec 1 16:57:06 2008 +1000 - xfree86: init EQ before trying to initialise the devices (#18890) + xfree86: don't render SW cursors for devices attached to VCP (#16805) - The kbd driver may send events during device initialisation, and these events - need the EQ set up already. + When leaving 3D games such as quake3 or sauerbraten, a cursor may stay on the + screen. This is caused by one run of SW rendering for the SD, even though the + SD was attached to the VCP and thus has HW rendering capabilities. - X.Org Bug 18890 + Check for the SD's attachment (like in all other functions) before deciding on + SW or HW rendering. - Signed-off-by: Peter Hutterer - (cherry picked from commit 39db182b637041255ed6dac739ff77c8e4e07c30) + X.Org Bug 16805 - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 991f0be6e2bfe3cc3df55b2fc75fe3900d5e0b94 -Author: Maarten Maathuis -Date: Sat Nov 29 14:30:55 2008 +0100 +commit 3a690598cf18c4cdc6aadd10a1ecf0772cacd34b +Author: Alan Coopersmith +Date: Tue Dec 2 12:59:57 2008 -0800 - randr: Avoid needlessly creating a shadow framebuffer. - - - pScreen->width and height were zero, so it didn't "fit" the screen. - (cherry picked from commit ffb484f7ef84099019b196ef97bfb2355eb6d52a) + Remove unused HandleSpecialKeys config option - Signed-off-by: Keith Packard + Was only used by "keyboard" driver - the last place the value was checked + was in xf86PostKbdEvent, which was removed in commit + 60ea7b51fe2b8a19a08b63db48504971a7a50ee6 -commit d6129ebf8dad9cfbc13dc8db7c780b023bf9a60b -Author: Timo Aaltonen -Date: Wed Dec 3 18:40:29 2008 +0200 +commit 1dfed222e93f4684c2a450944a9a0ea9e085c43f +Author: Bernhard Rosenkraenzer +Date: Tue Dec 2 09:01:56 2008 +1000 - If AEI is on, disable 'vmmouse' in addition to 'kbd' and 'mouse'. + Xext: fix MultiBuffer compilation error with TryClientEvents. (#18835) - Signed-off-by: Timo Aaltonen - Signed-off-by: Peter Hutterer - (cherry picked from commit dd128ddcdcbe254a9cdd973590f6a979a7f0427e) + X.Org Bug 18835 - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit 90900976ceee294fef4ae39e10869057c50f2021 -Author: Julien Cristau -Date: Wed Nov 26 21:19:55 2008 +0100 +commit 9ce995373e4aa4b1bf51b4adafa2324f781ec1cd +Author: Peter Hutterer +Date: Mon Dec 1 21:32:39 2008 +1000 - randr: add swapped dispatch for RR[GS]etCrtcTransform - - Fix a memory leak in ProcRRGetCrtcTransform() while I'm at it. + mi: UpdateSprite only if the device is attached. + +commit d507f60689f4e14383b0d24e63afc8cf836360d5 +Author: Peter Hutterer +Date: Wed Nov 26 14:15:04 2008 +1000 + + xfree86: don't FatalError on "too many input devices". - Signed-off-by: Julien Cristau - Cc: Keith Packard - (cherry picked from commit 0b5ecabfb803cd820338fb0364521fe39b05578b) + Just ignore devices after MAXDEVICES has been reached, but warn the user that + the devices are ignored. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit de83a342f483fbf3cc841929876002a3c47e3496 -Author: Kristian Høgsberg -Date: Wed Dec 3 11:22:38 2008 -0500 +commit 9bf761468fa3baf4c5fa40efa717b4b581d920f9 +Author: Peter Hutterer +Date: Fri Nov 28 11:44:58 2008 +1000 - Test for DRI2 extension in dri_internal.h and only enable AIGLX DRI2 if found. - (cherry picked from commit 110a71d11ab7a1a55a6a24d792457fdef0b0746d) - - Signed-off-by: Keith Packard + Xi: fix xi_filters size. -commit 3df1db67e37094ef263134a86ee82a36fc52f990 +commit 260e48c252c95fd1b1ba9ad7478791f6b9a67e2d Author: Peter Hutterer -Date: Wed Dec 3 11:31:48 2008 +1000 +Date: Fri Nov 28 11:29:06 2008 +1000 - Xi: change XIUnRegisterPropertyHandler to XIUnregisterPropertyHandler - - CamelCase can be taken too far, and AFAICT there's no consumers of that - function yet anyway. + dix: remove confusing (and wrong) comment. VCP is not the only pointer. Signed-off-by: Peter Hutterer - Signed-off-by: Keith Packard -commit ba666a969e938daa2176c12c4959393789b0a98d -Author: Keith Packard -Date: Tue Dec 9 20:36:41 2008 -0800 +commit 5d02e580d7c4144ea6f0984240fc913e05fec877 +Author: Peter Hutterer +Date: Fri Nov 28 11:46:15 2008 +1000 - Revert "dmx: claim we support XI 2." - - This reverts commit 8da8a0fec4b1b9d9208635dedb2f449dc99e0004. + dix: use UpdateFromMaster in GetProximityEvents. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit b268458eab2f213ec14dfe8013aa714c187e3aab -Author: Keith Packard -Date: Tue Dec 2 23:43:02 2008 -0800 +commit 95fc59a199f99bf167fbb09297a9bb0e33e31869 +Author: Peter Hutterer +Date: Fri Nov 28 14:55:15 2008 +1000 - Bump version to 1.5.99.2 (1.6 beta 2) - - Signed-off-by: Keith Packard + xkb: Extra sanity checks to prevent dev->key == NULL dereferencing. -commit d68632e2213adc0945dcdfca2e93f68aeab97457 -Author: Alan Coopersmith -Date: Tue Dec 2 14:32:48 2008 -0800 +commit a425abf0eaa61ee5ccb2f32a1af24edd190f7889 +Author: Peter Hutterer +Date: Wed Nov 26 12:20:00 2008 +1000 - Add atKeynames.h to libdmxinput_a_SOURCES so it's included in tarballs + xkb: don't attempt to filter events for devices without key classes. - Reported by geearu in #xorg-devel - (cherry picked from commit c1db925d10fd37077bed90612ed95c3fd20cd2e2) + Reported by Magnus Kessler. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer -commit f5ef57e5fef0be80d660c26ed370f608b4444a5e -Author: Adam Jackson -Date: Mon Dec 1 11:36:06 2008 -0500 +commit a85f0d6b98237d8a196de624207acf1983a1859a +Author: Peter Hutterer +Date: Wed Nov 26 11:15:05 2008 +1000 - randr: Don't send output property events on server exit + Xi: fix use of button->down - bitflags instead of int arrays. - If the Window resource type is already gone, there's no point in trying - to send events, all it can do is access already-freed memory. + The device's button down state array was changed to use DOWN_LENGTH and thus + bitflags for each button in cfcb3da7. - Relevant thread: + Update the DBSN events to copy this bit-wise state. + Update xkb and Xi to check for the bit flag instead of the array value. - http://lists.freedesktop.org/archives/xorg/2008-November/040443.html - (cherry picked from commit b0d371ab0a6efd4956c3677faa20b2ac15c33765) + Reported by ajax. - Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit 180bad84774493d48f2793a6281d825560944863 +Author: Paulo Cesar Pereira de Andrade +Date: Tue Dec 2 02:50:45 2008 -0200 -commit 40116cd5d0c205f4e8ab340dca80e38f8b78dddb + Add visibility flags to XSERVER_CFLAGS. + + This is done to actually change DIX_CFLAGS, as not all "modules" use + XORG_CFLAGS. + Also export the symbols that are required by other modules after + the change. + +commit 8c560422b44e012053612754430d2b87dc44ed59 Author: Alan Coopersmith Date: Mon Dec 1 20:02:34 2008 -0800 @@ -3502,75 +15712,20 @@ Date: Mon Dec 1 20:02:34 2008 -0800 The Xorg/xorg.conf sections on input device selection could use further updates to better match the current state of HAL-enabled configuration. - (cherry picked from commit 8c560422b44e012053612754430d2b87dc44ed59) - - Signed-off-by: Keith Packard -commit 4e5be5ad368b140d189fb69d394cf0c901f34d83 +commit 6a1850b8c677e2a2993f6f6b731ee3d35aa55d09 Author: Alan Coopersmith Date: Mon Dec 1 19:19:04 2008 -0800 Correct warning for unknown GlxVisuals option in conf file - (cherry picked from commit 6a1850b8c677e2a2993f6f6b731ee3d35aa55d09) - - Signed-off-by: Keith Packard - -commit ca744c371a138cfd19e826ba7f3847f32139ad64 -Author: Jay Cotton -Date: Mon Dec 1 16:06:09 2008 -0800 - - Sun bug 6618220: Xorg server core dump in xf86RandRModeRefresh(NULL) - - - (cherry picked from commit 5f3f14179edf48aad518f6f707bfdc37c27267c6) - - Signed-off-by: Keith Packard - -commit 78af5d81e818f4ac2fb43d9683fa634b3d1f7fc5 -Author: Alan Coopersmith -Date: Mon Dec 1 16:28:45 2008 -0800 - - Update See Also lists in Xorg & xorg.conf man pages - - Remove xorgconfig & xorgcfg - Update driver lists: - - Remove vga - - i810->intel - - via->openchrome - (cherry picked from commit 24c562f04b41d219c34f5fa3f963564accf329f2) - - Signed-off-by: Keith Packard - -commit e40841ce5afa0678b74b9eff37c7d304758309b6 -Author: Bernhard Rosenkraenzer -Date: Tue Dec 2 09:01:56 2008 +1000 - - Xext: fix MultiBuffer compilation error with TryClientEvents. (#18835) - - X.Org Bug 18835 - - Signed-off-by: Peter Hutterer - (cherry picked from commit 1dfed222e93f4684c2a450944a9a0ea9e085c43f) - -commit 0d902b05ad910cada46dcc2b85d8b0148aed35e6 -Author: Stuart Bennett -Date: Tue Dec 2 22:52:53 2008 -0800 - xf86Cursors: xf86_reload_cursors shouldn't unconditionally show hwcursor (#14820) - - Also, no need to call ShowCursor when SetCursorPosition already does it - Based on a previous patch by Maarten Maathuis - - Signed-off-by: Keith Packard - (cherry picked from commit 0b8f8b24f718820a72ebdc52423c2e6a44e848c5) - -commit cbf4fec52960ffd74b78ea45d0b917c76f553ebf +commit afeacb8e74b2a1e366e5ca9f0e58805d8d96c457 Author: Kristian Høgsberg Date: Mon Dec 1 20:53:17 2008 -0500 Bump dri2proto requirement to 1.99.3. -commit 670ac5d097c64d4f09ee3861d1ff21d5d6af3fdf +commit ad01e86b5c7c528adec8a1f95ecaa294f58a8922 Author: Kristian Høgsberg Date: Mon Dec 1 20:52:41 2008 -0500 @@ -3579,114 +15734,218 @@ Date: Mon Dec 1 20:52:41 2008 -0500 For this first iteration of DRI2 we don't have any vsync functionality in place yet, so back out the support in DRI2 and the protocol for now. -commit 862d5b2dc55e678921b3db710b2821b66d55ea2f -Author: Peter Hutterer -Date: Wed Nov 26 12:20:00 2008 +1000 +commit 24c562f04b41d219c34f5fa3f963564accf329f2 +Author: Alan Coopersmith +Date: Mon Dec 1 16:28:45 2008 -0800 - xkb: don't attempt to filter events for devices without key classes. - - Reported by Magnus Kessler. + Update See Also lists in Xorg & xorg.conf man pages - Signed-off-by: Peter Hutterer + Remove xorgconfig & xorgcfg + Update driver lists: + - Remove vga + - i810->intel + - via->openchrome -commit 41471afa7774a6598344ea7b488f993a0bd32e7f -Author: Peter Hutterer -Date: Fri Nov 28 14:55:15 2008 +1000 +commit bd147e6f4b03f344c967c88fd433877b14fe1912 +Author: Alan Coopersmith +Date: Mon Dec 1 16:08:55 2008 -0800 - xkb: Extra sanity checks to prevent dev->key == NULL dereferencing. + Remove hack to only load font modules if magic strings appear in font path -commit b983c4fa1ec13f6096badf9dd5ebbf55880bb6c1 -Author: Peter Hutterer -Date: Wed Nov 26 21:35:34 2008 +1000 +commit 5f3f14179edf48aad518f6f707bfdc37c27267c6 +Author: Jay Cotton +Date: Mon Dec 1 16:06:09 2008 -0800 - Require inputproto 1.5 - - Also claim to now support XI 1.5. + Sun bug 6618220: Xorg server core dump in xf86RandRModeRefresh(NULL) - Signed-off-by: Peter Hutterer - -commit f245c46d291dc22f40fb839bf21d2620091a84ef -Author: Peter Hutterer -Date: Fri Nov 28 14:21:05 2008 +1000 - - dix: don't detach SDs during grabs. + -commit 71f289f7d1b4fe79f25b229830047e71f50d8610 -Author: Peter Hutterer -Date: Fri Nov 28 14:05:58 2008 +1000 +commit 09df7cc5ad7b72d8a23c3e22fc718aad8c16f4d3 +Author: Kristian Høgsberg +Date: Mon Dec 1 12:41:10 2008 -0500 - dix: Don't deliver XI events from MDs. - - Restore the XI 1.x event model: VCP/VCK deliver core events only, SDs device - events only. + Avoid dereferencing NULL pScreen in xf86CrtcSetModeTransform(). - Signed-off-by: Peter Hutterer - -commit c910886737bf6ce7a4bd44d2149a1f0a810453d2 -Author: Peter Hutterer -Date: Fri Nov 28 13:49:40 2008 +1000 - - Xi: Purge XGE remainders, we don't have any XGE events anymore. + We can get there during PreInit as we set a mode for load detection. + At that time there's no pScreen anywhere, so just skip the optimization + then. -commit be4bf65d00a28cc77b939f00f115528a9024ab89 -Author: Peter Hutterer -Date: Fri Nov 28 09:22:04 2008 +1000 +commit b0d371ab0a6efd4956c3677faa20b2ac15c33765 +Author: Adam Jackson +Date: Mon Dec 1 11:36:06 2008 -0500 - input: don't switch MDs' classes around between SDs. + randr: Don't send output property events on server exit - Server 1.6 uses the X Input 1.x input model, where the core devices (VCP and - VCK) do not generate XI events. They don't have to swap device classes but - instead stay at the default number of classes at all times. - This means we can get rid of the DeviceClassesChangedEvents as well. - -commit aba1cbaadcde50a7a25f8aee06b66eec67a9145e -Author: Peter Hutterer -Date: Fri Nov 28 09:19:49 2008 +1000 - - dix: No DeviceEnterLeave events in server 1.6 - -commit 9739fac04520e3e0c338f74cedb58855a17fc899 -Author: Peter Hutterer -Date: Fri Nov 28 09:38:49 2008 +1000 - - Xi: don't allow VCP/VCK be OpenDevice'd, but allow all SDs. + If the Window resource type is already gone, there's no point in trying + to send events, all it can do is access already-freed memory. + + Relevant thread: - Reverting to traditional XI behaviour. + http://lists.freedesktop.org/archives/xorg/2008-November/040443.html -commit 7330cb56501defb0002815767d2dc7f5b2b8ca1c -Author: Peter Hutterer -Date: Fri Nov 28 09:35:48 2008 +1000 +commit 16b11cd03d8c5def07f0e598f237f71a37883a46 +Author: Paulo Cesar Pereira de Andrade +Date: Sun Nov 30 02:59:34 2008 -0200 - Xi: don't list attachment in ListInputDevices, but list all SDs. - - In XI2, we only list the VCP and the VCK as well as floating SDs to non-XI2 - clients. This is not the case here, we just list all devices. + Correct static symbol XkmReadTOC and first pass on compile warning fixes. - Signed-off-by: Peter Hutterer + The warnings corrected were only the ones that should correct + real problems. The most common one is 64 bit integers as + "printf %l" arguments. + Note that there is a patch related to this at: + http://bugs.freedesktop.org/show_bug.cgi?id=18204 -commit 1d307ed7f268d3bb511985c18d580ab8a104ed41 -Author: Peter Hutterer -Date: Fri Nov 28 09:34:56 2008 +1000 +commit fb22d4d928bc5d1a893494a059359da2ed2ac639 +Author: Paulo Cesar Pereira de Andrade +Date: Sun Nov 30 01:33:20 2008 -0200 - Xi: remove the GetExtensionVersion hack - don't reply with supported version. + Remove declarations of symbols that are never defined. - XI2 abuses the GEV request to reply with the min/major version of the - supported extension if the length for the name is 0. Don't do that, yet. - - Signed-off-by: Peter Hutterer + These symbols were removed from the X Server, or never declared. + One symbol that may need special attention is XkbBuildCoreState(), + that doesn't have a prototype anywhere, but is called from + xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros + XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in + include/xkbstr.h. + fb/wfbrename.h also may need some cleanup, as it makes several + "renames" of non existing symbols. -commit cfe7301bcf134ade26a81764be2ca5890eb29d5d -Author: Peter Hutterer -Date: Wed Nov 26 21:40:05 2008 +1000 +commit d6cbd4511e35a89a0353f11834c6fdb8d4d2189f +Author: Paulo Cesar Pereira de Andrade +Date: Sat Nov 29 23:56:06 2008 -0200 + + Export symbols defined in the sdk. + + This is the biggest "visibility" patch. Instead of doing a "export" + symbol on demand, export everything in the sdk, so that if some module + fails due to an unresolved symbol, it is because it is using a symbol + not in the sdk. + + Most exported symbols shouldn't really be made visible, neither + advertised in the sdk, as they are only used by a single shared object. + + Symbols in the sdk (or referenced in sdk macros), but not defined + anywhere include: + XkbBuildCoreState() + XkbInitialMap + XkbXIUnsupported + XkbCheckActionVMods() + XkbSendCompatNotify() + XkbDDXFakePointerButton() + XkbDDXApplyConfig() + _XkbStrCaseCmp() + _XkbErrMessages[] + _XkbErrCode + _XkbErrLocation + _XkbErrData + XkbAccessXDetailText() + XkbNKNDetailMaskText() + XkbLookupGroupAndLevel() + XkbInitAtoms() + XkbGetOrderedDrawables() + XkbFreeOrderedDrawables() + XkbConvertXkbComponents() + XkbWriteXKBSemantics() + XkbWriteXKBLayout() + XkbWriteXKBKeymap() + XkbWriteXKBFile() + XkbWriteCFile() + XkbWriteXKMFile() + XkbWriteToServer() + XkbMergeFile() + XkmFindTOCEntry() + XkmReadFileSection() + XkmReadFileSectionName() + InitExtInput() + xf86CheckButton() + xf86SwitchCoreDevice() + RamDacSetGamma() + RamDacRestoreDACValues() + xf86Bpp + xf86ConfigPix24 + xf86MouseCflags[] + xf86SupportedMouseTypes[] + xf86NumMouseTypes + xf86ChangeBusIndex() + xf86EntityEnter() + xf86EntityLeave() + xf86WrapperInit() + xf86RingBell() + xf86findOptionBoolean() + xf86debugListOptions() + LoadSubModuleLocal() + LoaderSymbolLocal() + getInt10Rec() + xf86CurrentScreen + xf86ReallocatePciResources() + xf86NewSerialNumber() + xf86RandRSetInitialMode() + fbCompositeSolidMask_nx1xn + fbCompositeSolidMask_nx8888x0565C + fbCompositeSolidMask_nx8888x8888C + fbCompositeSolidMask_nx8x0565 + fbCompositeSolidMask_nx8x0888 + fbCompositeSolidMask_nx8x8888 + fbCompositeSrc_0565x0565 + fbCompositeSrc_8888x0565 + fbCompositeSrc_8888x0888 + fbCompositeSrc_8888x8888 + fbCompositeSrcAdd_1000x1000 + fbCompositeSrcAdd_8000x8000 + fbCompositeSrcAdd_8888x8888 + fbGeneration + fbIn + fbOver + fbOver24 + fbOverlayGeneration + fbRasterizeEdges + fbRestoreAreas + fbSaveAreas + composeFunctions + VBEBuildVbeModeList() + VBECalcVbeModeIndex() + TIramdac3030CalculateMNPForClock() + shadowBufPtr + shadowFindBuf() + miRRGetScreenInfo() + RRSetScreenConfig() + RRModePruneUnused() + PixmanImageFromPicture() + extern int miPointerGetMotionEvents() + miClipPicture() + miRasterizeTriangle() + fbPush1toN() + fbInitializeBackingStore() + ddxBeforeReset() + SetupSprite() + InitSprite() + DGADeliverEvent() + + SPECIAL CASES + o defined as _X_INTERNAL + xf86NewInputDevice() + o defined as static + fbGCPrivateKey + fbOverlayScreenPrivateKey + fbScreenPrivateKey + fbWinPrivateKey + o defined in libXfont.so, but declared in xorg/dixfont.h + GetGlyphs() + QueryGlyphExtents() + QueryTextExtents() + ParseGlyphCachingMode() + InitGlyphCaching() + SetGlyphCachingMode() + +commit ffb484f7ef84099019b196ef97bfb2355eb6d52a +Author: Maarten Maathuis +Date: Sat Nov 29 14:30:55 2008 +0100 - Xi: remove all new XI2 protocol requests and their handling. - - This commit reverts to XI 1.4 requests, plus the input device property - requests. + randr: Avoid needlessly creating a shadow framebuffer. - Signed-off-by: Peter Hutterer + - pScreen->width and height were zero, so it didn't "fit" the screen. -commit db115e78705e59a376c6c425e7cb97cfb14ff2ac +commit 01eaebdc98f30fdf543af6337cdf012d3ff16f09 Author: George Staplin Date: Fri Nov 28 13:57:45 2008 -0700 @@ -3699,7 +15958,7 @@ Date: Fri Nov 28 13:57:45 2008 -0700 Use xalloc and xfree instead of malloc and free. (cherry picked from commit 755f53eb40c4329d8c82a31cb910c31fdd4ea12e) -commit d4fb734c631a20e93da22773e676f747c9f645ba +commit 3d527b91b4bfa31e78d5fc7a1447a4026876f14e Author: Jeremy Huddleston Date: Fri Nov 28 12:59:09 2008 -0800 @@ -3709,42 +15968,135 @@ Date: Fri Nov 28 12:59:09 2008 -0800 (cherry picked from commit fd4710aff3723d5f3422cf6a6530172eafc556d9) (cherry picked from commit 635019ad18db921fec99256294debd8571074abf) -commit e9ee5d4f61794d8d12109b44daa92868cb834954 +commit 71d3df7cc37403b5842227a035d9b995fd920e0b Author: Jeremy Huddleston Date: Fri Nov 28 11:18:14 2008 -0800 XQuartz: Avoid some warning messages being spewed to system.log by AppKit (cherry picked from commit 780eff230ce41ad785e54d61a82c731269ae0446) -commit 2ca2742aa588d48348971e7e7c4b75cae4a4f5ad +commit a9796c7bc43223df44f12a7be08e361aea963ec1 Author: Jeremy Huddleston Date: Fri Nov 28 01:45:37 2008 -0800 XQuarz: Setup our PATH and PWD earlier, so our initial client benefits from it as well... (cherry picked from commit cbae2b447357b3fed6ff19414c60dd3792045600) -commit added4cff7069f0c9d6b7047c6435d1599003ccb +commit ef4179f43a84d90f867b95ee5974ad26884253b5 Author: Jeremy Huddleston Date: Wed Nov 26 12:15:58 2008 -0800 XQuartz: Fix dead-acute on Greek keyboards (cherry picked from commit 807f2ec35c5f95b56b3e2b5eac51aec300fe5cb6) -commit 202908c6139b806bc599cd74f3b68172c14aa7b5 +commit 800f5c681bed300d8caf99935e8f80ea6c1993ba Author: Jeremy Huddleston Date: Wed Nov 26 12:07:52 2008 -0800 XQuartz: Fix Czech keyboard dead-acute (cherry picked from commit 771df2786bc60389489f0967e705c7c95bdda085) -commit c7c8eeaedc8dc24c3ed7930d4322eb811977536e +commit ac57bb36d56a7a4d41add8d5a206ff37544a1819 Author: Jeremy Huddleston Date: Tue Nov 25 20:14:37 2008 -0800 XQuartz: Fix an uninitialized keyboard_type on Tiger (cherry picked from commit 27b1a5eb3482052253ebdce1a09aedf05ac1b099) -commit f0e7a792bedbf9fe9844298ac74445a8116c52aa +commit 45c8bd0fe54273039fdaa1eeeafb81b5774f2c75 +Author: Paulo Cesar Pereira de Andrade +Date: Fri Nov 28 02:01:57 2008 -0200 + + Enable compiling the X Server and modules with hidden symbols by default. + + Note that it checks if support for symbol visibility is available by + the compiler, not if it is functional. It may have problems on non x86 + architectures. + To disable the feature, just pass the option "--disable-visibility" + to the X Server configure script. + Unless using an alternate build schema, drivers built from a git + checkout will use the same "visibility" related CFLAGS used to compile + the X Server. + +commit 31285d063ec4623cb0764437d6d57e244f20460d +Author: Paulo Cesar Pereira de Andrade +Date: Fri Nov 28 01:55:11 2008 -0200 + + Make visible symbols required by xorg modules. + + This patch exports all symbols required by the compilable + (in a x86 linux computer) xorg/driver/* modules. + Still missing symbols worth mentioning are: + + sunleo + miFindMaxBand no longer available + + intel (uxa/uxa-accel.c) + fbShmPutImage no longer available (and should have been static) + + mga + MGAGetClientPointer (should come from matrox's libhal) + + This is not a definitive "visibility" patch, as all it does is to + export missing symbols, but the modules that current don't compile, + may require more symbols once fixed, and third party drivers should + also require more symbols exported. + A "definitive" patch should export symbols defined in the sdk. + +commit 6f18ea7e656b79e58f66f51067334414767b413f +Author: Julien Cristau +Date: Wed Nov 26 19:07:04 2008 +0100 + + Typo fix + +commit efefc03f9b26738b69abb570c1af2167cc99c4d8 +Author: Julien Cristau +Date: Sun Oct 26 13:19:48 2008 +0100 + + Add missing include + + ../../../../hw/xfree86/xaa/xaaTables.c:9:14: warning: symbol 'byte_expand3' was not declared. Should it be static? + ../../../../hw/xfree86/xaa/xaaTables.c:53:14: warning: symbol 'byte_reversed_expand3' was not declared. Should it be static? + +commit 74bc792e1814849b8eee9e448e36c3568b821e6c +Author: Paulo Cesar Pereira de Andrade +Date: Thu Nov 27 05:34:14 2008 -0200 + + Export symbols required by the vesa and fbdev drivers. + + This is a minimal set of patches, to have an usable X Server when + compiling it with symbols hidden by default. + +commit 74e2669103b59d51b24ddc48f378b1d04a3effd4 +Author: Paulo Cesar Pereira de Andrade +Date: Thu Nov 27 04:33:44 2008 -0200 + + Export symbols also defined in libXfont. + + libXfont has stubs for these symbols, so, when compiling with hidden + symbols by default, these symbols must be visible in the X Server, or + the stubs in libXfont will be used. + +commit 87a7fb7438b70d07ebf240c530b8548a01021d48 +Author: Paulo Cesar Pereira de Andrade +Date: Thu Nov 27 00:12:59 2008 -0200 + + Rework code using return value of LoaderSymbol as a function pointer. + + The patch removes all macros in the format + define xf86_sym ((type (*)(argument-list))LoaderSymbol("sym")) + creates a new macro in the format + define xf86_sym sym + and ensures "sym" is a "visible" symbol. + The patch doesn't add or remove features, and is source and binary + compatible with previous shared objects (with the difference that it + requires the dlloader). + These symbols are a special case, as, due to the fact that LoaderSymbol + was being used to reference them, they are not easily found by "automated" + tools that check for missing symbols. And now it also have the benefit + that the compiler/loader "knows what is going on". + +commit fc708394318ed92c612e2938b335c08c1ffebb28 Author: Keith Packard Date: Wed Nov 26 15:49:02 2008 -0800 @@ -3753,7 +16105,12 @@ Date: Wed Nov 26 15:49:02 2008 -0800 This depends on randrproto 1.2.99.1 Signed-off-by: Keith Packard - (cherry picked from commit fc708394318ed92c612e2938b335c08c1ffebb28) + +commit f710ce269c020a39f58b2bfbd0fe5192a3279c72 +Author: Alan Hourihane +Date: Wed Nov 26 20:02:44 2008 +0000 + + bump master to 1.6.99.1 (now the 1.6 branch is created) commit f3edc1fb0210149f35eab4e413700b5c4ac48214 Author: Keith Packard diff --git a/xorg-server/Makefile.am b/xorg-server/Makefile.am index c605e87bc..cf1469ff7 100644 --- a/xorg-server/Makefile.am +++ b/xorg-server/Makefile.am @@ -1,5 +1,5 @@ AUTOMAKE_OPTIONS=dist-bzip2 foreign nostdinc -DISTCHECK_CONFIGURE_FLAGS=--disable-xorgcfg +ACLOCAL_AMFLAGS = -I m4 if COMPOSITE COMPOSITE_DIR=composite @@ -38,7 +38,8 @@ SUBDIRS = \ $(GLX_DIR) \ exa \ config \ - hw + hw \ + test aclocaldir = $(datadir)/aclocal aclocal_DATA = xorg-server.m4 @@ -48,15 +49,13 @@ pkgconfig_DATA = xorg-server.pc EXTRA_DIST = xorg-server.pc.in xorg-server.m4 ChangeLog autogen.sh +DISTCLEANFILES = doltcompile doltlibtool MAINTAINERCLEANFILES=ChangeLog -DISTCLEANFILES = doltlibtool doltcompile - .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) + $(CHANGELOG_CMD) dist-hook: ChangeLog @@ -81,7 +80,8 @@ DIST_SUBDIRS = \ glx \ exa \ config \ - hw + hw \ + test # gross hack relink: all diff --git a/xorg-server/Makefile.in b/xorg-server/Makefile.in index 2b9799ae7..23e7ca211 100644 --- a/xorg-server/Makefile.in +++ b/xorg-server/Makefile.in @@ -36,12 +36,16 @@ build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/xorg-server.pc.in \ - $(top_srcdir)/configure COPYING ChangeLog compile config.guess \ + $(srcdir)/Makefile.in $(srcdir)/shave-libtool.in \ + $(srcdir)/shave.in $(srcdir)/xorg-server.pc.in \ + $(top_srcdir)/configure COPYING ChangeLog config.guess \ config.sub depcomp install-sh ltmain.sh missing ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(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 \ @@ -53,8 +57,9 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = xorg-server.pc + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = shave shave-libtool xorg-server.pc CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = @@ -131,12 +136,12 @@ am__relativize = \ 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@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -157,9 +162,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -188,7 +196,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -197,9 +207,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -238,12 +252,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -263,7 +278,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -273,6 +287,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -286,11 +301,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -326,6 +340,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -350,7 +365,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -373,6 +387,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -404,14 +419,16 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = dist-bzip2 foreign nostdinc -DISTCHECK_CONFIGURE_FLAGS = --disable-xorgcfg +ACLOCAL_AMFLAGS = -I m4 @COMPOSITE_TRUE@COMPOSITE_DIR = composite @GLX_TRUE@GLX_DIR = glx @DBE_TRUE@DBE_DIR = dbe @@ -437,15 +454,16 @@ SUBDIRS = \ $(GLX_DIR) \ exa \ config \ - hw + hw \ + test aclocaldir = $(datadir)/aclocal aclocal_DATA = xorg-server.m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-server.pc EXTRA_DIST = xorg-server.pc.in xorg-server.m4 ChangeLog autogen.sh +DISTCLEANFILES = doltcompile doltlibtool MAINTAINERCLEANFILES = ChangeLog -DISTCLEANFILES = doltlibtool doltcompile DIST_SUBDIRS = \ doc \ include \ @@ -467,7 +485,8 @@ DIST_SUBDIRS = \ glx \ exa \ config \ - hw + hw \ + test all: all-recursive @@ -506,6 +525,10 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): +shave: $(top_builddir)/config.status $(srcdir)/shave.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +shave-libtool: $(top_builddir)/config.status $(srcdir)/shave-libtool.in + cd $(top_builddir) && $(SHELL) ./config.status $@ xorg-server.pc: $(top_builddir)/config.status $(srcdir)/xorg-server.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ @@ -1000,8 +1023,7 @@ uninstall-am: uninstall-aclocalDATA 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) + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/xorg-server/Xext/Makefile.am b/xorg-server/Xext/Makefile.am index 2f5c98b90..ac45f955a 100644 --- a/xorg-server/Xext/Makefile.am +++ b/xorg-server/Xext/Makefile.am @@ -26,6 +26,7 @@ BUILTIN_SRCS = \ sleepuntil.c \ sleepuntil.h \ sync.c \ + syncsrv.h \ xcmisc.c \ xtest.c @@ -62,6 +63,9 @@ endif XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c if XINERAMA BUILTIN_SRCS += $(XINERAMA_SRCS) +if XORG +sdk_HEADERS += panoramiXsrv.h panoramiX.h +endif endif # X-ACE extension: provides hooks for building security policy extensions @@ -69,6 +73,9 @@ endif XACE_SRCS = xace.c xace.h xacestr.h if XACE BUILTIN_SRCS += $(XACE_SRCS) +if XORG +sdk_HEADERS += xace.h xacestr.h +endif endif # SELinux extension: provides SELinux policy support for X objects diff --git a/xorg-server/Xext/Makefile.in b/xorg-server/Xext/Makefile.in index 7581a4de7..6c7a2e594 100644 --- a/xorg-server/Xext/Makefile.in +++ b/xorg-server/Xext/Makefile.in @@ -40,19 +40,24 @@ host_triplet = @host@ @RES_TRUE@am__append_3 = $(RES_SRCS) @SCREENSAVER_TRUE@am__append_4 = $(SCREENSAVER_SRCS) @XINERAMA_TRUE@am__append_5 = $(XINERAMA_SRCS) -@XACE_TRUE@am__append_6 = $(XACE_SRCS) -@XSELINUX_TRUE@am__append_7 = $(XSELINUX_SRCS) -@XCSECURITY_TRUE@am__append_8 = $(XCSECURITY_SRCS) -@XCALIBRATE_TRUE@am__append_9 = $(XCALIBRATE_SRCS) -@MULTIBUFFER_TRUE@am__append_10 = $(MULTIBUFFER_SRCS) -@XF86BIGFONT_TRUE@am__append_11 = $(BIGFONT_SRCS) -@DPMSExtension_TRUE@am__append_12 = $(DPMS_SRCS) +@XINERAMA_TRUE@@XORG_TRUE@am__append_6 = panoramiXsrv.h panoramiX.h +@XACE_TRUE@am__append_7 = $(XACE_SRCS) +@XACE_TRUE@@XORG_TRUE@am__append_8 = xace.h xacestr.h +@XSELINUX_TRUE@am__append_9 = $(XSELINUX_SRCS) +@XCSECURITY_TRUE@am__append_10 = $(XCSECURITY_SRCS) +@XCALIBRATE_TRUE@am__append_11 = $(XCALIBRATE_SRCS) +@MULTIBUFFER_TRUE@am__append_12 = $(MULTIBUFFER_SRCS) +@XF86BIGFONT_TRUE@am__append_13 = $(BIGFONT_SRCS) +@DPMSExtension_TRUE@am__append_14 = $(DPMS_SRCS) subdir = Xext DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -62,13 +67,14 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libXext_la_LIBADD = am__libXext_la_SOURCES_DIST = bigreq.c geext.c shape.c sleepuntil.c \ - sleepuntil.h sync.c xcmisc.c xtest.c shm.c shmint.h \ + sleepuntil.h sync.c syncsrv.h xcmisc.c xtest.c shm.c shmint.h \ panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h \ panoramiXprocs.c panoramiXSwap.c xace.c xace.h xacestr.h \ security.c securitysrv.h xcalibrate.c xf86bigfont.c xvmain.c \ @@ -110,10 +116,10 @@ libXext_la_OBJECTS = $(am_libXext_la_OBJECTS) @XORG_TRUE@am_libXext_la_rpath = libXextbuiltin_la_LIBADD = am__libXextbuiltin_la_SOURCES_DIST = bigreq.c geext.c shape.c \ - sleepuntil.c sleepuntil.h sync.c xcmisc.c xtest.c shm.c \ - shmint.h panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h \ - panoramiXprocs.c panoramiXSwap.c xace.c xace.h xacestr.h \ - security.c securitysrv.h xcalibrate.c xf86bigfont.c + sleepuntil.c sleepuntil.h sync.c syncsrv.h xcmisc.c xtest.c \ + shm.c shmint.h panoramiX.c panoramiX.h panoramiXh.h \ + panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c xace.c xace.h \ + xacestr.h security.c securitysrv.h xcalibrate.c xf86bigfont.c @XORG_TRUE@am_libXextbuiltin_la_OBJECTS = $(am__objects_13) libXextbuiltin_la_OBJECTS = $(am_libXextbuiltin_la_OBJECTS) @XORG_TRUE@am_libXextbuiltin_la_rpath = @@ -139,7 +145,8 @@ SOURCES = $(libXext_la_SOURCES) $(libXextbuiltin_la_SOURCES) \ DIST_SOURCES = $(am__libXext_la_SOURCES_DIST) \ $(am__libXextbuiltin_la_SOURCES_DIST) \ $(am__libXextmodule_la_SOURCES_DIST) -am__sdk_HEADERS_DIST = xvdix.h xvmcext.h geext.h geint.h shmint.h +am__sdk_HEADERS_DIST = xvdix.h xvmcext.h geext.h geint.h shmint.h \ + panoramiXsrv.h panoramiX.h xace.h xacestr.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -171,6 +178,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -191,9 +199,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -222,7 +233,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -231,9 +244,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -272,12 +289,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -297,7 +315,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -307,6 +324,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -320,11 +338,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -360,6 +377,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -384,7 +402,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -407,6 +424,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -438,7 +456,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -455,17 +475,18 @@ top_srcdir = @top_srcdir@ @XORG_TRUE@noinst_LTLIBRARIES = libXext.la libXextbuiltin.la libXextmodule.la INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod AM_CFLAGS = $(DIX_CFLAGS) -@XORG_TRUE@sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h +@XORG_TRUE@sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h \ +@XORG_TRUE@ $(am__append_6) $(am__append_8) # Sources always included in libXextbuiltin.la & libXext.la BUILTIN_SRCS = bigreq.c geext.c shape.c sleepuntil.c sleepuntil.h \ - sync.c xcmisc.c xtest.c $(am__append_1) $(am__append_5) \ - $(am__append_6) $(am__append_8) $(am__append_9) \ - $(am__append_11) + sync.c syncsrv.h xcmisc.c xtest.c $(am__append_1) \ + $(am__append_5) $(am__append_7) $(am__append_10) \ + $(am__append_11) $(am__append_13) # Sources always included in libXextmodule.la & libXext.la. That's right, zero. MODULE_SRCS = $(am__append_2) $(am__append_3) $(am__append_4) \ - $(am__append_7) $(am__append_10) $(am__append_12) + $(am__append_9) $(am__append_12) $(am__append_14) # Optional sources included if extension enabled by configure.ac rules diff --git a/xorg-server/Xext/bigreq.c b/xorg-server/Xext/bigreq.c index 1e807d820..582b670b0 100644 --- a/xorg-server/Xext/bigreq.c +++ b/xorg-server/Xext/bigreq.c @@ -26,7 +26,6 @@ from The Open Group. */ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -37,7 +36,7 @@ from The Open Group. #include "os.h" #include "dixstruct.h" #include "extnsionst.h" -#include +#include #include "opaque.h" #include "modinit.h" @@ -52,8 +51,7 @@ BigReqExtensionInit(INITARGS) } static int -ProcBigReqDispatch (client) - ClientPtr client; +ProcBigReqDispatch (ClientPtr client) { REQUEST(xBigReqEnableReq); xBigReqEnableReply rep; @@ -66,6 +64,7 @@ ProcBigReqDispatch (client) return BadRequest; REQUEST_SIZE_MATCH(xBigReqEnableReq); client->big_requests = TRUE; + memset(&rep, 0, sizeof(xBigReqEnableReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; diff --git a/xorg-server/Xext/dpms.c b/xorg-server/Xext/dpms.c index bad7aa64f..df63a8bf1 100644 --- a/xorg-server/Xext/dpms.c +++ b/xorg-server/Xext/dpms.c @@ -26,13 +26,6 @@ Equipment Corporation. ******************************************************************/ -/* - * HISTORY - * - * @(#)RCSfile: dpms.c,v Revision: 1.1.4.5 (DEC) Date: 1996/03/04 15:27:00 - */ - - #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -44,42 +37,12 @@ Equipment Corporation. #include "dixstruct.h" #include "extnsionst.h" #include "opaque.h" -#define DPMS_SERVER -#include -#include +#include #include "dpmsproc.h" #include "modinit.h" -static DISPATCH_PROC(ProcDPMSDispatch); -static DISPATCH_PROC(SProcDPMSDispatch); -static DISPATCH_PROC(ProcDPMSGetVersion); -static DISPATCH_PROC(SProcDPMSGetVersion); -static DISPATCH_PROC(ProcDPMSGetTimeouts); -static DISPATCH_PROC(SProcDPMSGetTimeouts); -static DISPATCH_PROC(ProcDPMSSetTimeouts); -static DISPATCH_PROC(SProcDPMSSetTimeouts); -static DISPATCH_PROC(ProcDPMSEnable); -static DISPATCH_PROC(SProcDPMSEnable); -static DISPATCH_PROC(ProcDPMSDisable); -static DISPATCH_PROC(SProcDPMSDisable); -static DISPATCH_PROC(ProcDPMSForceLevel); -static DISPATCH_PROC(SProcDPMSForceLevel); -static DISPATCH_PROC(ProcDPMSInfo); -static DISPATCH_PROC(SProcDPMSInfo); -static DISPATCH_PROC(ProcDPMSCapable); -static DISPATCH_PROC(SProcDPMSCapable); - -void -DPMSExtensionInit(INITARGS) -{ - AddExtension(DPMSExtensionName, 0, 0, - ProcDPMSDispatch, SProcDPMSDispatch, - NULL, StandardMinorOpcode); -} - static int -ProcDPMSGetVersion(client) - ClientPtr client; +ProcDPMSGetVersion(ClientPtr client) { /* REQUEST(xDPMSGetVersionReq); */ xDPMSGetVersionReply rep; @@ -123,8 +86,7 @@ ProcDPMSCapable(ClientPtr client) } static int -ProcDPMSGetTimeouts(client) - ClientPtr client; +ProcDPMSGetTimeouts(ClientPtr client) { /* REQUEST(xDPMSGetTimeoutsReq); */ xDPMSGetTimeoutsReply rep; @@ -150,8 +112,7 @@ ProcDPMSGetTimeouts(client) } static int -ProcDPMSSetTimeouts(client) - ClientPtr client; +ProcDPMSSetTimeouts(ClientPtr client) { REQUEST(xDPMSSetTimeoutsReq); @@ -177,8 +138,7 @@ ProcDPMSSetTimeouts(client) } static int -ProcDPMSEnable(client) - ClientPtr client; +ProcDPMSEnable(ClientPtr client) { Bool was_enabled = DPMSEnabled; @@ -194,8 +154,7 @@ ProcDPMSEnable(client) } static int -ProcDPMSDisable(client) - ClientPtr client; +ProcDPMSDisable(ClientPtr client) { /* REQUEST(xDPMSDisableReq); */ @@ -209,8 +168,7 @@ ProcDPMSDisable(client) } static int -ProcDPMSForceLevel(client) - ClientPtr client; +ProcDPMSForceLevel(ClientPtr client) { REQUEST(xDPMSForceLevelReq); @@ -219,19 +177,10 @@ ProcDPMSForceLevel(client) if (!DPMSEnabled) return BadMatch; - if (stuff->level == DPMSModeOn) { - lastDeviceEventTime.milliseconds = - GetTimeInMillis(); - } else if (stuff->level == DPMSModeStandby) { - lastDeviceEventTime.milliseconds = - GetTimeInMillis() - DPMSStandbyTime; - } else if (stuff->level == DPMSModeSuspend) { - lastDeviceEventTime.milliseconds = - GetTimeInMillis() - DPMSSuspendTime; - } else if (stuff->level == DPMSModeOff) { - lastDeviceEventTime.milliseconds = - GetTimeInMillis() - DPMSOffTime; - } else { + if (stuff->level != DPMSModeOn && + stuff->level != DPMSModeStandby && + stuff->level != DPMSModeSuspend && + stuff->level != DPMSModeOff) { client->errorValue = stuff->level; return BadValue; } @@ -265,8 +214,7 @@ ProcDPMSInfo(ClientPtr client) } static int -ProcDPMSDispatch (client) - ClientPtr client; +ProcDPMSDispatch (ClientPtr client) { REQUEST(xReq); @@ -294,8 +242,7 @@ ProcDPMSDispatch (client) } static int -SProcDPMSGetVersion(client) - ClientPtr client; +SProcDPMSGetVersion(ClientPtr client) { int n; REQUEST(xDPMSGetVersionReq); @@ -320,8 +267,7 @@ SProcDPMSCapable(ClientPtr client) } static int -SProcDPMSGetTimeouts(client) - ClientPtr client; +SProcDPMSGetTimeouts(ClientPtr client) { REQUEST(xDPMSGetTimeoutsReq); int n; @@ -333,8 +279,7 @@ SProcDPMSGetTimeouts(client) } static int -SProcDPMSSetTimeouts(client) - ClientPtr client; +SProcDPMSSetTimeouts(ClientPtr client) { REQUEST(xDPMSSetTimeoutsReq); int n; @@ -349,8 +294,7 @@ SProcDPMSSetTimeouts(client) } static int -SProcDPMSEnable(client) - ClientPtr client; +SProcDPMSEnable(ClientPtr client) { REQUEST(xDPMSEnableReq); int n; @@ -362,8 +306,7 @@ SProcDPMSEnable(client) } static int -SProcDPMSDisable(client) - ClientPtr client; +SProcDPMSDisable(ClientPtr client) { REQUEST(xDPMSDisableReq); int n; @@ -375,8 +318,7 @@ SProcDPMSDisable(client) } static int -SProcDPMSForceLevel(client) - ClientPtr client; +SProcDPMSForceLevel(ClientPtr client) { REQUEST(xDPMSForceLevelReq); int n; @@ -390,8 +332,7 @@ SProcDPMSForceLevel(client) } static int -SProcDPMSInfo(client) - ClientPtr client; +SProcDPMSInfo(ClientPtr client) { REQUEST(xDPMSInfoReq); int n; @@ -403,8 +344,7 @@ SProcDPMSInfo(client) } static int -SProcDPMSDispatch (client) - ClientPtr client; +SProcDPMSDispatch (ClientPtr client) { REQUEST(xReq); switch (stuff->data) @@ -429,3 +369,11 @@ SProcDPMSDispatch (client) return BadRequest; } } + +void +DPMSExtensionInit(INITARGS) +{ + AddExtension(DPMSExtensionName, 0, 0, + ProcDPMSDispatch, SProcDPMSDispatch, + NULL, StandardMinorOpcode); +} diff --git a/xorg-server/Xext/dpmsproc.h b/xorg-server/Xext/dpmsproc.h index d57f57318..c1df56fdf 100644 --- a/xorg-server/Xext/dpmsproc.h +++ b/xorg-server/Xext/dpmsproc.h @@ -1,4 +1,3 @@ - /* Prototypes for functions that the DDX must provide */ #ifdef HAVE_DIX_CONFIG_H @@ -11,7 +10,6 @@ #include "dixstruct.h" int DPMSSet(ClientPtr client, int level); -int DPMSGet(int *plevel); Bool DPMSSupported(void); #endif diff --git a/xorg-server/Xext/dpmsstubs.c b/xorg-server/Xext/dpmsstubs.c index 0f59d5160..f0f54d293 100644 --- a/xorg-server/Xext/dpmsstubs.c +++ b/xorg-server/Xext/dpmsstubs.c @@ -39,11 +39,6 @@ Bool DPMSSupported(void) return FALSE; } -int DPMSGet(int *plevel) -{ - return -1; -} - int DPMSSet(ClientPtr client, int level) { return Success; diff --git a/xorg-server/Xext/geext.c b/xorg-server/Xext/geext.c index 7ab99517d..1ddcbb1f6 100644 --- a/xorg-server/Xext/geext.c +++ b/xorg-server/Xext/geext.c @@ -58,7 +58,6 @@ static const int version_requests[] = { /* Forward declarations */ static void SGEGenericEvent(xEvent* from, xEvent* to); -static void GERecalculateWinMask(WindowPtr pWin); #define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) @@ -217,43 +216,6 @@ SGEGenericEvent(xEvent* from, xEvent* to) GEExtensions[gefrom->extension & 0x7F].evswap(gefrom, geto); } -/** - * Resource callback, invoked when the client disconnects and the associated - * GE masks must be destroyed. - */ -static int -GEClientGone(WindowPtr pWin, XID id) -{ - GenericClientMasksPtr gclmask; - GenericMaskPtr gmask, prev = NULL; - - if (!pWin || !pWin->optional) - return Success; - - gclmask = pWin->optional->geMasks; - for (gmask = gclmask->geClients; gmask; gmask = gmask->next) - { - if (gmask->resource == id) - { - if (prev) - { - prev->next = gmask->next; - xfree(gmask); - } else { - gclmask->geClients = NULL; - CheckWindowOptionalNeed(pWin); - GERecalculateWinMask(pWin); - xfree(gmask); - } - return Success; - } - prev = gmask; - } - - FatalError("Client not a GE client"); - return BadImplementation; -} - /* Init extension, register at server. * Since other extensions may rely on XGE (XInput does already), it is a good * idea to init XGE first, before any other extension. @@ -277,9 +239,6 @@ GEExtensionInit(void) GEErrorBase = extEntry->errorBase; GEEventType = GEEventBase; - RT_GECLIENT = CreateNewResourceType((DeleteType)GEClientGone); - RegisterResourceName(RT_GECLIENT, "GECLIENT"); - memset(GEExtensions, 0, sizeof(GEExtensions)); EventSwapVector[GenericEvent] = (EventSwapPtr) SGEGenericEvent; @@ -302,16 +261,13 @@ GEExtensionInit(void) */ void GERegisterExtension(int extension, - void (*ev_swap)(xGenericEvent* from, xGenericEvent* to), - void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, - WindowPtr pWin, GrabPtr pGrab)) + void (*ev_swap)(xGenericEvent* from, xGenericEvent* to)) { if ((extension & 0x7F) >= MAXEXTENSIONS) FatalError("GE: extension > MAXEXTENSIONS. This should not happen.\n"); /* extension opcodes are > 128, might as well save some space here */ GEExtensions[extension & 0x7f].evswap = ev_swap; - GEExtensions[extension & 0x7f].evfill = ev_fill; } @@ -326,149 +282,3 @@ GEInitEvent(xGenericEvent* ev, int extension) ev->length = 0; } -/* Recalculates the summary mask for the window. */ -static void -GERecalculateWinMask(WindowPtr pWin) -{ - int i; - GenericMaskPtr it; - GenericClientMasksPtr evmasks; - - if (!pWin->optional) - return; - - evmasks = pWin->optional->geMasks; - - for (i = 0; i < MAXEXTENSIONS; i++) - { - evmasks->eventMasks[i] = 0; - } - - it = pWin->optional->geMasks->geClients; - while(it) - { - for (i = 0; i < MAXEXTENSIONS; i++) - { - evmasks->eventMasks[i] |= it->eventMask[i]; - } - it = it->next; - } -} - -/* Set generic event mask for given window. */ -void -GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, - WindowPtr pWin, int extension, Mask mask) -{ - GenericMaskPtr cli; - - extension = (extension & 0x7F); - - if (extension >= MAXEXTENSIONS) - { - ErrorF("Invalid extension number.\n"); - return; - } - - if (!pWin->optional && !MakeWindowOptional(pWin)) - { - ErrorF("GE: Could not make window optional.\n"); - return; - } - - if (mask) - { - GenericClientMasksPtr evmasks = pWin->optional->geMasks; - - /* check for existing client */ - cli = evmasks->geClients; - while(cli) - { - if (rClient(cli) == pClient && cli->dev == pDev) - break; - cli = cli->next; - } - if (!cli) - { - /* new client and/or new device */ - cli = (GenericMaskPtr)xcalloc(1, sizeof(GenericMaskRec)); - if (!cli) - { - ErrorF("GE: Insufficient memory to alloc client.\n"); - return; - } - cli->next = evmasks->geClients; - cli->resource = FakeClientID(pClient->index); - cli->dev = pDev; - evmasks->geClients = cli; - AddResource(cli->resource, RT_GECLIENT, (pointer)pWin); - } - cli->eventMask[extension] = mask; - } else - { - /* remove client. */ - cli = pWin->optional->geMasks->geClients; - if (rClient(cli) == pClient && cli->dev == pDev) - { - pWin->optional->geMasks->geClients = cli->next; - xfree(cli); - } else - { - GenericMaskPtr prev = cli; - cli = cli->next; - - while(cli) - { - if (rClient(cli) == pClient && cli->dev == pDev) - { - prev->next = cli->next; - xfree(cli); - break; - } - prev = cli; - cli = cli->next; - } - } - if (!cli) - return; - } - - GERecalculateWinMask(pWin); -} - -/** - * Return TRUE if the mask for the given device is set. - * @param pWin Window the event may be delivered to. - * @param pDev Device the device originating the event. May be NULL. - * @param extension Extension ID - * @param mask Event mask - */ -BOOL -GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, - int extension, Mask mask) -{ - GenericMaskPtr gemask; - - if (!pWin->optional || !pWin->optional->geMasks) - return FALSE; - - extension &= 0x7F; - - if (!pWin->optional->geMasks->eventMasks[extension] & mask) - return FALSE; - - - gemask = pWin->optional->geMasks->geClients; - - while(gemask) - { - if ((!gemask->dev || gemask->dev == pDev) && - (gemask->eventMask[extension] & mask)) - return TRUE; - - gemask = gemask->next; - } - - return FALSE; -} - diff --git a/xorg-server/Xext/geext.h b/xorg-server/Xext/geext.h index 3d1665373..8e6dbeb24 100644 --- a/xorg-server/Xext/geext.h +++ b/xorg-server/Xext/geext.h @@ -34,46 +34,23 @@ from the author. #define _GEEXT_H_ #include - -/** - * This struct is used both in the window and by grabs to determine the event - * mask for a client. - * A window will have a linked list of these structs, with one entry per - * client per device, null-terminated. - * A grab has only one instance of this struct. - */ -typedef struct _GenericMaskRec { - struct _GenericMaskRec* next; - XID resource; /* id for the resource manager */ - DeviceIntPtr dev; - Mask eventMask[MAXEXTENSIONS]; /* one mask per extension */ -} GenericMaskRec, *GenericMaskPtr; - - -/* Struct to keep information about registered extensions - * - * evswap ... use to swap event fields for different byte ordered clients. - * evfill ... use to fill various event fields from the given parameters. - */ +/** Struct to keep information about registered extensions */ typedef struct _GEExtension { + /** Event swapping routine */ void (*evswap)(xGenericEvent* from, xGenericEvent* to); - void (*evfill)(xGenericEvent* ev, - DeviceIntPtr pDev, /* device */ - WindowPtr pWin, /* event window */ - GrabPtr pGrab /* current grab, may be NULL */ - ); } GEExtension, *GEExtensionPtr; /* All registered extensions and their handling functions. */ -extern GEExtension GEExtensions[MAXEXTENSIONS]; +extern _X_EXPORT GEExtension GEExtensions[MAXEXTENSIONS]; +/* Typecast to generic event */ +#define GEV(ev) ((xGenericEvent*)(ev)) /* Returns the extension offset from the event */ -#define GEEXT(ev) (((xGenericEvent*)(ev))->extension) +#define GEEXT(ev) (GEV(ev)->extension) +/* Return zero-based extension offset (offset - 128). Only for use in arrays */ #define GEEXTIDX(ev) (GEEXT(ev) & 0x7F) -/* Typecast to generic event */ -#define GEV(ev) ((xGenericEvent*)(ev)) /* True if mask is set for extension on window */ #define GEMaskIsSet(pWin, extension, mask) \ ((pWin)->optional && \ @@ -86,29 +63,21 @@ extern GEExtension GEExtensions[MAXEXTENSIONS]; /* Returns the event_fill for the given event */ #define GEEventFill(ev) \ - GEExtensions[GEEXTIDX(xE)].evfill + GEExtensions[GEEXTIDX(ev)].evfill #define GEIsType(ev, ext, ev_type) \ - ((ev->u.u.type == GenericEvent) && \ - ((xGenericEvent*)(ev))->extension == ext && \ - ((xGenericEvent*)(ev))->evtype == ev_type) + ((GEV(ev)->type == GenericEvent) && \ + GEEXT(ev) == (ext) && \ + GEV(ev)->evtype == (ev_type)) /* Interface for other extensions */ -void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, - WindowPtr pWin, int extension, Mask mask); - -void GERegisterExtension( +extern _X_EXPORT void GERegisterExtension( int extension, - void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to), - void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, - WindowPtr pWin, GrabPtr pGrab) - ); + void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to)); -void GEInitEvent(xGenericEvent* ev, int extension); -BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, - int extension, Mask mask); +extern _X_EXPORT void GEInitEvent(xGenericEvent* ev, int extension); -void GEExtensionInit(void); +extern _X_EXPORT void GEExtensionInit(void); #endif /* _GEEXT_H_ */ diff --git a/xorg-server/Xext/geint.h b/xorg-server/Xext/geint.h index 60cba7d72..881d30661 100644 --- a/xorg-server/Xext/geint.h +++ b/xorg-server/Xext/geint.h @@ -29,7 +29,6 @@ #ifndef _GEINT_H_ #define _GEINT_H_ -#define NEED_EVENTS #include #include #include "misc.h" @@ -38,10 +37,10 @@ #include "extnsionst.h" #include -extern int GEEventType; -extern int GEEventBase; -extern int GEErrorBase; -extern DevPrivateKey GEClientPrivateKey; +extern _X_EXPORT int GEEventType; +extern _X_EXPORT int GEEventBase; +extern _X_EXPORT int GEErrorBase; +extern _X_EXPORT DevPrivateKey GEClientPrivateKey; typedef struct _GEClientInfo { CARD32 major_version; @@ -50,7 +49,7 @@ typedef struct _GEClientInfo { #define GEGetClient(pClient) ((GEClientInfoPtr)(dixLookupPrivate(&((pClient)->devPrivates), GEClientPrivateKey))) -extern int (*ProcGEVector[/*GENumRequests*/])(ClientPtr); -extern int (*SProcGEVector[/*GENumRequests*/])(ClientPtr); +extern _X_EXPORT int (*ProcGEVector[/*GENumRequests*/])(ClientPtr); +extern _X_EXPORT int (*SProcGEVector[/*GENumRequests*/])(ClientPtr); #endif /* _GEINT_H_ */ diff --git a/xorg-server/Xext/mbuf.c b/xorg-server/Xext/mbuf.c index 39b8ba11e..55e732a9f 100644 --- a/xorg-server/Xext/mbuf.c +++ b/xorg-server/Xext/mbuf.c @@ -24,8 +24,6 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -205,7 +203,7 @@ MultibufferExtensionInit() for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; - if (!(pMultibufferScreen = (MultibufferScreenPtr) xalloc (sizeof (MultibufferScreenRec)))) + if (!(pMultibufferScreen = xalloc (sizeof (MultibufferScreenRec)))) { for (j = 0; j < i; j++) xfree (dixLookupPrivate(&screenInfo.screens[j]->devPrivates, MultibufferScreenPrivKey)); @@ -350,8 +348,7 @@ CreateImageBuffers (pWin, nbuf, ids, action, hint) xRectangle clearRect; DestroyImageBuffers(pWin); - pMultibuffers = (MultibuffersPtr) xalloc (sizeof (MultibuffersRec) + - nbuf * sizeof (MultibufferRec)); + pMultibuffers = xalloc (sizeof (MultibuffersRec) + nbuf * sizeof (MultibufferRec)); if (!pMultibuffers) return BadAlloc; pMultibuffers->pWindow = pWin; @@ -433,7 +430,7 @@ ProcCreateImageBuffers (client) int len, nbuf, i, err, rc; REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq); - len = stuff->length - (sizeof(xMbufCreateImageBuffersReq) >> 2); + len = stuff->length - bytes_to_int32(sizeof(xMbufCreateImageBuffersReq)); if (len == 0) return BadLength; rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); @@ -501,13 +498,13 @@ ProcDisplayImageBuffers (client) REQUEST_AT_LEAST_SIZE (xMbufDisplayImageBuffersReq); - nbuf = stuff->length - (sizeof (xMbufDisplayImageBuffersReq) >> 2); + nbuf = stuff->length - bytes_to_int32(sizeof (xMbufDisplayImageBuffersReq)); if (!nbuf) return Success; minDelay = stuff->minDelay; ids = (XID *) &stuff[1]; - ppMultibuffers = (MultibuffersPtr *) xalloc(nbuf * sizeof (MultibuffersPtr)); - pMultibuffer = (MultibufferPtr *) xalloc(nbuf * sizeof (MultibufferPtr)); + ppMultibuffers = xalloc(nbuf * sizeof (MultibuffersPtr)); + pMultibuffer = xalloc(nbuf * sizeof (MultibufferPtr)); if (!ppMultibuffers || !pMultibuffer) { if (ppMultibuffers) xfree(ppMultibuffers); @@ -595,7 +592,7 @@ ProcSetMBufferAttributes (client) pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); if (!pMultibuffers) return BadMatch; - len = stuff->length - (sizeof (xMbufSetMBufferAttributesReq) >> 2); + len = stuff->length - bytes_to_int32(sizeof (xMbufSetMBufferAttributesReq)); vmask = stuff->valueMask; if (len != Ones (vmask)) return BadLength; @@ -647,7 +644,7 @@ ProcGetMBufferAttributes (client) pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); if (!pMultibuffers) return BadAccess; - ids = (XID *) xalloc (pMultibuffers->numMultibuffer * sizeof (XID)); + ids = xalloc (pMultibuffers->numMultibuffer * sizeof (XID)); if (!ids) return BadAlloc; for (i = 0; i < pMultibuffers->numMultibuffer; i++) @@ -690,7 +687,7 @@ ProcSetBufferAttributes (client) pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); if (!pMultibuffer) return MultibufferErrorBase + MultibufferBadBuffer; - len = stuff->length - (sizeof (xMbufSetBufferAttributesReq) >> 2); + len = stuff->length - bytes_to_int32(sizeof (xMbufSetBufferAttributesReq)); vmask = stuff->valueMask; if (len != Ones (vmask)) return BadLength; @@ -784,14 +781,13 @@ ProcGetBufferInfo (client) pDepth = &pScreen->allowedDepths[i]; nInfo += pDepth->numVids; } - pInfo = (xMbufBufferInfo *) - xalloc (nInfo * sizeof (xMbufBufferInfo)); + pInfo = xalloc (nInfo * sizeof (xMbufBufferInfo)); if (!pInfo) return BadAlloc; rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = nInfo * (sizeof (xMbufBufferInfo) >> 2); + rep.length = nInfo * bytes_to_int32(sizeof (xMbufBufferInfo)); rep.normalInfo = nInfo; rep.stereoInfo = 0; if (client->swapped) @@ -1108,6 +1104,34 @@ SClobberNotifyEvent (from, to) to->state = from->state; } +RegionPtr CreateUnclippedWinSize(WindowPtr pWin); + +RegionPtr +CreateUnclippedWinSize (WindowPtr pWin) +{ + RegionPtr pRgn; + BoxRec box; + + box.x1 = pWin->drawable.x; + box.y1 = pWin->drawable.y; + box.x2 = pWin->drawable.x + (int) pWin->drawable.width; + box.y2 = pWin->drawable.y + (int) pWin->drawable.height; + pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1); + if (wBoundingShape (pWin) || wClipShape (pWin)) { + ScreenPtr pScreen; + pScreen = pWin->drawable.pScreen; + + REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x, + - pWin->drawable.y); + if (wBoundingShape (pWin)) + REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin)); + if (wClipShape (pWin)) + REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin)); + REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y); + } + return pRgn; +} + static void PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf) MultibufferPtr *pMultibuffer; @@ -1238,8 +1262,8 @@ DisplayImageBuffers (ids, nbuf) MultibuffersPtr *pMultibuffers; int i, j; - pMultibuffer = (MultibufferPtr *) xalloc (nbuf * sizeof *pMultibuffer + - nbuf * sizeof *pMultibuffers); + pMultibuffer = xalloc (nbuf * sizeof *pMultibuffer + + nbuf * sizeof *pMultibuffers); if (!pMultibuffer) return BadAlloc; pMultibuffers = (MultibuffersPtr *) (pMultibuffer + nbuf); @@ -1364,7 +1388,7 @@ MultibufferExpose (pMultibuffer, pRegion) numRects = REGION_NUM_RECTS(pRegion); pBox = REGION_RECTS(pRegion); - pEvent = (xEvent *) xalloc(numRects * sizeof(xEvent)); + pEvent = xalloc(numRects * sizeof(xEvent)); if (pEvent) { pe = pEvent; @@ -1718,7 +1742,7 @@ EventSelectForMultibuffer (pMultibuffer, client, mask) } if (!other) { /* new client that never selected events on this buffer before */ - other = (OtherClients *) xalloc (sizeof (OtherClients)); + other = xalloc (sizeof (OtherClients)); if (!other) return BadAlloc; other->mask = mask; diff --git a/xorg-server/Xext/mbufbf.c b/xorg-server/Xext/mbufbf.c index e929ab5fd..7d9d60a4f 100644 --- a/xorg-server/Xext/mbufbf.c +++ b/xorg-server/Xext/mbufbf.c @@ -25,8 +25,6 @@ in this Software without prior written authorization from The Open Group. */ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -223,7 +221,7 @@ bufMultibufferInit(pScreen, pMBScreen) pMBScreen->WrapScreenFuncs = bufWrapScreenFuncs; pMBScreen->ResetProc = bufResetProc; /* Create devPrivate part */ - pMBPriv = (mbufBufferPrivPtr) xalloc(sizeof *pMBPriv); + pMBPriv = xalloc(sizeof *pMBPriv); if (!pMBPriv) return (FALSE); @@ -613,8 +611,7 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum) if (!pGC) return; - prect = (xRectangle *)xalloc(REGION_NUM_RECTS(prgn) * - sizeof(xRectangle)); + prect = xalloc(REGION_NUM_RECTS(prgn) * sizeof(xRectangle)); if (!prect) { FreeScratchGC(pGC); diff --git a/xorg-server/Xext/mbufpx.c b/xorg-server/Xext/mbufpx.c index 21d525906..8421ba9eb 100644 --- a/xorg-server/Xext/mbufpx.c +++ b/xorg-server/Xext/mbufpx.c @@ -24,8 +24,6 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -92,7 +90,7 @@ pixMultibufferInit(pScreen, pMBScreen) nInfo += pDepth->numVids; } - pInfo = (xMbufBufferInfo *) xalloc (nInfo * sizeof (xMbufBufferInfo)); + pInfo = xalloc (nInfo * sizeof (xMbufBufferInfo)); if (!pInfo) return FALSE; @@ -116,7 +114,7 @@ pixMultibufferInit(pScreen, pMBScreen) * Setup the devPrivate to mbufScreenRec */ - pMBPriv = (mbufPixmapPrivPtr) xalloc(sizeof(* pMBPriv)); + pMBPriv = xalloc(sizeof(* pMBPriv)); if (!pMBPriv) { xfree(pInfo); @@ -263,7 +261,7 @@ MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion) int nrects = REGION_NUM_RECTS(pRegion); BoxPtr pbox = REGION_RECTS(pRegion); - pRects = (xRectangle *)xalloc(nrects * sizeof(xRectangle)); + pRects = xalloc(nrects * sizeof(xRectangle)); if (pRects) { int i; diff --git a/xorg-server/Xext/panoramiX.c b/xorg-server/Xext/panoramiX.c index a1f4ce01e..c5fb70061 100644 --- a/xorg-server/Xext/panoramiX.c +++ b/xorg-server/Xext/panoramiX.c @@ -31,7 +31,6 @@ Equipment Corporation. #include #endif -#define NEED_REPLIES #include #include #include @@ -73,9 +72,9 @@ extern VisualPtr glxMatchVisual(ScreenPtr pScreen, int PanoramiXPixWidth = 0; int PanoramiXPixHeight = 0; -_X_EXPORT int PanoramiXNumScreens = 0; +int PanoramiXNumScreens = 0; -_X_EXPORT PanoramiXData *panoramiXdataPtr = NULL; +PanoramiXData *panoramiXdataPtr = NULL; static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL}; static int PanoramiXNumDepths; @@ -83,14 +82,14 @@ static DepthPtr PanoramiXDepths; static int PanoramiXNumVisuals; static VisualPtr PanoramiXVisuals; -_X_EXPORT unsigned long XRC_DRAWABLE; -_X_EXPORT unsigned long XRT_WINDOW; -_X_EXPORT unsigned long XRT_PIXMAP; -_X_EXPORT unsigned long XRT_GC; -_X_EXPORT unsigned long XRT_COLORMAP; +unsigned long XRC_DRAWABLE; +unsigned long XRT_WINDOW; +unsigned long XRT_PIXMAP; +unsigned long XRT_GC; +unsigned long XRT_COLORMAP; static Bool VisualsEqual(VisualPtr, ScreenPtr, VisualPtr); -_X_EXPORT XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr = &VisualsEqual; +XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr = &VisualsEqual; /* * Function prototypes @@ -330,7 +329,7 @@ XineramaDestroyClip(GCPtr pGC) Xinerama_GC_FUNC_EPILOGUE (pGC); } -_X_EXPORT int +int XineramaDeleteResource(pointer data, XID id) { xfree(data); @@ -355,9 +354,12 @@ PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen) { PanoramiXSearchData data; + pointer val; - if(!screen) - return LookupIDByType(id, type); + if(!screen) { + dixLookupResourceByType(&val, id, type, serverClient, DixReadAccess); + return val; + } data.screen = screen; data.id = id; @@ -373,7 +375,7 @@ typedef struct _connect_callback_list { static XineramaConnectionCallbackList *ConnectionCallbackList = NULL; -_X_EXPORT Bool +Bool XineramaRegisterConnectionBlockCallback(void (*func)(void)) { XineramaConnectionCallbackList *newlist; @@ -667,7 +669,7 @@ Bool PanoramiXCreateConnectionBlock(void) length += (depth->nVisuals * sizeof(xVisualType)); } - connSetupPrefix.length = length >> 2; + connSetupPrefix.length = bytes_to_int32(length); for (i = 0; i < PanoramiXNumDepths; i++) xfree(PanoramiXDepths[i].vids); @@ -841,7 +843,7 @@ PanoramiXConsolidate(void) AddResource(defmap->info[0].id, XRT_COLORMAP, defmap); } -_X_EXPORT VisualID +VisualID PanoramiXTranslateVisualID(int screen, VisualID orig) { ScreenPtr pOtherScreen = screenInfo.screens[screen]; @@ -1051,7 +1053,7 @@ ProcXineramaQueryScreens(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens; - rep.length = rep.number * sz_XineramaScreenInfo >> 2; + rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo); if (client->swapped) { int n; swaps (&rep.sequenceNumber, n); diff --git a/xorg-server/Xext/panoramiX.h b/xorg-server/Xext/panoramiX.h index 700c5a4f9..cca4c5249 100644 --- a/xorg-server/Xext/panoramiX.h +++ b/xorg-server/Xext/panoramiX.h @@ -41,9 +41,8 @@ Equipment Corporation. #define _PANORAMIX_H_ #define _PANORAMIX_SERVER -#include +#include #undef _PANORAMIX_SERVER - #include "gcstruct.h" @@ -98,6 +97,4 @@ typedef struct { #define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared) -#define SKIP_FAKE_WINDOW(a) if(!LookupIDByType(a, XRT_WINDOW)) return - #endif /* _PANORAMIX_H_ */ diff --git a/xorg-server/Xext/panoramiXprocs.c b/xorg-server/Xext/panoramiXprocs.c index 38199a5df..6834efb71 100644 --- a/xorg-server/Xext/panoramiXprocs.c +++ b/xorg-server/Xext/panoramiXprocs.c @@ -32,8 +32,6 @@ Equipment Corporation. #include #include -#define NEED_REPLIES -#define NEED_EVENTS #include #include "windowstr.h" #include "dixfontstr.h" @@ -69,20 +67,21 @@ int PanoramiXCreateWindow(ClientPtr client) PanoramiXRes *cmap = NULL; REQUEST(xCreateWindowReq); int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; - int result = 0, len, j; + int result, len, j; int orig_x, orig_y; XID orig_visual, tmp; Bool parentIsRoot; REQUEST_AT_LEAST_SIZE(xCreateWindowReq); - len = client->req_len - (sizeof(xCreateWindowReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xCreateWindowReq)); if (Ones(stuff->mask) != len) return BadLength; - if (!(parent = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->parent, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&parent, stuff->parent, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; if(stuff->class == CopyFromParent) stuff->class = parent->u.win.class; @@ -94,31 +93,34 @@ int PanoramiXCreateWindow(ClientPtr client) pback_offset = Ones((Mask)stuff->mask & (CWBackPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pback_offset); if ((tmp != None) && (tmp != ParentRelative)) { - if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&backPix, tmp, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } if ((Mask)stuff->mask & CWBorderPixmap) { pbord_offset = Ones((Mask)stuff->mask & (CWBorderPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pbord_offset); if (tmp != CopyFromParent) { - if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&bordPix, tmp, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } if ((Mask)stuff->mask & CWColormap) { cmap_offset = Ones((Mask)stuff->mask & (CWColormap - 1)); tmp = *((CARD32 *) &stuff[1] + cmap_offset); if ((tmp != CopyFromParent) && (tmp != None)) { - if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_COLORMAP, DixReadAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, tmp, + XRT_COLORMAP, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; } } - if(!(newWin = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newWin = xalloc(sizeof(PanoramiXRes)))) return BadAlloc; newWin->type = XRT_WINDOW; @@ -172,18 +174,19 @@ int PanoramiXChangeWindowAttributes(ClientPtr client) PanoramiXRes *cmap = NULL; REQUEST(xChangeWindowAttributesReq); int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; - int result = 0, len, j; + int result, len, j; XID tmp; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); - len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq)); if (Ones(stuff->valueMask) != len) return BadLength; - if (!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->window, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; if((win->u.win.class == InputOnly) && (stuff->valueMask & (~INPUTONLY_LEGAL_MASK))) @@ -193,27 +196,30 @@ int PanoramiXChangeWindowAttributes(ClientPtr client) pback_offset = Ones((Mask)stuff->valueMask & (CWBackPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pback_offset); if ((tmp != None) && (tmp != ParentRelative)) { - if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&backPix, tmp, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } if ((Mask)stuff->valueMask & CWBorderPixmap) { pbord_offset = Ones((Mask)stuff->valueMask & (CWBorderPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pbord_offset); if (tmp != CopyFromParent) { - if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&bordPix, tmp, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } if ((Mask)stuff->valueMask & CWColormap) { cmap_offset = Ones((Mask)stuff->valueMask & (CWColormap - 1)); tmp = *((CARD32 *) &stuff[1] + cmap_offset); if ((tmp != CopyFromParent) && (tmp != None)) { - if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_COLORMAP, DixReadAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, tmp, + XRT_COLORMAP, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; } } @@ -235,14 +241,15 @@ int PanoramiXChangeWindowAttributes(ClientPtr client) int PanoramiXDestroyWindow(ClientPtr client) { PanoramiXRes *win; - int result = 0, j; + int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_WINDOW, DixDestroyAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->id, XRT_WINDOW, + client, DixDestroyAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS_BACKWARD(j) { stuff->id = win->info[j].id; @@ -260,14 +267,15 @@ int PanoramiXDestroyWindow(ClientPtr client) int PanoramiXDestroySubwindows(ClientPtr client) { PanoramiXRes *win; - int result = 0, j; + int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_WINDOW, DixDestroyAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->id, XRT_WINDOW, + client, DixDestroyAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS_BACKWARD(j) { stuff->id = win->info[j].id; @@ -285,14 +293,15 @@ int PanoramiXDestroySubwindows(ClientPtr client) int PanoramiXChangeSaveSet(ClientPtr client) { PanoramiXRes *win; - int result = 0, j; + int result, j; REQUEST(xChangeSaveSetReq); REQUEST_SIZE_MATCH(xChangeSaveSetReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->window, XRT_WINDOW, DixReadAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->window, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS_BACKWARD(j) { stuff->window = win->info[j].id; @@ -307,20 +316,22 @@ int PanoramiXChangeSaveSet(ClientPtr client) int PanoramiXReparentWindow(ClientPtr client) { PanoramiXRes *win, *parent; - int result = 0, j; + int result, j; int x, y; Bool parentIsRoot; REQUEST(xReparentWindowReq); REQUEST_SIZE_MATCH(xReparentWindowReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->window, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; - if(!(parent = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->parent, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&parent, stuff->parent, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; x = stuff->x; y = stuff->y; @@ -344,14 +355,15 @@ int PanoramiXReparentWindow(ClientPtr client) int PanoramiXMapWindow(ClientPtr client) { PanoramiXRes *win; - int result = 0, j; + int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_WINDOW, DixReadAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->id, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; @@ -366,14 +378,15 @@ int PanoramiXMapWindow(ClientPtr client) int PanoramiXMapSubwindows(ClientPtr client) { PanoramiXRes *win; - int result = 0, j; + int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_WINDOW, DixReadAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->id, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; @@ -388,14 +401,15 @@ int PanoramiXMapSubwindows(ClientPtr client) int PanoramiXUnmapWindow(ClientPtr client) { PanoramiXRes *win; - int result = 0, j; + int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_WINDOW, DixReadAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->id, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; @@ -410,14 +424,15 @@ int PanoramiXUnmapWindow(ClientPtr client) int PanoramiXUnmapSubwindows(ClientPtr client) { PanoramiXRes *win; - int result = 0, j; + int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_WINDOW, DixReadAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->id, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; @@ -434,33 +449,36 @@ int PanoramiXConfigureWindow(ClientPtr client) PanoramiXRes *win; PanoramiXRes *sib = NULL; WindowPtr pWin; - int result = 0, j, len, sib_offset = 0, x = 0, y = 0; + int result, j, len, sib_offset = 0, x = 0, y = 0; int x_offset = -1; int y_offset = -1; REQUEST(xConfigureWindowReq); REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); - len = client->req_len - (sizeof(xConfigureWindowReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq)); if (Ones(stuff->mask) != len) return BadLength; /* because we need the parent */ - if (!(pWin = (WindowPtr)SecurityLookupIDByType( - client, stuff->window, RT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&pWin, stuff->window, + RT_WINDOW, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; - if (!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->window, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; if ((Mask)stuff->mask & CWSibling) { XID tmp; sib_offset = Ones((Mask)stuff->mask & (CWSibling - 1)); if ((tmp = *((CARD32 *) &stuff[1] + sib_offset))) { - if(!(sib = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_WINDOW, DixReadAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&sib, tmp, XRT_WINDOW, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; } } @@ -498,14 +516,15 @@ int PanoramiXConfigureWindow(ClientPtr client) int PanoramiXCirculateWindow(ClientPtr client) { PanoramiXRes *win; - int result = 0, j; + int result, j; REQUEST(xCirculateWindowReq); REQUEST_SIZE_MATCH(xCirculateWindowReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->window, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS_FORWARD(j) { stuff->window = win->info[j].id; @@ -636,17 +655,18 @@ int PanoramiXTranslateCoords(ClientPtr client) int PanoramiXCreatePixmap(ClientPtr client) { PanoramiXRes *refDraw, *newPix; - int result = 0, j; + int result, j; REQUEST(xCreatePixmapReq); REQUEST_SIZE_MATCH(xCreatePixmapReq); client->errorValue = stuff->pid; - if(!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixReadAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&refDraw, stuff->drawable, + XRC_DRAWABLE, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; - if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPix = xalloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; @@ -674,16 +694,17 @@ int PanoramiXCreatePixmap(ClientPtr client) int PanoramiXFreePixmap(ClientPtr client) { PanoramiXRes *pix; - int result = 0, j; + int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; - if(!(pix = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_PIXMAP, DixDestroyAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&pix, stuff->id, XRT_PIXMAP, + client, DixDestroyAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; FOR_NSCREENS_BACKWARD(j) { stuff->id = pix->info[j].id; @@ -707,46 +728,50 @@ int PanoramiXCreateGC(ClientPtr client) PanoramiXRes *clip = NULL; REQUEST(xCreateGCReq); int tile_offset = 0, stip_offset = 0, clip_offset = 0; - int result = 0, len, j; + int result, len, j; XID tmp; REQUEST_AT_LEAST_SIZE(xCreateGCReq); client->errorValue = stuff->gc; - len = client->req_len - (sizeof(xCreateGCReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq)); if (Ones(stuff->mask) != len) return BadLength; - if (!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixReadAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&refDraw, stuff->drawable, + XRC_DRAWABLE, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if ((Mask)stuff->mask & GCTile) { tile_offset = Ones((Mask)stuff->mask & (GCTile - 1)); if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) { - if(!(tile = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&tile, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } if ((Mask)stuff->mask & GCStipple) { stip_offset = Ones((Mask)stuff->mask & (GCStipple - 1)); if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) { - if(!(stip = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&stip, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } if ((Mask)stuff->mask & GCClipMask) { clip_offset = Ones((Mask)stuff->mask & (GCClipMask - 1)); if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) { - if(!(clip = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&clip, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } - if(!(newGC = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newGC = xalloc(sizeof(PanoramiXRes)))) return BadAlloc; newGC->type = XRT_GC; @@ -783,41 +808,45 @@ int PanoramiXChangeGC(ClientPtr client) PanoramiXRes *clip = NULL; REQUEST(xChangeGCReq); int tile_offset = 0, stip_offset = 0, clip_offset = 0; - int result = 0, len, j; + int result, len, j; XID tmp; REQUEST_AT_LEAST_SIZE(xChangeGCReq); - len = client->req_len - (sizeof(xChangeGCReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xChangeGCReq)); if (Ones(stuff->mask) != len) return BadLength; - if (!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; if ((Mask)stuff->mask & GCTile) { tile_offset = Ones((Mask)stuff->mask & (GCTile - 1)); if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) { - if(!(tile = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&tile, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } if ((Mask)stuff->mask & GCStipple) { stip_offset = Ones((Mask)stuff->mask & (GCStipple - 1)); if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) { - if(!(stip = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&stip, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } if ((Mask)stuff->mask & GCClipMask) { clip_offset = Ones((Mask)stuff->mask & (GCClipMask - 1)); if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) { - if(!(clip = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&clip, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } } @@ -841,18 +870,20 @@ int PanoramiXChangeGC(ClientPtr client) int PanoramiXCopyGC(ClientPtr client) { PanoramiXRes *srcGC, *dstGC; - int result = 0, j; + int result, j; REQUEST(xCopyGCReq); REQUEST_SIZE_MATCH(xCopyGCReq); - if(!(srcGC = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->srcGC, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&srcGC, stuff->srcGC, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; - if(!(dstGC = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->dstGC, XRT_GC, DixWriteAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&dstGC, stuff->dstGC, XRT_GC, + client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; FOR_NSCREENS(j) { stuff->srcGC = srcGC->info[j].id; @@ -868,14 +899,15 @@ int PanoramiXCopyGC(ClientPtr client) int PanoramiXSetDashes(ClientPtr client) { PanoramiXRes *gc; - int result = 0, j; + int result, j; REQUEST(xSetDashesReq); REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixWriteAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; @@ -890,14 +922,15 @@ int PanoramiXSetDashes(ClientPtr client) int PanoramiXSetClipRectangles(ClientPtr client) { PanoramiXRes *gc; - int result = 0, j; + int result, j; REQUEST(xSetClipRectanglesReq); REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixWriteAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; @@ -912,14 +945,15 @@ int PanoramiXSetClipRectangles(ClientPtr client) int PanoramiXFreeGC(ClientPtr client) { PanoramiXRes *gc; - int result = 0, j; + int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_GC, DixDestroyAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->id, XRT_GC, + client, DixDestroyAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; FOR_NSCREENS_BACKWARD(j) { stuff->id = gc->info[j].id; @@ -937,15 +971,16 @@ int PanoramiXFreeGC(ClientPtr client) int PanoramiXClearToBackground(ClientPtr client) { PanoramiXRes *win; - int result = 0, j, x, y; + int result, j, x, y; Bool isRoot; REQUEST(xClearAreaReq); REQUEST_SIZE_MATCH(xClearAreaReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->window, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; x = stuff->x; y = stuff->y; @@ -976,7 +1011,7 @@ int PanoramiXClearToBackground(ClientPtr client) int PanoramiXCopyArea(ClientPtr client) { - int j, result = 0, srcx, srcy, dstx, dsty; + int j, result, srcx, srcy, dstx, dsty; PanoramiXRes *gc, *src, *dst; Bool srcIsRoot = FALSE; Bool dstIsRoot = FALSE; @@ -985,24 +1020,27 @@ int PanoramiXCopyArea(ClientPtr client) REQUEST_SIZE_MATCH(xCopyAreaReq); - if(!(src = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->srcDrawable, XRC_DRAWABLE, DixReadAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&src, stuff->srcDrawable, + XRC_DRAWABLE, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; srcShared = IS_SHARED_PIXMAP(src); - if(!(dst = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->dstDrawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&dst, stuff->dstDrawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; dstShared = IS_SHARED_PIXMAP(dst); if(dstShared && srcShared) return (* SavedProcVector[X_CopyArea])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; if((dst->type == XRT_WINDOW) && dst->u.win.root) dstIsRoot = TRUE; @@ -1141,24 +1179,27 @@ int PanoramiXCopyPlane(ClientPtr client) REQUEST_SIZE_MATCH(xCopyPlaneReq); - if(!(src = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->srcDrawable, XRC_DRAWABLE, DixReadAccess))) - return BadDrawable; + rc = dixLookupResourceByClass((pointer *)&src, stuff->srcDrawable, + XRC_DRAWABLE, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; srcShared = IS_SHARED_PIXMAP(src); - if(!(dst = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->dstDrawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + rc = dixLookupResourceByClass((pointer *)&dst, stuff->dstDrawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; dstShared = IS_SHARED_PIXMAP(dst); if(dstShared && srcShared) return (* SavedProcVector[X_CopyPlane])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + rc = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? BadGC : rc; if((dst->type == XRT_WINDOW) && dst->u.win.root) dstIsRoot = TRUE; @@ -1237,28 +1278,30 @@ int PanoramiXCopyPlane(ClientPtr client) int PanoramiXPolyPoint(ClientPtr client) { PanoramiXRes *gc, *draw; - int result = 0, npoint, j; + int result, npoint, j; xPoint *origPts; Bool isRoot; REQUEST(xPolyPointReq); REQUEST_AT_LEAST_SIZE(xPolyPointReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyPoint])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; - npoint = ((client->req_len << 2) - sizeof(xPolyPointReq)) >> 2; + npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq)); if (npoint > 0) { - origPts = (xPoint *) xalloc(npoint * sizeof(xPoint)); + origPts = xalloc(npoint * sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); FOR_NSCREENS_FORWARD(j){ @@ -1295,28 +1338,30 @@ int PanoramiXPolyPoint(ClientPtr client) int PanoramiXPolyLine(ClientPtr client) { PanoramiXRes *gc, *draw; - int result = 0, npoint, j; + int result, npoint, j; xPoint *origPts; Bool isRoot; REQUEST(xPolyLineReq); REQUEST_AT_LEAST_SIZE(xPolyLineReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyLine])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; - npoint = ((client->req_len << 2) - sizeof(xPolyLineReq)) >> 2; + npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq)); if (npoint > 0){ - origPts = (xPoint *) xalloc(npoint * sizeof(xPoint)); + origPts = xalloc(npoint * sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); FOR_NSCREENS_FORWARD(j){ @@ -1352,7 +1397,7 @@ int PanoramiXPolyLine(ClientPtr client) int PanoramiXPolySegment(ClientPtr client) { - int result = 0, nsegs, i, j; + int result, nsegs, i, j; PanoramiXRes *gc, *draw; xSegment *origSegs; Bool isRoot; @@ -1360,16 +1405,18 @@ int PanoramiXPolySegment(ClientPtr client) REQUEST_AT_LEAST_SIZE(xPolySegmentReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolySegment])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1377,7 +1424,7 @@ int PanoramiXPolySegment(ClientPtr client) if(nsegs & 4) return BadLength; nsegs >>= 3; if (nsegs > 0) { - origSegs = (xSegment *) xalloc(nsegs * sizeof(xSegment)); + origSegs = xalloc(nsegs * sizeof(xSegment)); memcpy((char *) origSegs, (char *) &stuff[1], nsegs * sizeof(xSegment)); FOR_NSCREENS_FORWARD(j){ @@ -1413,7 +1460,7 @@ int PanoramiXPolySegment(ClientPtr client) int PanoramiXPolyRectangle(ClientPtr client) { - int result = 0, nrects, i, j; + int result, nrects, i, j; PanoramiXRes *gc, *draw; Bool isRoot; xRectangle *origRecs; @@ -1421,17 +1468,18 @@ int PanoramiXPolyRectangle(ClientPtr client) REQUEST_AT_LEAST_SIZE(xPolyRectangleReq); - - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyRectangle])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1439,7 +1487,7 @@ int PanoramiXPolyRectangle(ClientPtr client) if(nrects & 4) return BadLength; nrects >>= 3; if (nrects > 0){ - origRecs = (xRectangle *) xalloc(nrects * sizeof(xRectangle)); + origRecs = xalloc(nrects * sizeof(xRectangle)); memcpy((char *)origRecs,(char *)&stuff[1],nrects * sizeof(xRectangle)); FOR_NSCREENS_FORWARD(j){ @@ -1474,7 +1522,7 @@ int PanoramiXPolyRectangle(ClientPtr client) int PanoramiXPolyArc(ClientPtr client) { - int result = 0, narcs, i, j; + int result, narcs, i, j; PanoramiXRes *gc, *draw; Bool isRoot; xArc *origArcs; @@ -1482,16 +1530,18 @@ int PanoramiXPolyArc(ClientPtr client) REQUEST_AT_LEAST_SIZE(xPolyArcReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyArc])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1499,7 +1549,7 @@ int PanoramiXPolyArc(ClientPtr client) if(narcs % sizeof(xArc)) return BadLength; narcs /= sizeof(xArc); if (narcs > 0){ - origArcs = (xArc *) xalloc(narcs * sizeof(xArc)); + origArcs = xalloc(narcs * sizeof(xArc)); memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc)); FOR_NSCREENS_FORWARD(j){ @@ -1532,7 +1582,7 @@ int PanoramiXPolyArc(ClientPtr client) int PanoramiXFillPoly(ClientPtr client) { - int result = 0, count, j; + int result, count, j; PanoramiXRes *gc, *draw; Bool isRoot; DDXPointPtr locPts; @@ -1540,22 +1590,24 @@ int PanoramiXFillPoly(ClientPtr client) REQUEST_AT_LEAST_SIZE(xFillPolyReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_FillPoly])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; - count = ((client->req_len << 2) - sizeof(xFillPolyReq)) >> 2; + count = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq)); if (count > 0){ - locPts = (DDXPointPtr) xalloc(count * sizeof(DDXPointRec)); + locPts = xalloc(count * sizeof(DDXPointRec)); memcpy((char *)locPts, (char *)&stuff[1], count * sizeof(DDXPointRec)); FOR_NSCREENS_FORWARD(j){ @@ -1591,7 +1643,7 @@ int PanoramiXFillPoly(ClientPtr client) int PanoramiXPolyFillRectangle(ClientPtr client) { - int result = 0, things, i, j; + int result, things, i, j; PanoramiXRes *gc, *draw; Bool isRoot; xRectangle *origRects; @@ -1599,16 +1651,18 @@ int PanoramiXPolyFillRectangle(ClientPtr client) REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyFillRectangle])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1616,7 +1670,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client) if(things & 4) return BadLength; things >>= 3; if (things > 0){ - origRects = (xRectangle *) xalloc(things * sizeof(xRectangle)); + origRects = xalloc(things * sizeof(xRectangle)); memcpy((char*)origRects,(char*)&stuff[1], things * sizeof(xRectangle)); FOR_NSCREENS_FORWARD(j){ @@ -1652,22 +1706,24 @@ int PanoramiXPolyFillArc(ClientPtr client) { PanoramiXRes *gc, *draw; Bool isRoot; - int result = 0, narcs, i, j; + int result, narcs, i, j; xArc *origArcs; REQUEST(xPolyFillArcReq); REQUEST_AT_LEAST_SIZE(xPolyFillArcReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyFillArc])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1675,7 +1731,7 @@ int PanoramiXPolyFillArc(ClientPtr client) IF_RETURN((narcs % sizeof(xArc)), BadLength); narcs /= sizeof(xArc); if (narcs > 0) { - origArcs = (xArc *) xalloc(narcs * sizeof(xArc)); + origArcs = xalloc(narcs * sizeof(xArc)); memcpy((char *) origArcs, (char *)&stuff[1], narcs * sizeof(xArc)); FOR_NSCREENS_FORWARD(j){ @@ -1711,21 +1767,23 @@ int PanoramiXPutImage(ClientPtr client) { PanoramiXRes *gc, *draw; Bool isRoot; - int j, result = 0, orig_x, orig_y; + int j, result, orig_x, orig_y; REQUEST(xPutImageReq); REQUEST_AT_LEAST_SIZE(xPutImageReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PutImage])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1767,9 +1825,10 @@ int PanoramiXGetImage(ClientPtr client) return(BadValue); } - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + rc = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; if(draw->type == XRT_PIXMAP) return (*SavedProcVector[X_GetImage])(client); @@ -1836,7 +1895,7 @@ int PanoramiXGetImage(ClientPtr client) } - xgi.length = (length + 3) >> 2; + xgi.length = bytes_to_int32(length); if (widthBytesLine == 0 || h == 0) linesPerBuf = 0; @@ -1908,22 +1967,24 @@ PanoramiXPolyText8(ClientPtr client) { PanoramiXRes *gc, *draw; Bool isRoot; - int result = 0, j; + int result, j; int orig_x, orig_y; REQUEST(xPolyTextReq); REQUEST_AT_LEAST_SIZE(xPolyTextReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyText8])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1947,22 +2008,24 @@ PanoramiXPolyText16(ClientPtr client) { PanoramiXRes *gc, *draw; Bool isRoot; - int result = 0, j; + int result, j; int orig_x, orig_y; REQUEST(xPolyTextReq); REQUEST_AT_LEAST_SIZE(xPolyTextReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyText16])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1984,7 +2047,7 @@ PanoramiXPolyText16(ClientPtr client) int PanoramiXImageText8(ClientPtr client) { - int result = 0, j; + int result, j; PanoramiXRes *gc, *draw; Bool isRoot; int orig_x, orig_y; @@ -1992,16 +2055,18 @@ int PanoramiXImageText8(ClientPtr client) REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_ImageText8])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -2023,7 +2088,7 @@ int PanoramiXImageText8(ClientPtr client) int PanoramiXImageText16(ClientPtr client) { - int result = 0, j; + int result, j; PanoramiXRes *gc, *draw; Bool isRoot; int orig_x, orig_y; @@ -2031,16 +2096,18 @@ int PanoramiXImageText16(ClientPtr client) REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_ImageText16])(client); - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -2064,16 +2131,17 @@ int PanoramiXImageText16(ClientPtr client) int PanoramiXCreateColormap(ClientPtr client) { PanoramiXRes *win, *newCmap; - int result = 0, j, orig_visual; + int result, j, orig_visual; REQUEST(xCreateColormapReq); REQUEST_SIZE_MATCH(xCreateColormapReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->window, XRT_WINDOW, DixReadAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->window, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; - if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newCmap = xalloc(sizeof(PanoramiXRes)))) return BadAlloc; newCmap->type = XRT_COLORMAP; @@ -2102,16 +2170,17 @@ int PanoramiXCreateColormap(ClientPtr client) int PanoramiXFreeColormap(ClientPtr client) { PanoramiXRes *cmap; - int result = 0, j; + int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_COLORMAP, DixDestroyAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->id, XRT_COLORMAP, + client, DixDestroyAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j) { stuff->id = cmap->info[j].id; @@ -2130,19 +2199,20 @@ int PanoramiXCopyColormapAndFree(ClientPtr client) { PanoramiXRes *cmap, *newCmap; - int result = 0, j; + int result, j; REQUEST(xCopyColormapAndFreeReq); REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); client->errorValue = stuff->srcCmap; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->srcCmap, XRT_COLORMAP, - DixReadAccess | DixWriteAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->srcCmap, + XRT_COLORMAP, client, + DixReadAccess | DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; - if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newCmap = xalloc(sizeof(PanoramiXRes)))) return BadAlloc; newCmap->type = XRT_COLORMAP; @@ -2169,16 +2239,17 @@ PanoramiXCopyColormapAndFree(ClientPtr client) int PanoramiXInstallColormap(ClientPtr client) { REQUEST(xResourceReq); - int result = 0, j; + int result, j; PanoramiXRes *cmap; REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_COLORMAP, DixReadAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->id, XRT_COLORMAP, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j){ stuff->id = cmap->info[j].id; @@ -2192,16 +2263,17 @@ int PanoramiXInstallColormap(ClientPtr client) int PanoramiXUninstallColormap(ClientPtr client) { REQUEST(xResourceReq); - int result = 0, j; + int result, j; PanoramiXRes *cmap; REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->id, XRT_COLORMAP, DixReadAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->id, XRT_COLORMAP, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j) { stuff->id = cmap->info[j].id; @@ -2214,7 +2286,7 @@ int PanoramiXUninstallColormap(ClientPtr client) int PanoramiXAllocColor(ClientPtr client) { - int result = 0, j; + int result, j; PanoramiXRes *cmap; REQUEST(xAllocColorReq); @@ -2222,9 +2294,10 @@ int PanoramiXAllocColor(ClientPtr client) client->errorValue = stuff->cmap; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; @@ -2237,7 +2310,7 @@ int PanoramiXAllocColor(ClientPtr client) int PanoramiXAllocNamedColor(ClientPtr client) { - int result = 0, j; + int result, j; PanoramiXRes *cmap; REQUEST(xAllocNamedColorReq); @@ -2245,9 +2318,10 @@ int PanoramiXAllocNamedColor(ClientPtr client) client->errorValue = stuff->cmap; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; @@ -2260,7 +2334,7 @@ int PanoramiXAllocNamedColor(ClientPtr client) int PanoramiXAllocColorCells(ClientPtr client) { - int result = 0, j; + int result, j; PanoramiXRes *cmap; REQUEST(xAllocColorCellsReq); @@ -2268,9 +2342,10 @@ int PanoramiXAllocColorCells(ClientPtr client) client->errorValue = stuff->cmap; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; @@ -2283,7 +2358,7 @@ int PanoramiXAllocColorCells(ClientPtr client) int PanoramiXAllocColorPlanes(ClientPtr client) { - int result = 0, j; + int result, j; PanoramiXRes *cmap; REQUEST(xAllocColorPlanesReq); @@ -2291,9 +2366,10 @@ int PanoramiXAllocColorPlanes(ClientPtr client) client->errorValue = stuff->cmap; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; @@ -2307,7 +2383,7 @@ int PanoramiXAllocColorPlanes(ClientPtr client) int PanoramiXFreeColors(ClientPtr client) { - int result = 0, j; + int result, j; PanoramiXRes *cmap; REQUEST(xFreeColorsReq); @@ -2315,9 +2391,10 @@ int PanoramiXFreeColors(ClientPtr client) client->errorValue = stuff->cmap; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; @@ -2329,7 +2406,7 @@ int PanoramiXFreeColors(ClientPtr client) int PanoramiXStoreColors(ClientPtr client) { - int result = 0, j; + int result, j; PanoramiXRes *cmap; REQUEST(xStoreColorsReq); @@ -2337,9 +2414,10 @@ int PanoramiXStoreColors(ClientPtr client) client->errorValue = stuff->cmap; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; @@ -2352,7 +2430,7 @@ int PanoramiXStoreColors(ClientPtr client) int PanoramiXStoreNamedColor(ClientPtr client) { - int result = 0, j; + int result, j; PanoramiXRes *cmap; REQUEST(xStoreNamedColorReq); @@ -2360,9 +2438,10 @@ int PanoramiXStoreNamedColor(ClientPtr client) client->errorValue = stuff->cmap; - if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) - return BadColor; + result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadColor : result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; diff --git a/xorg-server/Xext/panoramiXsrv.h b/xorg-server/Xext/panoramiXsrv.h index d5c3d9827..c77b11927 100644 --- a/xorg-server/Xext/panoramiXsrv.h +++ b/xorg-server/Xext/panoramiXsrv.h @@ -8,27 +8,27 @@ #include "panoramiX.h" -extern int PanoramiXNumScreens; -extern PanoramiXData *panoramiXdataPtr; -extern int PanoramiXPixWidth; -extern int PanoramiXPixHeight; +extern _X_EXPORT int PanoramiXNumScreens; +extern _X_EXPORT PanoramiXData *panoramiXdataPtr; +extern _X_EXPORT int PanoramiXPixWidth; +extern _X_EXPORT int PanoramiXPixHeight; -extern VisualID PanoramiXTranslateVisualID(int screen, VisualID orig); -extern void PanoramiXConsolidate(void); -extern Bool PanoramiXCreateConnectionBlock(void); -extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int); -extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void)); -extern int XineramaDeleteResource(pointer, XID); +extern _X_EXPORT VisualID PanoramiXTranslateVisualID(int screen, VisualID orig); +extern _X_EXPORT void PanoramiXConsolidate(void); +extern _X_EXPORT Bool PanoramiXCreateConnectionBlock(void); +extern _X_EXPORT PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int); +extern _X_EXPORT Bool XineramaRegisterConnectionBlockCallback(void (*func)(void)); +extern _X_EXPORT int XineramaDeleteResource(pointer, XID); -extern void XineramaReinitData(ScreenPtr); +extern _X_EXPORT void XineramaReinitData(ScreenPtr); -extern RegionRec XineramaScreenRegions[MAXSCREENS]; +extern _X_EXPORT RegionRec XineramaScreenRegions[MAXSCREENS]; -extern unsigned long XRC_DRAWABLE; -extern unsigned long XRT_WINDOW; -extern unsigned long XRT_PIXMAP; -extern unsigned long XRT_GC; -extern unsigned long XRT_COLORMAP; +extern _X_EXPORT unsigned long XRC_DRAWABLE; +extern _X_EXPORT unsigned long XRT_WINDOW; +extern _X_EXPORT unsigned long XRT_PIXMAP; +extern _X_EXPORT unsigned long XRT_GC; +extern _X_EXPORT unsigned long XRT_COLORMAP; /* * Drivers are allowed to wrap this function. Each wrapper can decide that the @@ -38,9 +38,9 @@ extern unsigned long XRT_COLORMAP; * screen 0. */ typedef Bool (*XineramaVisualsEqualProcPtr)(VisualPtr, ScreenPtr, VisualPtr); -extern XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr; +extern _X_EXPORT XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr; -extern void XineramaGetImageData( +extern _X_EXPORT void XineramaGetImageData( DrawablePtr *pDrawables, int left, int top, diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c index 86db7b0b9..18de4b540 100644 --- a/xorg-server/Xext/saver.c +++ b/xorg-server/Xext/saver.c @@ -27,8 +27,6 @@ in this Software without prior written authorization from the X Consortium. */ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -54,8 +52,7 @@ in this Software without prior written authorization from the X Consortium. #include "panoramiXsrv.h" #endif #ifdef DPMSExtension -#define DPMS_SERVER -#include +#include #endif #include @@ -144,7 +141,7 @@ static int ScreenSaverFreeSuspend( * entry from the per-screen queue. */ -static RESTYPE EventType; /* resource type for event masks */ +static RESTYPE SaverEventType; /* resource type for event masks */ typedef struct _ScreenSaverEvent *ScreenSaverEventPtr; @@ -237,7 +234,7 @@ static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex; dixSetPrivate(&(s)->devPrivates, ScreenPrivateKey, v); #define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = (s ? GetScreenPrivate(s) : NULL) -#define New(t) ((t *) xalloc (sizeof (t))) +#define New(t) (xalloc (sizeof (t))) /**************** * ScreenSaverExtensionInit @@ -255,7 +252,7 @@ ScreenSaverExtensionInit(INITARGS) ScreenPtr pScreen; AttrType = CreateNewResourceType(ScreenSaverFreeAttr); - EventType = CreateNewResourceType(ScreenSaverFreeEvents); + SaverEventType = CreateNewResourceType(ScreenSaverFreeEvents); SuspendType = CreateNewResourceType(ScreenSaverFreeSuspend); for (i = 0; i < screenInfo.numScreens; i++) @@ -263,7 +260,7 @@ ScreenSaverExtensionInit(INITARGS) pScreen = screenInfo.screens[i]; SetScreenPrivate (pScreen, NULL); } - if (AttrType && EventType && SuspendType && + if (AttrType && SaverEventType && SuspendType && (extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0, ProcScreenSaverDispatch, SProcScreenSaverDispatch, NULL, StandardMinorOpcode))) @@ -274,8 +271,7 @@ ScreenSaverExtensionInit(INITARGS) } static void -CheckScreenPrivate (pScreen) - ScreenPtr pScreen; +CheckScreenPrivate (ScreenPtr pScreen) { SetupScreen (pScreen); @@ -291,8 +287,7 @@ CheckScreenPrivate (pScreen) } static ScreenSaverScreenPrivatePtr -MakeScreenPrivate (pScreen) - ScreenPtr pScreen; +MakeScreenPrivate (ScreenPtr pScreen) { SetupScreen (pScreen); @@ -311,9 +306,7 @@ MakeScreenPrivate (pScreen) } static unsigned long -getEventMask (pScreen, client) - ScreenPtr pScreen; - ClientPtr client; +getEventMask (ScreenPtr pScreen, ClientPtr client) { SetupScreen(pScreen); ScreenSaverEventPtr pEv; @@ -327,10 +320,7 @@ getEventMask (pScreen, client) } static Bool -setEventMask (pScreen, client, mask) - ScreenPtr pScreen; - ClientPtr client; - unsigned long mask; +setEventMask (ScreenPtr pScreen, ClientPtr client, unsigned long mask) { SetupScreen(pScreen); ScreenSaverEventPtr pEv, *pPrev; @@ -348,7 +338,7 @@ setEventMask (pScreen, client, mask) break; if (mask == 0) { - FreeResource (pEv->resource, EventType); + FreeResource (pEv->resource, SaverEventType); *pPrev = pEv->next; xfree (pEv); CheckScreenPrivate (pScreen); @@ -368,7 +358,7 @@ setEventMask (pScreen, client, mask) pEv->client = client; pEv->screen = pScreen; pEv->resource = FakeClientID (client->index); - if (!AddResource (pEv->resource, EventType, (pointer) pEv)) + if (!AddResource (pEv->resource, SaverEventType, (pointer) pEv)) return FALSE; } pEv->mask = mask; @@ -377,8 +367,7 @@ setEventMask (pScreen, client, mask) } static void -FreeAttrs (pAttr) - ScreenSaverAttrPtr pAttr; +FreeAttrs (ScreenSaverAttrPtr pAttr) { PixmapPtr pPixmap; CursorPtr pCursor; @@ -392,8 +381,7 @@ FreeAttrs (pAttr) } static void -FreeScreenAttr (pAttr) - ScreenSaverAttrPtr pAttr; +FreeScreenAttr (ScreenSaverAttrPtr pAttr) { FreeAttrs (pAttr); xfree (pAttr->values); @@ -401,9 +389,7 @@ FreeScreenAttr (pAttr) } static int -ScreenSaverFreeEvents (value, id) - pointer value; - XID id; +ScreenSaverFreeEvents (pointer value, XID id) { ScreenSaverEventPtr pOld = (ScreenSaverEventPtr)value; ScreenPtr pScreen = pOld->screen; @@ -424,9 +410,7 @@ ScreenSaverFreeEvents (value, id) } static int -ScreenSaverFreeAttr (value, id) - pointer value; - XID id; +ScreenSaverFreeAttr (pointer value, XID id) { ScreenSaverAttrPtr pOldAttr = (ScreenSaverAttrPtr)value; ScreenPtr pScreen = pOldAttr->screen; @@ -487,10 +471,7 @@ ScreenSaverFreeSuspend (pointer value, XID id) } static void -SendScreenSaverNotify (pScreen, state, forced) - ScreenPtr pScreen; - int state; - Bool forced; +SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced) { ScreenSaverScreenPrivatePtr pPriv; ScreenSaverEventPtr pEv; @@ -533,8 +514,8 @@ SendScreenSaverNotify (pScreen, state, forced) } static void -SScreenSaverNotifyEvent (from, to) - xScreenSaverNotifyEvent *from, *to; +SScreenSaverNotifyEvent (xScreenSaverNotifyEvent *from, + xScreenSaverNotifyEvent *to) { to->type = from->type; to->state = from->state; @@ -547,16 +528,18 @@ SScreenSaverNotifyEvent (from, to) } static void -UninstallSaverColormap (pScreen) - ScreenPtr pScreen; +UninstallSaverColormap (ScreenPtr pScreen) { SetupScreen(pScreen); ColormapPtr pCmap; + int rc; if (pPriv && pPriv->installedMap != None) { - pCmap = (ColormapPtr) LookupIDByType (pPriv->installedMap, RT_COLORMAP); - if (pCmap) + rc = dixLookupResourceByType((pointer *)&pCmap, pPriv->installedMap, + RT_COLORMAP, serverClient, + DixUninstallAccess); + if (rc == Success) (*pCmap->pScreen->UninstallColormap) (pCmap); pPriv->installedMap = None; CheckScreenPrivate (pScreen); @@ -564,8 +547,7 @@ UninstallSaverColormap (pScreen) } static Bool -CreateSaverWindow (pScreen) - ScreenPtr pScreen; +CreateSaverWindow (ScreenPtr pScreen) { SetupScreen (pScreen); ScreenSaverStuffPtr pSaver; @@ -659,8 +641,7 @@ CreateSaverWindow (pScreen) wantMap = wColormap (pWin); if (wantMap == None) return TRUE; - installedMaps = (Colormap *) xalloc (pScreen->maxInstalledCmaps * - sizeof (Colormap)); + installedMaps = xalloc (pScreen->maxInstalledCmaps * sizeof (Colormap)); numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps) (pScreen, installedMaps); for (i = 0; i < numInstalled; i++) @@ -672,8 +653,9 @@ CreateSaverWindow (pScreen) if (i < numInstalled) return TRUE; - pCmap = (ColormapPtr) LookupIDByType (wantMap, RT_COLORMAP); - if (!pCmap) + result = dixLookupResourceByType((pointer *)&pCmap, wantMap, RT_COLORMAP, + serverClient, DixInstallAccess); + if (result != Success) return TRUE; pPriv->installedMap = wantMap; @@ -684,8 +666,7 @@ CreateSaverWindow (pScreen) } static Bool -DestroySaverWindow (pScreen) - ScreenPtr pScreen; +DestroySaverWindow (ScreenPtr pScreen) { SetupScreen(pScreen); ScreenSaverStuffPtr pSaver; @@ -706,10 +687,7 @@ DestroySaverWindow (pScreen) } static Bool -ScreenSaverHandle (pScreen, xstate, force) - ScreenPtr pScreen; - int xstate; - Bool force; +ScreenSaverHandle (ScreenPtr pScreen, int xstate, Bool force) { int state = 0; Bool ret = FALSE; @@ -740,8 +718,7 @@ ScreenSaverHandle (pScreen, xstate, force) } static int -ProcScreenSaverQueryVersion (client) - ClientPtr client; +ProcScreenSaverQueryVersion (ClientPtr client) { xScreenSaverQueryVersionReply rep; int n; @@ -761,8 +738,7 @@ ProcScreenSaverQueryVersion (client) } static int -ProcScreenSaverQueryInfo (client) - ClientPtr client; +ProcScreenSaverQueryInfo (ClientPtr client) { REQUEST(xScreenSaverQueryInfoReq); xScreenSaverQueryInfoReply rep; @@ -838,8 +814,7 @@ ProcScreenSaverQueryInfo (client) } static int -ProcScreenSaverSelectInput (client) - ClientPtr client; +ProcScreenSaverSelectInput (ClientPtr client) { REQUEST(xScreenSaverSelectInputReq); DrawablePtr pDraw; @@ -899,7 +874,7 @@ ScreenSaverSetAttributes (ClientPtr client) if (ret != Success) return ret; - len = stuff->length - (sizeof(xScreenSaverSetAttributesReq) >> 2); + len = stuff->length - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq)); if (Ones(stuff->mask) != len) return BadLength; if (!stuff->width || !stuff->height) @@ -1004,7 +979,7 @@ ScreenSaverSetAttributes (ClientPtr client) goto bail; } /* over allocate for override redirect */ - values = (unsigned long *) xalloc ((len + 1) * sizeof (unsigned long)); + values = xalloc ((len + 1) * sizeof (unsigned long)); if (!values) { ret = BadAlloc; @@ -1280,17 +1255,18 @@ ProcScreenSaverSetAttributes (ClientPtr client) PanoramiXRes *backPix = NULL; PanoramiXRes *bordPix = NULL; PanoramiXRes *cmap = NULL; - int i, status = 0, len; + int i, status, len; int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; XID orig_visual, tmp; REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + status = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (status != Success) + return (status == BadValue) ? BadDrawable : status; - len = stuff->length - (sizeof(xScreenSaverSetAttributesReq) >> 2); + len = stuff->length - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq)); if (Ones(stuff->mask) != len) return BadLength; @@ -1298,9 +1274,11 @@ ProcScreenSaverSetAttributes (ClientPtr client) pback_offset = Ones((Mask)stuff->mask & (CWBackPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pback_offset); if ((tmp != None) && (tmp != ParentRelative)) { - if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + status = dixLookupResourceByType((pointer *)&backPix, tmp, + XRT_PIXMAP, client, + DixReadAccess); + if (status != Success) + return (status == BadValue) ? BadPixmap : status; } } @@ -1308,9 +1286,11 @@ ProcScreenSaverSetAttributes (ClientPtr client) pbord_offset = Ones((Mask)stuff->mask & (CWBorderPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pbord_offset); if (tmp != CopyFromParent) { - if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + status = dixLookupResourceByType((pointer *)&bordPix, tmp, + XRT_PIXMAP, client, + DixReadAccess); + if (status != Success) + return (status == BadValue) ? BadPixmap : status; } } @@ -1318,9 +1298,11 @@ ProcScreenSaverSetAttributes (ClientPtr client) cmap_offset = Ones((Mask)stuff->mask & (CWColormap - 1)); tmp = *((CARD32 *) &stuff[1] + cmap_offset); if ((tmp != CopyFromParent) && (tmp != None)) { - if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType( - client, tmp, XRT_COLORMAP, DixReadAccess))) - return BadColor; + status = dixLookupResourceByType((pointer *)&cmap, tmp, + XRT_COLORMAP, client, + DixReadAccess); + if (status != Success) + return (status == BadValue) ? BadColor : status; } } @@ -1355,11 +1337,12 @@ ProcScreenSaverUnsetAttributes (ClientPtr client) if(!noPanoramiXExtension) { REQUEST(xScreenSaverUnsetAttributesReq); PanoramiXRes *draw; - int i; + int rc, i; - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + rc = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; for(i = PanoramiXNumScreens - 1; i > 0; i--) { stuff->drawable = draw->info[i].id; @@ -1406,7 +1389,7 @@ ProcScreenSaverSuspend (ClientPtr client) * to the record, so the screensaver will be reenabled and the record freed * if the client disconnects without reenabling it first. */ - this = (ScreenSaverSuspensionPtr) xalloc (sizeof (ScreenSaverSuspensionRec)); + this = xalloc (sizeof (ScreenSaverSuspensionRec)); if (!this) return BadAlloc; @@ -1444,8 +1427,7 @@ static DISPATCH_PROC((*NormalVector[])) = { #define NUM_REQUESTS ((sizeof NormalVector) / (sizeof NormalVector[0])) static int -ProcScreenSaverDispatch (client) - ClientPtr client; +ProcScreenSaverDispatch (ClientPtr client) { REQUEST(xReq); @@ -1455,8 +1437,7 @@ ProcScreenSaverDispatch (client) } static int -SProcScreenSaverQueryVersion (client) - ClientPtr client; +SProcScreenSaverQueryVersion (ClientPtr client) { REQUEST(xScreenSaverQueryVersionReq); int n; @@ -1467,8 +1448,7 @@ SProcScreenSaverQueryVersion (client) } static int -SProcScreenSaverQueryInfo (client) - ClientPtr client; +SProcScreenSaverQueryInfo (ClientPtr client) { REQUEST(xScreenSaverQueryInfoReq); int n; @@ -1480,8 +1460,7 @@ SProcScreenSaverQueryInfo (client) } static int -SProcScreenSaverSelectInput (client) - ClientPtr client; +SProcScreenSaverSelectInput (ClientPtr client) { REQUEST(xScreenSaverSelectInputReq); int n; @@ -1494,8 +1473,7 @@ SProcScreenSaverSelectInput (client) } static int -SProcScreenSaverSetAttributes (client) - ClientPtr client; +SProcScreenSaverSetAttributes (ClientPtr client) { REQUEST(xScreenSaverSetAttributesReq); int n; @@ -1515,8 +1493,7 @@ SProcScreenSaverSetAttributes (client) } static int -SProcScreenSaverUnsetAttributes (client) - ClientPtr client; +SProcScreenSaverUnsetAttributes (ClientPtr client) { REQUEST(xScreenSaverUnsetAttributesReq); int n; @@ -1549,8 +1526,7 @@ static DISPATCH_PROC((*SwappedVector[])) = { }; static int -SProcScreenSaverDispatch (client) - ClientPtr client; +SProcScreenSaverDispatch (ClientPtr client) { REQUEST(xReq); diff --git a/xorg-server/Xext/security.c b/xorg-server/Xext/security.c index 1a90a82b1..42eb9f01d 100644 --- a/xorg-server/Xext/security.c +++ b/xorg-server/Xext/security.c @@ -37,7 +37,7 @@ in this Software without prior written authorization from The Open Group. #include "registry.h" #include "xacestr.h" #include "securitysrv.h" -#include +#include #include "modinit.h" /* Extension stuff */ @@ -408,7 +408,7 @@ SecurityEventSelectForAuthorization( } } - pEventClient = (OtherClients *) xalloc(sizeof(OtherClients)); + pEventClient = xalloc(sizeof(OtherClients)); if (!pEventClient) return BadAlloc; pEventClient->mask = mask; @@ -450,9 +450,9 @@ ProcSecurityGenerateAuthorization( /* check request length */ REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq); - len = SIZEOF(xSecurityGenerateAuthorizationReq) >> 2; - len += (stuff->nbytesAuthProto + (unsigned)3) >> 2; - len += (stuff->nbytesAuthData + (unsigned)3) >> 2; + len = bytes_to_int32(SIZEOF(xSecurityGenerateAuthorizationReq)); + len += bytes_to_int32(stuff->nbytesAuthProto); + len += bytes_to_int32(stuff->nbytesAuthData); values = ((CARD32 *)stuff) + len; len += Ones(stuff->valueMask); if (client->req_len != len) @@ -520,7 +520,7 @@ ProcSecurityGenerateAuthorization( } protoname = (char *)&stuff[1]; - protodata = protoname + ((stuff->nbytesAuthProto + (unsigned)3) >> 2); + protodata = protoname + bytes_to_int32(stuff->nbytesAuthProto); /* call os layer to generate the authorization */ @@ -540,7 +540,7 @@ ProcSecurityGenerateAuthorization( /* associate additional information with this auth ID */ - pAuth = (SecurityAuthorizationPtr)xalloc(sizeof(SecurityAuthorizationRec)); + pAuth = xalloc(sizeof(SecurityAuthorizationRec)); if (!pAuth) { err = BadAlloc; @@ -580,7 +580,7 @@ ProcSecurityGenerateAuthorization( /* tell client the auth id and data */ rep.type = X_Reply; - rep.length = (authdata_len + 3) >> 2; + rep.length = bytes_to_int32(authdata_len); rep.sequenceNumber = client->sequence; rep.authId = authId; rep.dataLength = authdata_len; @@ -623,13 +623,16 @@ ProcSecurityRevokeAuthorization( { REQUEST(xSecurityRevokeAuthorizationReq); SecurityAuthorizationPtr pAuth; + int rc; REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); - pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(client, - stuff->authId, SecurityAuthorizationResType, DixDestroyAccess); - if (!pAuth) - return SecurityErrorBase + XSecurityBadAuthorization; + rc = dixLookupResourceByType((pointer *)&pAuth, stuff->authId, + SecurityAuthorizationResType, client, + DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? + SecurityErrorBase + XSecurityBadAuthorization : rc; FreeResource(stuff->authId, RT_NONE); return Success; @@ -685,10 +688,10 @@ SProcSecurityGenerateAuthorization( swaps(&stuff->nbytesAuthProto, n); swaps(&stuff->nbytesAuthData, n); swapl(&stuff->valueMask, n); - values_offset = ((stuff->nbytesAuthProto + (unsigned)3) >> 2) + - ((stuff->nbytesAuthData + (unsigned)3) >> 2); + values_offset = bytes_to_int32(stuff->nbytesAuthProto) + + bytes_to_int32(stuff->nbytesAuthData); if (values_offset > - stuff->length - (sz_xSecurityGenerateAuthorizationReq >> 2)) + stuff->length - bytes_to_int32(sz_xSecurityGenerateAuthorizationReq)) return BadLength; values = (CARD32 *)(&stuff[1]) + values_offset; nvalues = (((CARD32 *)stuff) + stuff->length) - values; diff --git a/xorg-server/Xext/shape.c b/xorg-server/Xext/shape.c index 332e58743..53167d140 100644 --- a/xorg-server/Xext/shape.c +++ b/xorg-server/Xext/shape.c @@ -24,8 +24,6 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -43,8 +41,7 @@ in this Software without prior written authorization from The Open Group. #include "dixstruct.h" #include "resource.h" #include "opaque.h" -#define _SHAPE_SERVER_ /* don't want Xlib structures */ -#include +#include #include "regionstr.h" #include "gcstruct.h" #include "modinit.h" @@ -65,18 +62,6 @@ static void SShapeNotifyEvent( xShapeNotifyEvent * /* from */, xShapeNotifyEvent * /* to */ ); -static int -RegionOperate ( - ClientPtr /* client */, - WindowPtr /* pWin */, - int /* kind */, - RegionPtr * /* destRgnp */, - RegionPtr /* srcRgn */, - int /* op */, - int /* xoff */, - int /* yoff */, - CreateDftPtr /* create */ - ); /* SendShapeNotify, CreateBoundingShape and CreateClipShape are used * externally by the Xfixes extension and are now defined in window.h @@ -109,7 +94,7 @@ static DISPATCH_PROC(SProcShapeSelectInput); #endif static int ShapeEventBase = 0; -static RESTYPE ClientType, EventType; /* resource types for event masks */ +static RESTYPE ClientType, ShapeEventType; /* resource types for event masks */ /* * each window has a list of clients requesting @@ -142,8 +127,8 @@ ShapeExtensionInit(void) ExtensionEntry *extEntry; ClientType = CreateNewResourceType(ShapeFreeClient); - EventType = CreateNewResourceType(ShapeFreeEvents); - if (ClientType && EventType && + ShapeEventType = CreateNewResourceType(ShapeFreeEvents); + if (ClientType && ShapeEventType && (extEntry = AddExtension(SHAPENAME, ShapeNumberEvents, 0, ProcShapeDispatch, SProcShapeDispatch, NULL, StandardMinorOpcode))) @@ -154,14 +139,15 @@ ShapeExtensionInit(void) } static int -RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create) - ClientPtr client; - WindowPtr pWin; - int kind; - RegionPtr *destRgnp, srcRgn; - int op; - int xoff, yoff; - CreateDftPtr create; /* creates a reasonable *destRgnp */ +RegionOperate ( + ClientPtr client, + WindowPtr pWin, + int kind, + RegionPtr *destRgnp, + RegionPtr srcRgn, + int op, + int xoff, int yoff, + CreateDftPtr create) { ScreenPtr pScreen = pWin->drawable.pScreen; @@ -239,8 +225,7 @@ RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create) } RegionPtr -CreateBoundingShape (pWin) - WindowPtr pWin; +CreateBoundingShape (WindowPtr pWin) { BoxRec extents; @@ -252,8 +237,7 @@ CreateBoundingShape (pWin) } RegionPtr -CreateClipShape (pWin) - WindowPtr pWin; +CreateClipShape (WindowPtr pWin) { BoxRec extents; @@ -265,13 +249,13 @@ CreateClipShape (pWin) } static int -ProcShapeQueryVersion (client) - ClientPtr client; +ProcShapeQueryVersion (ClientPtr client) { xShapeQueryVersionReply rep; int n; REQUEST_SIZE_MATCH (xShapeQueryVersionReq); + memset(&rep, 0, sizeof(xShapeQueryVersionReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -293,8 +277,7 @@ ProcShapeQueryVersion (client) *****************/ static int -ProcShapeRectangles (client) - ClientPtr client; +ProcShapeRectangles (ClientPtr client) { WindowPtr pWin; ScreenPtr pScreen; @@ -369,13 +352,14 @@ ProcPanoramiXShapeRectangles( { REQUEST(xShapeRectanglesReq); PanoramiXRes *win; - int j, result = 0; + int j, result; REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->dest, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->dest, XRT_WINDOW, + client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; @@ -393,8 +377,7 @@ ProcPanoramiXShapeRectangles( static int -ProcShapeMask (client) - ClientPtr client; +ProcShapeMask (ClientPtr client) { WindowPtr pWin; ScreenPtr pScreen; @@ -468,18 +451,20 @@ ProcPanoramiXShapeMask( { REQUEST(xShapeMaskReq); PanoramiXRes *win, *pmap; - int j, result = 0; + int j, result; REQUEST_SIZE_MATCH (xShapeMaskReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->dest, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->dest, XRT_WINDOW, + client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; if(stuff->src != None) { - if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->src, XRT_PIXMAP, DixReadAccess))) - return BadPixmap; + result = dixLookupResourceByType((pointer *)&pmap, stuff->src, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadPixmap : result; } else pmap = NULL; @@ -500,8 +485,7 @@ ProcPanoramiXShapeMask( ************/ static int -ProcShapeCombine (client) - ClientPtr client; +ProcShapeCombine (ClientPtr client) { WindowPtr pSrcWin, pDestWin; ScreenPtr pScreen; @@ -597,17 +581,19 @@ ProcPanoramiXShapeCombine( { REQUEST(xShapeCombineReq); PanoramiXRes *win, *win2; - int j, result = 0; + int j, result; REQUEST_AT_LEAST_SIZE (xShapeCombineReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->dest, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->dest, XRT_WINDOW, + client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; - if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->src, XRT_WINDOW, DixReadAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win2, stuff->src, XRT_WINDOW, + client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; @@ -624,8 +610,7 @@ ProcPanoramiXShapeCombine( *************/ static int -ProcShapeOffset (client) - ClientPtr client; +ProcShapeOffset (ClientPtr client) { WindowPtr pWin; ScreenPtr pScreen; @@ -670,13 +655,14 @@ ProcPanoramiXShapeOffset( { REQUEST(xShapeOffsetReq); PanoramiXRes *win; - int j, result = 0; + int j, result; REQUEST_AT_LEAST_SIZE (xShapeOffsetReq); - if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->dest, XRT_WINDOW, DixWriteAccess))) - return BadWindow; + result = dixLookupResourceByType((pointer *)&win, stuff->dest, XRT_WINDOW, + client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadWindow : result; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; @@ -689,8 +675,7 @@ ProcPanoramiXShapeOffset( static int -ProcShapeQueryExtents (client) - ClientPtr client; +ProcShapeQueryExtents (ClientPtr client) { REQUEST(xShapeQueryExtentsReq); WindowPtr pWin; @@ -703,6 +688,7 @@ ProcShapeQueryExtents (client) rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; + memset(&rep, 0, sizeof(xShapeQueryExtentsReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -754,18 +740,18 @@ ProcShapeQueryExtents (client) /*ARGSUSED*/ static int -ShapeFreeClient (data, id) - pointer data; - XID id; +ShapeFreeClient (pointer data, XID id) { ShapeEventPtr pShapeEvent; WindowPtr pWin; ShapeEventPtr *pHead, pCur, pPrev; + int rc; pShapeEvent = (ShapeEventPtr) data; pWin = pShapeEvent->window; - pHead = (ShapeEventPtr *) LookupIDByType(pWin->drawable.id, EventType); - if (pHead) { + rc = dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id, + ShapeEventType, serverClient, DixReadAccess); + if (rc == Success) { pPrev = 0; for (pCur = *pHead; pCur && pCur != pShapeEvent; pCur=pCur->next) pPrev = pCur; @@ -783,9 +769,7 @@ ShapeFreeClient (data, id) /*ARGSUSED*/ static int -ShapeFreeEvents (data, id) - pointer data; - XID id; +ShapeFreeEvents (pointer data, XID id) { ShapeEventPtr *pHead, pCur, pNext; @@ -800,8 +784,7 @@ ShapeFreeEvents (data, id) } static int -ProcShapeSelectInput (client) - ClientPtr client; +ProcShapeSelectInput (ClientPtr client) { REQUEST(xShapeSelectInputReq); WindowPtr pWin; @@ -813,8 +796,11 @@ ProcShapeSelectInput (client) rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); if (rc != Success) return rc; - pHead = (ShapeEventPtr *)SecurityLookupIDByType(client, - pWin->drawable.id, EventType, DixWriteAccess); + rc = dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id, + ShapeEventType, client, DixWriteAccess); + if (rc != Success && rc != BadValue) + return rc; + switch (stuff->enable) { case xTrue: if (pHead) { @@ -830,8 +816,7 @@ ProcShapeSelectInput (client) } /* build the entry */ - pNewShapeEvent = (ShapeEventPtr) - xalloc (sizeof (ShapeEventRec)); + pNewShapeEvent = xalloc (sizeof (ShapeEventRec)); if (!pNewShapeEvent) return BadAlloc; pNewShapeEvent->next = 0; @@ -853,9 +838,9 @@ ProcShapeSelectInput (client) */ if (!pHead) { - pHead = (ShapeEventPtr *) xalloc (sizeof (ShapeEventPtr)); + pHead = xalloc (sizeof (ShapeEventPtr)); if (!pHead || - !AddResource (pWin->drawable.id, EventType, (pointer)pHead)) + !AddResource (pWin->drawable.id, ShapeEventType, (pointer)pHead)) { FreeResource (clientResource, RT_NONE); return BadAlloc; @@ -896,9 +881,7 @@ ProcShapeSelectInput (client) */ void -SendShapeNotify (pWin, which) - WindowPtr pWin; - int which; +SendShapeNotify (WindowPtr pWin, int which) { ShapeEventPtr *pHead, pShapeEvent; ClientPtr client; @@ -906,9 +889,11 @@ SendShapeNotify (pWin, which) BoxRec extents; RegionPtr region; BYTE shaped; + int rc; - pHead = (ShapeEventPtr *) LookupIDByType(pWin->drawable.id, EventType); - if (!pHead) + rc = dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id, + ShapeEventType, serverClient, DixReadAccess); + if (rc != Success) return; switch (which) { case ShapeBounding: @@ -972,8 +957,7 @@ SendShapeNotify (pWin, which) } static int -ProcShapeInputSelected (client) - ClientPtr client; +ProcShapeInputSelected (ClientPtr client) { REQUEST(xShapeInputSelectedReq); WindowPtr pWin; @@ -986,8 +970,10 @@ ProcShapeInputSelected (client) rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; - pHead = (ShapeEventPtr *) SecurityLookupIDByType(client, - pWin->drawable.id, EventType, DixReadAccess); + rc = dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id, + ShapeEventType, client, DixReadAccess); + if (rc != Success && rc != BadValue) + return rc; enabled = xFalse; if (pHead) { for (pShapeEvent = *pHead; @@ -1013,8 +999,7 @@ ProcShapeInputSelected (client) } static int -ProcShapeGetRectangles (client) - ClientPtr client; +ProcShapeGetRectangles (ClientPtr client) { REQUEST(xShapeGetRectanglesReq); WindowPtr pWin; @@ -1044,7 +1029,7 @@ ProcShapeGetRectangles (client) } if (!region) { nrects = 1; - rects = (xRectangle *) xalloc (sizeof (xRectangle)); + rects = xalloc (sizeof (xRectangle)); if (!rects) return BadAlloc; switch (stuff->kind) { @@ -1071,7 +1056,7 @@ ProcShapeGetRectangles (client) BoxPtr box; nrects = REGION_NUM_RECTS(region); box = REGION_RECTS(region); - rects = (xRectangle *) xalloc (nrects * sizeof (xRectangle)); + rects = xalloc (nrects * sizeof (xRectangle)); if (!rects && nrects) return BadAlloc; for (i = 0; i < nrects; i++, box++) { @@ -1083,7 +1068,7 @@ ProcShapeGetRectangles (client) } rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = (nrects * sizeof (xRectangle)) >> 2; + rep.length = bytes_to_int32(nrects * sizeof (xRectangle)); rep.ordering = YXBanded; rep.nrects = nrects; if (client->swapped) { @@ -1099,8 +1084,7 @@ ProcShapeGetRectangles (client) } static int -ProcShapeDispatch (client) - ClientPtr client; +ProcShapeDispatch (ClientPtr client) { REQUEST(xReq); switch (stuff->data) { @@ -1148,8 +1132,7 @@ ProcShapeDispatch (client) } static void -SShapeNotifyEvent(from, to) - xShapeNotifyEvent *from, *to; +SShapeNotifyEvent(xShapeNotifyEvent *from, xShapeNotifyEvent *to) { to->type = from->type; to->kind = from->kind; @@ -1164,8 +1147,7 @@ SShapeNotifyEvent(from, to) } static int -SProcShapeQueryVersion (client) - ClientPtr client; +SProcShapeQueryVersion (ClientPtr client) { int n; REQUEST (xShapeQueryVersionReq); @@ -1175,8 +1157,7 @@ SProcShapeQueryVersion (client) } static int -SProcShapeRectangles (client) - ClientPtr client; +SProcShapeRectangles (ClientPtr client) { char n; REQUEST (xShapeRectanglesReq); @@ -1191,8 +1172,7 @@ SProcShapeRectangles (client) } static int -SProcShapeMask (client) - ClientPtr client; +SProcShapeMask (ClientPtr client) { char n; REQUEST (xShapeMaskReq); @@ -1207,8 +1187,7 @@ SProcShapeMask (client) } static int -SProcShapeCombine (client) - ClientPtr client; +SProcShapeCombine (ClientPtr client) { char n; REQUEST (xShapeCombineReq); @@ -1223,8 +1202,7 @@ SProcShapeCombine (client) } static int -SProcShapeOffset (client) - ClientPtr client; +SProcShapeOffset (ClientPtr client) { char n; REQUEST (xShapeOffsetReq); @@ -1238,8 +1216,7 @@ SProcShapeOffset (client) } static int -SProcShapeQueryExtents (client) - ClientPtr client; +SProcShapeQueryExtents (ClientPtr client) { char n; REQUEST (xShapeQueryExtentsReq); @@ -1251,8 +1228,7 @@ SProcShapeQueryExtents (client) } static int -SProcShapeSelectInput (client) - ClientPtr client; +SProcShapeSelectInput (ClientPtr client) { char n; REQUEST (xShapeSelectInputReq); @@ -1264,8 +1240,7 @@ SProcShapeSelectInput (client) } static int -SProcShapeInputSelected (client) - ClientPtr client; +SProcShapeInputSelected (ClientPtr client) { int n; REQUEST (xShapeInputSelectedReq); @@ -1277,8 +1252,7 @@ SProcShapeInputSelected (client) } static int -SProcShapeGetRectangles (client) - ClientPtr client; +SProcShapeGetRectangles (ClientPtr client) { REQUEST(xShapeGetRectanglesReq); char n; @@ -1290,8 +1264,7 @@ SProcShapeGetRectangles (client) } static int -SProcShapeDispatch (client) - ClientPtr client; +SProcShapeDispatch (ClientPtr client) { REQUEST(xReq); switch (stuff->data) { diff --git a/xorg-server/Xext/shm.c b/xorg-server/Xext/shm.c index a48d2bd5b..dd097e605 100644 --- a/xorg-server/Xext/shm.c +++ b/xorg-server/Xext/shm.c @@ -38,8 +38,6 @@ in this Software without prior written authorization from The Open Group. #include #include #include -#define NEED_REPLIES -#define NEED_EVENTS #include #include #include "misc.h" @@ -54,8 +52,7 @@ in this Software without prior written authorization from The Open Group. #include "servermd.h" #include "shmint.h" #include "xace.h" -#define _XSHM_SERVER_ -#include +#include #include /* Needed for Solaris cross-zone shared memory extension */ @@ -132,9 +129,9 @@ static DISPATCH_PROC(SProcShmPutImage); static DISPATCH_PROC(SProcShmQueryVersion); static unsigned char ShmReqCode; -_X_EXPORT int ShmCompletionCode; -_X_EXPORT int BadShmSegCode; -_X_EXPORT RESTYPE ShmSegType; +int ShmCompletionCode; +int BadShmSegCode; +RESTYPE ShmSegType; static ShmDescPtr Shmsegs; static Bool sharedPixmaps; static ShmFuncsPtr shmFuncs[MAXSCREENS]; @@ -146,12 +143,11 @@ static ShmFuncs fbFuncs = {fbShmCreatePixmap, NULL}; #define VERIFY_SHMSEG(shmseg,shmdesc,client) \ { \ - shmdesc = (ShmDescPtr)LookupIDByType(shmseg, ShmSegType); \ - if (!shmdesc) \ - { \ - client->errorValue = shmseg; \ - return BadShmSegCode; \ - } \ + int rc; \ + rc = dixLookupResourceByType((pointer *)&(shmdesc), shmseg, ShmSegType, \ + client, DixReadAccess); \ + if (rc != Success) \ + return (rc == BadValue) ? BadShmSegCode : rc; \ } #define VERIFY_SHMPTR(shmseg,offset,needwrite,shmdesc,client) \ @@ -200,7 +196,7 @@ static Bool CheckForShmSyscall(void) if (shmid != -1) { /* Successful allocation - clean up */ - shmctl(shmid, IPC_RMID, (struct shmid_ds *)NULL); + shmctl(shmid, IPC_RMID, NULL); } else { @@ -267,11 +263,11 @@ ShmResetProc(ExtensionEntry *extEntry) for (i = 0; i < MAXSCREENS; i++) { - shmFuncs[i] = (ShmFuncsPtr)NULL; + shmFuncs[i] = NULL; } } -_X_EXPORT void +void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs) { shmFuncs[pScreen->myNum] = funcs; @@ -298,7 +294,7 @@ ShmDestroyPixmap (PixmapPtr pPixmap) return ret; } -_X_EXPORT void +void ShmRegisterFbFuncs(ScreenPtr pScreen) { shmFuncs[pScreen->myNum] = &fbFuncs; @@ -311,6 +307,7 @@ ProcShmQueryVersion(ClientPtr client) int n; REQUEST_SIZE_MATCH(xShmQueryVersionReq); + memset(&rep, 0, sizeof(xShmQueryVersionReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -424,7 +421,7 @@ ProcShmAttach(ClientPtr client) } else { - shmdesc = (ShmDescPtr) xalloc(sizeof(ShmDescRec)); + shmdesc = xalloc(sizeof(ShmDescRec)); if (!shmdesc) return BadAlloc; shmdesc->addr = shmat(stuff->shmid, 0, @@ -514,20 +511,22 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC, static int ProcPanoramiXShmPutImage(ClientPtr client) { - int j, result = 0, orig_x, orig_y; + int j, result, orig_x, orig_y; PanoramiXRes *draw, *gc; Bool sendEvent, isRoot; REQUEST(xShmPutImageReq); REQUEST_SIZE_MATCH(xShmPutImageReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -571,9 +570,10 @@ ProcPanoramiXShmGetImage(ClientPtr client) return(BadValue); } - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + rc = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; if (draw->type == XRT_PIXMAP) return ProcShmGetImage(client); @@ -729,7 +729,7 @@ CreatePmap: VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); - if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPix = xalloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; diff --git a/xorg-server/Xext/shmint.h b/xorg-server/Xext/shmint.h index f659fd23a..8f8a00d4f 100644 --- a/xorg-server/Xext/shmint.h +++ b/xorg-server/Xext/shmint.h @@ -23,17 +23,47 @@ #ifndef _SHMINT_H_ #define _SHMINT_H_ -#define _XSHM_SERVER_ -#include +#include #include "screenint.h" #include "pixmap.h" #include "gc.h" -void +#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; + +extern _X_EXPORT void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs); -void +extern _X_EXPORT void ShmRegisterFbFuncs(ScreenPtr pScreen); +extern _X_EXPORT RESTYPE ShmSegType; +extern _X_EXPORT int ShmCompletionCode; +extern _X_EXPORT int BadShmSegCode; + #endif /* _SHMINT_H_ */ diff --git a/xorg-server/Xext/sleepuntil.c b/xorg-server/Xext/sleepuntil.c index f8cedbe6e..2616a5e5b 100644 --- a/xorg-server/Xext/sleepuntil.c +++ b/xorg-server/Xext/sleepuntil.c @@ -77,14 +77,11 @@ static void SertafiedWakeupHandler( pointer /* LastSelectMask */ ); -_X_EXPORT int -ClientSleepUntil (client, revive, notifyFunc, closure) - ClientPtr client; - TimeStamp *revive; - void (*notifyFunc)( - ClientPtr /* client */, - pointer /* closure */); - pointer closure; +int +ClientSleepUntil (ClientPtr client, + TimeStamp *revive, + void (*notifyFunc)(ClientPtr, pointer), + pointer closure) { SertafiedPtr pRequest, pReq, pPrev; @@ -96,7 +93,7 @@ ClientSleepUntil (client, revive, notifyFunc, closure) SertafiedGeneration = serverGeneration; BlockHandlerRegistered = FALSE; } - pRequest = (SertafiedPtr) xalloc (sizeof (SertafiedRec)); + pRequest = xalloc (sizeof (SertafiedRec)); if (!pRequest) return FALSE; pRequest->pClient = client; @@ -138,9 +135,7 @@ ClientSleepUntil (client, revive, notifyFunc, closure) } static void -ClientAwaken (client, closure) - ClientPtr client; - pointer closure; +ClientAwaken (ClientPtr client, pointer closure) { if (!client->clientGone) AttendClient (client); @@ -148,9 +143,7 @@ ClientAwaken (client, closure) static int -SertafiedDelete (value, id) - pointer value; - XID id; +SertafiedDelete (pointer value, XID id) { SertafiedPtr pRequest = (SertafiedPtr)value; SertafiedPtr pReq, pPrev; @@ -172,10 +165,7 @@ SertafiedDelete (value, id) } static void -SertafiedBlockHandler (data, wt, LastSelectMask) - pointer data; /* unused */ - OSTimePtr wt; /* wait time */ - pointer LastSelectMask; +SertafiedBlockHandler (pointer data, OSTimePtr wt, pointer LastSelectMask) { SertafiedPtr pReq, pNext; unsigned long delay; @@ -208,10 +198,7 @@ SertafiedBlockHandler (data, wt, LastSelectMask) } static void -SertafiedWakeupHandler (data, i, LastSelectMask) - pointer data; - int i; - pointer LastSelectMask; +SertafiedWakeupHandler (pointer data, int i, pointer LastSelectMask) { SertafiedPtr pReq, pNext; TimeStamp now; diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c index a006ae95b..667f8ab78 100644 --- a/xorg-server/Xext/sync.c +++ b/xorg-server/Xext/sync.c @@ -34,7 +34,7 @@ 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 +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 make no representations about the suitability of this software @@ -50,8 +50,6 @@ PERFORMANCE OF THIS SOFTWARE. */ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -67,9 +65,8 @@ PERFORMANCE OF THIS SOFTWARE. #include "dixstruct.h" #include "resource.h" #include "opaque.h" -#define _SYNC_SERVER -#include -#include +#include +#include "syncsrv.h" #include #if !defined(WIN32) @@ -97,173 +94,11 @@ static SyncCounter **SysCounterList = NULL; #define XSyncCAAllTrigger \ (XSyncCACounter | XSyncCAValueType | XSyncCAValue | XSyncCATestType) -static int -FreeAlarm( - pointer /* addr */, - XID /* id */ -); - -static int -FreeAlarmClient( - pointer /* value */, - XID /* id */ -); - -static int -FreeAwait( - pointer /* addr */, - XID /* id */ -); - -static void -ServertimeBracketValues( - pointer /* pCounter */, - CARD64 * /* pbracket_less */, - CARD64 * /* pbracket_greater */ -); - -static void -ServertimeQueryValue( - pointer /* pCounter */, - CARD64 * /* pValue_return */ -); - -static void -ServertimeWakeupHandler( - pointer /* env */, - int /* rc */, - pointer /* LastSelectMask */ -); - -static int -SyncInitTrigger( - ClientPtr /* client */, - SyncTrigger * /* pTrigger */, - XSyncCounter /* counter */, - Mask /* changes */ -); - -static void -SAlarmNotifyEvent( - xSyncAlarmNotifyEvent * /* from */, - xSyncAlarmNotifyEvent * /* to */ -); - -static void -SCounterNotifyEvent( - xSyncCounterNotifyEvent * /* from */, - xSyncCounterNotifyEvent * /* to */ -); - -static void -ServertimeBlockHandler( - pointer /* env */, - struct timeval ** /* wt */, - pointer /* LastSelectMask */ -); - -static int -SyncAddTriggerToCounter( - SyncTrigger * /* pTrigger */ -); - -extern void -SyncAlarmCounterDestroyed( - SyncTrigger * /* pTrigger */ -); - -static void -SyncAlarmTriggerFired( - SyncTrigger * /* pTrigger */ -); - -static void -SyncAwaitTriggerFired( - SyncTrigger * /* pTrigger */ -); - -static int -SyncChangeAlarmAttributes( - ClientPtr /* client */, - SyncAlarm * /* pAlarm */, - Mask /* mask */, - CARD32 * /* values */ -); - -static Bool -SyncCheckTriggerNegativeComparison( - SyncTrigger * /* pTrigger */, - CARD64 /* oldval */ -); - -static Bool -SyncCheckTriggerNegativeTransition( - SyncTrigger * /* pTrigger */, - CARD64 /* oldval */ -); - -static Bool -SyncCheckTriggerPositiveComparison( - SyncTrigger * /* pTrigger */, - CARD64 /* oldval */ -); - -static Bool -SyncCheckTriggerPositiveTransition( - SyncTrigger * /* pTrigger */, - CARD64 /* oldval */ -); - -static SyncCounter * -SyncCreateCounter( - ClientPtr /* client */, - XSyncCounter /* id */, - CARD64 /* initialvalue */ -); +static void SyncComputeBracketValues(SyncCounter *, Bool); -static void SyncComputeBracketValues( - SyncCounter * /* pCounter */, - Bool /* startOver */ -); +static void SyncInitServerTime(void); -static void -SyncDeleteTriggerFromCounter( - SyncTrigger * /* pTrigger */ -); - -static Bool -SyncEventSelectForAlarm( - SyncAlarm * /* pAlarm */, - ClientPtr /* client */, - Bool /* wantevents */ -); - -static void -SyncInitServerTime( - void -); - -static void -SyncInitIdleTime( - void -); - -static void -SyncResetProc( - ExtensionEntry * /* extEntry */ -); - -static void -SyncSendAlarmNotifyEvents( - SyncAlarm * /* pAlarm */ -); - -static void -SyncSendCounterNotifyEvents( - ClientPtr /* client */, - SyncAwait ** /* ppAwait */, - int /* num_events */ -); +static void SyncInitIdleTime(void); static DISPATCH_PROC(ProcSyncAwait); static DISPATCH_PROC(ProcSyncChangeAlarm); @@ -301,8 +136,7 @@ static DISPATCH_PROC(SProcSyncSetPriority); * delete and add triggers on this list. */ static void -SyncDeleteTriggerFromCounter(pTrigger) - SyncTrigger *pTrigger; +SyncDeleteTriggerFromCounter(SyncTrigger *pTrigger) { SyncTriggerList *pCur; SyncTriggerList *pPrev; @@ -323,7 +157,7 @@ SyncDeleteTriggerFromCounter(pTrigger) pPrev->next = pCur->next; else pTrigger->pCounter->pTriglist = pCur->next; - + xfree(pCur); break; } @@ -331,15 +165,14 @@ SyncDeleteTriggerFromCounter(pTrigger) pPrev = pCur; pCur = pCur->next; } - + if (IsSystemCounter(pTrigger->pCounter)) SyncComputeBracketValues(pTrigger->pCounter, /*startOver*/ TRUE); } static int -SyncAddTriggerToCounter(pTrigger) - SyncTrigger *pTrigger; +SyncAddTriggerToCounter(SyncTrigger *pTrigger) { SyncTriggerList *pCur; @@ -353,7 +186,7 @@ SyncAddTriggerToCounter(pTrigger) return Success; } - if (!(pCur = (SyncTriggerList *)xalloc(sizeof(SyncTriggerList)))) + if (!(pCur = xalloc(sizeof(SyncTriggerList)))) return BadAlloc; pCur->pTrigger = pTrigger; @@ -367,7 +200,7 @@ SyncAddTriggerToCounter(pTrigger) } -/* Below are four possible functions that can be plugged into +/* Below are four possible functions that can be plugged into * pTrigger->CheckTrigger, corresponding to the four possible * test-types. These functions are called after the counter's * value changes but are also passed the old counter value @@ -377,14 +210,12 @@ SyncAddTriggerToCounter(pTrigger) * of the trigger. * * All of them include the condition pTrigger->pCounter == NULL. - * This is because the spec says that a trigger with a counter value + * This is because the spec says that a trigger with a counter value * of None is always TRUE. */ static Bool -SyncCheckTriggerPositiveComparison(pTrigger, oldval) - SyncTrigger *pTrigger; - CARD64 oldval; +SyncCheckTriggerPositiveComparison(SyncTrigger *pTrigger, CARD64 oldval) { return (pTrigger->pCounter == NULL || XSyncValueGreaterOrEqual(pTrigger->pCounter->value, @@ -392,9 +223,7 @@ SyncCheckTriggerPositiveComparison(pTrigger, oldval) } static Bool -SyncCheckTriggerNegativeComparison(pTrigger, oldval) - SyncTrigger *pTrigger; - CARD64 oldval; +SyncCheckTriggerNegativeComparison(SyncTrigger *pTrigger, CARD64 oldval) { return (pTrigger->pCounter == NULL || XSyncValueLessOrEqual(pTrigger->pCounter->value, @@ -402,9 +231,7 @@ SyncCheckTriggerNegativeComparison(pTrigger, oldval) } static Bool -SyncCheckTriggerPositiveTransition(pTrigger, oldval) - SyncTrigger *pTrigger; - CARD64 oldval; +SyncCheckTriggerPositiveTransition(SyncTrigger *pTrigger, CARD64 oldval) { return (pTrigger->pCounter == NULL || (XSyncValueLessThan(oldval, pTrigger->test_value) && @@ -413,9 +240,7 @@ SyncCheckTriggerPositiveTransition(pTrigger, oldval) } static Bool -SyncCheckTriggerNegativeTransition(pTrigger, oldval) - SyncTrigger *pTrigger; - CARD64 oldval; +SyncCheckTriggerNegativeTransition(SyncTrigger *pTrigger, CARD64 oldval) { return (pTrigger->pCounter == NULL || (XSyncValueGreaterThan(oldval, pTrigger->test_value) && @@ -423,14 +248,9 @@ SyncCheckTriggerNegativeTransition(pTrigger, oldval) pTrigger->test_value))); } - - -static int -SyncInitTrigger(client, pTrigger, counter, changes) - ClientPtr client; /* so we can set errorValue */ - SyncTrigger *pTrigger; - XSyncCounter counter; - Mask changes; +static int +SyncInitTrigger(ClientPtr client, SyncTrigger *pTrigger, XSyncCounter counter, + Mask changes) { SyncCounter *pCounter = pTrigger->pCounter; int rc; @@ -486,16 +306,16 @@ SyncInitTrigger(client, pTrigger, counter, changes) switch (pTrigger->test_type) { - case XSyncPositiveTransition: + case XSyncPositiveTransition: pTrigger->CheckTrigger = SyncCheckTriggerPositiveTransition; break; - case XSyncNegativeTransition: + case XSyncNegativeTransition: pTrigger->CheckTrigger = SyncCheckTriggerNegativeTransition; break; - case XSyncPositiveComparison: + case XSyncPositiveComparison: pTrigger->CheckTrigger = SyncCheckTriggerPositiveComparison; break; - case XSyncNegativeComparison: + case XSyncNegativeComparison: pTrigger->CheckTrigger = SyncCheckTriggerNegativeComparison; break; } @@ -511,7 +331,7 @@ SyncInitTrigger(client, pTrigger, counter, changes) if (pCounter == NULL) return BadMatch; - XSyncValueAdd(&pTrigger->test_value, pCounter->value, + XSyncValueAdd(&pTrigger->test_value, pCounter->value, pTrigger->wait_value, &overflow); if (overflow) { @@ -533,17 +353,16 @@ SyncInitTrigger(client, pTrigger, counter, changes) { SyncComputeBracketValues(pCounter, /*startOver*/ TRUE); } - + return Success; } /* AlarmNotify events happen in response to actions taken on an Alarm or - * the counter used by the alarm. AlarmNotify may be sent to multiple + * the counter used by the alarm. AlarmNotify may be sent to multiple * clients. The alarm maintains a list of clients interested in events. */ static void -SyncSendAlarmNotifyEvents(pAlarm) - SyncAlarm *pAlarm; +SyncSendAlarmNotifyEvents(SyncAlarm *pAlarm) { SyncAlarmClientList *pcl; xSyncAlarmNotifyEvent ane; @@ -571,7 +390,7 @@ SyncSendAlarmNotifyEvents(pAlarm) ane.state = pAlarm->state; /* send to owner */ - if (pAlarm->events && !pAlarm->client->clientGone) + if (pAlarm->events && !pAlarm->client->clientGone) WriteEventsToClient(pAlarm->client, 1, (xEvent *) &ane); /* send to other interested clients */ @@ -586,23 +405,20 @@ SyncSendAlarmNotifyEvents(pAlarm) } -/* CounterNotify events only occur in response to an Await. The events +/* CounterNotify events only occur in response to an Await. The events * go only to the Awaiting client. */ static void -SyncSendCounterNotifyEvents(client, ppAwait, num_events) - ClientPtr client; - SyncAwait **ppAwait; - int num_events; +SyncSendCounterNotifyEvents(ClientPtr client, SyncAwait **ppAwait, + int num_events) { xSyncCounterNotifyEvent *pEvents, *pev; int i; if (client->clientGone) return; - pev = pEvents = (xSyncCounterNotifyEvent *) - xalloc(num_events * sizeof(xSyncCounterNotifyEvent)); - if (!pEvents) + pev = pEvents = xalloc(num_events * sizeof(xSyncCounterNotifyEvent)); + if (!pEvents) return; UpdateCurrentTime(); for (i = 0; i < num_events; i++, ppAwait++, pev++) @@ -629,9 +445,8 @@ SyncSendCounterNotifyEvents(client, ppAwait, num_events) /* This function is called when an alarm's counter is destroyed. * It is plugged into pTrigger->CounterDestroyed (for alarm triggers). */ -void -SyncAlarmCounterDestroyed(pTrigger) - SyncTrigger *pTrigger; +static void +SyncAlarmCounterDestroyed(SyncTrigger *pTrigger) { SyncAlarm *pAlarm = (SyncAlarm *)pTrigger; @@ -641,12 +456,11 @@ SyncAlarmCounterDestroyed(pTrigger) } -/* This function is called when an alarm "goes off." +/* This function is called when an alarm "goes off." * It is plugged into pTrigger->TriggerFired (for alarm triggers). */ static void -SyncAlarmTriggerFired(pTrigger) - SyncTrigger *pTrigger; +SyncAlarmTriggerFired(SyncTrigger *pTrigger) { SyncAlarm *pAlarm = (SyncAlarm *)pTrigger; CARD64 new_test_value; @@ -686,7 +500,7 @@ SyncAlarmTriggerFired(pTrigger) { XSyncValueAdd(&paTrigger->test_value, paTrigger->test_value, pAlarm->delta, &overflow); - } while (!overflow && + } while (!overflow && (*paTrigger->CheckTrigger)(paTrigger, paTrigger->pCounter->value)); @@ -721,8 +535,7 @@ SyncAlarmTriggerFired(pTrigger) * (for Await triggers). */ static void -SyncAwaitTriggerFired(pTrigger) - SyncTrigger *pTrigger; +SyncAwaitTriggerFired(SyncTrigger *pTrigger) { SyncAwait *pAwait = (SyncAwait *)pTrigger; int numwaits; @@ -732,7 +545,7 @@ SyncAwaitTriggerFired(pTrigger) pAwaitUnion = (SyncAwaitUnion *)pAwait->pHeader; numwaits = pAwaitUnion->header.num_waitconditions; - ppAwait = (SyncAwait **)xalloc(numwaits * sizeof(SyncAwait *)); + ppAwait = xalloc(numwaits * sizeof(SyncAwait *)); if (!ppAwait) goto bail; @@ -815,9 +628,7 @@ bail: * any triggers depending on the counter will be checked. */ void -SyncChangeCounter(pCounter, newval) - SyncCounter *pCounter; - CARD64 newval; +SyncChangeCounter(SyncCounter *pCounter, CARD64 newval) { SyncTriggerList *ptl, *pnext; CARD64 oldval; @@ -842,10 +653,7 @@ SyncChangeCounter(pCounter, newval) /* loosely based on dix/events.c/EventSelectForWindow */ static Bool -SyncEventSelectForAlarm(pAlarm, client, wantevents) - SyncAlarm *pAlarm; - ClientPtr client; - Bool wantevents; +SyncEventSelectForAlarm(SyncAlarm *pAlarm, ClientPtr client, Bool wantevents) { SyncAlarmClientList *pClients; @@ -862,8 +670,8 @@ SyncEventSelectForAlarm(pAlarm, client, wantevents) { if (pClients->client == client) { - /* client's presence on the list indicates desire for - * events. If the client doesn't want events, remove it + /* client's presence on the list indicates desire for + * events. If the client doesn't want events, remove it * from the list. If the client does want events, do * nothing, since it's already got them. */ @@ -880,18 +688,18 @@ SyncEventSelectForAlarm(pAlarm, client, wantevents) */ if (!wantevents) - /* client doesn't want events, and we just discovered that it + /* client doesn't want events, and we just discovered that it * doesn't have them, so there's nothing to do. */ return Success; /* add new client to pAlarm->pEventClients */ - pClients = (SyncAlarmClientList *) xalloc(sizeof(SyncAlarmClientList)); + pClients = xalloc(sizeof(SyncAlarmClientList)); if (!pClients) return BadAlloc; - /* register it as a resource so it will be cleaned up + /* register it as a resource so it will be cleaned up * if the client dies */ @@ -913,12 +721,9 @@ SyncEventSelectForAlarm(pAlarm, client, wantevents) /* * ** SyncChangeAlarmAttributes ** This is used by CreateAlarm and ChangeAlarm */ -static int -SyncChangeAlarmAttributes(client, pAlarm, mask, values) - ClientPtr client; - SyncAlarm *pAlarm; - Mask mask; - CARD32 *values; +static int +SyncChangeAlarmAttributes(ClientPtr client, SyncAlarm *pAlarm, Mask mask, + CARD32 *values) { int status; XSyncCounter counter; @@ -1015,20 +820,17 @@ SyncChangeAlarmAttributes(client, pAlarm, mask, values) static SyncCounter * -SyncCreateCounter(client, id, initialvalue) - ClientPtr client; - XSyncCounter id; - CARD64 initialvalue; +SyncCreateCounter(ClientPtr client, XSyncCounter id, CARD64 initialvalue) { SyncCounter *pCounter; - if (!(pCounter = (SyncCounter *) xalloc(sizeof(SyncCounter)))) - return (SyncCounter *)NULL; + if (!(pCounter = xalloc(sizeof(SyncCounter)))) + return NULL; if (!AddResource(id, RTCounter, (pointer) pCounter)) { - xfree((pointer) pCounter); - return (SyncCounter *)NULL; + xfree(pCounter); + return NULL; } pCounter->client = client; @@ -1040,36 +842,31 @@ SyncCreateCounter(client, id, initialvalue) return pCounter; } -static int FreeCounter( - pointer /*env*/, - XID /*id*/ -); +static int FreeCounter(void *, XID); /* * ***** System Counter utilities */ -pointer -SyncCreateSystemCounter(name, initial, resolution, counterType, - QueryValue, BracketValues) - char *name; - CARD64 initial; - CARD64 resolution; - SyncCounterType counterType; - void (*QueryValue) ( - pointer /* pCounter */, - CARD64 * /* pValue_return */); - void (*BracketValues) ( - pointer /* pCounter */, - CARD64 * /* pbracket_less */, - CARD64 * /* pbracket_greater */); +pointer +SyncCreateSystemCounter( + char *name, + CARD64 initial, + CARD64 resolution, + SyncCounterType counterType, + void (*QueryValue)(pointer /* pCounter */, + CARD64 * /* pValue_return */), + void (*BracketValues)(pointer /* pCounter */, + CARD64 * /* pbracket_less */, + CARD64 * /* pbracket_greater */) + ) { SyncCounter *pCounter; - SysCounterList = (SyncCounter **)xrealloc(SysCounterList, + SysCounterList = xrealloc(SysCounterList, (SyncNumSystemCounters+1)*sizeof(SyncCounter *)); if (!SysCounterList) - return (pointer)NULL; + return NULL; /* this function may be called before SYNC has been initialized, so we * have to make sure RTCounter is created. @@ -1079,21 +876,21 @@ SyncCreateSystemCounter(name, initial, resolution, counterType, RTCounter = CreateNewResourceType(FreeCounter); if (RTCounter == 0) { - return (pointer)NULL; + return NULL; } } - pCounter = SyncCreateCounter((ClientPtr)NULL, FakeClientID(0), initial); + pCounter = SyncCreateCounter(NULL, FakeClientID(0), initial); if (pCounter) { SysCounterInfo *psci; - psci = (SysCounterInfo *)xalloc(sizeof(SysCounterInfo)); + psci = xalloc(sizeof(SysCounterInfo)); if (!psci) { FreeResource(pCounter->id, RT_NONE); - return (pointer) pCounter; + return pCounter; } pCounter->pSysCounterInfo = psci; psci->name = name; @@ -1105,21 +902,18 @@ SyncCreateSystemCounter(name, initial, resolution, counterType, XSyncMinValue(&psci->bracket_less); SysCounterList[SyncNumSystemCounters++] = pCounter; } - return (pointer) pCounter; + return pCounter; } void -SyncDestroySystemCounter(pSysCounter) - pointer pSysCounter; +SyncDestroySystemCounter(pointer pSysCounter) { SyncCounter *pCounter = (SyncCounter *)pSysCounter; FreeResource(pCounter->id, RT_NONE); } static void -SyncComputeBracketValues(pCounter, startOver) - SyncCounter *pCounter; - Bool startOver; +SyncComputeBracketValues(SyncCounter *pCounter, Bool startOver) { SyncTriggerList *pCur; SyncTrigger *pTrigger; @@ -1202,9 +996,7 @@ SyncComputeBracketValues(pCounter, startOver) /* ARGSUSED */ static int -FreeAlarm(addr, id) - pointer addr; - XID id; +FreeAlarm(void *addr, XID id) { SyncAlarm *pAlarm = (SyncAlarm *) addr; @@ -1229,9 +1021,7 @@ FreeAlarm(addr, id) */ /* ARGSUSED */ static int -FreeCounter(env, id) - pointer env; - XID id; +FreeCounter(void *env, XID id) { SyncCounter *pCounter = (SyncCounter *) env; SyncTriggerList *ptl, *pnext; @@ -1281,9 +1071,7 @@ FreeCounter(env, id) */ /* ARGSUSED */ static int -FreeAwait(addr, id) - pointer addr; - XID id; +FreeAwait(void *addr, XID id) { SyncAwaitUnion *pAwaitUnion = (SyncAwaitUnion *) addr; SyncAwait *pAwait; @@ -1296,7 +1084,7 @@ FreeAwait(addr, id) for (numwaits = pAwaitUnion->header.num_waitconditions; numwaits; numwaits--, pAwait++) { - /* If the counter is being destroyed, FreeCounter will delete + /* If the counter is being destroyed, FreeCounter will delete * the trigger list itself, so don't do it here. */ SyncCounter *pCounter = pAwait->trigger.pCounter; @@ -1309,9 +1097,7 @@ FreeAwait(addr, id) /* loosely based on dix/events.c/OtherClientGone */ static int -FreeAlarmClient(value, id) - pointer value; /* must conform to DeleteType */ - XID id; +FreeAlarmClient(void *value, XID id) { SyncAlarm *pAlarm = (SyncAlarm *)value; SyncAlarmClientList *pCur, *pPrev; @@ -1327,7 +1113,7 @@ FreeAlarmClient(value, id) else pAlarm->pEventClients = pCur->next; xfree(pCur); - return(Success); + return Success; } } FatalError("alarm client not on event list"); @@ -1343,15 +1129,15 @@ FreeAlarmClient(value, id) /* * ** Initialize the extension */ -static int -ProcSyncInitialize(client) - ClientPtr client; +static int +ProcSyncInitialize(ClientPtr client) { xSyncInitializeReply rep; int n; REQUEST_SIZE_MATCH(xSyncInitializeReq); + memset(&rep, 0, sizeof(xSyncInitializeReply)); rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.majorVersion = SYNC_MAJOR_VERSION; @@ -1363,20 +1149,19 @@ ProcSyncInitialize(client) swaps(&rep.sequenceNumber, n); } WriteToClient(client, sizeof(rep), (char *) &rep); - return (client->noClientException); + return client->noClientException; } /* * ** Get list of system counters available through the extension */ -static int -ProcSyncListSystemCounters(client) - ClientPtr client; +static int +ProcSyncListSystemCounters(ClientPtr client) { xSyncListSystemCountersReply rep; int i, len; xSyncSystemCounter *list = NULL, *walklist = NULL; - + REQUEST_SIZE_MATCH(xSyncListSystemCountersReq); rep.type = X_Reply; @@ -1387,17 +1172,17 @@ ProcSyncListSystemCounters(client) { char *name = SysCounterList[i]->pSysCounterInfo->name; /* pad to 4 byte boundary */ - len += (sz_xSyncSystemCounter + strlen(name) + 3) & ~3; + len += pad_to_int32(sz_xSyncSystemCounter + strlen(name)); } if (len) { - walklist = list = (xSyncSystemCounter *) xalloc(len); + walklist = list = xalloc(len); if (!list) return BadAlloc; } - rep.length = len >> 2; + rep.length = bytes_to_int32(len); if (client->swapped) { @@ -1430,26 +1215,25 @@ ProcSyncListSystemCounters(client) pname_in_reply = ((char *)walklist) + sz_xSyncSystemCounter; strncpy(pname_in_reply, psci->name, namelen); - walklist = (xSyncSystemCounter *) (((char *)walklist) + - ((sz_xSyncSystemCounter + namelen + 3) & ~3)); + walklist = (xSyncSystemCounter *) (((char *)walklist) + + pad_to_int32(sz_xSyncSystemCounter + namelen)); } WriteToClient(client, sizeof(rep), (char *) &rep); - if (len) + if (len) { WriteToClient(client, len, (char *) list); xfree(list); } - return (client->noClientException); + return client->noClientException; } /* * ** Set client Priority */ -static int -ProcSyncSetPriority(client) - ClientPtr client; +static int +ProcSyncSetPriority(ClientPtr client) { REQUEST(xSyncSetPriorityReq); ClientPtr priorityclient; @@ -1483,9 +1267,8 @@ ProcSyncSetPriority(client) /* * ** Get client Priority */ -static int -ProcSyncGetPriority(client) - ClientPtr client; +static int +ProcSyncGetPriority(ClientPtr client) { REQUEST(xSyncGetPriorityReq); xSyncGetPriorityReply rep; @@ -1517,15 +1300,14 @@ ProcSyncGetPriority(client) WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep); - return (client->noClientException); + return client->noClientException; } /* * ** Create a new counter */ -static int -ProcSyncCreateCounter(client) - ClientPtr client; +static int +ProcSyncCreateCounter(ClientPtr client) { REQUEST(xSyncCreateCounterReq); CARD64 initial; @@ -1538,29 +1320,26 @@ ProcSyncCreateCounter(client) if (!SyncCreateCounter(client, stuff->cid, initial)) return BadAlloc; - return (client->noClientException); + return client->noClientException; } /* * ** Set Counter value */ -static int -ProcSyncSetCounter(client) - ClientPtr client; +static int +ProcSyncSetCounter(ClientPtr client) { REQUEST(xSyncSetCounterReq); SyncCounter *pCounter; CARD64 newvalue; + int rc; REQUEST_SIZE_MATCH(xSyncSetCounterReq); - pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->cid, - RTCounter, DixWriteAccess); - if (pCounter == NULL) - { - client->errorValue = stuff->cid; - return SyncErrorBase + XSyncBadCounter; - } + rc = dixLookupResourceByType((pointer *)&pCounter, stuff->cid, RTCounter, + client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; if (IsSystemCounter(pCounter)) { @@ -1576,24 +1355,21 @@ ProcSyncSetCounter(client) /* * ** Change Counter value */ -static int -ProcSyncChangeCounter(client) - ClientPtr client; +static int +ProcSyncChangeCounter(ClientPtr client) { REQUEST(xSyncChangeCounterReq); SyncCounter *pCounter; CARD64 newvalue; Bool overflow; + int rc; REQUEST_SIZE_MATCH(xSyncChangeCounterReq); - pCounter = (SyncCounter *) SecurityLookupIDByType(client, stuff->cid, - RTCounter, DixWriteAccess); - if (pCounter == NULL) - { - client->errorValue = stuff->cid; - return SyncErrorBase + XSyncBadCounter; - } + rc = dixLookupResourceByType((pointer *)&pCounter, stuff->cid, RTCounter, + client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; if (IsSystemCounter(pCounter)) { @@ -1606,7 +1382,7 @@ ProcSyncChangeCounter(client) if (overflow) { /* XXX 64 bit value can't fit in 32 bits; do the best we can */ - client->errorValue = stuff->value_hi; + client->errorValue = stuff->value_hi; return BadValue; } SyncChangeCounter(pCounter, newvalue); @@ -1616,22 +1392,20 @@ ProcSyncChangeCounter(client) /* * ** Destroy a counter */ -static int -ProcSyncDestroyCounter(client) - ClientPtr client; +static int +ProcSyncDestroyCounter(ClientPtr client) { REQUEST(xSyncDestroyCounterReq); SyncCounter *pCounter; + int rc; REQUEST_SIZE_MATCH(xSyncDestroyCounterReq); - pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter, - RTCounter, DixDestroyAccess); - if (pCounter == NULL) - { - client->errorValue = stuff->counter; - return SyncErrorBase + XSyncBadCounter; - } + rc = dixLookupResourceByType((pointer *)&pCounter, stuff->counter, RTCounter, + client, DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; + if (IsSystemCounter(pCounter)) { client->errorValue = stuff->counter; @@ -1645,9 +1419,8 @@ ProcSyncDestroyCounter(client) /* * ** Await */ -static int -ProcSyncAwait(client) - ClientPtr client; +static int +ProcSyncAwait(ClientPtr client) { REQUEST(xSyncAwaitReq); int len, items; @@ -1675,10 +1448,10 @@ ProcSyncAwait(client) pProtocolWaitConds = (xSyncWaitCondition *) & stuff[1]; - /* all the memory for the entire await list is allocated + /* all the memory for the entire await list is allocated * here in one chunk */ - pAwaitUnion = (SyncAwaitUnion *)xalloc((items+1) * sizeof(SyncAwaitUnion)); + pAwaitUnion = xalloc((items+1) * sizeof(SyncAwaitUnion)); if (!pAwaitUnion) return BadAlloc; @@ -1761,23 +1534,20 @@ ProcSyncAwait(client) /* * ** Query a counter */ -static int -ProcSyncQueryCounter(client) - ClientPtr client; +static int +ProcSyncQueryCounter(ClientPtr client) { REQUEST(xSyncQueryCounterReq); xSyncQueryCounterReply rep; SyncCounter *pCounter; + int rc; REQUEST_SIZE_MATCH(xSyncQueryCounterReq); - pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter, - RTCounter, DixReadAccess); - if (pCounter == NULL) - { - client->errorValue = stuff->counter; - return SyncErrorBase + XSyncBadCounter; - } + rc = dixLookupResourceByType((pointer *)&pCounter, stuff->counter, + RTCounter, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; rep.type = X_Reply; rep.length = 0; @@ -1802,16 +1572,15 @@ ProcSyncQueryCounter(client) swapl(&rep.value_lo, n); } WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep); - return (client->noClientException); + return client->noClientException; } /* * ** Create Alarm */ -static int -ProcSyncCreateAlarm(client) - ClientPtr client; +static int +ProcSyncCreateAlarm(ClientPtr client) { REQUEST(xSyncCreateAlarmReq); SyncAlarm *pAlarm; @@ -1824,12 +1593,12 @@ ProcSyncCreateAlarm(client) LEGAL_NEW_RESOURCE(stuff->id, client); vmask = stuff->valueMask; - len = client->req_len - (sizeof(xSyncCreateAlarmReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xSyncCreateAlarmReq)); /* the "extra" call to Ones accounts for the presence of 64 bit values */ if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue|XSyncCADelta)))) return BadLength; - if (!(pAlarm = (SyncAlarm *) xalloc(sizeof(SyncAlarm)))) + if (!(pAlarm = xalloc(sizeof(SyncAlarm)))) { return BadAlloc; } @@ -1889,9 +1658,8 @@ ProcSyncCreateAlarm(client) /* * ** Change Alarm */ -static int -ProcSyncChangeAlarm(client) - ClientPtr client; +static int +ProcSyncChangeAlarm(ClientPtr client) { REQUEST(xSyncChangeAlarmReq); SyncAlarm *pAlarm; @@ -1900,20 +1668,18 @@ ProcSyncChangeAlarm(client) REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); - if (!(pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, - RTAlarm, DixWriteAccess))) - { - client->errorValue = stuff->alarm; - return SyncErrorBase + XSyncBadAlarm; - } + status = dixLookupResourceByType((pointer *)&pAlarm, stuff->alarm, RTAlarm, + client, DixWriteAccess); + if (status != Success) + return (status == BadValue) ? SyncErrorBase + XSyncBadAlarm : status; vmask = stuff->valueMask; - len = client->req_len - (sizeof(xSyncChangeAlarmReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xSyncChangeAlarmReq)); /* the "extra" call to Ones accounts for the presence of 64 bit values */ if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue|XSyncCADelta)))) return BadLength; - if ((status = SyncChangeAlarmAttributes(client, pAlarm, vmask, + if ((status = SyncChangeAlarmAttributes(client, pAlarm, vmask, (CARD32 *)&stuff[1])) != Success) return status; @@ -1930,27 +1696,24 @@ ProcSyncChangeAlarm(client) return Success; } -static int -ProcSyncQueryAlarm(client) - ClientPtr client; +static int +ProcSyncQueryAlarm(ClientPtr client) { REQUEST(xSyncQueryAlarmReq); SyncAlarm *pAlarm; xSyncQueryAlarmReply rep; SyncTrigger *pTrigger; + int rc; REQUEST_SIZE_MATCH(xSyncQueryAlarmReq); - pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, - RTAlarm, DixReadAccess); - if (!pAlarm) - { - client->errorValue = stuff->alarm; - return (SyncErrorBase + XSyncBadAlarm); - } + rc = dixLookupResourceByType((pointer *)&pAlarm, stuff->alarm, RTAlarm, + client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? SyncErrorBase + XSyncBadAlarm : rc; rep.type = X_Reply; - rep.length = (sizeof(xSyncQueryAlarmReply) - sizeof(xGenericReply)) >> 2; + rep.length = bytes_to_int32(sizeof(xSyncQueryAlarmReply) - sizeof(xGenericReply)); rep.sequenceNumber = client->sequence; pTrigger = &pAlarm->trigger; @@ -1989,41 +1752,37 @@ ProcSyncQueryAlarm(client) } WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep); - return (client->noClientException); + return client->noClientException; } - -static int -ProcSyncDestroyAlarm(client) - ClientPtr client; +static int +ProcSyncDestroyAlarm(ClientPtr client) { + SyncAlarm *pAlarm; + int rc; REQUEST(xSyncDestroyAlarmReq); REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq); - if (!((SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, - RTAlarm, DixDestroyAccess))) - { - client->errorValue = stuff->alarm; - return SyncErrorBase + XSyncBadAlarm; - } + rc = dixLookupResourceByType((pointer *)&pAlarm, stuff->alarm, RTAlarm, + client, DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? SyncErrorBase + XSyncBadAlarm : rc; FreeResource(stuff->alarm, RT_NONE); - return (client->noClientException); + return client->noClientException; } /* * ** Given an extension request, call the appropriate request procedure */ -static int -ProcSyncDispatch(client) - ClientPtr client; +static int +ProcSyncDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { - case X_SyncInitialize: return ProcSyncInitialize(client); case X_SyncListSystemCounters: @@ -2061,9 +1820,8 @@ ProcSyncDispatch(client) * Boring Swapping stuff ... */ -static int -SProcSyncInitialize(client) - ClientPtr client; +static int +SProcSyncInitialize(ClientPtr client) { REQUEST(xSyncInitializeReq); char n; @@ -2074,9 +1832,8 @@ SProcSyncInitialize(client) return ProcSyncInitialize(client); } -static int -SProcSyncListSystemCounters(client) - ClientPtr client; +static int +SProcSyncListSystemCounters(ClientPtr client) { REQUEST(xSyncListSystemCountersReq); char n; @@ -2087,9 +1844,8 @@ SProcSyncListSystemCounters(client) return ProcSyncListSystemCounters(client); } -static int -SProcSyncCreateCounter(client) - ClientPtr client; +static int +SProcSyncCreateCounter(ClientPtr client) { REQUEST(xSyncCreateCounterReq); char n; @@ -2103,9 +1859,8 @@ SProcSyncCreateCounter(client) return ProcSyncCreateCounter(client); } -static int -SProcSyncSetCounter(client) - ClientPtr client; +static int +SProcSyncSetCounter(ClientPtr client) { REQUEST(xSyncSetCounterReq); char n; @@ -2119,9 +1874,8 @@ SProcSyncSetCounter(client) return ProcSyncSetCounter(client); } -static int -SProcSyncChangeCounter(client) - ClientPtr client; +static int +SProcSyncChangeCounter(ClientPtr client) { REQUEST(xSyncChangeCounterReq); char n; @@ -2135,9 +1889,8 @@ SProcSyncChangeCounter(client) return ProcSyncChangeCounter(client); } -static int -SProcSyncQueryCounter(client) - ClientPtr client; +static int +SProcSyncQueryCounter(ClientPtr client) { REQUEST(xSyncQueryCounterReq); char n; @@ -2149,9 +1902,8 @@ SProcSyncQueryCounter(client) return ProcSyncQueryCounter(client); } -static int -SProcSyncDestroyCounter(client) - ClientPtr client; +static int +SProcSyncDestroyCounter(ClientPtr client) { REQUEST(xSyncDestroyCounterReq); char n; @@ -2163,9 +1915,8 @@ SProcSyncDestroyCounter(client) return ProcSyncDestroyCounter(client); } -static int -SProcSyncAwait(client) - ClientPtr client; +static int +SProcSyncAwait(ClientPtr client) { REQUEST(xSyncAwaitReq); char n; @@ -2177,10 +1928,8 @@ SProcSyncAwait(client) return ProcSyncAwait(client); } - -static int -SProcSyncCreateAlarm(client) - ClientPtr client; +static int +SProcSyncCreateAlarm(ClientPtr client) { REQUEST(xSyncCreateAlarmReq); char n; @@ -2194,9 +1943,8 @@ SProcSyncCreateAlarm(client) return ProcSyncCreateAlarm(client); } -static int -SProcSyncChangeAlarm(client) - ClientPtr client; +static int +SProcSyncChangeAlarm(ClientPtr client) { REQUEST(xSyncChangeAlarmReq); char n; @@ -2209,9 +1957,8 @@ SProcSyncChangeAlarm(client) return ProcSyncChangeAlarm(client); } -static int -SProcSyncQueryAlarm(client) - ClientPtr client; +static int +SProcSyncQueryAlarm(ClientPtr client) { REQUEST(xSyncQueryAlarmReq); char n; @@ -2223,9 +1970,8 @@ SProcSyncQueryAlarm(client) return ProcSyncQueryAlarm(client); } -static int -SProcSyncDestroyAlarm(client) - ClientPtr client; +static int +SProcSyncDestroyAlarm(ClientPtr client) { REQUEST(xSyncDestroyAlarmReq); char n; @@ -2237,9 +1983,8 @@ SProcSyncDestroyAlarm(client) return ProcSyncDestroyAlarm(client); } -static int -SProcSyncSetPriority(client) - ClientPtr client; +static int +SProcSyncSetPriority(ClientPtr client) { REQUEST(xSyncSetPriorityReq); char n; @@ -2252,9 +1997,8 @@ SProcSyncSetPriority(client) return ProcSyncSetPriority(client); } -static int -SProcSyncGetPriority(client) - ClientPtr client; +static int +SProcSyncGetPriority(ClientPtr client) { REQUEST(xSyncGetPriorityReq); char n; @@ -2267,9 +2011,8 @@ SProcSyncGetPriority(client) } -static int -SProcSyncDispatch(client) - ClientPtr client; +static int +SProcSyncDispatch(ClientPtr client) { REQUEST(xReq); @@ -2312,9 +2055,8 @@ SProcSyncDispatch(client) * Event Swapping */ -static void -SCounterNotifyEvent(from, to) - xSyncCounterNotifyEvent *from, *to; +static void +SCounterNotifyEvent(xSyncCounterNotifyEvent *from, xSyncCounterNotifyEvent *to) { to->type = from->type; to->kind = from->kind; @@ -2330,9 +2072,8 @@ SCounterNotifyEvent(from, to) } -static void -SAlarmNotifyEvent(from, to) - xSyncAlarmNotifyEvent *from, *to; +static void +SAlarmNotifyEvent(xSyncAlarmNotifyEvent *from, xSyncAlarmNotifyEvent *to) { to->type = from->type; to->kind = from->kind; @@ -2350,9 +2091,8 @@ SAlarmNotifyEvent(from, to) * ** Close everything down. ** This is fairly simple for now. */ /* ARGSUSED */ -static void -SyncResetProc(extEntry) - ExtensionEntry *extEntry; +static void +SyncResetProc(ExtensionEntry *extEntry) { xfree(SysCounterList); SysCounterList = NULL; @@ -2363,8 +2103,8 @@ SyncResetProc(extEntry) /* * ** Initialise the extension. */ -void -SyncExtensionInit(INITARGS) +void +SyncExtensionInit(void) { ExtensionEntry *extEntry; @@ -2433,10 +2173,8 @@ static XSyncValue *pnext_time; *** code inspired by multibuffer extension */ /*ARGSUSED*/ -static void ServertimeBlockHandler(env, wt, LastSelectMask) -pointer env; -struct timeval **wt; -pointer LastSelectMask; +static void +ServertimeBlockHandler(void *env, struct timeval **wt, void *LastSelectMask) { XSyncValue delay; unsigned long timeout; @@ -2448,7 +2186,7 @@ pointer LastSelectMask; if (XSyncValueGreaterOrEqual(Now, *pnext_time)) { timeout = 0; - } + } else { Bool overflow; @@ -2464,10 +2202,8 @@ pointer LastSelectMask; *** Wakeup Handler */ /*ARGSUSED*/ -static void ServertimeWakeupHandler(env, rc, LastSelectMask) -pointer env; -int rc; -pointer LastSelectMask; +static void +ServertimeWakeupHandler(void *env, int rc, void *LastSelectMask) { if (pnext_time) { @@ -2481,19 +2217,15 @@ pointer LastSelectMask; } static void -ServertimeQueryValue(pCounter, pValue_return) - pointer pCounter; - CARD64 *pValue_return; +ServertimeQueryValue(void *pCounter, CARD64 *pValue_return) { GetTime(); *pValue_return = Now; } static void -ServertimeBracketValues(pCounter, pbracket_less, pbracket_greater) - pointer pCounter; - CARD64 *pbracket_less; - CARD64 *pbracket_greater; +ServertimeBracketValues(void *pCounter, CARD64 *pbracket_less, + CARD64 *pbracket_greater) { if (!pnext_time && pbracket_greater) { @@ -2607,9 +2339,7 @@ IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask) } static void -IdleTimeWakeupHandler (pointer env, - int rc, - pointer LastSelectMask) +IdleTimeWakeupHandler (pointer env, int rc, pointer LastSelectMask) { XSyncValue idle; @@ -2628,8 +2358,7 @@ IdleTimeWakeupHandler (pointer env, } static void -IdleTimeBracketValues (pointer pCounter, - CARD64 *pbracket_less, +IdleTimeBracketValues (pointer pCounter, CARD64 *pbracket_less, CARD64 *pbracket_greater) { Bool registered = (pIdleTimeValueLess || pIdleTimeValueGreater); diff --git a/xorg-server/Xext/syncsrv.h b/xorg-server/Xext/syncsrv.h new file mode 100644 index 000000000..00e0bda50 --- /dev/null +++ b/xorg-server/Xext/syncsrv.h @@ -0,0 +1,176 @@ +/* + +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. + +******************************************************************/ + +#ifndef _SYNCSRV_H_ +#define _SYNCSRV_H_ + +#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 /* _SYNCSRV_H_ */ diff --git a/xorg-server/Xext/xace.c b/xorg-server/Xext/xace.c index 8a8f8c61d..bf0e98fb0 100644 --- a/xorg-server/Xext/xace.c +++ b/xorg-server/Xext/xace.c @@ -1,6 +1,6 @@ /************************************************************ -Author: Eamon Walsh +Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that @@ -29,7 +29,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "gcstruct.h" #include "xacestr.h" -CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0}; +#define XSERV_t +#define TRANS_SERVER +#include +#include "../os/osdep.h" + +_X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0}; /* Special-cased hook functions. Called by Xserver. */ @@ -95,114 +100,104 @@ int XaceHook(int hook, ...) switch (hook) { case XACE_RESOURCE_ACCESS: { - XaceResourceAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, XID), - va_arg(ap, RESTYPE), - va_arg(ap, pointer), - va_arg(ap, RESTYPE), - va_arg(ap, pointer), - va_arg(ap, Mask), - Success /* default allow */ - }; + XaceResourceAccessRec rec; + rec.client = va_arg(ap, ClientPtr); + rec.id = va_arg(ap, XID); + rec.rtype = va_arg(ap, RESTYPE); + rec.res = va_arg(ap, pointer); + rec.ptype = va_arg(ap, RESTYPE); + rec.parent = va_arg(ap, pointer); + rec.access_mode = va_arg(ap, Mask); + rec.status = Success; /* default allow */ calldata = &rec; prv = &rec.status; break; } case XACE_DEVICE_ACCESS: { - XaceDeviceAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, DeviceIntPtr), - va_arg(ap, Mask), - Success /* default allow */ - }; + XaceDeviceAccessRec rec; + rec.client = va_arg(ap, ClientPtr); + rec.dev = va_arg(ap, DeviceIntPtr); + rec.access_mode = va_arg(ap, Mask); + rec.status = Success; /* default allow */ calldata = &rec; prv = &rec.status; break; } case XACE_SEND_ACCESS: { - XaceSendAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, DeviceIntPtr), - va_arg(ap, WindowPtr), - va_arg(ap, xEventPtr), - va_arg(ap, int), - Success /* default allow */ - }; + XaceSendAccessRec rec; + rec.client = va_arg(ap, ClientPtr); + rec.dev = va_arg(ap, DeviceIntPtr); + rec.pWin = va_arg(ap, WindowPtr); + rec.events = va_arg(ap, xEventPtr); + rec.count = va_arg(ap, int); + rec.status = Success; /* default allow */ calldata = &rec; prv = &rec.status; break; } case XACE_RECEIVE_ACCESS: { - XaceReceiveAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, WindowPtr), - va_arg(ap, xEventPtr), - va_arg(ap, int), - Success /* default allow */ - }; + XaceReceiveAccessRec rec; + rec.client = va_arg(ap, ClientPtr); + rec.pWin = va_arg(ap, WindowPtr); + rec.events = va_arg(ap, xEventPtr); + rec.count = va_arg(ap, int); + rec.status = Success; /* default allow */ calldata = &rec; prv = &rec.status; break; } case XACE_CLIENT_ACCESS: { - XaceClientAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, ClientPtr), - va_arg(ap, Mask), - Success /* default allow */ - }; + XaceClientAccessRec rec; + rec.client = va_arg(ap, ClientPtr); + rec.target = va_arg(ap, ClientPtr); + rec.access_mode = va_arg(ap, Mask); + rec.status = Success; /* default allow */ calldata = &rec; prv = &rec.status; break; } case XACE_EXT_ACCESS: { - XaceExtAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, ExtensionEntry*), - DixGetAttrAccess, - Success /* default allow */ - }; + XaceExtAccessRec rec; + rec.client = va_arg(ap, ClientPtr); + rec.ext = va_arg(ap, ExtensionEntry*); + rec.access_mode = DixGetAttrAccess; + rec.status = Success; /* default allow */ calldata = &rec; prv = &rec.status; break; } case XACE_SERVER_ACCESS: { - XaceServerAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, Mask), - Success /* default allow */ - }; + XaceServerAccessRec rec; + rec.client = va_arg(ap, ClientPtr); + rec.access_mode = va_arg(ap, Mask); + rec.status = Success; /* default allow */ calldata = &rec; prv = &rec.status; break; } case XACE_SCREEN_ACCESS: case XACE_SCREENSAVER_ACCESS: { - XaceScreenAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, ScreenPtr), - va_arg(ap, Mask), - Success /* default allow */ - }; + XaceScreenAccessRec rec; + rec.client = va_arg(ap, ClientPtr); + rec.screen = va_arg(ap, ScreenPtr); + rec.access_mode = va_arg(ap, Mask); + rec.status = Success; /* default allow */ calldata = &rec; prv = &rec.status; break; } case XACE_AUTH_AVAIL: { - XaceAuthAvailRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, XID) - }; + XaceAuthAvailRec rec; + rec.client = va_arg(ap, ClientPtr); + rec.authId = va_arg(ap, XID); calldata = &rec; break; } case XACE_KEY_AVAIL: { - XaceKeyAvailRec rec = { - va_arg(ap, xEventPtr), - va_arg(ap, DeviceIntPtr), - va_arg(ap, int) - }; + XaceKeyAvailRec rec; + rec.event = va_arg(ap, xEventPtr); + rec.keybd = va_arg(ap, DeviceIntPtr); + rec.count = va_arg(ap, int); calldata = &rec; break; } @@ -239,15 +234,14 @@ int XaceHook(int hook, ...) * region of the window will be destroyed (overwritten) in pBuf. */ void -XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h, - format, pBuf) - ClientPtr client; - RegionPtr pVisibleRegion; - long widthBytesLine; - DrawablePtr pDraw; - int x, y, w, h; - unsigned int format; - char * pBuf; +XaceCensorImage( + ClientPtr client, + RegionPtr pVisibleRegion, + long widthBytesLine, + DrawablePtr pDraw, + int x, int y, int w, int h, + unsigned int format, + char *pBuf) { ScreenPtr pScreen; RegionRec imageRegion; /* region representing x,y,w,h */ @@ -280,7 +274,7 @@ XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h, /* convert region to list-of-rectangles for PolyFillRect */ - pRects = (xRectangle *)xalloc(nRects * sizeof(xRectangle)); + pRects = xalloc(nRects * sizeof(xRectangle)); if (!pRects) { failed = TRUE; @@ -339,3 +333,18 @@ XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h, REGION_UNINIT(pScreen, &imageRegion); REGION_UNINIT(pScreen, &censorRegion); } /* XaceCensorImage */ + +/* + * Xtrans wrappers for use by modules + */ +int XaceGetConnectionNumber(ClientPtr client) +{ + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + return _XSERVTransGetConnectionNumber(ci); +} + +int XaceIsLocal(ClientPtr client) +{ + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + return _XSERVTransIsLocal(ci); +} diff --git a/xorg-server/Xext/xace.h b/xorg-server/Xext/xace.h index bd69bca98..6029d87d8 100644 --- a/xorg-server/Xext/xace.h +++ b/xorg-server/Xext/xace.h @@ -1,6 +1,6 @@ /************************************************************ -Author: Eamon Walsh +Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that @@ -56,23 +56,24 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_AUDIT_END 16 #define XACE_NUM_HOOKS 17 -extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; +extern _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; /* Entry point for hook functions. Called by Xserver. + * Required by libdbe and libextmod */ -extern int XaceHook( +extern _X_EXPORT int XaceHook( int /*hook*/, ... /*appropriate args for hook*/ ); /* Special-cased hook functions */ -extern int XaceHookDispatch(ClientPtr ptr, int major); -extern int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, - PropertyPtr *ppProp, Mask access_mode); -extern int XaceHookSelectionAccess(ClientPtr ptr, +extern _X_EXPORT int XaceHookDispatch(ClientPtr ptr, int major); +extern _X_EXPORT int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, + PropertyPtr *ppProp, Mask access_mode); +extern _X_EXPORT int XaceHookSelectionAccess(ClientPtr ptr, Selection **ppSel, Mask access_mode); -extern void XaceHookAuditEnd(ClientPtr ptr, int result); +extern _X_EXPORT void XaceHookAuditEnd(ClientPtr ptr, int result); /* Register a callback for a given hook. */ @@ -84,11 +85,15 @@ extern void XaceHookAuditEnd(ClientPtr ptr, int result); #define XaceDeleteCallback(hook,callback,data) \ DeleteCallback(XaceHooks+(hook), callback, data) +/* XTrans wrappers for use by security modules + */ +extern _X_EXPORT int XaceGetConnectionNumber(ClientPtr ptr); +extern _X_EXPORT int XaceIsLocal(ClientPtr ptr); /* From the original Security extension... */ -extern void XaceCensorImage( +extern _X_EXPORT void XaceCensorImage( ClientPtr client, RegionPtr pVisibleRegion, long widthBytesLine, diff --git a/xorg-server/Xext/xacestr.h b/xorg-server/Xext/xacestr.h index ba115a427..84216c8c0 100644 --- a/xorg-server/Xext/xacestr.h +++ b/xorg-server/Xext/xacestr.h @@ -1,6 +1,6 @@ /************************************************************ -Author: Eamon Walsh +Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that diff --git a/xorg-server/Xext/xcalibrate.c b/xorg-server/Xext/xcalibrate.c index 3e05e6ca2..f923c17a1 100644 --- a/xorg-server/Xext/xcalibrate.c +++ b/xorg-server/Xext/xcalibrate.c @@ -24,8 +24,6 @@ #include #endif -#define NEED_EVENTS -#define NEED_REPLIES #include #include diff --git a/xorg-server/Xext/xcmisc.c b/xorg-server/Xext/xcmisc.c index 1ee173bd6..f644cb458 100644 --- a/xorg-server/Xext/xcmisc.c +++ b/xorg-server/Xext/xcmisc.c @@ -26,8 +26,6 @@ from The Open Group. */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -39,7 +37,7 @@ from The Open Group. #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" -#include +#include #include "modinit.h" #if HAVE_STDINT_H @@ -66,8 +64,7 @@ XCMiscExtensionInit(INITARGS) } static int -ProcXCMiscGetVersion(client) - ClientPtr client; +ProcXCMiscGetVersion(ClientPtr client) { xXCMiscGetVersionReply rep; int n; @@ -88,8 +85,7 @@ ProcXCMiscGetVersion(client) } static int -ProcXCMiscGetXIDRange(client) - ClientPtr client; +ProcXCMiscGetXIDRange(ClientPtr client) { xXCMiscGetXIDRangeReply rep; int n; @@ -112,8 +108,7 @@ ProcXCMiscGetXIDRange(client) } static int -ProcXCMiscGetXIDList(client) - ClientPtr client; +ProcXCMiscGetXIDList(ClientPtr client) { REQUEST(xXCMiscGetXIDListReq); xXCMiscGetXIDListReply rep; @@ -152,8 +147,7 @@ ProcXCMiscGetXIDList(client) } static int -ProcXCMiscDispatch (client) - ClientPtr client; +ProcXCMiscDispatch (ClientPtr client) { REQUEST(xReq); switch (stuff->data) @@ -170,8 +164,7 @@ ProcXCMiscDispatch (client) } static int -SProcXCMiscGetVersion(client) - ClientPtr client; +SProcXCMiscGetVersion(ClientPtr client) { int n; REQUEST(xXCMiscGetVersionReq); @@ -184,8 +177,7 @@ SProcXCMiscGetVersion(client) } static int -SProcXCMiscGetXIDRange(client) - ClientPtr client; +SProcXCMiscGetXIDRange(ClientPtr client) { int n; REQUEST(xReq); @@ -195,8 +187,7 @@ SProcXCMiscGetXIDRange(client) } static int -SProcXCMiscGetXIDList(client) - ClientPtr client; +SProcXCMiscGetXIDList(ClientPtr client) { int n; REQUEST(xXCMiscGetXIDListReq); @@ -207,8 +198,7 @@ SProcXCMiscGetXIDList(client) } static int -SProcXCMiscDispatch (client) - ClientPtr client; +SProcXCMiscDispatch (ClientPtr client) { REQUEST(xReq); switch (stuff->data) diff --git a/xorg-server/Xext/xf86bigfont.c b/xorg-server/Xext/xf86bigfont.c index dabbdd6e0..aeea23313 100644 --- a/xorg-server/Xext/xf86bigfont.c +++ b/xorg-server/Xext/xf86bigfont.c @@ -72,8 +72,7 @@ #include "dixfontstr.h" #include "extnsionst.h" -#define _XF86BIGFONT_SERVER_ -#include +#include static void XF86BigfontResetProc( ExtensionEntry * /* extEntry */ @@ -125,7 +124,7 @@ CheckForShmSyscall(void) if (shmid != -1) { /* Successful allocation - clean up */ - shmctl(shmid, IPC_RMID, (struct shmid_ds *)NULL); + shmctl(shmid, IPC_RMID, NULL); } else { @@ -229,7 +228,7 @@ shmalloc( if (size < 3500) return (ShmDescPtr) NULL; - pDesc = (ShmDescRec *) xalloc(sizeof(ShmDescRec)); + pDesc = xalloc(sizeof(ShmDescRec)); if (!pDesc) return (ShmDescPtr) NULL; @@ -427,15 +426,15 @@ ProcXF86BigfontQueryFont( } #endif client->errorValue = stuff->id; /* EITHER font or gc */ - pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, - DixGetAttrAccess); + dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT, + client, DixGetAttrAccess); if (!pFont) { - GC *pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC, - DixGetAttrAccess); - if (!pGC) { - client->errorValue = stuff->id; + GC *pGC; + dixLookupResourceByType((pointer *)&pGC, stuff->id, RT_GC, + client, DixGetAttrAccess); + if (!pGC) return BadFont; /* procotol spec says only error is BadFont */ - } + pFont = pGC->font; } @@ -473,8 +472,7 @@ ProcXF86BigfontQueryFont( shmid = pDesc->shmid; } else { #endif - pCI = (xCharInfo *) - xalloc(nCharInfos * sizeof(xCharInfo)); + pCI = xalloc(nCharInfos * sizeof(xCharInfo)); if (!pCI) return BadAlloc; #ifdef HAS_SHM @@ -536,8 +534,7 @@ ProcXF86BigfontQueryFont( if (hashModulus > nCharInfos+1) hashModulus = nCharInfos+1; - tmp = (CARD16*) - xalloc((4*nCharInfos+1) * sizeof(CARD16)); + tmp = xalloc((4*nCharInfos+1) * sizeof(CARD16)); if (!tmp) { if (!pDesc) xfree(pCI); return BadAlloc; @@ -621,8 +618,7 @@ ProcXF86BigfontQueryFont( ? nUniqCharInfos * sizeof(xCharInfo) + (nCharInfos+1)/2 * 2 * sizeof(CARD16) : 0); - xXF86BigfontQueryFontReply* reply = - (xXF86BigfontQueryFontReply *) xalloc(rlength); + xXF86BigfontQueryFontReply* reply = xalloc(rlength); char* p; if (!reply) { if (nCharInfos > 0) { @@ -632,7 +628,7 @@ ProcXF86BigfontQueryFont( return BadAlloc; } reply->type = X_Reply; - reply->length = (rlength - sizeof(xGenericReply)) >> 2; + reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); reply->sequenceNumber = client->sequence; reply->minBounds = pFont->info.ink_minbounds; reply->maxBounds = pFont->info.ink_maxbounds; diff --git a/xorg-server/Xext/xres.c b/xorg-server/Xext/xres.c index bdc534c91..9dd08b113 100644 --- a/xorg-server/Xext/xres.c +++ b/xorg-server/Xext/xres.c @@ -2,8 +2,6 @@ Copyright (c) 2002 XFree86 Inc */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -77,7 +75,7 @@ ProcXResQueryClients (ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.num_clients = num_clients; - rep.length = rep.num_clients * sz_xXResClient >> 2; + rep.length = bytes_to_int32(rep.num_clients * sz_xXResClient); if (client->swapped) { int n; swaps (&rep.sequenceNumber, n); @@ -146,7 +144,7 @@ ProcXResQueryClientResources (ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.num_types = num_types; - rep.length = rep.num_types * sz_xXResType >> 2; + rep.length = bytes_to_int32(rep.num_types * sz_xXResType); if (client->swapped) { int n; swaps (&rep.sequenceNumber, n); diff --git a/xorg-server/Xext/xselinux.c b/xorg-server/Xext/xselinux.c index 3124eb9b7..b9b16b6ce 100644 --- a/xorg-server/Xext/xselinux.c +++ b/xorg-server/Xext/xselinux.c @@ -1,6 +1,6 @@ /************************************************************ -Author: Eamon Walsh +Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that @@ -49,10 +49,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "scrnintstr.h" #include "selection.h" #include "xacestr.h" +#define _XSELINUX_NEED_FLASK #include "xselinux.h" -#define XSERV_t -#define TRANS_SERVER -#include #include "../os/osdep.h" #include "modinit.h" @@ -136,32 +134,6 @@ static unsigned numKnownEvents; static SELinuxAtomRec *knownAtoms; static unsigned numKnownAtoms; -/* dynamically allocated security classes and permissions */ -static struct security_class_mapping map[] = { - { "x_drawable", { "read", "write", "destroy", "create", "getattr", "setattr", "list_property", "get_property", "set_property", "", "", "list_child", "add_child", "remove_child", "hide", "show", "blend", "override", "", "", "", "", "send", "receive", "", "manage", NULL }}, - { "x_screen", { "", "", "", "", "getattr", "setattr", "saver_getattr", "saver_setattr", "", "", "", "", "", "", "hide_cursor", "show_cursor", "saver_hide", "saver_show", NULL }}, - { "x_gc", { "", "", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, - { "x_font", { "", "", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_glyph", "remove_glyph", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, - { "x_colormap", { "read", "write", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_color", "remove_color", "", "", "", "", "", "", "install", "uninstall", "", "", "use", NULL }}, - { "x_property", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "write", NULL }}, - { "x_selection", { "read", "", "", "setattr", "getattr", "setattr", NULL }}, - { "x_cursor", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, - { "x_client", { "", "", "destroy", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "manage", NULL }}, - { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "use", "manage", "", "bell", NULL }}, - { "x_server", { "record", "", "", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "grab", "", "", "", "", "", "", "", "manage", "debug", NULL }}, - { "x_extension", { "", "", "", "", "query", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, - { "x_event", { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "send", "receive", NULL }}, - { "x_synthetic_event", { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "send", "receive", NULL }}, - { "x_resource", { "read", "write", "write", "write", "read", "write", "read", "read", "write", "read", "write", "read", "write", "write", "write", "read", "read", "write", "write", "write", "write", "write", "write", "read", "read", "write", "read", "write", NULL }}, - { NULL } -}; - -/* x_resource "read" bits from the list above */ -#define SELinuxReadMask (DixReadAccess|DixGetAttrAccess|DixListPropAccess| \ - DixGetPropAccess|DixGetFocusAccess|DixListAccess| \ - DixShowAccess|DixBlendAccess|DixReceiveAccess| \ - DixUseAccess|DixDebugAccess) - /* forward declarations */ static void SELinuxScreen(CallbackListPtr *, pointer, pointer); @@ -460,8 +432,7 @@ SELinuxDoCheck(SELinuxSubjectRec *subj, SELinuxObjectRec *obj, static void SELinuxLabelClient(ClientPtr client) { - XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; - int fd = _XSERVTransGetConnectionNumber(ci); + int fd = XaceGetConnectionNumber(client); SELinuxSubjectRec *subj; SELinuxObjectRec *obj; security_context_t ctx; @@ -479,7 +450,7 @@ SELinuxLabelClient(ClientPtr client) } /* For local clients, try and determine the executable name */ - if (_XSERVTransIsLocal(ci)) { + if (XaceIsLocal(client)) { struct ucred creds; socklen_t len = sizeof(creds); char path[PATH_MAX + 1]; @@ -613,7 +584,8 @@ SELinuxAudit(void *auditdata, { SELinuxAuditRec *audit = auditdata; ClientPtr client = audit->client; - char idNum[16], *propertyName, *selectionName; + char idNum[16]; + const char *propertyName, *selectionName; int major = -1, minor = -1; if (client) { @@ -941,6 +913,10 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) security_id_t tsid; int rc; + /* Don't care about the new content check */ + if (rec->access_mode & DixPostAccess) + return; + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&pProp->devPrivates, objectKey); @@ -1307,7 +1283,7 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid) } rep.type = X_Reply; - rep.length = (len + 3) >> 2; + rep.length = bytes_to_int32(len); rep.sequenceNumber = client->sequence; rep.context_len = len; @@ -1342,14 +1318,6 @@ ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset) return BadAlloc; } - if (offset == CTX_DEV) { - /* Device create context currently requires manage permission */ - rc = XaceHook(XACE_SERVER_ACCESS, client, DixManageAccess); - if (rc != Success) - goto out; - privPtr = &serverClient->devPrivates; - } - ptr = dixLookupPrivate(privPtr, subjectKey); pSid = (security_id_t *)(ptr + offset); sidput(*pSid); @@ -1361,7 +1329,7 @@ ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset) avc_context_to_sid_raw(ctx, pSid) < 0) rc = BadValue; } -out: + xfree(ctx); return rc; } @@ -1534,8 +1502,8 @@ SELinuxPopulateItem(SELinuxListItemRec *i, PrivateRec **privPtr, CARD32 id, return BadValue; i->id = id; - i->octx_len = (strlen(i->octx) + 4) >> 2; - i->dctx_len = (strlen(i->dctx) + 4) >> 2; + i->octx_len = bytes_to_int32(strlen(i->octx) + 1); + i->dctx_len = bytes_to_int32(strlen(i->dctx) + 1); *size += i->octx_len + i->dctx_len + 3; return Success; diff --git a/xorg-server/Xext/xselinux.h b/xorg-server/Xext/xselinux.h index 7c3ffdcb7..e99f05b09 100644 --- a/xorg-server/Xext/xselinux.h +++ b/xorg-server/Xext/xselinux.h @@ -1,6 +1,6 @@ /************************************************************ -Author: Eamon Walsh +Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that @@ -139,6 +139,7 @@ typedef struct { } SELinuxListItemsReply; +#ifdef _XSELINUX_NEED_FLASK /* Private Flask definitions */ #define SECCLASS_X_DRAWABLE 1 #define SECCLASS_X_SCREEN 2 @@ -156,4 +157,395 @@ typedef struct { #define SECCLASS_X_FAKEEVENT 14 #define SECCLASS_X_RESOURCE 15 +/* Mapping from DixAccess bits to Flask permissions */ +static struct security_class_mapping map[] = { + { "x_drawable", + { "read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "list_property", /* DixListPropAccess */ + "get_property", /* DixGetPropAccess */ + "set_property", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "list_child", /* DixListAccess */ + "add_child", /* DixAddAccess */ + "remove_child", /* DixRemoveAccess */ + "hide", /* DixHideAccess */ + "show", /* DixShowAccess */ + "blend", /* DixBlendAccess */ + "override", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "send", /* DixSendAccess */ + "receive", /* DixReceiveAccess */ + "", /* DixUseAccess */ + "manage", /* DixManageAccess */ + NULL }}, + { "x_screen", + { "", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "saver_getattr", /* DixListPropAccess */ + "saver_setattr", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "hide_cursor", /* DixHideAccess */ + "show_cursor", /* DixShowAccess */ + "saver_hide", /* DixBlendAccess */ + "saver_show", /* DixGrabAccess */ + NULL }}, + { "x_gc", + { "", /* DixReadAccess */ + "", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL }}, + { "x_font", + { "", /* DixReadAccess */ + "", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "add_glyph", /* DixAddAccess */ + "remove_glyph", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL }}, + { "x_colormap", + { "read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "add_color", /* DixAddAccess */ + "remove_color", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "install", /* DixInstallAccess */ + "uninstall", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL }}, + { "x_property", + { "read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "write", /* DixBlendAccess */ + NULL }}, + { "x_selection", + { "read", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "setattr", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + NULL }}, + { "x_cursor", + { "read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL }}, + { "x_client", + { "", /* DixReadAccess */ + "", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "", /* DixUseAccess */ + "manage", /* DixManageAccess */ + NULL }}, + { "x_device", + { "read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "list_property", /* DixListPropAccess */ + "get_property", /* DixGetPropAccess */ + "set_property", /* DixSetPropAccess */ + "getfocus", /* DixGetFocusAccess */ + "setfocus", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "add", /* DixAddAccess */ + "remove", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "grab", /* DixGrabAccess */ + "freeze", /* DixFreezeAccess */ + "force_cursor", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + "manage", /* DixManageAccess */ + "", /* DixDebugAccess */ + "bell", /* DixBellAccess */ + NULL }}, + { "x_server", + { "record", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "grab", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "", /* DixUseAccess */ + "manage", /* DixManageAccess */ + "debug", /* DixDebugAccess */ + NULL }}, + { "x_extension", + { "", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "query", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL }}, + { "x_event", + { "", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "send", /* DixSendAccess */ + "receive", /* DixReceiveAccess */ + NULL }}, + { "x_synthetic_event", + { "", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "send", /* DixSendAccess */ + "receive", /* DixReceiveAccess */ + NULL }}, + { "x_resource", + { "read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "write", /* DixDestroyAccess */ + "write", /* DixCreateAccess */ + "read", /* DixGetAttrAccess */ + "write", /* DixSetAttrAccess */ + "read", /* DixListPropAccess */ + "read", /* DixGetPropAccess */ + "write", /* DixSetPropAccess */ + "read", /* DixGetFocusAccess */ + "write", /* DixSetFocusAccess */ + "read", /* DixListAccess */ + "write", /* DixAddAccess */ + "write", /* DixRemoveAccess */ + "write", /* DixHideAccess */ + "read", /* DixShowAccess */ + "read", /* DixBlendAccess */ + "write", /* DixGrabAccess */ + "write", /* DixFreezeAccess */ + "write", /* DixForceAccess */ + "write", /* DixInstallAccess */ + "write", /* DixUninstallAccess */ + "write", /* DixSendAccess */ + "read", /* DixReceiveAccess */ + "read", /* DixUseAccess */ + "write", /* DixManageAccess */ + "read", /* DixDebugAccess */ + "write", /* DixBellAccess */ + NULL }}, + { NULL } +}; + +/* x_resource "read" bits from the list above */ +#define SELinuxReadMask (DixReadAccess|DixGetAttrAccess|DixListPropAccess| \ + DixGetPropAccess|DixGetFocusAccess|DixListAccess| \ + DixShowAccess|DixBlendAccess|DixReceiveAccess| \ + DixUseAccess|DixDebugAccess) + +#endif /* _XSELINUX_NEED_FLASK */ #endif /* _XSELINUX_H */ diff --git a/xorg-server/Xext/xtest.c b/xorg-server/Xext/xtest.c index e5ab7b451..0400062d8 100644 --- a/xorg-server/Xext/xtest.c +++ b/xorg-server/Xext/xtest.c @@ -31,8 +31,8 @@ #endif #include -#define NEED_EVENTS #include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -43,16 +43,40 @@ #include "dixevents.h" #include "sleepuntil.h" #include "mi.h" -#define _XTEST_SERVER_ -#include -#include +#include "xkbsrv.h" +#include "xkbstr.h" +#include #include #include +#include "exglobals.h" +#include "mipointer.h" +#include "xserver-properties.h" +#include "exevents.h" #include "modinit.h" extern int DeviceValuator; -extern int DeviceMotionNotify; + +/* XTest events are sent during request processing and may be interruped by + * a SIGIO. We need a separate event list to avoid events overwriting each + * other's memory */ +static EventListPtr xtest_evlist; + +/* Used to store if a device is an XTest Virtual device */ +static int XTestDevicePrivateKeyIndex; +DevPrivateKey XTestDevicePrivateKey = &XTestDevicePrivateKeyIndex; + +/** + * xtestpointer + * is the virtual pointer for XTest. It is the first slave + * device of the VCP. + * xtestkeyboard + * is the virtual keyboard for XTest. It is the first slave + * device of the VCK + * + * Neither of these devices can be deleted. + */ +DeviceIntPtr xtestpointer, xtestkeyboard; #ifdef PANORAMIX #include "panoramiX.h" @@ -81,11 +105,12 @@ XTestExtensionInit(INITARGS) AddExtension(XTestExtensionName, 0, 0, ProcXTestDispatch, SProcXTestDispatch, NULL, StandardMinorOpcode); + + xtest_evlist = InitEventList(GetMaximumEventsNum()); } static int -ProcXTestGetVersion(client) - ClientPtr client; +ProcXTestGetVersion(ClientPtr client) { xXTestGetVersionReply rep; int n; @@ -105,8 +130,7 @@ ProcXTestGetVersion(client) } static int -ProcXTestCompareCursor(client) - ClientPtr client; +ProcXTestCompareCursor(ClientPtr client) { REQUEST(xXTestCompareCursorReq); xXTestCompareCursorReply rep; @@ -144,8 +168,7 @@ ProcXTestCompareCursor(client) } static int -ProcXTestFakeInput(client) - ClientPtr client; +ProcXTestFakeInput(ClientPtr client) { REQUEST(xXTestFakeInputReq); int nev, n, type, rc; @@ -157,7 +180,6 @@ ProcXTestFakeInput(client) int valuators[MAX_VALUATORS] = {0}; int numValuators = 0; int firstValuator = 0; - EventListPtr events; int nevents = 0; int i; int base = 0; @@ -189,11 +211,34 @@ ProcXTestFakeInput(client) switch (type) { case XI_DeviceKeyPress: case XI_DeviceKeyRelease: + if (!dev->key) + { + client->errorValue = ev->u.u.type; + return BadValue; + } + break; case XI_DeviceButtonPress: case XI_DeviceButtonRelease: + if (!dev->button) + { + client->errorValue = ev->u.u.type; + return BadValue; + } + break; case XI_DeviceMotionNotify: + if (!dev->valuator) + { + client->errorValue = ev->u.u.type; + return BadValue; + } + break; case XI_ProximityIn: case XI_ProximityOut: + if (!dev->proximity) + { + client->errorValue = ev->u.u.type; + return BadValue; + } break; default: client->errorValue = ev->u.u.type; @@ -221,7 +266,7 @@ ProcXTestFakeInput(client) flags |= POINTER_ABSOLUTE; } - if (nev == 1 && type == XI_DeviceMotionNotify && !dev->valuator) + if (nev > 1 && !dev->valuator) { client->errorValue = dv->first_valuator; return BadValue; @@ -296,8 +341,7 @@ ProcXTestFakeInput(client) return BadValue; } - if (dev->u.lastSlave) - dev = dev->u.lastSlave; + dev = GetXTestDevice(dev); } /* If the event has a time set, wait for it to pass */ @@ -334,14 +378,20 @@ ProcXTestFakeInput(client) { case KeyPress: case KeyRelease: - if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode || - ev->u.u.detail > dev->key->curKeySyms.maxKeyCode) + if (!dev->key) + return BadDevice; + + if (ev->u.u.detail < dev->key->xkbInfo->desc->min_key_code || + ev->u.u.detail > dev->key->xkbInfo->desc->max_key_code) { client->errorValue = ev->u.u.detail; return BadValue; } break; case MotionNotify: + if (!dev->valuator) + return BadDevice; + /* broken lib, XI events have root uninitialized */ if (extension || ev->u.keyButtonPointer.root == None) root = GetCurrentRootWindow(dev); @@ -368,12 +418,9 @@ ProcXTestFakeInput(client) break; case ButtonPress: case ButtonRelease: - if (!extension) - { - dev = PickPointer(client); - if (dev->u.lastSlave) - dev = dev->u.lastSlave; - } + if (!dev->button) + return BadDevice; + if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; @@ -384,35 +431,32 @@ ProcXTestFakeInput(client) if (screenIsSaved == SCREEN_SAVER_ON) dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); - OsBlockSignals(); - GetEventList(&events); switch(type) { case MotionNotify: - nevents = GetPointerEvents(events, dev, type, 0, flags, + nevents = GetPointerEvents(xtest_evlist, dev, type, 0, flags, firstValuator, numValuators, valuators); break; case ButtonPress: case ButtonRelease: - nevents = GetPointerEvents(events, dev, type, ev->u.u.detail, + nevents = GetPointerEvents(xtest_evlist, dev, type, ev->u.u.detail, flags, firstValuator, numValuators, valuators); break; case KeyPress: case KeyRelease: - nevents = GetKeyboardEvents(events, dev, type, ev->u.u.detail); + nevents = GetKeyboardEvents(xtest_evlist, dev, type, ev->u.u.detail); break; } for (i = 0; i < nevents; i++) - mieqEnqueue(dev, (events+i)->event); - OsReleaseSignals(); + mieqProcessDeviceEvent(dev, (InternalEvent*)(xtest_evlist+i)->event, NULL); + miPointerUpdateSprite(dev); return client->noClientException; } static int -ProcXTestGrabControl(client) - ClientPtr client; +ProcXTestGrabControl(ClientPtr client) { REQUEST(xXTestGrabControlReq); @@ -430,8 +474,7 @@ ProcXTestGrabControl(client) } static int -ProcXTestDispatch (client) - ClientPtr client; +ProcXTestDispatch (ClientPtr client) { REQUEST(xReq); switch (stuff->data) @@ -450,8 +493,7 @@ ProcXTestDispatch (client) } static int -SProcXTestGetVersion(client) - ClientPtr client; +SProcXTestGetVersion(ClientPtr client) { int n; REQUEST(xXTestGetVersionReq); @@ -463,8 +505,7 @@ SProcXTestGetVersion(client) } static int -SProcXTestCompareCursor(client) - ClientPtr client; +SProcXTestCompareCursor(ClientPtr client) { int n; REQUEST(xXTestCompareCursorReq); @@ -477,9 +518,7 @@ SProcXTestCompareCursor(client) } static int -XTestSwapFakeInput(client, req) - ClientPtr client; - xReq *req; +XTestSwapFakeInput(ClientPtr client, xReq *req) { int nev; xEvent *ev; @@ -503,8 +542,7 @@ XTestSwapFakeInput(client, req) } static int -SProcXTestFakeInput(client) - ClientPtr client; +SProcXTestFakeInput(ClientPtr client) { int n; REQUEST(xReq); @@ -517,8 +555,7 @@ SProcXTestFakeInput(client) } static int -SProcXTestGrabControl(client) - ClientPtr client; +SProcXTestGrabControl(ClientPtr client) { int n; REQUEST(xXTestGrabControlReq); @@ -529,8 +566,7 @@ SProcXTestGrabControl(client) } static int -SProcXTestDispatch (client) - ClientPtr client; +SProcXTestDispatch (ClientPtr client) { REQUEST(xReq); switch (stuff->data) @@ -547,3 +583,126 @@ SProcXTestDispatch (client) return BadRequest; } } + +/** + * Allocate an virtual slave device for xtest events, this + * is a slave device to inputInfo master devices + */ +void InitXTestDevices(void) +{ + if(AllocXTestDevice(serverClient, "Virtual core", + &xtestpointer, &xtestkeyboard, + inputInfo.pointer, inputInfo.keyboard) != Success) + FatalError("Failed to allocate XTest devices"); + + if (ActivateDevice(xtestpointer, TRUE) != Success || + ActivateDevice(xtestkeyboard, TRUE) != Success) + FatalError("Failed to activate XTest core devices."); + if (!EnableDevice(xtestpointer, TRUE) || + !EnableDevice(xtestkeyboard, TRUE)) + FatalError("Failed to enable XTest core devices."); + + AttachDevice(NULL, xtestpointer, inputInfo.pointer); + AttachDevice(NULL, xtestkeyboard, inputInfo.keyboard); +} + +/** + * Don't allow changing the XTest property. + */ +static int +DeviceSetXTestProperty(DeviceIntPtr dev, Atom property, + XIPropertyValuePtr prop, BOOL checkonly) +{ + if (property == XIGetKnownProperty(XI_PROP_XTEST_DEVICE)) + return BadAccess; + + return Success; +} + +/** + * Allocate a device pair that is initialised as a slave + * device with properties that identify the devices as belonging + * to XTest subsystem. + * This only creates the pair, Activate/Enable Device + * still need to be called. + */ +int AllocXTestDevice (ClientPtr client, char* name, + DeviceIntPtr* ptr, DeviceIntPtr* keybd, + DeviceIntPtr master_ptr, DeviceIntPtr master_keybd) +{ + int retval; + int len = strlen(name); + char *xtestname = xcalloc(len + 7, 1 ); + char dummy = 1; + + strncpy( xtestname, name, len); + strncat( xtestname, " XTEST", 6 ); + + retval = AllocDevicePair( client, xtestname, ptr, keybd, CorePointerProc, CoreKeyboardProc, FALSE); + if ( retval == Success ){ + dixSetPrivate(&((*ptr)->devPrivates), XTestDevicePrivateKey, (void *)master_ptr->id); + dixSetPrivate(&((*keybd)->devPrivates), XTestDevicePrivateKey, (void *)master_keybd->id); + } + + xfree( xtestname ); + + XIChangeDeviceProperty(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), + XA_INTEGER, 8, PropModeReplace, 1, &dummy, + FALSE); + XISetDevicePropertyDeletable(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), FALSE); + XIRegisterPropertyHandler(*ptr, DeviceSetXTestProperty, NULL, NULL); + XIChangeDeviceProperty(*keybd, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), + XA_INTEGER, 8, PropModeReplace, 1, &dummy, + FALSE); + XISetDevicePropertyDeletable(*keybd, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), FALSE); + XIRegisterPropertyHandler(*keybd, DeviceSetXTestProperty, NULL, NULL); + + return retval; +} + +/** + * If master is NULL, return TRUE if the given device is an xtest device or + * FALSE otherwise. + * If master is not NULL, return TRUE if the given device is this master's + * xtest device. + */ +BOOL +IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master) +{ + int is_XTest = FALSE; + int mid; + void *tmp; /* shut up, gcc! */ + + if (IsMaster(dev)) + return is_XTest; + + tmp = dixLookupPrivate(&dev->devPrivates, XTestDevicePrivateKey); + mid = (int)tmp; + + /* deviceid 0 is reserved for XIAllDevices, non-zero mid means XTest + * device */ + if ((!master && mid) || + (master && mid == master->id)) + is_XTest = TRUE; + + return is_XTest; +} + +/** + * @return The X Test virtual device for the given master. + */ +DeviceIntPtr +GetXTestDevice(DeviceIntPtr master) +{ + DeviceIntPtr it; + + for (it = inputInfo.devices; it; it = it->next) + { + if (IsXTestDevice(it, master)) + return it; + } + + /* This only happens if master is a slave device. don't do that */ + return NULL; +} + diff --git a/xorg-server/Xext/xvdisp.c b/xorg-server/Xext/xvdisp.c index de0128e14..04cd11a3f 100644 --- a/xorg-server/Xext/xvdisp.c +++ b/xorg-server/Xext/xvdisp.c @@ -42,8 +42,7 @@ SOFTWARE. #include #include "xvdix.h" #ifdef MITSHM -#define _XSHM_SERVER_ -#include +#include #endif #include "xvdisp.h" @@ -423,12 +422,12 @@ ProcXvQueryAdaptors(ClientPtr client) pa = pxvs->pAdaptors; while (na--) { - totalSize += (strlen(pa->name) + 3) & ~3; + totalSize += pad_to_int32(strlen(pa->name)); totalSize += pa->nFormats * sz_xvFormat; pa++; } - rep.length = totalSize >> 2; + rep.length = bytes_to_int32(totalSize); _WriteQueryAdaptorsReply(client, &rep); @@ -479,11 +478,7 @@ ProcXvQueryEncodings(ClientPtr client) REQUEST(xvQueryEncodingsReq); REQUEST_SIZE_MATCH(xvQueryEncodingsReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -502,11 +497,11 @@ ProcXvQueryEncodings(ClientPtr client) totalSize = ne * sz_xvEncodingInfo; while (ne--) { - totalSize += (strlen(pe->name) + 3) & ~3; + totalSize += pad_to_int32(strlen(pe->name)); pe++; } - rep.length = totalSize >> 2; + rep.length = bytes_to_int32(totalSize); _WriteQueryEncodingsReply(client, &rep); @@ -540,12 +535,7 @@ ProcXvPutVideo(ClientPtr client) REQUEST_SIZE_MATCH(xvPutVideoReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); - - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -560,17 +550,15 @@ ProcXvPutVideo(ClientPtr client) return (BadMatch); } - status = XVCALL(diMatchPort)(pPort, pDraw); + status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } - return XVCALL(diPutVideo)(client, pDraw, pPort, pGC, - stuff->vid_x, stuff->vid_y, - stuff->vid_w, stuff->vid_h, - stuff->drw_x, stuff->drw_y, - stuff->drw_w, stuff->drw_h); + return XvdiPutVideo(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); } static int @@ -585,12 +573,7 @@ ProcXvPutStill(ClientPtr client) REQUEST_SIZE_MATCH(xvPutStillReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); - - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -605,17 +588,15 @@ ProcXvPutStill(ClientPtr client) return (BadMatch); } - status = XVCALL(diMatchPort)(pPort, pDraw); + status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } - return XVCALL(diPutStill)(client, pDraw, pPort, pGC, - stuff->vid_x, stuff->vid_y, - stuff->vid_w, stuff->vid_h, - stuff->drw_x, stuff->drw_y, - stuff->drw_w, stuff->drw_h); + return XvdiPutStill(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); } static int @@ -630,12 +611,7 @@ ProcXvGetVideo(ClientPtr client) REQUEST_SIZE_MATCH(xvGetVideoReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); - - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -650,17 +626,15 @@ ProcXvGetVideo(ClientPtr client) return (BadMatch); } - status = XVCALL(diMatchPort)(pPort, pDraw); + status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } - return XVCALL(diGetVideo)(client, pDraw, pPort, pGC, - stuff->vid_x, stuff->vid_y, - stuff->vid_w, stuff->vid_h, - stuff->drw_x, stuff->drw_y, - stuff->drw_w, stuff->drw_h); + return XvdiGetVideo(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); } static int @@ -675,12 +649,7 @@ ProcXvGetStill(ClientPtr client) REQUEST_SIZE_MATCH(xvGetStillReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); - - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -695,17 +664,15 @@ ProcXvGetStill(ClientPtr client) return (BadMatch); } - status = XVCALL(diMatchPort)(pPort, pDraw); + status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } - return XVCALL(diGetStill)(client, pDraw, pPort, pGC, - stuff->vid_x, stuff->vid_y, - stuff->vid_w, stuff->vid_h, - stuff->drw_x, stuff->drw_y, - stuff->drw_w, stuff->drw_h); + return XvdiGetStill(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); } static int @@ -720,7 +687,7 @@ ProcXvSelectVideoNotify(ClientPtr client) if (rc != Success) return rc; - return XVCALL(diSelectVideoNotify)(client, pDraw, stuff->onoff); + return XvdiSelectVideoNotify(client, pDraw, stuff->onoff); } static int @@ -731,11 +698,7 @@ ProcXvSelectPortNotify(ClientPtr client) REQUEST(xvSelectPortNotifyReq); REQUEST_SIZE_MATCH(xvSelectPortNotifyReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -743,7 +706,7 @@ ProcXvSelectPortNotify(ClientPtr client) return (status); } - return XVCALL(diSelectPortNotify)(client, pPort, stuff->onoff); + return XvdiSelectPortNotify(client, pPort, stuff->onoff); } static int @@ -755,11 +718,7 @@ ProcXvGrabPort(ClientPtr client) REQUEST(xvGrabPortReq); REQUEST_SIZE_MATCH(xvGrabPortReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -767,7 +726,7 @@ ProcXvGrabPort(ClientPtr client) return (status); } - status = XVCALL(diGrabPort)(client, pPort, stuff->time, &result); + status = XvdiGrabPort(client, pPort, stuff->time, &result); if (status != Success) { @@ -792,11 +751,7 @@ ProcXvUngrabPort(ClientPtr client) REQUEST(xvGrabPortReq); REQUEST_SIZE_MATCH(xvGrabPortReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -804,7 +759,7 @@ ProcXvUngrabPort(ClientPtr client) return (status); } - return XVCALL(diUngrabPort)(client, pPort, stuff->time); + return XvdiUngrabPort(client, pPort, stuff->time); } static int @@ -816,11 +771,7 @@ ProcXvStopVideo(ClientPtr client) REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -832,7 +783,7 @@ ProcXvStopVideo(ClientPtr client) if (rc != Success) return rc; - return XVCALL(diStopVideo)(client, pPort, pDraw); + return XvdiStopVideo(client, pPort, pDraw); } static int @@ -843,11 +794,7 @@ ProcXvSetPortAttribute(ClientPtr client) REQUEST(xvSetPortAttributeReq); REQUEST_SIZE_MATCH(xvSetPortAttributeReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixSetAttrAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -861,8 +808,7 @@ ProcXvSetPortAttribute(ClientPtr client) return(BadAtom); } - status = XVCALL(diSetPortAttribute)(client, pPort, - stuff->attribute, stuff->value); + status = XvdiSetPortAttribute(client, pPort, stuff->attribute, stuff->value); if (status == BadMatch) client->errorValue = stuff->attribute; @@ -882,11 +828,7 @@ ProcXvGetPortAttribute(ClientPtr client) REQUEST(xvGetPortAttributeReq); REQUEST_SIZE_MATCH(xvGetPortAttributeReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -900,7 +842,7 @@ ProcXvGetPortAttribute(ClientPtr client) return(BadAtom); } - status = XVCALL(diGetPortAttribute)(client, pPort, stuff->attribute, &value); + status = XvdiGetPortAttribute(client, pPort, stuff->attribute, &value); if (status != Success) { client->errorValue = stuff->attribute; @@ -927,11 +869,7 @@ ProcXvQueryBestSize(ClientPtr client) REQUEST(xvQueryBestSizeReq); REQUEST_SIZE_MATCH(xvQueryBestSizeReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -968,11 +906,7 @@ ProcXvQueryPortAttributes(ClientPtr client) REQUEST(xvQueryPortAttributesReq); REQUEST_SIZE_MATCH(xvQueryPortAttributesReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -988,7 +922,7 @@ ProcXvQueryPortAttributes(ClientPtr client) for(i = 0, pAtt = pPort->pAdaptor->pAttributes; i < pPort->pAdaptor->nAttributes; i++, pAtt++) { - rep.text_size += (strlen(pAtt->name) + 1 + 3) & ~3L; + rep.text_size += pad_to_int32(strlen(pAtt->name) + 1); } rep.length = (pPort->pAdaptor->nAttributes * sz_xvAttributeInfo) @@ -1004,7 +938,7 @@ ProcXvQueryPortAttributes(ClientPtr client) Info.flags = pAtt->flags; Info.min = pAtt->min_value; Info.max = pAtt->max_value; - Info.size = (size + 3) & ~3L; + Info.size = pad_to_int32(size); _WriteAttributeInfo(client, &Info); @@ -1028,12 +962,7 @@ ProcXvPutImage(ClientPtr client) REQUEST_AT_LEAST_SIZE(xvPutImageReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); - - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -1048,7 +977,7 @@ ProcXvPutImage(ClientPtr client) return (BadMatch); } - status = XVCALL(diMatchPort)(pPort, pDraw); + status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; @@ -1069,7 +998,7 @@ ProcXvPutImage(ClientPtr client) size = (*pPort->pAdaptor->ddQueryImageAttributes)(client, pPort, pImage, &width, &height, NULL, NULL); size += sizeof(xvPutImageReq); - size = (size + 3) >> 2; + size = bytes_to_int32(size); if((width < stuff->width) || (height < stuff->height)) return BadValue; @@ -1077,13 +1006,11 @@ ProcXvPutImage(ClientPtr client) if(client->req_len < size) return BadLength; - return XVCALL(diPutImage)(client, pDraw, pPort, pGC, - stuff->src_x, stuff->src_y, - stuff->src_w, stuff->src_h, - stuff->drw_x, stuff->drw_y, - stuff->drw_w, stuff->drw_h, - pImage, (unsigned char*)(&stuff[1]), FALSE, - stuff->width, stuff->height); + return XvdiPutImage(client, pDraw, pPort, pGC, stuff->src_x, stuff->src_y, + stuff->src_w, stuff->src_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h, pImage, + (unsigned char*)(&stuff[1]), FALSE, + stuff->width, stuff->height); } #ifdef MITSHM @@ -1116,12 +1043,7 @@ ProcXvShmPutImage(ClientPtr client) REQUEST_SIZE_MATCH(xvShmPutImageReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); - - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if ((status = _AllocatePort(stuff->port, pPort)) != Success) { @@ -1136,7 +1058,7 @@ ProcXvShmPutImage(ClientPtr client) return (BadMatch); } - status = XVCALL(diMatchPort)(pPort, pDraw); + status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; @@ -1152,11 +1074,10 @@ ProcXvShmPutImage(ClientPtr client) if(!pImage) return BadMatch; - if(!(shmdesc = (ShmDescPtr)LookupIDByType(stuff->shmseg, ShmSegType))) - { - client->errorValue = stuff->shmseg; - return BadShmSegCode; - } + status = dixLookupResourceByType((pointer *)&shmdesc, stuff->shmseg, + ShmSegType, serverClient, DixReadAccess); + if (status != Success) + return (status == BadValue) ? BadShmSegCode : status; width = stuff->width; height = stuff->height; @@ -1168,13 +1089,11 @@ ProcXvShmPutImage(ClientPtr client) if((width < stuff->width) || (height < stuff->height)) return BadValue; - status = XVCALL(diPutImage)(client, pDraw, pPort, pGC, - stuff->src_x, stuff->src_y, - stuff->src_w, stuff->src_h, - stuff->drw_x, stuff->drw_y, - stuff->drw_w, stuff->drw_h, pImage, - (unsigned char *)shmdesc->addr + stuff->offset, - stuff->send_event, stuff->width, stuff->height); + status = XvdiPutImage(client, pDraw, pPort, pGC, stuff->src_x, stuff->src_y, + stuff->src_w, stuff->src_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h, pImage, + (unsigned char *)shmdesc->addr + stuff->offset, + stuff->send_event, stuff->width, stuff->height); if((status == Success) && stuff->send_event) { xShmCompletionEvent ev; @@ -1219,11 +1138,7 @@ ProcXvQueryImageAttributes(ClientPtr client) REQUEST_SIZE_MATCH(xvQueryImageAttributesReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); for(i = 0; i < pPort->pAdaptor->nImages; i++) { if(pPort->pAdaptor->pImages[i].id == stuff->id) { @@ -1282,16 +1197,12 @@ ProcXvListImageFormats(ClientPtr client) REQUEST_SIZE_MATCH(xvListImageFormatsReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client) )) - { - client->errorValue = stuff->port; - return (_XvBadPort); - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.num_formats = pPort->pAdaptor->nImages; - rep.length = pPort->pAdaptor->nImages * sz_xvImageFormatInfo >> 2; + rep.length = bytes_to_int32(pPort->pAdaptor->nImages * sz_xvImageFormatInfo); _WriteListImageFormatsReply(client, &rep); @@ -1692,18 +1603,20 @@ SProcXvDispatch(ClientPtr client) static int XineramaXvStopVideo(ClientPtr client) { - int result = Success, i; + int result, i; PanoramiXRes *draw, *port; REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; - if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, DixReadAccess))) - return _XvBadPort; + result = dixLookupResourceByType((pointer *)&port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? _XvBadPort : result; FOR_NSCREENS_BACKWARD(i) { if(port->info[i].id) { @@ -1721,13 +1634,14 @@ XineramaXvSetPortAttribute(ClientPtr client) { REQUEST(xvSetPortAttributeReq); PanoramiXRes *port; - int result = Success, i; + int result, i; REQUEST_SIZE_MATCH(xvSetPortAttributeReq); - if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, DixReadAccess))) - return _XvBadPort; + result = dixLookupResourceByType((pointer *)&port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? _XvBadPort : result; FOR_NSCREENS_BACKWARD(i) { if(port->info[i].id) { @@ -1746,21 +1660,24 @@ XineramaXvShmPutImage(ClientPtr client) PanoramiXRes *draw, *gc, *port; Bool send_event = stuff->send_event; Bool isRoot; - int result = Success, i, x, y; + int result, i, x, y; REQUEST_SIZE_MATCH(xvShmPutImageReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; - if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, DixReadAccess))) - return _XvBadPort; + result = dixLookupResourceByType((pointer *)&port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? _XvBadPort : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1795,21 +1712,24 @@ XineramaXvPutImage(ClientPtr client) REQUEST(xvPutImageReq); PanoramiXRes *draw, *gc, *port; Bool isRoot; - int result = Success, i, x, y; + int result, i, x, y; REQUEST_AT_LEAST_SIZE(xvPutImageReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; - if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, DixReadAccess))) - return _XvBadPort; + result = dixLookupResourceByType((pointer *)&port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? _XvBadPort : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1840,21 +1760,24 @@ XineramaXvPutVideo(ClientPtr client) REQUEST(xvPutImageReq); PanoramiXRes *draw, *gc, *port; Bool isRoot; - int result = Success, i, x, y; + int result, i, x, y; REQUEST_AT_LEAST_SIZE(xvPutVideoReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; - if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, DixReadAccess))) - return _XvBadPort; + result = dixLookupResourceByType((pointer *)&port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? _XvBadPort : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1885,21 +1808,24 @@ XineramaXvPutStill(ClientPtr client) REQUEST(xvPutImageReq); PanoramiXRes *draw, *gc, *port; Bool isRoot; - int result = Success, i, x, y; + int result, i, x, y; REQUEST_AT_LEAST_SIZE(xvPutImageReq); - if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; - if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, DixReadAccess))) - return BadGC; + result = dixLookupResourceByType((pointer *)&gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadGC : result; - if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, DixReadAccess))) - return _XvBadPort; + result = dixLookupResourceByType((pointer *)&port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? _XvBadPort : result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; diff --git a/xorg-server/Xext/xvdix.h b/xorg-server/Xext/xvdix.h index a516cf113..44f8f6b18 100644 --- a/xorg-server/Xext/xvdix.h +++ b/xorg-server/Xext/xvdix.h @@ -55,20 +55,22 @@ SOFTWARE. #include "scrnintstr.h" #include -extern unsigned long XvExtensionGeneration; -extern unsigned long XvScreenGeneration; -extern unsigned long XvResourceGeneration; - -extern int XvReqCode; -extern int XvEventBase; -extern int XvErrorBase; - -extern unsigned long XvRTPort; -extern unsigned long XvRTEncoding; -extern unsigned long XvRTGrab; -extern unsigned long XvRTVideoNotify; -extern unsigned long XvRTVideoNotifyList; -extern unsigned long XvRTPortNotify; +#ifndef XorgLoader +extern _X_EXPORT unsigned long XvExtensionGeneration; +extern _X_EXPORT unsigned long XvScreenGeneration; +extern _X_EXPORT unsigned long XvResourceGeneration; + +extern _X_EXPORT int XvReqCode; +extern _X_EXPORT int XvEventBase; +extern _X_EXPORT int XvErrorBase; + +extern _X_EXPORT unsigned long XvRTPort; +extern _X_EXPORT unsigned long XvRTEncoding; +extern _X_EXPORT unsigned long XvRTGrab; +extern _X_EXPORT unsigned long XvRTVideoNotify; +extern _X_EXPORT unsigned long XvRTVideoNotifyList; +extern _X_EXPORT unsigned long XvRTPortNotify; +#endif typedef struct { int numerator; @@ -199,17 +201,13 @@ typedef struct _XvPortRec { DevUnion devPriv; } XvPortRec, *XvPortPtr; -#define LOOKUP_PORT(_id, client)\ - ((XvPortPtr)LookupIDByType(_id, XvRTPort)) - -#define LOOKUP_ENCODING(_id, client)\ - ((XvEncodingPtr)LookupIDByType(_id, XvRTEncoding)) - -#define LOOKUP_VIDEONOTIFY_LIST(_id, client)\ - ((XvVideoNotifyPtr)LookupIDByType(_id, XvRTVideoNotifyList)) - -#define LOOKUP_PORTNOTIFY_LIST(_id, client)\ - ((XvPortNotifyPtr)LookupIDByType(_id, XvRTPortNotifyList)) +#define VALIDATE_XV_PORT(portID, pPort, mode)\ + {\ + int rc = dixLookupResourceByType((pointer *)&(pPort), portID,\ + XvRTPort, client, mode);\ + if (rc != Success)\ + return (rc == BadValue) ? _XvBadPort : rc;\ + } typedef struct { int version, revision; @@ -234,54 +232,44 @@ typedef struct { #define _XvBadPort (XvBadPort+XvErrorBase) #define _XvBadEncoding (XvBadEncoding+XvErrorBase) -extern int ProcXvDispatch(ClientPtr); -extern int SProcXvDispatch(ClientPtr); +#ifndef XorgLoader +extern _X_EXPORT int ProcXvDispatch(ClientPtr); +extern _X_EXPORT int SProcXvDispatch(ClientPtr); -extern void XvExtensionInit(void); -extern int XvScreenInit(ScreenPtr); -extern DevPrivateKey XvGetScreenKey(void); -extern unsigned long XvGetRTPort(void); -extern int XvdiSendPortNotify(XvPortPtr, Atom, INT32); -extern int XvdiVideoStopped(XvPortPtr, int); +extern _X_EXPORT void XvExtensionInit(void); +extern _X_EXPORT int XvScreenInit(ScreenPtr); +extern _X_EXPORT DevPrivateKey XvGetScreenKey(void); +extern _X_EXPORT unsigned long XvGetRTPort(void); +extern _X_EXPORT int XvdiSendPortNotify(XvPortPtr, Atom, INT32); +extern _X_EXPORT int XvdiVideoStopped(XvPortPtr, int); -extern int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +extern _X_EXPORT int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -extern int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +extern _X_EXPORT int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -extern int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +extern _X_EXPORT int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -extern int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +extern _X_EXPORT int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -extern int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +extern _X_EXPORT int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16, XvImagePtr, unsigned char*, Bool, CARD16, CARD16); -extern int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL); -extern int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL); -extern int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32); -extern int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32*); -extern int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr); -extern int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr); -extern int XvdiMatchPort(XvPortPtr, DrawablePtr); -extern int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *); -extern int XvdiUngrabPort( ClientPtr, XvPortPtr, Time); - - -#if !defined(UNIXCPP) - -#define XVCALL(name) Xv##name - -#else - -#define XVCALL(name) Xv/**/name - -#endif - +extern _X_EXPORT int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL); +extern _X_EXPORT int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL); +extern _X_EXPORT int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32); +extern _X_EXPORT int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32*); +extern _X_EXPORT int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr); +extern _X_EXPORT int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr); +extern _X_EXPORT int XvdiMatchPort(XvPortPtr, DrawablePtr); +extern _X_EXPORT int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *); +extern _X_EXPORT int XvdiUngrabPort( ClientPtr, XvPortPtr, Time); +#endif /* XorgLoader */ #endif /* XVDIX_H */ diff --git a/xorg-server/Xext/xvmain.c b/xorg-server/Xext/xvmain.c index fcca724b0..7c8a3c3d4 100644 --- a/xorg-server/Xext/xvmain.c +++ b/xorg-server/Xext/xvmain.c @@ -153,7 +153,7 @@ static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int); ** */ -void +void XvExtensionInit(void) { ExtensionEntry *extEntry; @@ -248,7 +248,7 @@ CreateResourceTypes(void) } -_X_EXPORT int +int XvScreenInit(ScreenPtr pScreen) { XvScreenPtr pxvs; @@ -273,7 +273,7 @@ XvScreenInit(ScreenPtr pScreen) /* ALLOCATE SCREEN PRIVATE RECORD */ - pxvs = (XvScreenPtr) xalloc (sizeof (XvScreenRec)); + pxvs = xalloc (sizeof (XvScreenRec)); if (!pxvs) { ErrorF("XvScreenInit: Unable to allocate screen private structure\n"); @@ -323,13 +323,13 @@ XvResetProc(ExtensionEntry* extEntry) XvResetProcVector(); } -_X_EXPORT DevPrivateKey +DevPrivateKey XvGetScreenKey(void) { return XvScreenKey; } -_X_EXPORT unsigned long +unsigned long XvGetRTPort(void) { return XvRTPort; @@ -367,11 +367,10 @@ XvDestroyPixmap(PixmapPtr pPix) { XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted); - (void)(* pp->pAdaptor->ddStopVideo)((ClientPtr)NULL, pp, - pp->pDraw); + (void)(* pp->pAdaptor->ddStopVideo)(NULL, pp, pp->pDraw); - pp->pDraw = (DrawablePtr)NULL; - pp->client = (ClientPtr)NULL; + pp->pDraw = NULL; + pp->client = NULL; pp->time = currentTime; } pp++; @@ -419,11 +418,10 @@ XvDestroyWindow(WindowPtr pWin) { XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted); - (void)(* pp->pAdaptor->ddStopVideo)((ClientPtr)NULL, pp, - pp->pDraw); + (void)(* pp->pAdaptor->ddStopVideo)(NULL, pp, pp->pDraw); - pp->pDraw = (DrawablePtr)NULL; - pp->client = (ClientPtr)NULL; + pp->pDraw = NULL; + pp->client = NULL; pp->time = currentTime; } pp++; @@ -455,8 +453,8 @@ XvdiVideoStopped(XvPortPtr pPort, int reason) XvdiSendVideoNotify(pPort, pPort->pDraw, reason); - pPort->pDraw = (DrawablePtr)NULL; - pPort->client = (ClientPtr)NULL; + pPort->pDraw = NULL; + pPort->client = NULL; pPort->time = currentTime; return Success; @@ -472,7 +470,7 @@ XvdiDestroyPort(pointer pPort, XID id) static int XvdiDestroyGrab(pointer pGrab, XID id) { - ((XvGrabPtr)pGrab)->client = (ClientPtr)NULL; + ((XvGrabPtr)pGrab)->client = NULL; return Success; } @@ -481,7 +479,7 @@ XvdiDestroyVideoNotify(pointer pn, XID id) { /* JUST CLEAR OUT THE client POINTER FIELD */ - ((XvVideoNotifyPtr)pn)->client = (ClientPtr)NULL; + ((XvVideoNotifyPtr)pn)->client = NULL; return Success; } @@ -490,7 +488,7 @@ XvdiDestroyPortNotify(pointer pn, XID id) { /* JUST CLEAR OUT THE client POINTER FIELD */ - ((XvPortNotifyPtr)pn)->client = (ClientPtr)NULL; + ((XvPortNotifyPtr)pn)->client = NULL; return Success; } @@ -520,17 +518,13 @@ XvdiDestroyEncoding(pointer value, XID id) } static int -XvdiSendVideoNotify(pPort, pDraw, reason) - -XvPortPtr pPort; -DrawablePtr pDraw; -int reason; - +XvdiSendVideoNotify(XvPortPtr pPort, DrawablePtr pDraw, int reason) { xvEvent event; XvVideoNotifyPtr pn; - pn = (XvVideoNotifyPtr)LookupIDByType(pDraw->id, XvRTVideoNotifyList); + dixLookupResourceByType((pointer *)&pn, pDraw->id, XvRTVideoNotifyList, + serverClient, DixReadAccess); while (pn) { @@ -857,7 +851,7 @@ XvdiGrabPort( if ((pPort->pDraw) && (client != pPort->client)) { - XVCALL(diStopVideo)((ClientPtr)NULL, pPort, pPort->pDraw); + XvdiStopVideo(NULL, pPort, pPort->pDraw); } pPort->grab.client = client; @@ -896,7 +890,7 @@ XvdiUngrabPort( /* FREE THE GRAB RESOURCE; AND SET THE GRAB CLIENT TO NULL */ FreeResource(pPort->grab.id, XvRTGrab); - pPort->grab.client = (ClientPtr)NULL; + pPort->grab.client = NULL; pPort->time = currentTime; @@ -912,10 +906,14 @@ XvdiSelectVideoNotify( BOOL onoff ){ XvVideoNotifyPtr pn,tpn,fpn; + int rc; /* FIND VideoNotify LIST */ - pn = (XvVideoNotifyPtr)LookupIDByType(pDraw->id, XvRTVideoNotifyList); + rc = dixLookupResourceByType((pointer *)&pn, pDraw->id, XvRTVideoNotifyList, + client, DixWriteAccess); + if (rc != Success && rc != BadValue) + return rc; /* IF ONE DONES'T EXIST AND NO MASK, THEN JUST RETURN */ @@ -926,9 +924,9 @@ XvdiSelectVideoNotify( if (!pn) { - if (!(tpn = (XvVideoNotifyPtr)xalloc(sizeof(XvVideoNotifyRec)))) + if (!(tpn = xalloc(sizeof(XvVideoNotifyRec)))) return BadAlloc; - tpn->next = (XvVideoNotifyPtr)NULL; + tpn->next = NULL; if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn)) { xfree(tpn); @@ -939,13 +937,13 @@ XvdiSelectVideoNotify( { /* LOOK TO SEE IF ENTRY ALREADY EXISTS */ - fpn = (XvVideoNotifyPtr)NULL; + fpn = NULL; tpn = pn; while (tpn) { if (tpn->client == client) { - if (!onoff) tpn->client = (ClientPtr)NULL; + if (!onoff) tpn->client = NULL; return Success; } if (!tpn->client) fpn = tpn; /* TAKE NOTE OF FREE ENTRY */ @@ -964,7 +962,7 @@ XvdiSelectVideoNotify( } else { - if (!(tpn = (XvVideoNotifyPtr)xalloc(sizeof(XvVideoNotifyRec)))) + if (!(tpn = xalloc(sizeof(XvVideoNotifyRec)))) return BadAlloc; tpn->next = pn->next; pn->next = tpn; @@ -974,7 +972,7 @@ XvdiSelectVideoNotify( /* INIT CLIENT PTR IN CASE WE CAN'T ADD RESOURCE */ /* ADD RESOURCE SO THAT IF CLIENT EXITS THE CLIENT PTR WILL BE CLEARED */ - tpn->client = (ClientPtr)NULL; + tpn->client = NULL; tpn->id = FakeClientID(client->index); AddResource(tpn->id, XvRTVideoNotify, tpn); @@ -993,7 +991,7 @@ XvdiSelectPortNotify( /* SEE IF CLIENT IS ALREADY IN LIST */ - tpn = (XvPortNotifyPtr)NULL; + tpn = NULL; pn = pPort->pNotify; while (pn) { @@ -1010,7 +1008,7 @@ XvdiSelectPortNotify( if (!onoff) { - pn->client = (ClientPtr)NULL; + pn->client = NULL; FreeResource(pn->id, XvRTPortNotify); } @@ -1022,7 +1020,7 @@ XvdiSelectPortNotify( if (!tpn) { - if (!(tpn = (XvPortNotifyPtr)xalloc(sizeof(XvPortNotifyRec)))) + if (!(tpn = xalloc(sizeof(XvPortNotifyRec)))) return BadAlloc; tpn->next = pPort->pNotify; pPort->pNotify = tpn; @@ -1065,7 +1063,7 @@ XvdiStopVideo( status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pDraw); - pPort->pDraw = (DrawablePtr)NULL; + pPort->pDraw = NULL; pPort->client = (ClientPtr)client; pPort->time = currentTime; @@ -1089,7 +1087,7 @@ XvdiPreemptVideo( status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pPort->pDraw); - pPort->pDraw = (DrawablePtr)NULL; + pPort->pDraw = NULL; pPort->client = (ClientPtr)client; pPort->time = currentTime; diff --git a/xorg-server/Xext/xvmc.c b/xorg-server/Xext/xvmc.c index ad1b8abc0..b7bb0fc1b 100644 --- a/xorg-server/Xext/xvmc.c +++ b/xorg-server/Xext/xvmc.c @@ -1,6 +1,4 @@ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -138,10 +136,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client) REQUEST(xvmcListSurfaceTypesReq); REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client))) { - client->errorValue = stuff->port; - return _XvBadPort; - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if(XvMCScreenKey) { /* any adaptors at all */ ScreenPtr pScreen = pPort->pAdaptor->pScreen; @@ -158,7 +153,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.num = (adaptor) ? adaptor->num_surfaces : 0; - rep.length = rep.num * sizeof(xvmcSurfaceInfo) >> 2; + rep.length = bytes_to_int32(rep.num * sizeof(xvmcSurfaceInfo)); WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), (char*)&rep); @@ -194,10 +189,7 @@ ProcXvMCCreateContext(ClientPtr client) REQUEST(xvmcCreateContextReq); REQUEST_SIZE_MATCH(xvmcCreateContextReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client))) { - client->errorValue = stuff->port; - return _XvBadPort; - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); pScreen = pPort->pAdaptor->pScreen; @@ -275,11 +267,15 @@ ProcXvMCCreateContext(ClientPtr client) static int ProcXvMCDestroyContext(ClientPtr client) { + pointer val; + int rc; REQUEST(xvmcDestroyContextReq); REQUEST_SIZE_MATCH(xvmcDestroyContextReq); - if(!LookupIDByType(stuff->context_id, XvMCRTContext)) - return (XvMCBadContext + XvMCErrorBase); + rc = dixLookupResourceByType(&val, stuff->context_id, XvMCRTContext, + client, DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? XvMCBadContext + XvMCErrorBase : rc; FreeResource(stuff->context_id, RT_NONE); @@ -299,8 +295,10 @@ ProcXvMCCreateSurface(ClientPtr client) REQUEST(xvmcCreateSurfaceReq); REQUEST_SIZE_MATCH(xvmcCreateSurfaceReq); - if(!(pContext = LookupIDByType(stuff->context_id, XvMCRTContext))) - return (XvMCBadContext + XvMCErrorBase); + result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id, + XvMCRTContext, client, DixUseAccess); + if (result != Success) + return (result == BadValue) ? XvMCBadContext + XvMCErrorBase : result; pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); @@ -339,11 +337,15 @@ ProcXvMCCreateSurface(ClientPtr client) static int ProcXvMCDestroySurface(ClientPtr client) { + pointer val; + int rc; REQUEST(xvmcDestroySurfaceReq); REQUEST_SIZE_MATCH(xvmcDestroySurfaceReq); - if(!LookupIDByType(stuff->surface_id, XvMCRTSurface)) - return (XvMCBadSurface + XvMCErrorBase); + rc = dixLookupResourceByType(&val, stuff->surface_id, XvMCRTSurface, + client, DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? XvMCBadSurface + XvMCErrorBase : rc; FreeResource(stuff->surface_id, RT_NONE); @@ -365,8 +367,10 @@ ProcXvMCCreateSubpicture(ClientPtr client) REQUEST(xvmcCreateSubpictureReq); REQUEST_SIZE_MATCH(xvmcCreateSubpictureReq); - if(!(pContext = LookupIDByType(stuff->context_id, XvMCRTContext))) - return (XvMCBadContext + XvMCErrorBase); + result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id, + XvMCRTContext, client, DixUseAccess); + if (result != Success) + return (result == BadValue) ? XvMCBadContext + XvMCErrorBase : result; pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); @@ -450,11 +454,15 @@ ProcXvMCCreateSubpicture(ClientPtr client) static int ProcXvMCDestroySubpicture(ClientPtr client) { + pointer val; + int rc; REQUEST(xvmcDestroySubpictureReq); REQUEST_SIZE_MATCH(xvmcDestroySubpictureReq); - if(!LookupIDByType(stuff->subpicture_id, XvMCRTSubpicture)) - return (XvMCBadSubpicture + XvMCErrorBase); + rc = dixLookupResourceByType(&val, stuff->subpicture_id, XvMCRTSubpicture, + client, DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? XvMCBadSubpicture + XvMCErrorBase : rc; FreeResource(stuff->subpicture_id, RT_NONE); @@ -477,10 +485,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client) REQUEST(xvmcListSubpictureTypesReq); REQUEST_SIZE_MATCH(xvmcListSubpictureTypesReq); - if(!(pPort = LOOKUP_PORT(stuff->port, client))) { - client->errorValue = stuff->port; - return _XvBadPort; - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); pScreen = pPort->pAdaptor->pScreen; @@ -514,7 +519,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client) if(surface->compatible_subpictures) rep.num = surface->compatible_subpictures->num_xvimages; - rep.length = rep.num * sizeof(xvImageFormatInfo) >> 2; + rep.length = bytes_to_int32(rep.num * sizeof(xvImageFormatInfo)); WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), (char*)&rep); @@ -573,11 +578,7 @@ ProcXvMCGetDRInfo(ClientPtr client) REQUEST(xvmcGetDRInfoReq); REQUEST_SIZE_MATCH(xvmcGetDRInfoReq); - - if(!(pPort = LOOKUP_PORT(stuff->port, client))) { - client->errorValue = stuff->port; - return _XvBadPort; - } + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); pScreen = pPort->pAdaptor->pScreen; pScreenPriv = XVMC_GET_PRIVATE(pScreen); @@ -587,8 +588,8 @@ ProcXvMCGetDRInfo(ClientPtr client) rep.major = pScreenPriv->major; rep.minor = pScreenPriv->minor; rep.patchLevel = pScreenPriv->patchLevel; - rep.nameLen = (strlen(pScreenPriv->clientDriverName) + 4) >> 2; - rep.busIDLen = (strlen(pScreenPriv->busID) + 4) >> 2; + rep.nameLen = bytes_to_int32(strlen(pScreenPriv->clientDriverName) + 1); + rep.busIDLen = bytes_to_int32(strlen(pScreenPriv->busID) + 1); rep.length = rep.nameLen + rep.busIDLen; rep.nameLen <<=2; @@ -664,7 +665,7 @@ SProcXvMCDispatch (ClientPtr client) return BadImplementation; } -void +void XvMCExtensionInit(void) { ExtensionEntry *extEntry; @@ -712,7 +713,7 @@ XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) XvMCScreenKey = &XvMCScreenKeyIndex; - if(!(pScreenPriv = (XvMCScreenPtr)xalloc(sizeof(XvMCScreenRec)))) + if(!(pScreenPriv = xalloc(sizeof(XvMCScreenRec)))) return BadAlloc; dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv); diff --git a/xorg-server/Xext/xvmcext.h b/xorg-server/Xext/xvmcext.h index 9c019fee6..5b431260f 100644 --- a/xorg-server/Xext/xvmcext.h +++ b/xorg-server/Xext/xvmcext.h @@ -101,15 +101,18 @@ typedef struct { XvMCDestroySubpictureProcPtr DestroySubpicture; } XvMCAdaptorRec, *XvMCAdaptorPtr; -void XvMCExtensionInit(void); +#ifndef XorgLoader +extern _X_EXPORT void XvMCExtensionInit(void); -int XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr adapt); +extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen, + int num, + XvMCAdaptorPtr adapt); -XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id); +extern _X_EXPORT XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id); -int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name, +extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name, char *busID, int major, int minor, int patchLevel); - +#endif #endif /* _XVMC_H */ diff --git a/xorg-server/Xi/Makefile.am b/xorg-server/Xi/Makefile.am index 557e20728..69c7886b9 100644 --- a/xorg-server/Xi/Makefile.am +++ b/xorg-server/Xi/Makefile.am @@ -76,7 +76,33 @@ libXi_la_SOURCES = \ ungrdevb.h \ ungrdevk.c \ ungrdevk.h \ + xiallowev.c \ + xiallowev.h \ + xichangecursor.c \ + xichangecursor.h \ + xichangehierarchy.c \ + xichangehierarchy.h \ + xigetclientpointer.c \ + xigetclientpointer.h \ + xigrabdev.c \ + xigrabdev.h \ + xipassivegrab.h \ + xipassivegrab.c \ xiproperty.c \ - xiproperty.h + xiproperty.h \ + xiquerydevice.c \ + xiquerydevice.h \ + xiquerypointer.c \ + xiquerypointer.h \ + xiqueryversion.c \ + xiqueryversion.h \ + xiselectev.c \ + xiselectev.h \ + xisetclientpointer.c \ + xisetclientpointer.h \ + xisetdevfocus.c \ + xisetdevfocus.h \ + xiwarppointer.c \ + xiwarppointer.h EXTRA_DIST = stubs.c diff --git a/xorg-server/Xi/Makefile.in b/xorg-server/Xi/Makefile.in index 9da131ad2..10cb1c7b4 100644 --- a/xorg-server/Xi/Makefile.in +++ b/xorg-server/Xi/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = Xi DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -60,7 +64,11 @@ am_libXi_la_OBJECTS = allowev.lo chgdctl.lo chgfctl.lo chgkbd.lo \ getvers.lo grabdev.lo grabdevb.lo grabdevk.lo gtmotion.lo \ listdev.lo opendev.lo queryst.lo selectev.lo sendexev.lo \ setbmap.lo setdval.lo setfocus.lo setmmap.lo setmode.lo \ - ungrdev.lo ungrdevb.lo ungrdevk.lo xiproperty.lo + ungrdev.lo ungrdevb.lo ungrdevk.lo xiallowev.lo \ + xichangecursor.lo xichangehierarchy.lo xigetclientpointer.lo \ + xigrabdev.lo xipassivegrab.lo xiproperty.lo xiquerydevice.lo \ + xiquerypointer.lo xiqueryversion.lo xiselectev.lo \ + xisetclientpointer.lo xisetdevfocus.lo xiwarppointer.lo libXi_la_OBJECTS = $(am_libXi_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -82,6 +90,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -102,9 +111,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -133,7 +145,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -142,9 +156,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -183,12 +201,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -208,7 +227,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -218,6 +236,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -231,11 +250,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -271,6 +289,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -295,7 +314,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -318,6 +336,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -349,7 +368,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -431,8 +452,34 @@ libXi_la_SOURCES = \ ungrdevb.h \ ungrdevk.c \ ungrdevk.h \ + xiallowev.c \ + xiallowev.h \ + xichangecursor.c \ + xichangecursor.h \ + xichangehierarchy.c \ + xichangehierarchy.h \ + xigetclientpointer.c \ + xigetclientpointer.h \ + xigrabdev.c \ + xigrabdev.h \ + xipassivegrab.h \ + xipassivegrab.c \ xiproperty.c \ - xiproperty.h + xiproperty.h \ + xiquerydevice.c \ + xiquerydevice.h \ + xiquerypointer.c \ + xiquerypointer.h \ + xiqueryversion.c \ + xiqueryversion.h \ + xiselectev.c \ + xiselectev.h \ + xisetclientpointer.c \ + xisetclientpointer.h \ + xisetdevfocus.c \ + xisetdevfocus.h \ + xiwarppointer.c \ + xiwarppointer.h EXTRA_DIST = stubs.c all: all-am @@ -524,7 +571,20 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdevb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdevk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiallowev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xichangecursor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xichangehierarchy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xigetclientpointer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xigrabdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xipassivegrab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiproperty.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiquerydevice.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiquerypointer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiqueryversion.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiselectev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xisetclientpointer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xisetdevfocus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiwarppointer.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff --git a/xorg-server/Xi/allowev.c b/xorg-server/Xi/allowev.c index 36b6caad5..96f3b543c 100644 --- a/xorg-server/Xi/allowev.c +++ b/xorg-server/Xi/allowev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -106,22 +104,22 @@ ProcXAllowDeviceEvents(ClientPtr client) switch (stuff->mode) { case ReplayThisDevice: - AllowSome(client, time, thisdev, NOT_GRABBED, FALSE); + AllowSome(client, time, thisdev, NOT_GRABBED); break; case SyncThisDevice: - AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT, FALSE); + AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT); break; case AsyncThisDevice: - AllowSome(client, time, thisdev, THAWED, FALSE); + AllowSome(client, time, thisdev, THAWED); break; case AsyncOtherDevices: - AllowSome(client, time, thisdev, THAW_OTHERS, FALSE); + AllowSome(client, time, thisdev, THAW_OTHERS); break; case SyncAll: - AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT, FALSE); + AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT); break; case AsyncAll: - AllowSome(client, time, thisdev, THAWED_BOTH, FALSE); + AllowSome(client, time, thisdev, THAWED_BOTH); break; default: client->errorValue = stuff->mode; diff --git a/xorg-server/Xi/chgdctl.c b/xorg-server/Xi/chgdctl.c index 6044f6cd6..901a0e419 100644 --- a/xorg-server/Xi/chgdctl.c +++ b/xorg-server/Xi/chgdctl.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -144,7 +142,7 @@ ProcXChangeDeviceControl(ClientPtr client) REQUEST(xChangeDeviceControlReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); - len = stuff->length - (sizeof(xChangeDeviceControlReq) >> 2); + len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceControlReq)); ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) goto out; @@ -157,8 +155,8 @@ ProcXChangeDeviceControl(ClientPtr client) switch (stuff->control) { case DEVICE_RESOLUTION: r = (xDeviceResolutionCtl *) & stuff[1]; - if ((len < (sizeof(xDeviceResolutionCtl) >> 2)) || - (len != (sizeof(xDeviceResolutionCtl) >> 2) + r->num_valuators)) { + if ((len < bytes_to_int32(sizeof(xDeviceResolutionCtl))) || + (len != bytes_to_int32(sizeof(xDeviceResolutionCtl)) + r->num_valuators)) { ret = BadLength; goto out; } @@ -255,9 +253,9 @@ ProcXChangeDeviceControl(ClientPtr client) if (status == Success) { if (e->enable) - EnableDevice(dev); + EnableDevice(dev, TRUE); else - DisableDevice(dev); + DisableDevice(dev, TRUE); ret = Success; } else if (status == DeviceBusy) { rep.status = DeviceBusy; diff --git a/xorg-server/Xi/chgfctl.c b/xorg-server/Xi/chgfctl.c index 3155e87c2..9189702c1 100644 --- a/xorg-server/Xi/chgfctl.c +++ b/xorg-server/Xi/chgfctl.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -443,14 +441,14 @@ ProcXChangeFeedbackControl(ClientPtr client) REQUEST(xChangeFeedbackControlReq); REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); - len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2); + len = stuff->length - bytes_to_int32(sizeof(xChangeFeedbackControlReq)); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (rc != Success) return rc; switch (stuff->feedbackid) { case KbdFeedbackClass: - if (len != (sizeof(xKbdFeedbackCtl) >> 2)) + if (len != bytes_to_int32(sizeof(xKbdFeedbackCtl))) return BadLength; for (k = dev->kbdfeed; k; k = k->next) @@ -459,7 +457,7 @@ ProcXChangeFeedbackControl(ClientPtr client) (xKbdFeedbackCtl *) & stuff[1]); break; case PtrFeedbackClass: - if (len != (sizeof(xPtrFeedbackCtl) >> 2)) + if (len != bytes_to_int32(sizeof(xPtrFeedbackCtl))) return BadLength; for (p = dev->ptrfeed; p; p = p->next) @@ -475,7 +473,7 @@ ProcXChangeFeedbackControl(ClientPtr client) if (client->swapped) { swaps(&f->num_keysyms, n); } - if (len != ((sizeof(xStringFeedbackCtl) >> 2) + f->num_keysyms)) + if (len != (bytes_to_int32(sizeof(xStringFeedbackCtl)) + f->num_keysyms)) return BadLength; for (s = dev->stringfeed; s; s = s->next) @@ -485,7 +483,7 @@ ProcXChangeFeedbackControl(ClientPtr client) break; } case IntegerFeedbackClass: - if (len != (sizeof(xIntegerFeedbackCtl) >> 2)) + if (len != bytes_to_int32(sizeof(xIntegerFeedbackCtl))) return BadLength; for (i = dev->intfeed; i; i = i->next) @@ -494,7 +492,7 @@ ProcXChangeFeedbackControl(ClientPtr client) (xIntegerFeedbackCtl *)&stuff[1]); break; case LedFeedbackClass: - if (len != (sizeof(xLedFeedbackCtl) >> 2)) + if (len != bytes_to_int32(sizeof(xLedFeedbackCtl))) return BadLength; for (l = dev->leds; l; l = l->next) @@ -503,7 +501,7 @@ ProcXChangeFeedbackControl(ClientPtr client) (xLedFeedbackCtl *) & stuff[1]); break; case BellFeedbackClass: - if (len != (sizeof(xBellFeedbackCtl) >> 2)) + if (len != bytes_to_int32(sizeof(xBellFeedbackCtl))) return BadLength; for (b = dev->bell; b; b = b->next) diff --git a/xorg-server/Xi/chgkbd.c b/xorg-server/Xi/chgkbd.c index 83de646f1..f9fd09902 100644 --- a/xorg-server/Xi/chgkbd.c +++ b/xorg-server/Xi/chgkbd.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/Xi/chgkmap.c b/xorg-server/Xi/chgkmap.c index 3f51648e1..e4b9e154c 100644 --- a/xorg-server/Xi/chgkmap.c +++ b/xorg-server/Xi/chgkmap.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -109,7 +107,7 @@ ProcXChangeDeviceKeyMapping(ClientPtr client) ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; - len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2); + len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceKeyMappingReq)); ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify, stuff->firstKeyCode, stuff->keyCodes, diff --git a/xorg-server/Xi/chgprop.c b/xorg-server/Xi/chgprop.c index 3fb33e129..d24a24638 100644 --- a/xorg-server/Xi/chgprop.c +++ b/xorg-server/Xi/chgprop.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -106,7 +104,7 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client) REQUEST(xChangeDeviceDontPropagateListReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); - if (stuff->length != (sizeof(xChangeDeviceDontPropagateListReq) >> 2) + + if (stuff->length != bytes_to_int32(sizeof(xChangeDeviceDontPropagateListReq)) + stuff->count) return BadLength; diff --git a/xorg-server/Xi/chgptr.c b/xorg-server/Xi/chgptr.c index 28950918f..6a4fbc342 100644 --- a/xorg-server/Xi/chgptr.c +++ b/xorg-server/Xi/chgptr.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/Xi/closedev.c b/xorg-server/Xi/closedev.c index 2be908c4a..159ead55c 100644 --- a/xorg-server/Xi/closedev.c +++ b/xorg-server/Xi/closedev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/Xi/devbell.c b/xorg-server/Xi/devbell.c index 264f64800..539da1814 100644 --- a/xorg-server/Xi/devbell.c +++ b/xorg-server/Xi/devbell.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 0bb84f86c..0211e72b7 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -52,17 +52,17 @@ SOFTWARE. * */ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif +#include "inputstr.h" #include #include #include #include +#include #include -#include "inputstr.h" #include "windowstr.h" #include "miscstruct.h" #include "region.h" @@ -74,12 +74,12 @@ SOFTWARE. #include "scrnintstr.h" #include "listdev.h" /* for CopySwapXXXClass */ #include "xace.h" +#include "xiquerydevice.h" /* For List*Info */ +#include "eventconvert.h" +#include "eventstr.h" -#ifdef XKB #include #include "xkbsrv.h" -extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); -#endif #define WID(w) ((w) ? ((w)->drawable.id) : 0) #define AllModifiersMask ( \ @@ -87,8 +87,6 @@ extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); Mod3Mask | Mod4Mask | Mod5Mask ) #define AllButtonsMask ( \ Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) -#define Motion_Filter(class) (DevicePointerMotionMask | \ - (class)->state | (class)->motionMask) Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , Bool /* ignoreSelectedEvents */ @@ -99,6 +97,22 @@ static Bool MakeInputMasks(WindowPtr /* pWin */ /* Used to sture classes currently not in use by an MD */ extern DevPrivateKey UnusedClassesPrivateKey; +/* + * Only let the given client know of core events which will affect its + * interpretation of input events, if the client's ClientPointer (or the + * paired keyboard) is the current device. + */ +int +XIShouldNotify(ClientPtr client, DeviceIntPtr dev) +{ + DeviceIntPtr current_ptr = PickPointer(client); + DeviceIntPtr current_kbd = GetPairedDevice(current_ptr); + + if (dev == current_kbd || dev == current_ptr) + return 1; + + return 0; +} void RegisterOtherDevice(DeviceIntPtr device) @@ -108,25 +122,17 @@ RegisterOtherDevice(DeviceIntPtr device) } Bool -IsPointerEvent(xEvent* xE) +IsPointerEvent(InternalEvent* event) { - switch(xE->u.u.type) + switch(event->any.type) { - case ButtonPress: - case ButtonRelease: - case MotionNotify: - case EnterNotify: - case LeaveNotify: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_Motion: + /* XXX: enter/leave ?? */ return TRUE; default: - if (xE->u.u.type == DeviceButtonPress || - xE->u.u.type == DeviceButtonRelease || - xE->u.u.type == DeviceMotionNotify || - xE->u.u.type == ProximityIn || - xE->u.u.type == ProximityOut) - { - return TRUE; - } + break; } return FALSE; } @@ -186,88 +192,23 @@ XIGetDevice(xEvent* xE) * This code is basically the old SwitchCoreKeyboard. */ -void +static void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) { - static DeviceIntPtr lastMapNotifyDevice = NULL; - KeyClassPtr mk, dk; /* master, device */ - BOOL sendNotify = FALSE; + KeyClassPtr mk = master->key; + KeyClassPtr dk = device->key; int i; if (device == master) return; - dk = device->key; - mk = master->key; - - if (device != dixLookupPrivate(&master->devPrivates, - CoreDevicePrivateKey)) { - memcpy(mk->modifierMap, dk->modifierMap, MAP_LENGTH); + mk->sourceid = device->id; - if (dk->maxKeysPerModifier) - { - mk->modifierKeyMap = xrealloc(mk->modifierKeyMap, - 8 * dk->maxKeysPerModifier); - if (!mk->modifierKeyMap) - FatalError("[Xi] no memory for class shift.\n"); - memcpy(mk->modifierKeyMap, dk->modifierKeyMap, - (8 * dk->maxKeysPerModifier)); - } else - { - xfree(mk->modifierKeyMap); - mk->modifierKeyMap = NULL; - } + for (i = 0; i < 8; i++) + mk->modifierKeyCount[i] = dk->modifierKeyCount[i]; - mk->maxKeysPerModifier = dk->maxKeysPerModifier; - mk->curKeySyms.minKeyCode = dk->curKeySyms.minKeyCode; - mk->curKeySyms.maxKeyCode = dk->curKeySyms.maxKeyCode; - SetKeySymsMap(&mk->curKeySyms, &dk->curKeySyms); - - /* - * Copy state from the extended keyboard to core. If you omit this, - * holding Ctrl on keyboard one, and pressing Q on keyboard two, will - * cause your app to quit. This feels wrong to me, hence the below - * code. - * - * XXX: If you synthesise core modifier events, the state will get - * clobbered here. You'll have to work out something sensible - * to fix that. Good luck. - */ - -#define KEYBOARD_MASK (ShiftMask | LockMask | ControlMask | Mod1Mask | \ - Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask) - mk->state &= ~(KEYBOARD_MASK); - mk->state |= (dk->state & KEYBOARD_MASK); -#undef KEYBOARD_MASK - for (i = 0; i < 8; i++) - mk->modifierKeyCount[i] = dk->modifierKeyCount[i]; - -#ifdef XKB - if (!noXkbExtension && dk->xkbInfo && dk->xkbInfo->desc) { - if (!mk->xkbInfo || !mk->xkbInfo->desc) - { - XkbInitDevice(master); - XkbFinishDeviceInit(master); - } - if (!XkbCopyKeymap(dk->xkbInfo->desc, mk->xkbInfo->desc, True)) - FatalError("Couldn't pivot keymap from device to core!\n"); - } -#endif - - dixSetPrivate(&master->devPrivates, CoreDevicePrivateKey, device); - sendNotify = TRUE; - } else if (lastMapNotifyDevice != master) - sendNotify = TRUE; - - if (sendNotify) - { - SendMappingNotify(master, MappingKeyboard, - mk->curKeySyms.minKeyCode, - (mk->curKeySyms.maxKeyCode - - mk->curKeySyms.minKeyCode), - serverClient); - lastMapNotifyDevice = master; - } + if (!XkbCopyDeviceKeymap(master, device)) + FatalError("Couldn't pivot keymap from device to core!\n"); } /** @@ -280,82 +221,6 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) { ClassesPtr classes; - if (from->kbdfeed) - { - KbdFeedbackPtr *k, it; - - if (!to->kbdfeed) - { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); - to->kbdfeed = classes->kbdfeed; - } - - k = &to->kbdfeed; - for(it = from->kbdfeed; it; it = it->next) - { - if (!(*k)) - { - *k = xcalloc(1, sizeof(KbdFeedbackClassRec)); - if (!*k) - { - ErrorF("[Xi] Cannot alloc memory for class copy."); - return; - } - } - (*k)->BellProc = it->BellProc; - (*k)->CtrlProc = it->CtrlProc; - (*k)->ctrl = it->ctrl; -#ifdef XKB - if ((*k)->xkb_sli) - XkbFreeSrvLedInfo((*k)->xkb_sli); - (*k)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, *k, NULL); -#endif - - k = &(*k)->next; - } - } else if (to->kbdfeed && !from->kbdfeed) - { - ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); - classes->kbdfeed = to->kbdfeed; - to->kbdfeed = NULL; - } - - if (from->ptrfeed) - { - PtrFeedbackPtr *p, it; - if (!to->ptrfeed) - { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); - to->ptrfeed = classes->ptrfeed; - } - - p = &to->ptrfeed; - for (it = from->ptrfeed; it; it = it->next) - { - if (!(*p)) - { - *p = xcalloc(1, sizeof(PtrFeedbackClassRec)); - if (!*p) - { - ErrorF("[Xi] Cannot alloc memory for class copy."); - return; - } - } - (*p)->CtrlProc = it->CtrlProc; - (*p)->ctrl = it->ctrl; - - p = &(*p)->next; - } - } else if (to->ptrfeed && !from->ptrfeed) - { - ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); - classes->ptrfeed = to->ptrfeed; - to->ptrfeed = NULL; - } if (from->intfeed) { @@ -491,11 +356,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } (*l)->CtrlProc = it->CtrlProc; (*l)->ctrl = it->ctrl; -#ifdef XKB if ((*l)->xkb_sli) XkbFreeSrvLedInfo((*l)->xkb_sli); (*l)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, NULL, *l); -#endif l = &(*l)->next; } @@ -508,74 +371,161 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } } -/** - * Copies the CONTENT of the classes of device from into the classes in device - * to. From and to are identical after finishing. - * - * If to does not have classes from currenly has, the classes are stored in - * to's devPrivates system. Later, we recover it again from there if needed. - * Saves a few memory allocations. - */ - -void -DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) +static void +DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) { ClassesPtr classes; /* XkbInitDevice (->XkbInitIndicatorMap->XkbFindSrvLedInfo) relies on the * kbdfeed to be set up properly, so let's do the feedback classes first. */ - DeepCopyFeedbackClasses(from, to); + if (from->kbdfeed) + { + KbdFeedbackPtr *k, it; + + if (!to->kbdfeed) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + + to->kbdfeed = classes->kbdfeed; + if (!to->kbdfeed) + InitKeyboardDeviceStruct(to, NULL, NULL, NULL); + } + + k = &to->kbdfeed; + for(it = from->kbdfeed; it; it = it->next) + { + if (!(*k)) + { + *k = xcalloc(1, sizeof(KbdFeedbackClassRec)); + if (!*k) + { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } + (*k)->BellProc = it->BellProc; + (*k)->CtrlProc = it->CtrlProc; + (*k)->ctrl = it->ctrl; + if ((*k)->xkb_sli) + XkbFreeSrvLedInfo((*k)->xkb_sli); + (*k)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, *k, NULL); + + k = &(*k)->next; + } + } else if (to->kbdfeed && !from->kbdfeed) + { + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->kbdfeed = to->kbdfeed; + to->kbdfeed = NULL; + } if (from->key) { - KeyCode *oldModKeyMap; - KeySym *oldMap; -#ifdef XKB - struct _XkbSrvInfo *oldXkbInfo; -#endif if (!to->key) { classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + UnusedClassesPrivateKey); to->key = classes->key; if (!to->key) + InitKeyboardDeviceStruct(to, NULL, NULL, NULL); + else + classes->key = NULL; + } + + CopyKeyClass(from, to); + } else if (to->key && !from->key) + { + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->key = to->key; + to->key = NULL; + } + + /* We can't just copy over the focus class. When an app sets the focus, + * it'll do so on the master device. Copying the SDs focus means losing + * the focus. + * So we only copy the focus class if the device didn't have one, + * otherwise we leave it as it is. + */ + if (from->focus) + { + if (!to->focus) + { + WindowPtr *oldTrace; + + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->focus = classes->focus; + if (!to->focus) { - to->key = xcalloc(1, sizeof(KeyClassRec)); - if (!to->key) + to->focus = xcalloc(1, sizeof(FocusClassRec)); + if (!to->focus) FatalError("[Xi] no memory for class shift.\n"); } else - classes->key = NULL; + classes->focus = NULL; + + oldTrace = to->focus->trace; + memcpy(to->focus, from->focus, sizeof(FocusClassRec)); + to->focus->trace = xrealloc(oldTrace, + to->focus->traceSize * sizeof(WindowPtr)); + if (!to->focus->trace && to->focus->traceSize) + FatalError("[Xi] no memory for trace.\n"); + memcpy(to->focus->trace, from->focus->trace, + from->focus->traceSize * sizeof(WindowPtr)); + to->focus->sourceid = from->id; } + } else if (to->focus) + { + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->focus = to->focus; + to->focus = NULL; + } - oldModKeyMap = to->key->modifierKeyMap; - oldMap = to->key->curKeySyms.map; -#ifdef XKB - oldXkbInfo = to->key->xkbInfo; -#endif +} + +static void +DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) +{ + ClassesPtr classes; - if (!oldMap) /* newly created key struct */ + /* Feedback classes must be copied first */ + if (from->ptrfeed) + { + PtrFeedbackPtr *p, it; + if (!to->ptrfeed) { - int bytes = (to->key->curKeySyms.maxKeyCode - - to->key->curKeySyms.minKeyCode + 1) * - to->key->curKeySyms.mapWidth; - oldMap = (KeySym *)xcalloc(sizeof(KeySym), bytes); - memcpy(oldMap, from->key->curKeySyms.map, bytes); + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->ptrfeed = classes->ptrfeed; } - to->key->modifierKeyMap = oldModKeyMap; - to->key->curKeySyms.map = oldMap; -#ifdef XKB - to->key->xkbInfo = oldXkbInfo; -#endif + p = &to->ptrfeed; + for (it = from->ptrfeed; it; it = it->next) + { + if (!(*p)) + { + *p = xcalloc(1, sizeof(PtrFeedbackClassRec)); + if (!*p) + { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } + (*p)->CtrlProc = it->CtrlProc; + (*p)->ctrl = it->ctrl; - CopyKeyClass(from, to); - } else if (to->key && !from->key) + p = &(*p)->next; + } + } else if (to->ptrfeed && !from->ptrfeed) { ClassesPtr classes; classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); - classes->key = to->key; - to->key = NULL; + classes->ptrfeed = to->ptrfeed; + to->ptrfeed = NULL; } if (from->valuator) @@ -592,7 +542,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->valuator = xrealloc(to->valuator, sizeof(ValuatorClassRec) + from->valuator->numAxes * sizeof(AxisInfo) + - from->valuator->numAxes * sizeof(unsigned int)); + from->valuator->numAxes * sizeof(double)); v = to->valuator; if (!v) FatalError("[Xi] no memory for class shift.\n"); @@ -601,7 +551,9 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) v->axes = (AxisInfoPtr)&v[1]; memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); - v->axisVal = (int*)(v->axes + from->valuator->numAxes); + v->axisVal = (double*)(v->axes + from->valuator->numAxes); + v->sourceid = from->id; + v->mode = from->valuator->mode; } else if (to->valuator && !from->valuator) { ClassesPtr classes; @@ -626,7 +578,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) classes->button = NULL; } -#ifdef XKB if (from->button->xkb_acts) { if (!to->button->xkb_acts) @@ -639,7 +590,10 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) sizeof(XkbAction)); } else xfree(to->button->xkb_acts); -#endif + + memcpy(to->button->labels, from->button->labels, + from->button->numButtons * sizeof(Atom)); + to->button->sourceid = from->id; } else if (to->button && !from->button) { ClassesPtr classes; @@ -648,47 +602,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->button = NULL; } - - /* We can't just copy over the focus class. When an app sets the focus, - * it'll do so on the master device. Copying the SDs focus means losing - * the focus. - * So we only copy the focus class if the device didn't have one, - * otherwise we leave it as it is. - */ - if (from->focus) - { - if (!to->focus) - { - WindowPtr *oldTrace; - - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); - to->focus = classes->focus; - if (!to->focus) - { - to->focus = xcalloc(1, sizeof(FocusClassRec)); - if (!to->focus) - FatalError("[Xi] no memory for class shift.\n"); - } else - classes->focus = NULL; - - oldTrace = to->focus->trace; - memcpy(to->focus, from->focus, sizeof(FocusClassRec)); - to->focus->trace = xrealloc(oldTrace, - to->focus->traceSize * sizeof(WindowPtr)); - if (!to->focus->trace && to->focus->traceSize) - FatalError("[Xi] no memory for trace.\n"); - memcpy(to->focus->trace, from->focus->trace, - from->focus->traceSize * sizeof(WindowPtr)); - } - } else if (to->focus) - { - ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); - classes->focus = to->focus; - to->focus = NULL; - } - if (from->proximity) { if (!to->proximity) @@ -705,6 +618,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) classes->proximity = NULL; } memcpy(to->proximity, from->proximity, sizeof(ProximityClassRec)); + to->proximity->sourceid = from->id; } else if (to->proximity) { ClassesPtr classes; @@ -729,15 +643,88 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) classes->absolute = NULL; } memcpy(to->absolute, from->absolute, sizeof(AbsoluteClassRec)); + to->absolute->sourceid = from->id; } else if (to->absolute) { - ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); - classes->absolute = to->absolute; - to->absolute = NULL; + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->absolute = to->absolute; + to->absolute = NULL; + } +} + +/** + * Copies the CONTENT of the classes of device from into the classes in device + * to. From and to are identical after finishing. + * + * If to does not have classes from currenly has, the classes are stored in + * to's devPrivates system. Later, we recover it again from there if needed. + * Saves a few memory allocations. + */ +void +DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, DeviceChangedEvent *dce) +{ + /* generic feedback classes, not tied to pointer and/or keyboard */ + DeepCopyFeedbackClasses(from, to); + + if ((dce->flags & DEVCHANGE_KEYBOARD_EVENT)) + DeepCopyKeyboardClasses(from, to); + if ((dce->flags & DEVCHANGE_POINTER_EVENT)) + DeepCopyPointerClasses(from, to); +} + + +/** + * Send an XI2 DeviceChangedEvent to all interested clients. + */ +void +XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, DeviceChangedEvent *dce) +{ + xXIDeviceChangedEvent *dcce; + int rc; + + rc = EventToXI2((InternalEvent*)dce, (xEvent**)&dcce); + if (rc != Success) + { + ErrorF("[Xi] event conversion from DCE failed with code %d\n", rc); + return; } + + /* we don't actually swap if there's a NullClient, swapping is done + * later when event is delivered. */ + SendEventToAllWindows(master, XI_DeviceChangedMask, (xEvent*)dcce, 1); + xfree(dcce); } +static void +ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce) +{ + DeviceIntPtr slave; + int rc; + + /* For now, we don't have devices that change physically. */ + if (!IsMaster(device)) + return; + + rc = dixLookupDevice(&slave, dce->sourceid, serverClient, DixReadAccess); + + if (rc != Success) + return; /* Device has disappeared */ + + if (!slave->u.master) + return; /* set floating since the event */ + + if (slave->u.master->id != dce->masterid) + return; /* not our slave anymore, don't care */ + + /* FIXME: we probably need to send a DCE for the new slave now */ + + device->public.devicePrivate = slave->public.devicePrivate; + + /* FIXME: the classes may have changed since we generated the event. */ + DeepCopyDeviceClasses(slave, device, dce); + XISendDeviceChangedEvent(slave, device, dce); +} /** * Update the device state according to the data in the event. @@ -745,147 +732,106 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) * return values are * DEFAULT ... process as normal * DONT_PROCESS ... return immediately from caller - * IS_REPEAT .. event is a repeat event. */ #define DEFAULT 0 #define DONT_PROCESS 1 -#define IS_REPEAT 2 int -UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) +UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) { int i; int key = 0, - bit = 0; + bit = 0, + last_valuator; KeyClassPtr k = NULL; ButtonClassPtr b = NULL; ValuatorClassPtr v = NULL; - deviceValuator *xV = (deviceValuator *) xE; BYTE *kptr = NULL; - CARD16 modifiers = 0, - mask = 0; - /* currently no other generic event modifies the device */ - if (xE->u.u.type == GenericEvent) - return DEFAULT; + /* This event is always the first we get, before the actual events with + * the data. However, the way how the DDX is set up, "device" will + * actually be the slave device that caused the event. + */ + switch(event->type) + { + case ET_DeviceChanged: + ChangeMasterDeviceClasses(device, (DeviceChangedEvent*)event); + return DONT_PROCESS; /* event has been sent already */ + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + break; + default: + /* other events don't update the device */ + return DEFAULT; + } k = device->key; v = device->valuator; b = device->button; + key = event->detail.key; + bit = 1 << (key & 7); - if (xE->u.u.type != DeviceValuator) + /* Update device axis */ + /* Check valuators first */ + last_valuator = -1; + for (i = 0; i < MAX_VALUATORS; i++) { - key = xE->u.u.detail; - bit = 1 << (key & 7); + if (BitIsOn(&event->valuators.mask, i)) + { + if (!v) + { + ErrorF("[Xi] Valuators reported for non-valuator device '%s'. " + "Ignoring event.\n", device->name); + return DONT_PROCESS; + } else if (v->numAxes < i) + { + ErrorF("[Xi] Too many valuators reported for device '%s'. " + "Ignoring event.\n", device->name); + return DONT_PROCESS; + } + last_valuator = i; + } } - /* Update device axis */ - /* Don't update valuators for the VCP, it never sends XI events anyway */ - for (i = 1; !device->isMaster && i < count; i++) { - if ((++xV)->type == DeviceValuator) { - int *axisvals; - int first = xV->first_valuator; - BOOL change = FALSE; - - - if (xV->num_valuators && - (!v || (xV->num_valuators && - (first + xV->num_valuators > v->numAxes)))) - FatalError("Bad valuators reported for device %s\n", - device->name); - if (v && v->axisVal) { - /* v->axisVal is always in absolute coordinates. Only the - * delivery mode changes. - * If device is mode Absolute - * dev = event - * If device is mode Relative - * swap = (event - device) - * dev = event - * event = delta - */ - int delta; - axisvals = v->axisVal; - if (v->mode == Relative) /* device reports relative */ - change = TRUE; - - switch (xV->num_valuators) { - case 6: - if (change) delta = xV->valuator5 - *(axisvals + first + 5); - *(axisvals + first + 5) = xV->valuator5; - if (change) xV->valuator5 = delta; - case 5: - if (change) delta = xV->valuator4 - *(axisvals + first + 4); - *(axisvals + first + 4) = xV->valuator4; - if (change) xV->valuator4 = delta; - case 4: - if (change) delta = xV->valuator3 - *(axisvals + first + 3); - *(axisvals + first + 3) = xV->valuator3; - if (change) xV->valuator3 = delta; - case 3: - if (change) delta = xV->valuator2 - *(axisvals + first + 2); - *(axisvals + first + 2) = xV->valuator2; - if (change) xV->valuator2 = delta; - case 2: - if (change) delta = xV->valuator1 - *(axisvals + first + 1); - *(axisvals + first + 1) = xV->valuator1; - if (change) xV->valuator1 = delta; - case 1: - if (change) delta = xV->valuator0 - *(axisvals + first); - *(axisvals + first) = xV->valuator0; - if (change) xV->valuator0 = delta; - case 0: - default: - break; - } - } - } + for (i = 0; i <= last_valuator && i < v->numAxes; i++) + { + if (BitIsOn(&event->valuators.mask, i)) + { + /* XXX: Relative/Absolute mode */ + v->axisVal[i] = event->valuators.data[i]; + v->axisVal[i] += event->valuators.data_frac[i]; + } } - if (xE->u.u.type == DeviceKeyPress) { + if (event->type == ET_KeyPress) { if (!k) return DONT_PROCESS; - modifiers = k->modifierMap[key]; kptr = &k->down[key >> 3]; - if (*kptr & bit) { /* allow ddx to generate multiple downs */ - return IS_REPEAT; - } + /* don't allow ddx to generate multiple downs, but repeats are okay */ + if ((*kptr & bit) && !event->key_repeat) + return DONT_PROCESS; if (device->valuator) device->valuator->motionHintWindow = NullWindow; *kptr |= bit; - k->prev_state = k->state; - for (i = 0, mask = 1; modifiers; i++, mask <<= 1) { - if (mask & modifiers) { - /* This key affects modifier "i" */ - k->modifierKeyCount[i]++; - k->state |= mask; - modifiers &= ~mask; - } - } - } else if (xE->u.u.type == DeviceKeyRelease) { + } else if (event->type == ET_KeyRelease) { if (!k) return DONT_PROCESS; kptr = &k->down[key >> 3]; if (!(*kptr & bit)) /* guard against duplicates */ return DONT_PROCESS; - modifiers = k->modifierMap[key]; if (device->valuator) device->valuator->motionHintWindow = NullWindow; *kptr &= ~bit; - k->prev_state = k->state; - for (i = 0, mask = 1; modifiers; i++, mask <<= 1) { - if (mask & modifiers) { - /* This key affects modifier "i" */ - if (--k->modifierKeyCount[i] <= 0) { - k->modifierKeyCount[i] = 0; - k->state &= ~mask; - } - modifiers &= ~mask; - } - } - } else if (xE->u.u.type == DeviceButtonPress) { + } else if (event->type == ET_ButtonPress) { + Mask mask; if (!b) return DONT_PROCESS; @@ -901,15 +847,21 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) b->motionMask = DeviceButtonMotionMask; if (b->map[key] <= 5) b->state |= (Button1Mask >> 1) << b->map[key]; - SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify); - } else if (xE->u.u.type == DeviceButtonRelease) { + + /* Add state and motionMask to the filter for this event */ + mask = DevicePointerMotionMask | b->state | b->motionMask; + SetMaskForEvent(device->id, mask, DeviceMotionNotify); + mask = PointerMotionMask | b->state | b->motionMask; + SetMaskForEvent(device->id, mask, MotionNotify); + } else if (event->type == ET_ButtonRelease) { + Mask mask; if (!b) return DONT_PROCESS; kptr = &b->down[key>>3]; if (!(*kptr & bit)) return DONT_PROCESS; - if (device->isMaster) { + if (IsMaster(device)) { DeviceIntPtr sd; /* @@ -918,7 +870,9 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) * event being delivered through the slave first */ for (sd = inputInfo.devices; sd; sd = sd->next) { - if (sd->isMaster || sd->u.master != device) + if (IsMaster(sd) || sd->u.master != device) + continue; + if (!sd->button) continue; if ((sd->button->down[key>>3] & bit) != 0) return DONT_PROCESS; @@ -933,35 +887,76 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) b->motionMask = 0; if (b->map[key] <= 5) b->state &= ~((Button1Mask >> 1) << b->map[key]); - SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify); - } else if (xE->u.u.type == ProximityIn) + + /* Add state and motionMask to the filter for this event */ + mask = DevicePointerMotionMask | b->state | b->motionMask; + SetMaskForEvent(device->id, mask, DeviceMotionNotify); + mask = PointerMotionMask | b->state | b->motionMask; + SetMaskForEvent(device->id, mask, MotionNotify); + } else if (event->type == ET_ProximityIn) device->valuator->mode &= ~OutOfProximity; - else if (xE->u.u.type == ProximityOut) + else if (event->type == ET_ProximityOut) device->valuator->mode |= OutOfProximity; return DEFAULT; } +static void +ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device) +{ + GrabPtr grab = device->deviceGrab.grab; + + if (grab) + DeliverGrabbedEvent((InternalEvent*)ev, device, FALSE); + else { /* deliver to all root windows */ + xEvent *xi; + int i; + + i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi); + if (i != Success) + { + ErrorF("[Xi] %s: XI2 conversion failed in ProcessRawEvent (%d)\n", + device->name, i); + return; + } + + for (i = 0; i < screenInfo.numScreens; i++) + DeliverEventsToWindow(device, WindowTable[i], xi, 1, + GetEventFilter(device, xi), NULL); + xfree(xi); + } +} + /** * Main device event processing function. * Called from when processing the events from the event queue. * */ void -ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) +ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) { - int i; - CARD16 modifiers; - GrabPtr grab = device->deviceGrab.grab; + GrabPtr grab; Bool deactivateDeviceGrab = FALSE; int key = 0, rootX, rootY; ButtonClassPtr b; KeyClassPtr k; ValuatorClassPtr v; - deviceValuator *xV = (deviceValuator *) xE; int ret = 0; - int state; + int state, i; DeviceIntPtr mouse = NULL, kbd = NULL; + DeviceEvent *event = (DeviceEvent*)ev; + + CHECKEVENT(ev); + + if (ev->any.type == ET_RawKeyPress || + ev->any.type == ET_RawKeyRelease || + ev->any.type == ET_RawButtonPress || + ev->any.type == ET_RawButtonRelease || + ev->any.type == ET_RawMotion) + { + ProcessRawEvent((RawDeviceEvent*)ev, device); + return; + } if (IsPointerDevice(device)) { @@ -978,10 +973,34 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) } /* State needs to be assembled BEFORE the device is updated. */ - state = (kbd) ? kbd->key->state : 0; - state |= (mouse) ? (mouse->button->state) : 0; + state = (kbd && kbd->key) ? XkbStateFieldFromRec(&kbd->key->xkbInfo->state) : 0; + state |= (mouse && mouse->button) ? (mouse->button->state) : 0; + + for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) + if (BitIsOn(mouse->button->down, i)) + SetBit(event->buttons, i); - ret = UpdateDeviceState(device, xE, count); + if (kbd && kbd->key) + { + XkbStatePtr state; + /* we need the state before the event happens */ + if (event->type == ET_KeyPress || event->type == ET_KeyRelease) + state = &kbd->key->xkbInfo->prev_state; + else + state = &kbd->key->xkbInfo->state; + + event->mods.base = state->base_mods; + event->mods.latched = state->latched_mods; + event->mods.locked = state->locked_mods; + event->mods.effective = state->mods; + + event->group.base = state->base_group; + event->group.latched = state->latched_group; + event->group.locked = state->locked_group; + event->group.effective = state->group; + } + + ret = UpdateDeviceState(device, event); if (ret == DONT_PROCESS) return; @@ -989,19 +1008,31 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) b = device->button; k = device->key; - if (device->isMaster) - CheckMotion(xE, device); - - if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { - GetSpritePosition(device, &rootX, &rootY); - xE->u.keyButtonPointer.rootX = rootX; - xE->u.keyButtonPointer.rootY = rootY; - NoticeEventTime(xE); + if (IsMaster(device) || !device->u.master) + CheckMotion(event, device); - xE->u.keyButtonPointer.state = state; - - key = xE->u.u.detail; + switch (event->type) + { + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + GetSpritePosition(device, &rootX, &rootY); + event->root_x = rootX; + event->root_y = rootY; + NoticeEventTime((InternalEvent*)event); + event->corestate = state; + key = event->detail.key; + break; + default: + break; } + +#if 0 + /* FIXME: I'm broken. Please fix me. Thanks */ if (DeviceEventCallback) { DeviceEventInfoRec eventinfo; @@ -1009,84 +1040,70 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) eventinfo.count = count; CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); } +#endif + grab = device->deviceGrab.grab; - /* Valuator event handling */ - /* Don't care about valuators for the VCP, it never sends XI events */ - - for (i = 1; !device->isMaster && i < count; i++) { - if ((++xV)->type == DeviceValuator) { - int first = xV->first_valuator; - if (xV->num_valuators - && (!v - || (xV->num_valuators - && (first + xV->num_valuators > v->numAxes)))) - FatalError("Bad valuators reported for device %s\n", - device->name); - xV->device_state = 0; - if (k) - xV->device_state |= k->state; - if (b) - xV->device_state |= b->state; - } + switch(event->type) + { + case ET_KeyPress: + if (!grab && CheckDeviceGrabs(device, event, 0)) { + device->deviceGrab.activatingKey = key; + return; + } + break; + case ET_KeyRelease: + if (grab && device->deviceGrab.fromPassiveGrab && + (key == device->deviceGrab.activatingKey) && + (device->deviceGrab.grab->type == KeyPress || + device->deviceGrab.grab->type == DeviceKeyPress || + device->deviceGrab.grab->type == XI_KeyPress)) + deactivateDeviceGrab = TRUE; + break; + case ET_ButtonPress: + event->detail.button = b->map[key]; + if (!event->detail.button) { /* there's no button 0 */ + event->detail.button = key; + return; + } + if (!grab && CheckDeviceGrabs(device, event, 0)) + { + /* if a passive grab was activated, the event has been sent + * already */ + return; + } + break; + case ET_ButtonRelease: + event->detail.button = b->map[key]; + if (!event->detail.button) { /* there's no button 0 */ + event->detail.button = key; + return; + } + if (grab && !b->buttonsDown && + device->deviceGrab.fromPassiveGrab && + (device->deviceGrab.grab->type == ButtonPress || + device->deviceGrab.grab->type == DeviceButtonPress || + device->deviceGrab.grab->type == XI_ButtonPress)) + deactivateDeviceGrab = TRUE; + default: + break; } - if (xE->u.u.type == DeviceKeyPress) { - if (ret == IS_REPEAT) { /* allow ddx to generate multiple downs */ - modifiers = k->modifierMap[key]; - if (!modifiers) { - xE->u.u.type = DeviceKeyRelease; - ProcessOtherEvent(xE, device, count); - xE->u.u.type = DeviceKeyPress; - /* release can have side effects, don't fall through */ - ProcessOtherEvent(xE, device, count); - } - return; - } - if (!grab && CheckDeviceGrabs(device, xE, 0, count)) { - device->deviceGrab.activatingKey = key; - return; - } - } else if (xE->u.u.type == DeviceKeyRelease) { - if (device->deviceGrab.fromPassiveGrab && - (key == device->deviceGrab.activatingKey)) - deactivateDeviceGrab = TRUE; - } else if (xE->u.u.type == DeviceButtonPress) { - xE->u.u.detail = b->map[key]; - if (xE->u.u.detail == 0) { - xE->u.u.detail = key; - return; - } - if (!grab && CheckDeviceGrabs(device, xE, 0, count)) - { - /* if a passive grab was activated, the event has been sent - * already */ - return; - } - - } else if (xE->u.u.type == DeviceButtonRelease) { - xE->u.u.detail = b->map[key]; - if (xE->u.u.detail == 0) { - xE->u.u.detail = key; - return; - } - if (!b->buttonsDown && device->deviceGrab.fromPassiveGrab) - deactivateDeviceGrab = TRUE; - } if (grab) - DeliverGrabbedEvent(xE, device, deactivateDeviceGrab, count); - else if (device->focus && !IsPointerEvent(xE)) - DeliverFocusedEvent(device, xE, GetSpriteWindow(device), count); + DeliverGrabbedEvent((InternalEvent*)event, device, deactivateDeviceGrab); + else if (device->focus && !IsPointerEvent((InternalEvent*)ev)) + DeliverFocusedEvent(device, (InternalEvent*)event, + GetSpriteWindow(device)); else - DeliverDeviceEvents(GetSpriteWindow(device), xE, NullGrab, NullWindow, - device, count); + DeliverDeviceEvents(GetSpriteWindow(device), (InternalEvent*)event, + NullGrab, NullWindow, device); if (deactivateDeviceGrab == TRUE) (*device->deviceGrab.DeactivateGrab) (device); - xE->u.u.detail = key; + event->detail.key = key; } -_X_EXPORT int +int InitProximityClassDeviceStruct(DeviceIntPtr dev) { ProximityClassPtr proxc; @@ -1094,6 +1111,7 @@ InitProximityClassDeviceStruct(DeviceIntPtr dev) proxc = (ProximityClassPtr) xalloc(sizeof(ProximityClassRec)); if (!proxc) return FALSE; + proxc->sourceid = dev->id; dev->proximity = proxc; return TRUE; } @@ -1107,14 +1125,16 @@ InitProximityClassDeviceStruct(DeviceIntPtr dev) * * @see InitValuatorClassDeviceStruct */ -_X_EXPORT void -InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, +void +InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval, int resolution, int min_res, int max_res) { AxisInfoPtr ax; if (!dev || !dev->valuator || minval > maxval) return; + if (axnum >= dev->valuator->numAxes) + return; ax = dev->valuator->axes + axnum; @@ -1123,6 +1143,7 @@ InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, ax->resolution = resolution; ax->min_resolution = min_res; ax->max_resolution = max_res; + ax->label = label; } static void @@ -1143,7 +1164,8 @@ FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k, memcpy((char*)ev->buttons, (char*)b->down, 4); } else if (k) { ev->classes_reported |= (1 << KeyClass); - ev->num_keys = k->curKeySyms.maxKeyCode - k->curKeySyms.minKeyCode; + ev->num_keys = k->xkbInfo->desc->max_key_code - + k->xkbInfo->desc->min_key_code; memmove((char *)&ev->keys[0], (char *)k->down, 4); } if (v) { @@ -1191,21 +1213,65 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) { deviceFocus event; + xXIFocusInEvent *xi2event; + DeviceIntPtr mouse; + int btlen, len, i; + + mouse = (IsMaster(dev) || dev->u.master) ? GetMaster(dev, MASTER_POINTER) : dev; + + /* XI 2 event */ + btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0; + btlen = bytes_to_int32(btlen); + len = sizeof(xXIFocusInEvent) + btlen * 4; + + xi2event = xcalloc(1, len); + xi2event->type = GenericEvent; + xi2event->extension = IReqCode; + xi2event->evtype = type; + xi2event->length = bytes_to_int32(len - sizeof(xEvent)); + xi2event->buttons_len = btlen; + xi2event->detail = detail; + xi2event->time = currentTime.milliseconds; + xi2event->deviceid = dev->id; + xi2event->sourceid = dev->id; /* a device doesn't change focus by itself */ + xi2event->mode = mode; + xi2event->root_x = FP1616(mouse->spriteInfo->sprite->hot.x, 0); + xi2event->root_y = FP1616(mouse->spriteInfo->sprite->hot.y, 0); + + for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) + if (BitIsOn(mouse->button->down, i)) + SetBit(&xi2event[1], i); + + if (dev->key) + { + xi2event->mods.base_mods = dev->key->xkbInfo->state.base_mods; + xi2event->mods.latched_mods = dev->key->xkbInfo->state.latched_mods; + xi2event->mods.locked_mods = dev->key->xkbInfo->state.locked_mods; + xi2event->mods.effective_mods = dev->key->xkbInfo->state.mods; + + xi2event->group.base_group = dev->key->xkbInfo->state.base_group; + xi2event->group.latched_group = dev->key->xkbInfo->state.latched_group; + xi2event->group.locked_group = dev->key->xkbInfo->state.locked_group; + xi2event->group.effective_group = dev->key->xkbInfo->state.group; + } - if (type == FocusIn) - type = DeviceFocusIn; - else - type = DeviceFocusOut; + FixUpEventFromWindow(dev, (xEvent*)xi2event, pWin, None, FALSE); + + DeliverEventsToWindow(dev, pWin, (xEvent*)xi2event, 1, + GetEventFilter(dev, (xEvent*)xi2event), NullGrab); + xfree(xi2event); + + /* XI 1.x event */ event.deviceid = dev->id; event.mode = mode; - event.type = type; + event.type = (type == XI_FocusIn) ? DeviceFocusIn : DeviceFocusOut; event.detail = detail; event.window = pWin->drawable.id; event.time = currentTime.milliseconds; - (void)DeliverEventsToWindow(dev, pWin, (xEvent *) & event, 1, - DeviceFocusChangeMask, NullGrab, dev->id); + DeliverEventsToWindow(dev, pWin, (xEvent *) & event, 1, + DeviceFocusChangeMask, NullGrab); if ((type == DeviceFocusIn) && (wOtherInputMasks(pWin)) && @@ -1227,7 +1293,8 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, evcount++; } if ((k = dev->key) != NULL) { - nkeys = k->curKeySyms.maxKeyCode - k->curKeySyms.minKeyCode; + nkeys = k->xkbInfo->desc->max_key_code - + k->xkbInfo->desc->min_key_code; if (nkeys > 32) evcount++; if (nbuttons > 0) { @@ -1300,147 +1367,203 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, } } - (void)DeliverEventsToWindow(dev, pWin, (xEvent *) sev, evcount, - DeviceStateNotifyMask, NullGrab, dev->id); + DeliverEventsToWindow(dev, pWin, (xEvent *) sev, evcount, + DeviceStateNotifyMask, NullGrab); xfree(sev); } } int -GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, - BYTE other_devices_mode, CARD16 modifiers, - DeviceIntPtr modifier_device, CARD8 button, Window grabWindow, - BOOL ownerEvents, Cursor rcursor, Window rconfineTo, Mask eventMask) +CheckGrabValues(ClientPtr client, GrabParameters* param) { - WindowPtr pWin, confineTo; - CursorPtr cursor; - GrabPtr grab; - Mask access_mode = DixGrabAccess; - int rc; + if (param->grabtype != GRABTYPE_CORE && + param->grabtype != GRABTYPE_XI && + param->grabtype != GRABTYPE_XI2) + { + ErrorF("[Xi] grabtype is invalid. This is a bug.\n"); + return BadImplementation; + } - if ((this_device_mode != GrabModeSync) && - (this_device_mode != GrabModeAsync)) { - client->errorValue = this_device_mode; + if ((param->this_device_mode != GrabModeSync) && + (param->this_device_mode != GrabModeAsync)) { + client->errorValue = param->this_device_mode; return BadValue; } - if ((other_devices_mode != GrabModeSync) && - (other_devices_mode != GrabModeAsync)) { - client->errorValue = other_devices_mode; + if ((param->other_devices_mode != GrabModeSync) && + (param->other_devices_mode != GrabModeAsync)) { + client->errorValue = param->other_devices_mode; return BadValue; } - if ((modifiers != AnyModifier) && (modifiers & ~AllModifiersMask)) { - client->errorValue = modifiers; + + if (param->grabtype != GRABTYPE_XI2 && (param->modifiers != AnyModifier) && + (param->modifiers & ~AllModifiersMask)) { + client->errorValue = param->modifiers; return BadValue; } - if ((ownerEvents != xFalse) && (ownerEvents != xTrue)) { - client->errorValue = ownerEvents; + + if ((param->ownerEvents != xFalse) && (param->ownerEvents != xTrue)) { + client->errorValue = param->ownerEvents; return BadValue; } - rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess); + return Success; +} + +int +GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, + int button, GrabParameters *param, GrabType grabtype, + GrabMask *mask) +{ + WindowPtr pWin, confineTo; + CursorPtr cursor; + GrabPtr grab; + int rc, type = -1; + Mask access_mode = DixGrabAccess; + + rc = CheckGrabValues(client, param); if (rc != Success) return rc; - if (rconfineTo == None) + if (param->confineTo == None) confineTo = NullWindow; else { - rc = dixLookupWindow(&confineTo, rconfineTo, client, DixSetAttrAccess); + rc = dixLookupWindow(&confineTo, param->confineTo, client, DixSetAttrAccess); if (rc != Success) return rc; } - if (rcursor == None) + if (param->cursor == None) cursor = NullCursor; else { - rc = dixLookupResourceByType((pointer *)&cursor, rcursor, RT_CURSOR, - client, DixUseAccess); + rc = dixLookupResourceByType((pointer *)&cursor, param->cursor, + RT_CURSOR, client, DixUseAccess); if (rc != Success) { - client->errorValue = rcursor; + client->errorValue = param->cursor; return (rc == BadValue) ? BadCursor : rc; } access_mode |= DixForceAccess; } - if (this_device_mode == GrabModeSync || other_devices_mode == GrabModeSync) + if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync) access_mode |= DixFreezeAccess; rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; - grab = CreateGrab(client->index, dev, pWin, eventMask, - (Bool) ownerEvents, (Bool) this_device_mode, - (Bool) other_devices_mode, modifier_device, modifiers, - DeviceButtonPress, button, confineTo, cursor); + if (grabtype == GRABTYPE_XI) + type = DeviceButtonPress; + else if (grabtype == GRABTYPE_XI2) + type = XI_ButtonPress; + + grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype, + mask, param, type, button, confineTo, cursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); } +/** + * Grab the given key. If grabtype is GRABTYPE_XI, the key is a keycode. If + * grabtype is GRABTYPE_XI2, the key is a keysym. + */ int -GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, - BYTE other_devices_mode, CARD16 modifiers, - DeviceIntPtr modifier_device, CARD8 key, Window grabWindow, - BOOL ownerEvents, Mask mask) +GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, + int key, GrabParameters *param, GrabType grabtype, GrabMask *mask) { WindowPtr pWin; GrabPtr grab; KeyClassPtr k = dev->key; Mask access_mode = DixGrabAccess; - int rc; + int rc, type = -1; + rc = CheckGrabValues(client, param); + if (rc != Success) + return rc; if (k == NULL) return BadMatch; - if ((other_devices_mode != GrabModeSync) && - (other_devices_mode != GrabModeAsync)) { - client->errorValue = other_devices_mode; - return BadValue; - } - if ((this_device_mode != GrabModeSync) && - (this_device_mode != GrabModeAsync)) { - client->errorValue = this_device_mode; - return BadValue; - } - if (((key > k->curKeySyms.maxKeyCode) || (key < k->curKeySyms.minKeyCode)) - && (key != AnyKey)) { - client->errorValue = key; - return BadValue; - } - if ((modifiers != AnyModifier) && (modifiers & ~AllModifiersMask)) { - client->errorValue = modifiers; - return BadValue; - } - if ((ownerEvents != xTrue) && (ownerEvents != xFalse)) { - client->errorValue = ownerEvents; - return BadValue; - } - rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess); + if (grabtype == GRABTYPE_XI) + { + if ((key > k->xkbInfo->desc->max_key_code || + key < k->xkbInfo->desc->min_key_code) + && (key != AnyKey)) { + client->errorValue = key; + return BadValue; + } + type = DeviceKeyPress; + } else if (grabtype == GRABTYPE_XI2) + type = XI_KeyPress; + + rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; - if (this_device_mode == GrabModeSync || other_devices_mode == GrabModeSync) + if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync) access_mode |= DixFreezeAccess; rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); if (rc != Success) return rc; - grab = CreateGrab(client->index, dev, pWin, - mask, ownerEvents, this_device_mode, other_devices_mode, - modifier_device, modifiers, DeviceKeyPress, key, - NullWindow, NullCursor); + grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype, + mask, param, type, key, NULL, NULL); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); } +/* Enter/FocusIn grab */ +int +GrabWindow(ClientPtr client, DeviceIntPtr dev, int type, + GrabParameters *param, GrabMask *mask) +{ + WindowPtr pWin; + CursorPtr cursor; + GrabPtr grab; + Mask access_mode = DixGrabAccess; + int rc; + + rc = CheckGrabValues(client, param); + if (rc != Success) + return rc; + + rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + if (param->cursor == None) + cursor = NullCursor; + else { + rc = dixLookupResourceByType((pointer *)&cursor, param->cursor, + RT_CURSOR, client, DixUseAccess); + if (rc != Success) + { + client->errorValue = param->cursor; + return (rc == BadValue) ? BadCursor : rc; + } + access_mode |= DixForceAccess; + } + if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc != Success) + return rc; + + grab = CreateGrab(client->index, dev, dev, pWin, GRABTYPE_XI2, + mask, param, (type == XIGrabtypeEnter) ? XI_Enter : XI_FocusIn, + 0, NULL, cursor); + + if (!grab) + return BadAlloc; + + return AddPassiveGrabToList(client, grab); +} + int SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client, - Mask mask, Mask exclusivemasks, Mask validmasks) + Mask mask, Mask exclusivemasks) { int mskidx = dev->id; int i, ret; Mask check; InputClientsPtr others; - if (mask & ~validmasks) { - client->errorValue = mask; - return BadValue; - } check = (mask & exclusivemasks); if (wOtherInputMasks(pWin)) { if (check & wOtherInputMasks(pWin)->inputEvents[mskidx]) { /* It is illegal for two different @@ -1528,15 +1651,20 @@ RecalculateDeviceDeliverableEvents(WindowPtr pWin) InputClientsPtr others; struct _OtherInputMasks *inputMasks; /* default: NULL */ WindowPtr pChild, tmp; - int i; + int i, j; pChild = pWin; while (1) { if ((inputMasks = wOtherInputMasks(pChild)) != 0) { + for (i = 0; i < EMASKSIZE; i++) + memset(inputMasks->xi2mask[i], 0, sizeof(inputMasks->xi2mask[i])); for (others = inputMasks->inputClients; others; others = others->next) { for (i = 0; i < EMASKSIZE; i++) inputMasks->inputEvents[i] |= others->mask[i]; + for (i = 0; i < EMASKSIZE; i++) + for (j = 0; j < XI2MASKSIZE; j++) + inputMasks->xi2mask[i][j] |= others->xi2mask[i][j]; } for (i = 0; i < EMASKSIZE; i++) inputMasks->deliverableEvents[i] = inputMasks->inputEvents[i]; @@ -1644,7 +1772,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, ev->u.u.type |= 0x80; if (propagate) { for (; pWin; pWin = pWin->parent) { - if (DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab, d->id)) + if (DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab)) return Success; if (pWin == effectiveFocus) return Success; @@ -1654,7 +1782,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, break; } } else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, ev, count)) - (void)(DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab, d->id)); + DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab); return Success; } @@ -1681,111 +1809,6 @@ SetButtonMapping(ClientPtr client, DeviceIntPtr dev, int nElts, BYTE * map) return Success; } -int -SetModifierMapping(ClientPtr client, DeviceIntPtr dev, int len, int rlen, - int numKeyPerModifier, KeyCode * inputMap, KeyClassPtr * k) -{ - KeyCode *map = NULL; - int inputMapLen; - int i; - - *k = dev->key; - if (*k == NULL) - return BadMatch; - if (len != ((numKeyPerModifier << 1) + rlen)) - return BadLength; - - inputMapLen = 8 * numKeyPerModifier; - - /* - * Now enforce the restriction that "all of the non-zero keycodes must be - * in the range specified by min-keycode and max-keycode in the - * connection setup (else a Value error)" - */ - i = inputMapLen; - while (i--) { - if (inputMap[i] - && (inputMap[i] < (*k)->curKeySyms.minKeyCode - || inputMap[i] > (*k)->curKeySyms.maxKeyCode)) { - client->errorValue = inputMap[i]; - return -1; /* BadValue collides with MappingFailed */ - } - } - - /* - * Now enforce the restriction that none of the old or new - * modifier keys may be down while we change the mapping, and - * that the DDX layer likes the choice. - */ - if (!AllModifierKeysAreUp(dev, (*k)->modifierKeyMap, - (int)(*k)->maxKeysPerModifier, inputMap, - (int)numKeyPerModifier) - || !AllModifierKeysAreUp(dev, inputMap, (int)numKeyPerModifier, - (*k)->modifierKeyMap, - (int)(*k)->maxKeysPerModifier)) { - return MappingBusy; - } else { - for (i = 0; i < inputMapLen; i++) { - if (inputMap[i] && !LegalModifier(inputMap[i], dev)) { - return MappingFailed; - } - } - } - - /* - * Now build the keyboard's modifier bitmap from the - * list of keycodes. - */ - if (inputMapLen) { - map = (KeyCode *) xalloc(inputMapLen); - if (!map) - return BadAlloc; - } - if ((*k)->modifierKeyMap) - xfree((*k)->modifierKeyMap); - if (inputMapLen) { - (*k)->modifierKeyMap = map; - memmove((char *)(*k)->modifierKeyMap, (char *)inputMap, inputMapLen); - } else - (*k)->modifierKeyMap = NULL; - - (*k)->maxKeysPerModifier = numKeyPerModifier; - for (i = 0; i < MAP_LENGTH; i++) - (*k)->modifierMap[i] = 0; - for (i = 0; i < inputMapLen; i++) - if (inputMap[i]) { - (*k)->modifierMap[inputMap[i]] - |= (1 << (i / (*k)->maxKeysPerModifier)); - } - - return (MappingSuccess); -} - -void -SendDeviceMappingNotify(ClientPtr client, CARD8 request, - KeyCode firstKeyCode, CARD8 count, DeviceIntPtr dev) -{ - xEvent event; - deviceMappingNotify *ev = (deviceMappingNotify *) & event; - - ev->type = DeviceMappingNotify; - ev->request = request; - ev->deviceid = dev->id; - ev->time = currentTime.milliseconds; - if (request == MappingKeyboard) { - ev->firstKeyCode = firstKeyCode; - ev->count = count; - } - -#ifdef XKB - if (!noXkbExtension && (request == MappingKeyboard || - request == MappingModifier)) - XkbApplyMappingChange(dev, request, firstKeyCode, count, client); -#endif - - SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) ev, 1); -} - int ChangeKeyMapping(ClientPtr client, DeviceIntPtr dev, @@ -1803,8 +1826,8 @@ ChangeKeyMapping(ClientPtr client, if (len != (keyCodes * keySymsPerKeyCode)) return BadLength; - if ((firstKeyCode < k->curKeySyms.minKeyCode) || - (firstKeyCode + keyCodes - 1 > k->curKeySyms.maxKeyCode)) { + if ((firstKeyCode < k->xkbInfo->desc->min_key_code) || + (firstKeyCode + keyCodes - 1 > k->xkbInfo->desc->max_key_code)) { client->errorValue = firstKeyCode; return BadValue; } @@ -1816,9 +1839,10 @@ ChangeKeyMapping(ClientPtr client, keysyms.maxKeyCode = firstKeyCode + keyCodes - 1; keysyms.mapWidth = keySymsPerKeyCode; keysyms.map = map; - if (!SetKeySymsMap(&k->curKeySyms, &keysyms)) - return BadAlloc; - SendDeviceMappingNotify(client, MappingKeyboard, firstKeyCode, keyCodes, dev); + + XkbApplyMappingChange(dev, &keysyms, firstKeyCode, keyCodes, NULL, + serverClient); + return client->noClientException; } @@ -1847,7 +1871,8 @@ DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) switch (dev->focus->revert) { case RevertToNone: - DoFocusEvents(dev, pWin, NoneWin, focusEventMode); + if (!ActivateFocusInGrab(dev, pWin, NoneWin)) + DoFocusEvents(dev, pWin, NoneWin, focusEventMode); dev->focus->win = NoneWin; dev->focus->traceGood = 0; break; @@ -1858,26 +1883,34 @@ DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) dev->focus->traceGood--; } while (!parent->realized); - DoFocusEvents(dev, pWin, parent, focusEventMode); + if (!ActivateFocusInGrab(dev, pWin, parent)) + DoFocusEvents(dev, pWin, parent, focusEventMode); dev->focus->win = parent; dev->focus->revert = RevertToNone; break; case RevertToPointerRoot: - DoFocusEvents(dev, pWin, PointerRootWin, focusEventMode); + if (!ActivateFocusInGrab(dev, pWin, PointerRootWin)) + DoFocusEvents(dev, pWin, PointerRootWin, focusEventMode); dev->focus->win = PointerRootWin; dev->focus->traceGood = 0; break; case RevertToFollowKeyboard: - if (inputInfo.keyboard->focus->win) { - DoFocusEvents(dev, pWin, inputInfo.keyboard->focus->win, - focusEventMode); + { + DeviceIntPtr kbd = GetMaster(dev, MASTER_KEYBOARD); + if (!kbd || (kbd == dev && kbd != inputInfo.keyboard)) + kbd = inputInfo.keyboard; + if (kbd->focus->win) { + if (!ActivateFocusInGrab(dev, pWin, kbd->focus->win)) + DoFocusEvents(dev, pWin, kbd->focus->win, focusEventMode); dev->focus->win = FollowKeyboardWin; dev->focus->traceGood = 0; } else { - DoFocusEvents(dev, pWin, NoneWin, focusEventMode); + if (!ActivateFocusInGrab(dev, pWin, NoneWin)) + DoFocusEvents(dev, pWin, NoneWin, focusEventMode); dev->focus->win = NoneWin; dev->focus->traceGood = 0; } + } break; } } @@ -1896,8 +1929,6 @@ DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources) struct _OtherInputMasks *inputMasks; for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev == inputInfo.pointer || dev == inputInfo.keyboard) - continue; DeleteDeviceFromAnyExtEvents(pWin, dev); } @@ -1944,7 +1975,7 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, DeviceIntPtr dev; dixLookupDevice(&dev, xE->deviceid & DEVICE_BITS, serverClient, - DixReadAccess); + DixGrabAccess); if (!dev) return; @@ -1964,7 +1995,6 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, tempGrab.pointerMode = GrabModeAsync; tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; - tempGrab.genericMasks = NULL; tempGrab.next = NULL; (*dev->deviceGrab.ActivateGrab) (dev, &tempGrab, currentTime, TRUE); } @@ -2063,7 +2093,7 @@ FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask, while (p1) { p2 = p1->firstChild; - (void)DeliverEventsToWindow(dev, p1, ev, count, mask, NullGrab, dev->id); + DeliverEventsToWindow(dev, p1, ev, count, mask, NullGrab); FindInterestedChildren(dev, p2, mask, ev, count); p1 = p1->nextSib; } @@ -2085,9 +2115,56 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count) pWin = WindowTable[i]; if (!pWin) continue; - (void)DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab, dev->id); + DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab); p1 = pWin->firstChild; FindInterestedChildren(dev, p1, mask, ev, count); } } +/** + * Set the XI2 mask for the given client on the given window. + * @param dev The device to set the mask for. + * @param win The window to set the mask on. + * @param client The client setting the mask. + * @param len Number of bytes in mask. + * @param mask Event mask in the form of (1 << eventtype) + */ +int +XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, + unsigned int len, unsigned char* mask) +{ + OtherInputMasks *masks; + InputClientsPtr others = NULL; + + masks = wOtherInputMasks(win); + if (masks) + { + for (others = wOtherInputMasks(win)->inputClients; others; + others = others->next) { + if (SameClient(others, client)) { + memset(others->xi2mask[dev->id], 0, + sizeof(others->xi2mask[dev->id])); + break; + } + } + } + + len = min(len, sizeof(others->xi2mask[dev->id])); + + if (len && !others) + { + if (AddExtensionClient(win, client, 0, 0) != Success) + return BadAlloc; + others= wOtherInputMasks(win)->inputClients; + } + + if (others) + memset(others->xi2mask[dev->id], 0, sizeof(others->xi2mask[dev->id])); + + if (len) + memcpy(others->xi2mask[dev->id], mask, len); + + RecalculateDeviceDeliverableEvents(win); + + return Success; +} diff --git a/xorg-server/Xi/exglobals.h b/xorg-server/Xi/exglobals.h index 42a695356..2d2d25c0b 100644 --- a/xorg-server/Xi/exglobals.h +++ b/xorg-server/Xi/exglobals.h @@ -43,18 +43,19 @@ extern int BadMode; extern int DeviceBusy; extern int BadClass; -extern Mask DevicePointerMotionMask; -extern Mask DevicePointerMotionHintMask; -extern Mask DeviceFocusChangeMask; -extern Mask DeviceStateNotifyMask; -extern Mask DeviceMappingNotifyMask; -extern Mask DeviceOwnerGrabButtonMask; -extern Mask DeviceButtonGrabMask; -extern Mask DeviceButtonMotionMask; -extern Mask DevicePresenceNotifyMask; -extern Mask DevicePropertyNotifyMask; -extern Mask DeviceEnterWindowMask; -extern Mask DeviceLeaveWindowMask; +/* Note: only the ones needed in files other than extinit.c are declared */ +extern const Mask DevicePointerMotionMask; +extern const Mask DevicePointerMotionHintMask; +extern const Mask DeviceFocusChangeMask; +extern const Mask DeviceStateNotifyMask; +extern const Mask DeviceMappingNotifyMask; +extern const Mask DeviceOwnerGrabButtonMask; +extern const Mask DeviceButtonGrabMask; +extern const Mask DeviceButtonMotionMask; +extern const Mask DevicePresenceNotifyMask; +extern const Mask DevicePropertyNotifyMask; +extern const Mask XIAllMasks; + extern Mask PropagateMask[]; extern int DeviceValuator; @@ -74,8 +75,6 @@ extern int DeviceMappingNotify; extern int ChangeDeviceNotify; extern int DevicePresenceNotify; extern int DevicePropertyNotify; -extern int DeviceEnterNotify; -extern int DeviceLeaveNotify; extern int RT_INPUTCLIENT; diff --git a/xorg-server/Xi/extinit.c b/xorg-server/Xi/extinit.c index 14eb3cbe1..84b999c0c 100644 --- a/xorg-server/Xi/extinit.c +++ b/xorg-server/Xi/extinit.c @@ -52,8 +52,6 @@ SOFTWARE. #define NUMTYPES 15 -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -63,6 +61,7 @@ SOFTWARE. #include "extnsionst.h" /* extension entry */ #include #include +#include #include #include "geext.h" /* extension interfaces for ge */ @@ -112,12 +111,53 @@ SOFTWARE. #include "ungrdev.h" #include "ungrdevb.h" #include "ungrdevk.h" +#include "xiallowev.h" +#include "xiselectev.h" +#include "xigrabdev.h" +#include "xipassivegrab.h" +#include "xisetdevfocus.h" #include "xiproperty.h" +#include "xichangecursor.h" +#include "xichangehierarchy.h" +#include "xigetclientpointer.h" +#include "xiquerydevice.h" +#include "xiquerypointer.h" +#include "xiqueryversion.h" +#include "xisetclientpointer.h" +#include "xiwarppointer.h" + + +/* Masks for XI events have to be aligned with core event (partially anyway). + * If DeviceButtonMotionMask is != ButtonMotionMask, event delivery + * breaks down. The device needs the dev->button->motionMask. If DBMM is + * the same as BMM, we can ensure that both core and device events can be + * delivered, without the need for extra structures in the DeviceIntRec. */ +const Mask DeviceKeyPressMask = KeyPressMask; +const Mask DeviceKeyReleaseMask = KeyReleaseMask; +const Mask DeviceButtonPressMask = ButtonPressMask; +const Mask DeviceButtonReleaseMask = ButtonReleaseMask; +const Mask DeviceProximityMask = (1L << 4); +const Mask DeviceStateNotifyMask = (1L << 5); +const Mask DevicePointerMotionMask = PointerMotionMask; +const Mask DevicePointerMotionHintMask = PointerMotionHintMask; +const Mask DeviceButton1MotionMask = Button1MotionMask; +const Mask DeviceButton2MotionMask = Button2MotionMask; +const Mask DeviceButton3MotionMask = Button3MotionMask; +const Mask DeviceButton4MotionMask = Button4MotionMask; +const Mask DeviceButton5MotionMask = Button5MotionMask; +const Mask DeviceButtonMotionMask = ButtonMotionMask; +const Mask DeviceFocusChangeMask = (1L << 14); +const Mask DeviceMappingNotifyMask = (1L << 15); +const Mask ChangeDeviceNotifyMask = (1L << 16); +const Mask DeviceButtonGrabMask = (1L << 17); +const Mask DeviceOwnerGrabButtonMask = (1L << 17); +const Mask DevicePresenceNotifyMask = (1L << 18); +const Mask DeviceEnterWindowMask = (1L << 18); +const Mask DeviceLeaveWindowMask = (1L << 19); +const Mask DevicePropertyNotifyMask = (1L << 20); +const Mask XIAllMasks = (1L << 21) - 1; - -static Mask lastExtEventMask = 1; int ExtEventIndex; -Mask ExtValidMasks[EMASKSIZE]; Mask ExtExclusiveMasks[EMASKSIZE]; static struct dev_type @@ -148,6 +188,9 @@ static struct dev_type CARD8 event_base[numInputClasses]; XExtEventInfo EventInfo[32]; +static DeviceIntRec xi_all_devices; +static DeviceIntRec xi_all_master_devices; + /** * Dispatch vector. Functions defined in here will be called when the matching * request arrives. @@ -193,7 +236,29 @@ static int (*ProcIVector[])(ClientPtr) = { ProcXListDeviceProperties, /* 36 */ ProcXChangeDeviceProperty, /* 37 */ ProcXDeleteDeviceProperty, /* 38 */ - ProcXGetDeviceProperty /* 39 */ + ProcXGetDeviceProperty, /* 39 */ + /* XI 2 */ + ProcXIQueryPointer, /* 40 */ + ProcXIWarpPointer, /* 41 */ + ProcXIChangeCursor, /* 42 */ + ProcXIChangeHierarchy, /* 43 */ + ProcXISetClientPointer, /* 44 */ + ProcXIGetClientPointer, /* 45 */ + ProcXISelectEvents, /* 46 */ + ProcXIQueryVersion, /* 47 */ + ProcXIQueryDevice, /* 48 */ + ProcXISetFocus, /* 49 */ + ProcXIGetFocus, /* 50 */ + ProcXIGrabDevice, /* 51 */ + ProcXIUngrabDevice, /* 52 */ + ProcXIAllowEvents, /* 53 */ + ProcXIPassiveGrabDevice, /* 54 */ + ProcXIPassiveUngrabDevice, /* 55 */ + ProcXIListProperties, /* 56 */ + ProcXIChangeProperty, /* 57 */ + ProcXIDeleteProperty, /* 58 */ + ProcXIGetProperty, /* 59 */ + ProcXIGetSelectedEvents /* 60 */ }; /* For swapped clients */ @@ -237,7 +302,28 @@ static int (*SProcIVector[])(ClientPtr) = { SProcXListDeviceProperties, /* 36 */ SProcXChangeDeviceProperty, /* 37 */ SProcXDeleteDeviceProperty, /* 38 */ - SProcXGetDeviceProperty /* 39 */ + SProcXGetDeviceProperty, /* 39 */ + SProcXIQueryPointer, /* 40 */ + SProcXIWarpPointer, /* 41 */ + SProcXIChangeCursor, /* 42 */ + SProcXIChangeHierarchy, /* 43 */ + SProcXISetClientPointer, /* 44 */ + SProcXIGetClientPointer, /* 45 */ + SProcXISelectEvents, /* 46 */ + SProcXIQueryVersion, /* 47 */ + SProcXIQueryDevice, /* 48 */ + SProcXISetFocus, /* 49 */ + SProcXIGetFocus, /* 50 */ + SProcXIGrabDevice, /* 51 */ + SProcXIUngrabDevice, /* 52 */ + SProcXIAllowEvents, /* 53 */ + SProcXIPassiveGrabDevice, /* 54 */ + SProcXIPassiveUngrabDevice, /* 55 */ + SProcXIListProperties, /* 56 */ + SProcXIChangeProperty, /* 57 */ + SProcXIDeleteProperty, /* 58 */ + SProcXIGetProperty, /* 59 */ + SProcXIGetSelectedEvents /* 60 */ }; /***************************************************************** @@ -254,18 +340,6 @@ int BadMode = 2; int DeviceBusy = 3; int BadClass = 4; -Mask DevicePointerMotionMask; -Mask DevicePointerMotionHintMask; -Mask DeviceFocusChangeMask; -Mask DeviceStateNotifyMask; -static Mask ChangeDeviceNotifyMask; -Mask DeviceMappingNotifyMask; -Mask DeviceOwnerGrabButtonMask; -Mask DeviceButtonGrabMask; -Mask DeviceButtonMotionMask; -Mask DevicePresenceNotifyMask; -Mask DevicePropertyNotifyMask; - int DeviceValuator; int DeviceKeyPress; int DeviceKeyRelease; @@ -292,7 +366,7 @@ int RT_INPUTCLIENT; * */ -extern XExtensionVersion AllExtensionVersions[]; +extern XExtensionVersion XIVersion; Mask PropagateMask[MAXDEVICES]; @@ -307,8 +381,8 @@ static int XIClientPrivateKeyIndex; DevPrivateKey XIClientPrivateKey = &XIClientPrivateKeyIndex; static XExtensionVersion thisversion = { XI_Present, - XI_Add_DeviceProperties_Major, - XI_Add_DeviceProperties_Minor + XI_2_Major, + XI_2_Minor }; @@ -343,7 +417,7 @@ static int ProcIDispatch(ClientPtr client) { REQUEST(xReq); - if (stuff->data > IREQUESTS || !ProcIVector[stuff->data]) + if (stuff->data > (IREQUESTS + XI2REQUESTS) || !ProcIVector[stuff->data]) return BadRequest; return (*ProcIVector[stuff->data])(client); @@ -433,6 +507,26 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) SRepXListDeviceProperties(client, len, (xListDevicePropertiesReply*)rep); else if (rep->RepType == X_GetDeviceProperty) SRepXGetDeviceProperty(client, len, (xGetDevicePropertyReply *) rep); + else if (rep->RepType == X_XIQueryPointer) + SRepXIQueryPointer(client, len, (xXIQueryPointerReply *) rep); + else if (rep->RepType == X_XIGetClientPointer) + SRepXIGetClientPointer(client, len, (xXIGetClientPointerReply*) rep); + else if (rep->RepType == X_XIQueryVersion) + SRepXIQueryVersion(client, len, (xXIQueryVersionReply*)rep); + else if (rep->RepType == X_XIQueryDevice) + SRepXIQueryDevice(client, len, (xXIQueryDeviceReply*)rep); + else if (rep->RepType == X_XIGrabDevice) + SRepXIGrabDevice(client, len, (xXIGrabDeviceReply *) rep); + else if (rep->RepType == X_XIGrabDevice) + SRepXIPassiveGrabDevice(client, len, (xXIPassiveGrabDeviceReply *) rep); + else if (rep->RepType == X_XIListProperties) + SRepXIListProperties(client, len, (xXIListPropertiesReply *) rep); + else if (rep->RepType == X_XIGetProperty) + SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep); + else if (rep->RepType == X_XIGetSelectedEvents) + SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep); + else if (rep->RepType == X_XIGetFocus) + SRepXIGetFocus(client, len, (xXIGetFocusReply *) rep); else { FatalError("XINPUT confused sending swapped reply"); } @@ -549,42 +643,279 @@ SDevicePropertyNotifyEvent (devicePropertyNotify *from, devicePropertyNotify *to swapl(&to->atom, n); } -/************************************************************************** - * - * Allow the specified event to have its propagation suppressed. - * The default is to not allow suppression of propagation. - * - */ +static void +SDeviceLeaveNotifyEvent (xXILeaveEvent *from, xXILeaveEvent *to) +{ + char n; + + *to = *from; + swaps(&to->sequenceNumber,n); + swapl(&to->length, n); + swaps(&to->evtype, n); + swaps(&to->deviceid, n); + swapl(&to->time, n); + swapl(&to->root, n); + swapl(&to->event, n); + swapl(&to->child, n); + swapl(&to->root_x, n); + swapl(&to->root_y, n); + swapl(&to->event_x, n); + swapl(&to->event_y, n); + swaps(&to->sourceid, n); + swaps(&to->buttons_len, n); + swapl(&to->mods.base_mods, n); + swapl(&to->mods.latched_mods, n); + swapl(&to->mods.locked_mods, n); +} static void -AllowPropagateSuppress(Mask mask) +SDeviceChangedEvent(xXIDeviceChangedEvent* from, xXIDeviceChangedEvent* to) +{ + char n; + int i, j; + xXIAnyInfo *any; + + *to = *from; + memcpy(&to[1], &from[1], from->length * 4); + + any = (xXIAnyInfo*)&to[1]; + for (i = 0; i < to->num_classes; i++) + { + int length = any->length; + + switch(any->type) + { + case KeyClass: + { + xXIKeyInfo *ki = (xXIKeyInfo*)any; + uint32_t *key = (uint32_t*)&ki[1]; + for (j = 0; j < ki->num_keycodes; j++, key++) + swapl(key, n); + swaps(&ki->num_keycodes, n); + } + break; + case ButtonClass: + { + xXIButtonInfo *bi = (xXIButtonInfo*)any; + Atom *labels = (Atom*)((char*)bi + sizeof(xXIButtonInfo) + + pad_to_int32(bits_to_bytes(bi->num_buttons))); + for (j = 0; j < bi->num_buttons; j++) + swapl(&labels[j], n); + swaps(&bi->num_buttons, n); + } + break; + case ValuatorClass: + { + xXIValuatorInfo* ai = (xXIValuatorInfo*)any; + swapl(&ai->label, n); + swapl(&ai->min.integral, n); + swapl(&ai->min.frac, n); + swapl(&ai->max.integral, n); + swapl(&ai->max.frac, n); + swapl(&ai->resolution, n); + swaps(&ai->number, n); + } + break; + } + + swaps(&any->type, n); + swaps(&any->length, n); + swaps(&any->sourceid, n); + + any = (xXIAnyInfo*)((char*)any + length * 4); + } + + swaps(&to->sequenceNumber, n); + swapl(&to->length, n); + swaps(&to->evtype, n); + swaps(&to->deviceid, n); + swapl(&to->time, n); + swaps(&to->num_classes, n); + swaps(&to->sourceid, n); + +} + +static void SDeviceEvent(xXIDeviceEvent *from, xXIDeviceEvent *to) { int i; + char n; + char *ptr; + char *vmask; - for (i = 0; i < MAXDEVICES; i++) - PropagateMask[i] |= mask; + memcpy(to, from, sizeof(xEvent) + from->length * 4); + + swaps(&to->sequenceNumber, n); + swapl(&to->length, n); + swaps(&to->evtype, n); + swaps(&to->deviceid, n); + swapl(&to->time, n); + swapl(&to->detail, n); + swapl(&to->root, n); + swapl(&to->event, n); + swapl(&to->child, n); + swapl(&to->root_x, n); + swapl(&to->root_y, n); + swapl(&to->event_x, n); + swapl(&to->event_y, n); + swaps(&to->buttons_len, n); + swaps(&to->valuators_len, n); + swaps(&to->sourceid, n); + swapl(&to->mods.base_mods, n); + swapl(&to->mods.latched_mods, n); + swapl(&to->mods.locked_mods, n); + swapl(&to->mods.effective_mods, n); + + ptr = (char*)(&to[1]); + ptr += from->buttons_len * 4; + vmask = ptr; /* valuator mask */ + ptr += from->valuators_len * 4; + for (i = 0; i < from->valuators_len * 32; i++) + { + if (BitIsOn(vmask, i)) + { + swapl(((uint32_t*)ptr), n); + ptr += 4; + swapl(((uint32_t*)ptr), n); + ptr += 4; + } + } +} + +static void SDeviceHierarchyEvent(xXIHierarchyEvent *from, + xXIHierarchyEvent *to) +{ + int i; + char n; + xXIHierarchyInfo *info; + + *to = *from; + memcpy(&to[1], &from[1], from->length * 4); + swaps(&to->sequenceNumber, n); + swapl(&to->length, n); + swaps(&to->evtype, n); + swaps(&to->deviceid, n); + swapl(&to->time, n); + swapl(&to->flags, n); + swaps(&to->num_info, n); + + info = (xXIHierarchyInfo*)&to[1]; + for (i = 0; i< from->num_info; i++) + { + swaps(&info->deviceid, n); + swaps(&info->attachment, n); + info++; + } +} + +static void SXIPropertyEvent(xXIPropertyEvent *from, xXIPropertyEvent *to) +{ + char n; + + *to = *from; + swaps(&to->sequenceNumber, n); + swapl(&to->length, n); + swaps(&to->evtype, n); + swaps(&to->deviceid, n); + swapl(&to->property, n); +} + +static void SRawEvent(xXIRawEvent *from, xXIRawEvent *to) +{ + char n; + int i; + FP3232 *values; + unsigned char *mask; + + memcpy(to, from, sizeof(xEvent) + from->length * 4); + + swaps(&to->sequenceNumber, n); + swapl(&to->length, n); + swaps(&to->evtype, n); + swaps(&to->deviceid, n); + swapl(&to->time, n); + swapl(&to->detail, n); + + + mask = (unsigned char*)&to[1]; + values = (FP3232*)(mask + from->valuators_len * 4); + + for (i = 0; i < from->valuators_len * 4 * 8; i++) + { + if (BitIsOn(mask, i)) + { + /* for each bit set there are two FP3232 values on the wire, in + * the order abcABC for data and data_raw. Here we swap as if + * they were in aAbBcC order because it's easier and really + * doesn't matter. + */ + swapl(&values->integral, n); + swapl(&values->frac, n); + values++; + swapl(&values->integral, n); + swapl(&values->frac, n); + values++; + } + } + + swaps(&to->valuators_len, n); +} + + +/** Event swapping function for XI2 events. */ +void +XI2EventSwap(xGenericEvent *from, xGenericEvent *to) +{ + switch(from->evtype) + { + case XI_Enter: + case XI_Leave: + SDeviceLeaveNotifyEvent((xXILeaveEvent*)from, (xXILeaveEvent*)to); + break; + case XI_DeviceChanged: + SDeviceChangedEvent((xXIDeviceChangedEvent*)from, + (xXIDeviceChangedEvent*)to); + break; + case XI_HierarchyChanged: + SDeviceHierarchyEvent((xXIHierarchyEvent*)from, (xXIHierarchyEvent*)to); + break; + case XI_PropertyEvent: + SXIPropertyEvent((xXIPropertyEvent*)from, + (xXIPropertyEvent*)to); + break; + case XI_Motion: + case XI_KeyPress: + case XI_KeyRelease: + case XI_ButtonPress: + case XI_ButtonRelease: + SDeviceEvent((xXIDeviceEvent*)from, (xXIDeviceEvent*)to); + break; + case XI_RawMotion: + case XI_RawKeyPress: + case XI_RawKeyRelease: + case XI_RawButtonPress: + case XI_RawButtonRelease: + SRawEvent((xXIRawEvent*)from, (xXIRawEvent*)to); + break; + default: + ErrorF("[Xi] Unknown event type to swap. This is a bug.\n"); + break; + } } /************************************************************************** * - * Return the next available extension event mask. + * Allow the specified event to have its propagation suppressed. + * The default is to not allow suppression of propagation. * */ -static Mask -GetNextExtEventMask(void) +static void +AllowPropagateSuppress(Mask mask) { int i; - Mask mask = lastExtEventMask; - - if (lastExtEventMask == 0) { - FatalError("GetNextExtEventMask: no more events are available."); - } - lastExtEventMask <<= 1; for (i = 0; i < MAXDEVICES; i++) - ExtValidMasks[i] |= mask; - return mask; + PropagateMask[i] |= mask; } /************************************************************************** @@ -654,8 +985,6 @@ SetMaskForExtEvent(Mask mask, int event) static void FixExtensionEvents(ExtensionEntry * extEntry) { - Mask mask; - DeviceValuator = extEntry->eventBase; DeviceKeyPress = DeviceValuator + 1; DeviceKeyRelease = DeviceKeyPress + 1; @@ -687,81 +1016,50 @@ FixExtensionEvents(ExtensionEntry * extEntry) DeviceBusy += extEntry->errorBase; BadClass += extEntry->errorBase; - mask = GetNextExtEventMask(); - SetMaskForExtEvent(mask, DeviceKeyPress); - AllowPropagateSuppress(mask); + SetMaskForExtEvent(DeviceKeyPressMask, DeviceKeyPress); + AllowPropagateSuppress(DeviceKeyPressMask); + SetCriticalEvent(DeviceKeyPress); - mask = GetNextExtEventMask(); - SetMaskForExtEvent(mask, DeviceKeyRelease); - AllowPropagateSuppress(mask); + SetMaskForExtEvent(DeviceKeyReleaseMask, DeviceKeyRelease); + AllowPropagateSuppress(DeviceKeyReleaseMask); + SetCriticalEvent(DeviceKeyRelease); - mask = GetNextExtEventMask(); - SetMaskForExtEvent(mask, DeviceButtonPress); - AllowPropagateSuppress(mask); + SetMaskForExtEvent(DeviceButtonPressMask, DeviceButtonPress); + AllowPropagateSuppress(DeviceButtonPressMask); + SetCriticalEvent(DeviceButtonPress); - mask = GetNextExtEventMask(); - SetMaskForExtEvent(mask, DeviceButtonRelease); - AllowPropagateSuppress(mask); + SetMaskForExtEvent(DeviceButtonReleaseMask, DeviceButtonRelease); + AllowPropagateSuppress(DeviceButtonReleaseMask); + SetCriticalEvent(DeviceButtonRelease); - mask = GetNextExtEventMask(); - SetMaskForExtEvent(mask, ProximityIn); - SetMaskForExtEvent(mask, ProximityOut); - AllowPropagateSuppress(mask); + SetMaskForExtEvent(DeviceProximityMask, ProximityIn); + SetMaskForExtEvent(DeviceProximityMask, ProximityOut); - mask = GetNextExtEventMask(); - DeviceStateNotifyMask = mask; - SetMaskForExtEvent(mask, DeviceStateNotify); + SetMaskForExtEvent(DeviceStateNotifyMask, DeviceStateNotify); - mask = GetNextExtEventMask(); - DevicePointerMotionMask = mask; - SetMaskForExtEvent(mask, DeviceMotionNotify); - AllowPropagateSuppress(mask); + SetMaskForExtEvent(DevicePointerMotionMask, DeviceMotionNotify); + AllowPropagateSuppress(DevicePointerMotionMask); + SetCriticalEvent(DeviceMotionNotify); - DevicePointerMotionHintMask = GetNextExtEventMask(); SetEventInfo(DevicePointerMotionHintMask, _devicePointerMotionHint); - SetEventInfo(GetNextExtEventMask(), _deviceButton1Motion); - SetEventInfo(GetNextExtEventMask(), _deviceButton2Motion); - SetEventInfo(GetNextExtEventMask(), _deviceButton3Motion); - SetEventInfo(GetNextExtEventMask(), _deviceButton4Motion); - SetEventInfo(GetNextExtEventMask(), _deviceButton5Motion); - - /* If DeviceButtonMotionMask is != ButtonMotionMask, event delivery - * breaks down. The device needs the dev->button->motionMask. If DBMM is - * the same as BMM, we can ensure that both core and device events can be - * delivered, without the need for extra structures in the DeviceIntRec. - */ - DeviceButtonMotionMask = GetNextExtEventMask(); + SetEventInfo(DeviceButton1MotionMask, _deviceButton1Motion); + SetEventInfo(DeviceButton2MotionMask, _deviceButton2Motion); + SetEventInfo(DeviceButton3MotionMask, _deviceButton3Motion); + SetEventInfo(DeviceButton4MotionMask, _deviceButton4Motion); + SetEventInfo(DeviceButton5MotionMask, _deviceButton5Motion); SetEventInfo(DeviceButtonMotionMask, _deviceButtonMotion); - if (DeviceButtonMotionMask != ButtonMotionMask) - { - /* This should never happen, but if it does, hide under the - * bed and cry for help. */ - ErrorF("[Xi] DeviceButtonMotionMask != ButtonMotionMask. Trouble!\n"); - } - DeviceFocusChangeMask = GetNextExtEventMask(); SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusIn); SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusOut); - mask = GetNextExtEventMask(); - SetMaskForExtEvent(mask, DeviceMappingNotify); - DeviceMappingNotifyMask = mask; - - mask = GetNextExtEventMask(); - SetMaskForExtEvent(mask, ChangeDeviceNotify); - ChangeDeviceNotifyMask = mask; + SetMaskForExtEvent(DeviceMappingNotifyMask, DeviceMappingNotify); + SetMaskForExtEvent(ChangeDeviceNotifyMask, ChangeDeviceNotify); - DeviceButtonGrabMask = GetNextExtEventMask(); SetEventInfo(DeviceButtonGrabMask, _deviceButtonGrab); SetExclusiveAccess(DeviceButtonGrabMask); - DeviceOwnerGrabButtonMask = GetNextExtEventMask(); SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton); - - DevicePresenceNotifyMask = GetNextExtEventMask(); SetEventInfo(DevicePresenceNotifyMask, _devicePresence); - - DevicePropertyNotifyMask = GetNextExtEventMask(); SetMaskForExtEvent(DevicePropertyNotifyMask, DevicePropertyNotify); SetEventInfo(0, _noExtensionEvent); @@ -792,7 +1090,6 @@ RestoreExtensionEvents(void) EventInfo[i].type = 0; } ExtEventIndex = 0; - lastExtEventMask = 1; DeviceValuator = 0; DeviceKeyPress = 1; DeviceKeyRelease = 2; @@ -852,21 +1149,6 @@ IResetProc(ExtensionEntry * unused) RestoreExtensionEvents(); } -/***************************************************************** - * - * Returns TRUE if the device has some sort of pointer type. - * - */ - -Bool -DeviceIsPointerType(DeviceIntPtr dev) -{ - if (dev_type[1].type == dev->type) - return TRUE; - - return FALSE; -} - /*********************************************************************** * @@ -877,7 +1159,7 @@ DeviceIsPointerType(DeviceIntPtr dev) void AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name) { - dev->type = type; + dev->xinput_type = type; dev->name = (char *)xalloc(strlen(name) + 1); strcpy(dev->name, name); } @@ -985,9 +1267,8 @@ XInputExtensionInit(void) if (extEntry) { IReqCode = extEntry->base; IEventBase = extEntry->eventBase; - AllExtensionVersions[IReqCode - 128] = thisversion; + XIVersion = thisversion; MakeDeviceTypeAtoms(); - XIInitKnownProperties(); RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone); RegisterResourceName(RT_INPUTCLIENT, "INPUTCLIENT"); FixExtensionEvents(extEntry); @@ -1009,7 +1290,20 @@ XInputExtensionInit(void) EventSwapVector[ChangeDeviceNotify] = SEventIDispatch; EventSwapVector[DevicePresenceNotify] = SEventIDispatch; + GERegisterExtension(IReqCode, XI2EventSwap); + + + memset(&xi_all_devices, 0, sizeof(xi_all_devices)); + memset(&xi_all_master_devices, 0, sizeof(xi_all_master_devices)); + xi_all_devices.id = XIAllDevices; + xi_all_devices.name = "XIAllDevices"; + xi_all_master_devices.id = XIAllMasterDevices; + xi_all_master_devices.name = "XIAllMasterDevices"; + + inputInfo.all_devices = &xi_all_devices; + inputInfo.all_master_devices = &xi_all_master_devices; } else { FatalError("IExtensionInit: AddExtensions failed\n"); } } + diff --git a/xorg-server/Xi/getbmap.c b/xorg-server/Xi/getbmap.c index 9f93b06ef..e2d58972a 100644 --- a/xorg-server/Xi/getbmap.c +++ b/xorg-server/Xi/getbmap.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -111,7 +109,7 @@ ProcXGetDeviceButtonMapping(ClientPtr client) return BadMatch; rep.nElts = b->numButtons; - rep.length = (rep.nElts + (4 - 1)) / 4; + rep.length = bytes_to_int32(rep.nElts); WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep); (void)WriteToClient(client, rep.nElts, (char *)&b->map[1]); return Success; diff --git a/xorg-server/Xi/getdctl.c b/xorg-server/Xi/getdctl.c index c979959e2..68181fa61 100644 --- a/xorg-server/Xi/getdctl.c +++ b/xorg-server/Xi/getdctl.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -308,7 +306,7 @@ ProcXGetDeviceControl(ClientPtr client) break; } - rep.length = (total_length + 3) >> 2; + rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xGetDeviceControlReply), &rep); WriteToClient(client, total_length, savbuf); xfree(savbuf); diff --git a/xorg-server/Xi/getfctl.c b/xorg-server/Xi/getfctl.c index 1b1e594a2..607765e98 100644 --- a/xorg-server/Xi/getfctl.c +++ b/xorg-server/Xi/getfctl.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -360,7 +358,7 @@ ProcXGetFeedbackControl(ClientPtr client) for (b = dev->bell; b; b = b->next) CopySwapBellFeedback(client, b, &buf); - rep.length = (total_length + 3) >> 2; + rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep); WriteToClient(client, total_length, savbuf); xfree(savbuf); diff --git a/xorg-server/Xi/getfocus.c b/xorg-server/Xi/getfocus.c index dfef22fb7..69eadde87 100644 --- a/xorg-server/Xi/getfocus.c +++ b/xorg-server/Xi/getfocus.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/Xi/getkmap.c b/xorg-server/Xi/getkmap.c index 0eec1d8df..78449e212 100644 --- a/xorg-server/Xi/getkmap.c +++ b/xorg-server/Xi/getkmap.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -61,6 +59,8 @@ SOFTWARE. #include #include "exglobals.h" #include "swaprep.h" +#include "xkbsrv.h" +#include "xkbstr.h" #include "getkmap.h" @@ -92,7 +92,8 @@ ProcXGetDeviceKeyMapping(ClientPtr client) { xGetDeviceKeyMappingReply rep; DeviceIntPtr dev; - KeySymsPtr k; + XkbDescPtr xkb; + KeySymsPtr syms; int rc; REQUEST(xGetDeviceKeyMappingReq); @@ -103,31 +104,37 @@ ProcXGetDeviceKeyMapping(ClientPtr client) return rc; if (dev->key == NULL) return BadMatch; - k = &dev->key->curKeySyms; + xkb = dev->key->xkbInfo->desc; - if ((stuff->firstKeyCode < k->minKeyCode) || - (stuff->firstKeyCode > k->maxKeyCode)) { + if (stuff->firstKeyCode < xkb->min_key_code || + stuff->firstKeyCode > xkb->max_key_code) { client->errorValue = stuff->firstKeyCode; return BadValue; } - if (stuff->firstKeyCode + stuff->count > k->maxKeyCode + 1) { + if (stuff->firstKeyCode + stuff->count > xkb->max_key_code + 1) { client->errorValue = stuff->count; return BadValue; } + syms = XkbGetCoreMap(dev); + if (!syms) + return BadAlloc; + rep.repType = X_Reply; rep.RepType = X_GetDeviceKeyMapping; rep.sequenceNumber = client->sequence; - rep.keySymsPerKeyCode = k->mapWidth; - rep.length = (k->mapWidth * stuff->count); /* KeySyms are 4 bytes */ + rep.keySymsPerKeyCode = syms->mapWidth; + rep.length = (syms->mapWidth * stuff->count); /* KeySyms are 4 bytes */ WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep); client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; WriteSwappedDataToClient(client, - k->mapWidth * stuff->count * sizeof(KeySym), - &k->map[(stuff->firstKeyCode - k->minKeyCode) * - k->mapWidth]); + syms->mapWidth * stuff->count * sizeof(KeySym), + &syms->map[syms->mapWidth * (stuff->firstKeyCode - + syms->minKeyCode)]); + xfree(syms->map); + xfree(syms); return Success; } diff --git a/xorg-server/Xi/getmmap.c b/xorg-server/Xi/getmmap.c index c6c9c3362..ddf27a5f0 100644 --- a/xorg-server/Xi/getmmap.c +++ b/xorg-server/Xi/getmmap.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -89,36 +87,34 @@ SProcXGetDeviceModifierMapping(ClientPtr client) int ProcXGetDeviceModifierMapping(ClientPtr client) { - CARD8 maxkeys; DeviceIntPtr dev; xGetDeviceModifierMappingReply rep; - KeyClassPtr kp; - int rc; + KeyCode *modkeymap = NULL; + int ret, max_keys_per_mod; REQUEST(xGetDeviceModifierMappingReq); REQUEST_SIZE_MATCH(xGetDeviceModifierMappingReq); - rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); - if (rc != Success) - return rc; + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (ret != Success) + return ret; - kp = dev->key; - if (kp == NULL) - return BadMatch; - - maxkeys = kp->maxKeysPerModifier; + ret = generate_modkeymap(client, dev, &modkeymap, &max_keys_per_mod); + if (ret != Success) + return ret; rep.repType = X_Reply; rep.RepType = X_GetDeviceModifierMapping; - rep.numKeyPerModifier = maxkeys; + rep.numKeyPerModifier = max_keys_per_mod; rep.sequenceNumber = client->sequence; /* length counts 4 byte quantities - there are 8 modifiers 1 byte big */ - rep.length = 2 * maxkeys; + rep.length = max_keys_per_mod << 1; WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); + WriteToClient(client, max_keys_per_mod * 8, (char *) modkeymap); + + xfree(modkeymap); - /* Reply with the (modified by DDX) map that SetModifierMapping passed in */ - WriteToClient(client, 8 * maxkeys, (char *)kp->modifierKeyMap); return Success; } diff --git a/xorg-server/Xi/getprop.c b/xorg-server/Xi/getprop.c index 188f549e5..1f28a8a40 100644 --- a/xorg-server/Xi/getprop.c +++ b/xorg-server/Xi/getprop.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -122,7 +120,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) if (count) { rep.count = count; buf = (XEventClass *) xalloc(rep.count * sizeof(XEventClass)); - rep.length = (rep.count * sizeof(XEventClass) + 3) >> 2; + rep.length = bytes_to_int32(rep.count * sizeof(XEventClass)); tbuf = buf; for (i = 0; i < EMASKSIZE; i++) diff --git a/xorg-server/Xi/getselev.c b/xorg-server/Xi/getselev.c index caa376fcb..90f6284e5 100644 --- a/xorg-server/Xi/getselev.c +++ b/xorg-server/Xi/getselev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -133,7 +131,7 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) total_length = (rep.all_clients_count + rep.this_client_count) * sizeof(XEventClass); - rep.length = (total_length + 3) >> 2; + rep.length = bytes_to_int32(total_length); buf = (XEventClass *) xalloc(total_length); tclient = buf; diff --git a/xorg-server/Xi/getvers.c b/xorg-server/Xi/getvers.c index 88ff1991a..c8e9ebca6 100644 --- a/xorg-server/Xi/getvers.c +++ b/xorg-server/Xi/getvers.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -64,7 +62,7 @@ SOFTWARE. #include "getvers.h" -XExtensionVersion AllExtensionVersions[128]; +XExtensionVersion XIVersion; /*********************************************************************** * @@ -94,24 +92,22 @@ int ProcXGetExtensionVersion(ClientPtr client) { xGetExtensionVersionReply rep; - XIClientPtr pXIClient; REQUEST(xGetExtensionVersionReq); REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); - if (stuff->length != (sizeof(xGetExtensionVersionReq) + - stuff->nbytes + 3) >> 2) + if (stuff->length != bytes_to_int32(sizeof(xGetExtensionVersionReq) + + stuff->nbytes)) return BadLength; - pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); - + memset(&rep, 0, sizeof(xGetExtensionVersionReply)); rep.repType = X_Reply; rep.RepType = X_GetExtensionVersion; rep.length = 0; rep.sequenceNumber = client->sequence; rep.present = TRUE; - rep.major_version = AllExtensionVersions[IReqCode - 128].major_version; - rep.minor_version = AllExtensionVersions[IReqCode - 128].minor_version; + rep.major_version = XIVersion.major_version; + rep.minor_version = XIVersion.minor_version; WriteReplyToClient(client, sizeof(xGetExtensionVersionReply), &rep); diff --git a/xorg-server/Xi/grabdev.c b/xorg-server/Xi/grabdev.c index 8217a9928..925c9a6d2 100644 --- a/xorg-server/Xi/grabdev.c +++ b/xorg-server/Xi/grabdev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -86,7 +84,7 @@ SProcXGrabDevice(ClientPtr client) swapl(&stuff->time, n); swaps(&stuff->event_count, n); - if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count) + if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count) return BadLength; SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); @@ -106,12 +104,13 @@ ProcXGrabDevice(ClientPtr client) int rc; xGrabDeviceReply rep; DeviceIntPtr dev; + GrabMask mask; struct tmask tmp[EMASKSIZE]; REQUEST(xGrabDeviceReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceReq); - if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count) + if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count) return BadLength; rep.repType = X_Reply; @@ -128,10 +127,13 @@ ProcXGrabDevice(ClientPtr client) X_GrabDevice)) != Success) return rc; - rc = GrabDevice(client, dev, stuff->this_device_mode, - stuff->other_devices_mode, stuff->grabWindow, + mask.xi = tmp[stuff->deviceid].mask; + + rc = GrabDevice(client, dev, stuff->other_devices_mode, + stuff->this_device_mode, stuff->grabWindow, stuff->ownerEvents, stuff->time, - tmp[stuff->deviceid].mask, &rep.status, FALSE); + &mask, GRABTYPE_XI, None, None, + &rep.status); if (rc != Success) return rc; @@ -179,10 +181,10 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count, for (i = 0; i < count; i++, list++) { device = *list >> 8; - if (device > 255) /* FIXME: we only use 7 bit for devices? */ + if (device > 255) return BadClass; - rc = dixLookupDevice(&tdev, device, client, DixReadAccess); + rc = dixLookupDevice(&tdev, device, client, DixUseAccess); if (rc != BadDevice && rc != Success) return rc; if (rc == BadDevice || (dev != NULL && tdev != dev)) diff --git a/xorg-server/Xi/grabdevb.c b/xorg-server/Xi/grabdevb.c index 98f7e117d..e235f5313 100644 --- a/xorg-server/Xi/grabdevb.c +++ b/xorg-server/Xi/grabdevb.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -105,12 +103,14 @@ ProcXGrabDeviceButton(ClientPtr client) DeviceIntPtr mdev; XEventClass *class; struct tmask tmp[EMASKSIZE]; + GrabParameters param; + GrabMask mask; REQUEST(xGrabDeviceButtonReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); if (stuff->length != - (sizeof(xGrabDeviceButtonReq) >> 2) + stuff->event_count) + bytes_to_int32(sizeof(xGrabDeviceButtonReq)) + stuff->event_count) return BadLength; ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); @@ -119,14 +119,14 @@ ProcXGrabDeviceButton(ClientPtr client) if (stuff->modifier_device != UseXKeyboard) { ret = dixLookupDevice(&mdev, stuff->modifier_device, client, - DixReadAccess); + DixUseAccess); if (ret != Success) return ret; if (mdev->key == NULL) return BadMatch; } else { mdev = PickKeyboard(client); - ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixReadAccess); + ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixUseAccess); if (ret != Success) return ret; } @@ -137,10 +137,18 @@ ProcXGrabDeviceButton(ClientPtr client) stuff->event_count, tmp, dev, X_GrabDeviceButton)) != Success) return ret; - ret = GrabButton(client, dev, stuff->this_device_mode, - stuff->other_devices_mode, stuff->modifiers, mdev, - stuff->button, stuff->grabWindow, stuff->ownerEvents, - (Cursor) 0, (Window) 0, tmp[stuff->grabbed_device].mask); + + memset(¶m, 0, sizeof(param)); + param.grabtype = GRABTYPE_XI; + param.ownerEvents = stuff->ownerEvents; + param.this_device_mode = stuff->this_device_mode; + param.other_devices_mode = stuff->other_devices_mode; + param.grabWindow = stuff->grabWindow; + param.modifiers = stuff->modifiers; + mask.xi = tmp[stuff->grabbed_device].mask; + + ret = GrabButton(client, dev, mdev, stuff->button, ¶m, + GRABTYPE_XI, &mask); return ret; } diff --git a/xorg-server/Xi/grabdevk.c b/xorg-server/Xi/grabdevk.c index 6a245f25a..b34867b5f 100644 --- a/xorg-server/Xi/grabdevk.c +++ b/xorg-server/Xi/grabdevk.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -103,11 +101,13 @@ ProcXGrabDeviceKey(ClientPtr client) DeviceIntPtr mdev; XEventClass *class; struct tmask tmp[EMASKSIZE]; + GrabParameters param; + GrabMask mask; REQUEST(xGrabDeviceKeyReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); - if (stuff->length != (sizeof(xGrabDeviceKeyReq) >> 2) + stuff->event_count) + if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count) return BadLength; ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); @@ -116,14 +116,14 @@ ProcXGrabDeviceKey(ClientPtr client) if (stuff->modifier_device != UseXKeyboard) { ret = dixLookupDevice(&mdev, stuff->modifier_device, client, - DixReadAccess); + DixUseAccess); if (ret != Success) return ret; if (mdev->key == NULL) return BadMatch; } else { mdev = PickKeyboard(client); - ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixReadAccess); + ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixUseAccess); if (ret != Success) return ret; } @@ -135,10 +135,17 @@ ProcXGrabDeviceKey(ClientPtr client) X_GrabDeviceKey)) != Success) return ret; - ret = GrabKey(client, dev, stuff->this_device_mode, - stuff->other_devices_mode, stuff->modifiers, mdev, - stuff->key, stuff->grabWindow, stuff->ownerEvents, - tmp[stuff->grabbed_device].mask); + + memset(¶m, 0, sizeof(param)); + param.grabtype = GRABTYPE_XI; + param.ownerEvents = stuff->ownerEvents; + param.this_device_mode = stuff->this_device_mode; + param.other_devices_mode = stuff->other_devices_mode; + param.grabWindow = stuff->grabWindow; + param.modifiers = stuff->modifiers; + mask.xi = tmp[stuff->grabbed_device].mask; + + ret = GrabKey(client, dev, mdev, stuff->key, ¶m, GRABTYPE_XI, &mask); return ret; } diff --git a/xorg-server/Xi/gtmotion.c b/xorg-server/Xi/gtmotion.c index 8fa0cca29..8e91c5a47 100644 --- a/xorg-server/Xi/gtmotion.c +++ b/xorg-server/Xi/gtmotion.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -138,7 +136,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) (ScreenPtr) NULL, FALSE); } if (rep.nEvents > 0) { - length = (rep.nEvents * size + 3) >> 2; + length = bytes_to_int32(rep.nEvents * size); rep.length = length; } nEvents = rep.nEvents; diff --git a/xorg-server/Xi/listdev.c b/xorg-server/Xi/listdev.c index 56ba2f6eb..98ef7aa43 100644 --- a/xorg-server/Xi/listdev.c +++ b/xorg-server/Xi/listdev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -63,9 +61,10 @@ SOFTWARE. #include #include "XIstubs.h" #include "extnsionst.h" -#include "exglobals.h" /* FIXME */ #include "exevents.h" #include "xace.h" +#include "xkbsrv.h" +#include "xkbstr.h" #include "listdev.h" @@ -93,7 +92,7 @@ SProcXListInputDevices(ClientPtr client) * */ -void +static void SizeDeviceInfo(DeviceIntPtr d, int *namesize, int *size) { int chunks; @@ -175,11 +174,11 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, dev = (xDeviceInfoPtr) * buf; dev->id = d->id; - dev->type = d->type; + dev->type = d->xinput_type; dev->num_classes = num_classes; - if (d->isMaster && IsKeyboardDevice(d)) + if (IsMaster(d) && IsKeyboardDevice(d)) dev->use = IsXKeyboard; - else if (d->isMaster && IsPointerDevice(d)) + else if (IsMaster(d) && IsPointerDevice(d)) dev->use = IsXPointer; else if (d->key && d->kbdfeed) dev->use = IsXExtensionKeyboard; @@ -209,8 +208,8 @@ CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) k2 = (xKeyInfoPtr) * buf; k2->class = KeyClass; k2->length = sizeof(xKeyInfo); - k2->min_keycode = k->curKeySyms.minKeyCode; - k2->max_keycode = k->curKeySyms.maxKeyCode; + k2->min_keycode = k->xkbInfo->desc->min_key_code; + k2->max_keycode = k->xkbInfo->desc->max_key_code; k2->num_keys = k2->max_keycode - k2->min_keycode + 1; if (client && client->swapped) { swaps(&k2->num_keys, n); @@ -273,6 +272,24 @@ CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf) return (i); } +static void +CopySwapClasses(ClientPtr client, DeviceIntPtr dev, CARD8 *num_classes, + char** classbuf) +{ + if (dev->key != NULL) { + CopySwapKeyClass(client, dev->key, classbuf); + (*num_classes)++; + } + if (dev->button != NULL) { + CopySwapButtonClass(client, dev->button, classbuf); + (*num_classes)++; + } + if (dev->valuator != NULL) { + (*num_classes) += + CopySwapValuatorClass(client, dev->valuator, classbuf); + } +} + /*********************************************************************** * * This procedure lists information to be returned for an input device. @@ -288,24 +305,26 @@ ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev, CopySwapClasses(client, d, &dev->num_classes, classbuf); } -void -CopySwapClasses(ClientPtr client, DeviceIntPtr dev, CARD8 *num_classes, - char** classbuf) +/*********************************************************************** + * + * This procedure checks if a device should be left off the list. + * + */ + +static Bool +ShouldSkipDevice(ClientPtr client, DeviceIntPtr d) { - if (dev->key != NULL) { - CopySwapKeyClass(client, dev->key, classbuf); - (*num_classes)++; - } - if (dev->button != NULL) { - CopySwapButtonClass(client, dev->button, classbuf); - (*num_classes)++; - } - if (dev->valuator != NULL) { - (*num_classes) += - CopySwapValuatorClass(client, dev->valuator, classbuf); + /* don't send master devices other than VCP/VCK */ + if (!IsMaster(d) || d == inputInfo.pointer || d == inputInfo.keyboard) + { + int rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + if (rc == Success) + return FALSE; } + return TRUE; } + /*********************************************************************** * * This procedure lists the input devices available to the server. @@ -320,66 +339,80 @@ int ProcXListInputDevices(ClientPtr client) { xListInputDevicesReply rep; - XIClientPtr pXIClient; int numdevs = 0; int namesize = 1; /* need 1 extra byte for strcpy */ - int rc, size = 0; + int i = 0, size = 0; int total_length; - char *devbuf; - char *classbuf; - char *namebuf; - char *savbuf; + char *devbuf, *classbuf, *namebuf, *savbuf; + Bool *skip; xDeviceInfo *dev; DeviceIntPtr d; REQUEST_SIZE_MATCH(xListInputDevicesReq); + memset(&rep, 0, sizeof(xListInputDevicesReply)); rep.repType = X_Reply; rep.RepType = X_ListInputDevices; rep.length = 0; rep.sequenceNumber = client->sequence; - pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); AddOtherInputDevices(); - for (d = inputInfo.devices; d; d = d->next) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); - if (rc != Success) - return rc; + /* allocate space for saving skip value */ + skip = xcalloc(sizeof(Bool), inputInfo.numDevices); + if (!skip) + return BadAlloc; + + /* figure out which devices to skip */ + numdevs = 0; + for (d = inputInfo.devices; d; d = d->next, i++) { + skip[i] = ShouldSkipDevice(client, d); + if (skip[i]) + continue; + SizeDeviceInfo(d, &namesize, &size); numdevs++; } - for (d = inputInfo.off_devices; d; d = d->next) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); - if (rc != Success) - return rc; + for (d = inputInfo.off_devices; d; d = d->next, i++) { + skip[i] = ShouldSkipDevice(client, d); + if (skip[i]) + continue; + SizeDeviceInfo(d, &namesize, &size); numdevs++; } + /* allocate space for reply */ total_length = numdevs * sizeof(xDeviceInfo) + size + namesize; - devbuf = (char *)xalloc(total_length); + devbuf = (char *)xcalloc(1, total_length); classbuf = devbuf + (numdevs * sizeof(xDeviceInfo)); namebuf = classbuf + size; savbuf = devbuf; + /* fill in and send reply */ + i = 0; dev = (xDeviceInfoPtr) devbuf; - for (d = inputInfo.devices; d; d = d->next) - { + for (d = inputInfo.devices; d; d = d->next, i++) { + if (skip[i]) + continue; + ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf); } - for (d = inputInfo.off_devices; d; d = d->next) - { + for (d = inputInfo.off_devices; d; d = d->next, i++) { + if (skip[i]) + continue; + ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf); } rep.ndevices = numdevs; - rep.length = (total_length + 3) >> 2; + rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xListInputDevicesReply), &rep); WriteToClient(client, total_length, savbuf); xfree(savbuf); + xfree(skip); return Success; } diff --git a/xorg-server/Xi/listdev.h b/xorg-server/Xi/listdev.h index 39ea2d635..b0d2dd5e2 100644 --- a/xorg-server/Xi/listdev.h +++ b/xorg-server/Xi/listdev.h @@ -43,15 +43,4 @@ void SRepXListInputDevices(ClientPtr /* client */ , xListInputDevicesReply * /* rep */ ); -void -CopySwapClasses(ClientPtr /* client */, - DeviceIntPtr /* dev */, - CARD8* /* num_classes */, - char** /* classbuf */); - -void -SizeDeviceInfo(DeviceIntPtr /* dev */, - int* /* namesize */, - int* /* size */); - #endif /* LISTDEV_H */ diff --git a/xorg-server/Xi/opendev.c b/xorg-server/Xi/opendev.c index 8d249278d..3844d25a2 100644 --- a/xorg-server/Xi/opendev.c +++ b/xorg-server/Xi/opendev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -114,13 +112,14 @@ ProcXOpenDevice(ClientPtr client) } else if (status != Success) return status; - if (dev->isMaster) - return BadDevice; + if (IsMaster(dev)) + return BadDevice; OpenInputDevice(dev, client, &status); if (status != Success) return status; + memset(&rep, 0, sizeof(xOpenDeviceReply)); rep.repType = X_Reply; rep.RepType = X_OpenDevice; rep.sequenceNumber = client->sequence; @@ -151,7 +150,7 @@ ProcXOpenDevice(ClientPtr client) } evbase[j].class = OtherClass; evbase[j++].event_type_base = event_base[OtherClass]; - rep.length = (j * sizeof(xInputClassInfo) + 3) >> 2; + rep.length = bytes_to_int32(j * sizeof(xInputClassInfo)); rep.num_classes = j; WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep); WriteToClient(client, j * sizeof(xInputClassInfo), (char *)evbase); diff --git a/xorg-server/Xi/queryst.c b/xorg-server/Xi/queryst.c index 21de843f3..60ec32ec9 100644 --- a/xorg-server/Xi/queryst.c +++ b/xorg-server/Xi/queryst.c @@ -32,8 +32,6 @@ from The Open Group. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -44,6 +42,8 @@ from The Open Group. #include #include "exevents.h" #include "exglobals.h" +#include "xkbsrv.h" +#include "xkbstr.h" #include "queryst.h" @@ -85,7 +85,7 @@ ProcXQueryDeviceState(ClientPtr client) xValuatorState *tv; xQueryDeviceStateReply rep; DeviceIntPtr dev; - int *values; + double *values; REQUEST(xQueryDeviceStateReq); REQUEST_SIZE_MATCH(xQueryDeviceStateReq); @@ -128,7 +128,8 @@ ProcXQueryDeviceState(ClientPtr client) tk = (xKeyState *) buf; tk->class = KeyClass; tk->length = sizeof(xKeyState); - tk->num_keys = k->curKeySyms.maxKeyCode - k->curKeySyms.minKeyCode + 1; + tk->num_keys = k->xkbInfo->desc->max_key_code - + k->xkbInfo->desc->min_key_code + 1; for (i = 0; i < 32; i++) tk->keys[i] = k->down[i]; buf += sizeof(xKeyState); @@ -160,7 +161,7 @@ ProcXQueryDeviceState(ClientPtr client) } rep.num_classes = num_classes; - rep.length = (total_length + 3) >> 2; + rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xQueryDeviceStateReply), &rep); if (total_length > 0) WriteToClient(client, total_length, savbuf); diff --git a/xorg-server/Xi/selectev.c b/xorg-server/Xi/selectev.c index 9c336fce5..031e602ad 100644 --- a/xorg-server/Xi/selectev.c +++ b/xorg-server/Xi/selectev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include @@ -60,6 +58,7 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include +#include #include #include "exevents.h" #include "exglobals.h" @@ -68,7 +67,6 @@ SOFTWARE. #include "selectev.h" extern Mask ExtExclusiveMasks[]; -extern Mask ExtValidMasks[]; static int HandleDevicePresenceMask(ClientPtr client, WindowPtr win, @@ -106,10 +104,9 @@ HandleDevicePresenceMask(ClientPtr client, WindowPtr win, if (mask == 0) return Success; - /* We always only use mksidx = MAXDEVICES for events not bound to + /* We always only use mksidx = AllDevices for events not bound to * devices */ - - if (AddExtensionClient (win, client, mask, MAXDEVICES) != Success) + if (AddExtensionClient (win, client, mask, XIAllDevices) != Success) return BadAlloc; RecalculateDeviceDeliverableEvents(win); @@ -157,7 +154,7 @@ ProcXSelectExtensionEvent(ClientPtr client) REQUEST(xSelectExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); - if (stuff->length != (sizeof(xSelectExtensionEventReq) >> 2) + stuff->count) + if (stuff->length != bytes_to_int32(sizeof(xSelectExtensionEventReq)) + stuff->count) return BadLength; ret = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); @@ -175,10 +172,13 @@ ProcXSelectExtensionEvent(ClientPtr client) for (i = 0; i < EMASKSIZE; i++) if (tmp[i].dev != NULL) { + if (tmp[i].mask & ~XIAllMasks) { + client->errorValue = tmp[i].mask; + return BadValue; + } if ((ret = SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client, - tmp[i].mask, ExtExclusiveMasks[i], - ExtValidMasks[i])) != Success) + tmp[i].mask, ExtExclusiveMasks[i]))!= Success) return ret; } diff --git a/xorg-server/Xi/sendexev.c b/xorg-server/Xi/sendexev.c index 9b37de307..8629dd202 100644 --- a/xorg-server/Xi/sendexev.c +++ b/xorg-server/Xi/sendexev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -91,8 +89,8 @@ SProcXSendExtensionEvent(ClientPtr client) swapl(&stuff->destination, n); swaps(&stuff->count, n); - if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count + - (stuff->num_events * (sizeof(xEvent) >> 2))) + if (stuff->length != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count + + bytes_to_int32(stuff->num_events * sizeof(xEvent))) return BadLength; eventP = (xEvent *) & stuff[1]; @@ -128,8 +126,8 @@ ProcXSendExtensionEvent(ClientPtr client) REQUEST(xSendExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); - if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count + - (stuff->num_events * (sizeof(xEvent) >> 2))) + if (stuff->length != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count + + (stuff->num_events * bytes_to_int32(sizeof(xEvent)))) return BadLength; ret = dixLookupDevice(&dev, stuff->deviceid, client, DixWriteAccess); diff --git a/xorg-server/Xi/setbmap.c b/xorg-server/Xi/setbmap.c index f05225531..37c40e408 100644 --- a/xorg-server/Xi/setbmap.c +++ b/xorg-server/Xi/setbmap.c @@ -50,11 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES -#define IsOn(ptr, bit) \ - (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))) - #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -99,31 +94,30 @@ ProcXSetDeviceButtonMapping(ClientPtr client) REQUEST(xSetDeviceButtonMappingReq); REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq); - if (stuff->length != (sizeof(xSetDeviceButtonMappingReq) + - stuff->map_length + 3) >> 2) + if (stuff->length != + bytes_to_int32(sizeof(xSetDeviceButtonMappingReq) + stuff->map_length)) return BadLength; + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); + if (ret != Success) + return ret; + rep.repType = X_Reply; rep.RepType = X_SetDeviceButtonMapping; rep.length = 0; rep.sequenceNumber = client->sequence; rep.status = MappingSuccess; - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); - if (ret != Success) - return ret; - - ret = SetButtonMapping(client, dev, stuff->map_length, (BYTE *) & stuff[1]); + ret = ApplyPointerMapping(dev, (CARD8 *) &stuff[1], stuff->map_length, client); + if (ret == -1) + return BadValue; + else if (ret == MappingBusy) + rep.status = ret; + else if (ret != Success) + return ret; - if (ret == BadValue || ret == BadMatch) - return ret; - else { - rep.status = ret; - WriteReplyToClient(client, sizeof(xSetDeviceButtonMappingReply), &rep); - } + WriteReplyToClient(client, sizeof(xSetDeviceButtonMappingReply), &rep); - if (ret != MappingBusy) - SendDeviceMappingNotify(client, MappingPointer, 0, 0, dev); return Success; } diff --git a/xorg-server/Xi/setdval.c b/xorg-server/Xi/setdval.c index 20584629a..b384f0d3c 100644 --- a/xorg-server/Xi/setdval.c +++ b/xorg-server/Xi/setdval.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -102,7 +100,7 @@ ProcXSetDeviceValuators(ClientPtr client) rep.status = Success; rep.sequenceNumber = client->sequence; - if (stuff->length != (sizeof(xSetDeviceValuatorsReq) >> 2) + + if (stuff->length != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) + stuff->num_valuators) return BadLength; diff --git a/xorg-server/Xi/setfocus.c b/xorg-server/Xi/setfocus.c index c6edbc2e5..03bc37acb 100644 --- a/xorg-server/Xi/setfocus.c +++ b/xorg-server/Xi/setfocus.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/Xi/setmmap.c b/xorg-server/Xi/setmmap.c index 34efde595..cbe5dc8c5 100644 --- a/xorg-server/Xi/setmmap.c +++ b/xorg-server/Xi/setmmap.c @@ -50,14 +50,13 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include +#include #include #include "exevents.h" #include "exglobals.h" @@ -93,33 +92,39 @@ ProcXSetDeviceModifierMapping(ClientPtr client) int ret; xSetDeviceModifierMappingReply rep; DeviceIntPtr dev; - KeyClassPtr kp; REQUEST(xSetDeviceModifierMappingReq); REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq); - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); - if (ret != Success) - return ret; + if (stuff->length != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) + + (stuff->numKeyPerModifier << 1)) + return BadLength; rep.repType = X_Reply; rep.RepType = X_SetDeviceModifierMapping; rep.length = 0; rep.sequenceNumber = client->sequence; - ret = SetModifierMapping(client, dev, stuff->length, - (sizeof(xSetDeviceModifierMappingReq) >> 2), - stuff->numKeyPerModifier, (BYTE *) & stuff[1], - &kp); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); + if (ret != Success) + return ret; + + ret = change_modmap(client, dev, (KeyCode *) &stuff[1], + stuff->numKeyPerModifier); + if (ret == Success) + ret = MappingSuccess; if (ret == MappingSuccess || ret == MappingBusy || ret == MappingFailed) { rep.success = ret; - if (ret == MappingSuccess) - SendDeviceMappingNotify(client, MappingModifier, 0, 0, dev); WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply), &rep); - } else if (ret == -1) - return BadValue; + } + else if (ret == -1) { + return BadValue; + } + else { + return ret; + } return Success; } diff --git a/xorg-server/Xi/setmode.c b/xorg-server/Xi/setmode.c index 2badb5161..51e57675f 100644 --- a/xorg-server/Xi/setmode.c +++ b/xorg-server/Xi/setmode.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/Xi/stubs.c b/xorg-server/Xi/stubs.c index d01927c73..400e937d1 100644 --- a/xorg-server/Xi/stubs.c +++ b/xorg-server/Xi/stubs.c @@ -54,7 +54,6 @@ SOFTWARE. * Xnest could do the same thing. */ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -154,7 +153,7 @@ AddOtherInputDevices(void) void OpenInputDevice(DeviceIntPtr dev, ClientPtr client, int *status) { - *status = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess); + *status = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixUseAccess); } /**************************************************************************** diff --git a/xorg-server/Xi/ungrdev.c b/xorg-server/Xi/ungrdev.c index f6525a287..a09c3d024 100644 --- a/xorg-server/Xi/ungrdev.c +++ b/xorg-server/Xi/ungrdev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -106,7 +104,7 @@ ProcXUngrabDevice(ClientPtr client) time = ClientTimeToServerTime(stuff->time); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) && - (grab) && SameClient(grab, client) && !grab->coreGrab) + (grab) && SameClient(grab, client) && grab->grabtype == GRABTYPE_XI) (*dev->deviceGrab.DeactivateGrab) (dev); return Success; } diff --git a/xorg-server/Xi/ungrdevb.c b/xorg-server/Xi/ungrdevb.c index d1aef5f13..4e93f1ae3 100644 --- a/xorg-server/Xi/ungrdevb.c +++ b/xorg-server/Xi/ungrdevb.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -134,6 +132,7 @@ ProcXUngrabDeviceButton(ClientPtr client) temporaryGrab.device = dev; temporaryGrab.window = pWin; temporaryGrab.type = DeviceButtonPress; + temporaryGrab.grabtype = GRABTYPE_XI; temporaryGrab.modifierDevice = mdev; temporaryGrab.modifiersDetail.exact = stuff->modifiers; temporaryGrab.modifiersDetail.pMask = NULL; diff --git a/xorg-server/Xi/ungrdevk.c b/xorg-server/Xi/ungrdevk.c index bc3ada987..3b4d6260e 100644 --- a/xorg-server/Xi/ungrdevk.c +++ b/xorg-server/Xi/ungrdevk.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -62,6 +60,8 @@ SOFTWARE. #include #include "exglobals.h" #include "dixgrabs.h" +#include "xkbsrv.h" +#include "xkbstr.h" #include "ungrdevk.h" @@ -126,8 +126,8 @@ ProcXUngrabDeviceKey(ClientPtr client) if (rc != Success) return rc; - if (((stuff->key > dev->key->curKeySyms.maxKeyCode) || - (stuff->key < dev->key->curKeySyms.minKeyCode)) + if (((stuff->key > dev->key->xkbInfo->desc->max_key_code) || + (stuff->key < dev->key->xkbInfo->desc->min_key_code)) && (stuff->key != AnyKey)) return BadValue; @@ -139,6 +139,7 @@ ProcXUngrabDeviceKey(ClientPtr client) temporaryGrab.device = dev; temporaryGrab.window = pWin; temporaryGrab.type = DeviceKeyPress; + temporaryGrab.grabtype = GRABTYPE_XI; temporaryGrab.modifierDevice = mdev; temporaryGrab.modifiersDetail.exact = stuff->modifiers; temporaryGrab.modifiersDetail.pMask = NULL; diff --git a/xorg-server/Xi/xiallowev.c b/xorg-server/Xi/xiallowev.c new file mode 100644 index 000000000..3077e1a44 --- /dev/null +++ b/xorg-server/Xi/xiallowev.c @@ -0,0 +1,103 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ + +/*********************************************************************** + * + * Request to allow some device events. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include + +#include "exglobals.h" /* BadDevice */ +#include "xiallowev.h" + +int +SProcXIAllowEvents(ClientPtr client) +{ + char n; + + REQUEST(xXIAllowEventsReq); + + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->time, n); + + return ProcXIAllowEvents(client); +} + +int +ProcXIAllowEvents(ClientPtr client) +{ + TimeStamp time; + DeviceIntPtr dev; + int ret = Success; + + REQUEST(xXIAllowEventsReq); + REQUEST_SIZE_MATCH(xXIAllowEventsReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (ret != Success) + return ret; + + time = ClientTimeToServerTime(stuff->time); + + switch (stuff->mode) { + case XIReplayDevice: + AllowSome(client, time, dev, NOT_GRABBED); + break; + case XISyncDevice: + AllowSome(client, time, dev, FREEZE_NEXT_EVENT); + break; + case XIAsyncDevice: + AllowSome(client, time, dev, THAWED); + break; + case XIAsyncPairedDevice: + if (IsMaster(dev)) + AllowSome(client, time, dev, THAW_OTHERS); + break; + case XISyncPair: + if (IsMaster(dev)) + AllowSome(client, time, dev, FREEZE_BOTH_NEXT_EVENT); + break; + case XIAsyncPair: + if (IsMaster(dev)) + AllowSome(client, time, dev, THAWED_BOTH); + break; + default: + client->errorValue = stuff->mode; + ret = BadValue; + } + + return ret; +} + diff --git a/xorg-server/Xi/xiallowev.h b/xorg-server/Xi/xiallowev.h new file mode 100644 index 000000000..3a417b9b1 --- /dev/null +++ b/xorg-server/Xi/xiallowev.h @@ -0,0 +1,36 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef XIALLOWEV_H +#define XIALLOWEV_H 1 + +int ProcXIAllowEvents(ClientPtr client); +int SProcXIAllowEvents(ClientPtr client); + +#endif /* XIALLOWEV_H */ diff --git a/xorg-server/Xi/xichangecursor.c b/xorg-server/Xi/xichangecursor.c new file mode 100644 index 000000000..f071e8406 --- /dev/null +++ b/xorg-server/Xi/xichangecursor.c @@ -0,0 +1,113 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request to change a given device pointer's cursor. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" +#include "input.h" + +#include "xichangecursor.h" + +/*********************************************************************** + * + * This procedure allows a client to set one pointer's cursor. + * + */ + +int +SProcXIChangeCursor(ClientPtr client) +{ + char n; + + REQUEST(xXIChangeCursorReq); + swaps(&stuff->length, n); + swapl(&stuff->win, n); + swapl(&stuff->cursor, n); + swaps(&stuff->deviceid, n); + REQUEST_SIZE_MATCH(xXIChangeCursorReq); + return (ProcXIChangeCursor(client)); +} + +int ProcXIChangeCursor(ClientPtr client) +{ + int rc; + WindowPtr pWin = NULL; + DeviceIntPtr pDev = NULL; + CursorPtr pCursor = NULL; + + REQUEST(xXIChangeCursorReq); + REQUEST_SIZE_MATCH(xXIChangeCursorReq); + + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + if (!IsMaster(pDev) || !IsPointerDevice(pDev)) + return BadDevice; + + if (stuff->win != None) + { + rc = dixLookupWindow(&pWin, stuff->win, client, DixSetAttrAccess); + if (rc != Success) + return rc; + } + + if (stuff->cursor == None) + { + if (pWin == WindowTable[pWin->drawable.pScreen->myNum]) + pCursor = rootCursor; + else + pCursor = (CursorPtr)None; + } + else + { + rc = dixLookupResourceByType((pointer *)&pCursor, stuff->cursor, + RT_CURSOR, client, DixUseAccess); + if (rc != Success) + return (rc == BadValue) ? BadCursor : rc; + } + + ChangeWindowDeviceCursor(pWin, pDev, pCursor); + + return Success; +} + diff --git a/xorg-server/Xi/xichangecursor.h b/xorg-server/Xi/xichangecursor.h new file mode 100644 index 000000000..dc6ccb1af --- /dev/null +++ b/xorg-server/Xi/xichangecursor.h @@ -0,0 +1,36 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef CHDEVCUR_H +#define CHDEVCUR_H 1 + +int SProcXIChangeCursor(ClientPtr /* client */); +int ProcXIChangeCursor(ClientPtr /* client */); + +#endif /* CHDEVCUR_H */ diff --git a/xorg-server/Xi/xichangehierarchy.c b/xorg-server/Xi/xichangehierarchy.c new file mode 100644 index 000000000..1a06e4555 --- /dev/null +++ b/xorg-server/Xi/xichangehierarchy.c @@ -0,0 +1,454 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * Copyright 2009 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request change in the device hierarchy. + * + */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" +#include "geext.h" +#include "xace.h" +#include "xiquerydevice.h" /* for GetDeviceUse */ + +#include "xkbsrv.h" + +#include "xichangehierarchy.h" + +/** + * Send the current state of the device hierarchy to all clients. + */ +void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) +{ + xXIHierarchyEvent *ev; + xXIHierarchyInfo *info; + DeviceIntRec dummyDev; + DeviceIntPtr dev; + int i; + + if (!flags) + return; + + ev = xcalloc(1, sizeof(xXIHierarchyEvent) + + MAXDEVICES * sizeof(xXIHierarchyInfo)); + ev->type = GenericEvent; + ev->extension = IReqCode; + ev->evtype = XI_HierarchyChanged; + ev->time = GetTimeInMillis(); + ev->flags = 0; + ev->num_info = inputInfo.numDevices; + + info = (xXIHierarchyInfo*)&ev[1]; + for (dev = inputInfo.devices; dev; dev = dev->next) + { + info->deviceid = dev->id; + info->enabled = dev->enabled; + info->use = GetDeviceUse(dev, &info->attachment); + info->flags = flags[dev->id]; + ev->flags |= info->flags; + info++; + } + for (dev = inputInfo.off_devices; dev; dev = dev->next) + { + info->deviceid = dev->id; + info->enabled = dev->enabled; + info->use = GetDeviceUse(dev, &info->attachment); + info->flags = flags[dev->id]; + ev->flags |= info->flags; + info++; + } + + + for (i = 0; i < MAXDEVICES; i++) + { + if (flags[i] & (XIMasterRemoved | XISlaveRemoved)) + { + info->deviceid = i; + info->enabled = FALSE; + info->flags = flags[i]; + info->use = 0; + ev->flags |= info->flags; + ev->num_info++; + info++; + } + } + + ev->length = bytes_to_int32(ev->num_info * sizeof(xXIHierarchyInfo)); + + dummyDev.id = XIAllDevices; + SendEventToAllWindows(&dummyDev, (XI_HierarchyChangedMask >> 8), (xEvent*)ev, 1); + xfree(ev); +} + + +/*********************************************************************** + * + * This procedure allows a client to change the device hierarchy through + * adding new master devices, removing them, etc. + * + */ + +int SProcXIChangeHierarchy(ClientPtr client) +{ + char n; + + REQUEST(xXIChangeHierarchyReq); + swaps(&stuff->length, n); + return (ProcXIChangeHierarchy(client)); +} + +#define SWAPIF(cmd) if (client->swapped) { cmd; } + +int +ProcXIChangeHierarchy(ClientPtr client) +{ + DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd; + xXIAnyHierarchyChangeInfo *any; + int required_len = sizeof(xXIChangeHierarchyReq); + char n; + int rc = Success; + int flags[MAXDEVICES] = {0}; + + REQUEST(xXIChangeHierarchyReq); + REQUEST_AT_LEAST_SIZE(xXIChangeHierarchyReq); + + if (!stuff->num_changes) + return rc; + + any = (xXIAnyHierarchyChangeInfo*)&stuff[1]; + while(stuff->num_changes--) + { + SWAPIF(swapl(&any->type, n)); + SWAPIF(swaps(&any->length, n)); + + required_len += any->length; + if ((stuff->length * 4) < required_len) + return BadLength; + + switch(any->type) + { + case XIAddMaster: + { + xXIAddMasterInfo* c = (xXIAddMasterInfo*)any; + char* name; + + SWAPIF(swaps(&c->name_len, n)); + name = xcalloc(c->name_len + 1, sizeof(char)); + strncpy(name, (char*)&c[1], c->name_len); + + + rc = AllocDevicePair(client, name, &ptr, &keybd, + CorePointerProc, CoreKeyboardProc, + TRUE); + if (rc != Success) + { + xfree(name); + goto unwind; + } + + if (!c->send_core) + ptr->coreEvents = keybd->coreEvents = FALSE; + + /* Allocate virtual slave devices for xtest events */ + rc = AllocXTestDevice(client, name, &XTestptr, &XTestkeybd, + ptr, keybd); + if (rc != Success) + { + + xfree(name); + goto unwind; + } + + ActivateDevice(ptr, FALSE); + ActivateDevice(keybd, FALSE); + flags[ptr->id] |= XIMasterAdded; + flags[keybd->id] |= XIMasterAdded; + + ActivateDevice(XTestptr, FALSE); + ActivateDevice(XTestkeybd, FALSE); + flags[XTestptr->id] |= XISlaveAdded; + flags[XTestkeybd->id] |= XISlaveAdded; + + if (c->enable) + { + EnableDevice(ptr, FALSE); + EnableDevice(keybd, FALSE); + flags[ptr->id] |= XIDeviceEnabled; + flags[keybd->id] |= XIDeviceEnabled; + + EnableDevice(XTestptr, FALSE); + EnableDevice(XTestkeybd, FALSE); + flags[XTestptr->id] |= XIDeviceEnabled; + flags[XTestkeybd->id] |= XIDeviceEnabled; + } + + /* Attach the XTest virtual devices to the newly + created master device */ + AttachDevice(NULL, XTestptr, ptr); + AttachDevice(NULL, XTestkeybd, keybd); + flags[XTestptr->id] |= XISlaveAttached; + flags[XTestkeybd->id] |= XISlaveAttached; + + xfree(name); + } + break; + case XIRemoveMaster: + { + xXIRemoveMasterInfo* r = (xXIRemoveMasterInfo*)any; + + if (r->return_mode != XIAttachToMaster && + r->return_mode != XIFloating) + return BadValue; + + rc = dixLookupDevice(&ptr, r->deviceid, client, + DixDestroyAccess); + if (rc != Success) + goto unwind; + + if (!IsMaster(ptr)) + { + client->errorValue = r->deviceid; + rc = BadDevice; + goto unwind; + } + + /* XXX: For now, don't allow removal of VCP, VCK */ + if (ptr == inputInfo.pointer || + ptr == inputInfo.keyboard) + { + rc = BadDevice; + goto unwind; + } + + + ptr = GetMaster(ptr, MASTER_POINTER); + rc = dixLookupDevice(&ptr, + ptr->id, + client, + DixDestroyAccess); + if (rc != Success) + goto unwind; + keybd = GetMaster(ptr, MASTER_KEYBOARD); + rc = dixLookupDevice(&keybd, + keybd->id, + client, + DixDestroyAccess); + if (rc != Success) + goto unwind; + + XTestptr = GetXTestDevice(ptr); + rc = dixLookupDevice(&XTestptr, XTestptr->id, client, + DixDestroyAccess); + if (rc != Success) + goto unwind; + + XTestkeybd = GetXTestDevice(keybd); + rc = dixLookupDevice(&XTestkeybd, XTestkeybd->id, client, + DixDestroyAccess); + if (rc != Success) + goto unwind; + + /* Disabling sends the devices floating, reattach them if + * desired. */ + if (r->return_mode == XIAttachToMaster) + { + DeviceIntPtr attached, + newptr, + newkeybd; + + rc = dixLookupDevice(&newptr, r->return_pointer, + client, DixAddAccess); + if (rc != Success) + goto unwind; + + if (!IsMaster(newptr)) + { + client->errorValue = r->return_pointer; + rc = BadDevice; + goto unwind; + } + + rc = dixLookupDevice(&newkeybd, r->return_keyboard, + client, DixAddAccess); + if (rc != Success) + goto unwind; + + if (!IsMaster(newkeybd)) + { + client->errorValue = r->return_keyboard; + rc = BadDevice; + goto unwind; + } + + for (attached = inputInfo.devices; + attached; + attached = attached->next) + { + if (!IsMaster(attached)) { + if (attached->u.master == ptr) + { + AttachDevice(client, attached, newptr); + flags[attached->id] |= XISlaveAttached; + } + if (attached->u.master == keybd) + { + AttachDevice(client, attached, newkeybd); + flags[attached->id] |= XISlaveAttached; + } + } + } + } + + /* can't disable until we removed pairing */ + keybd->spriteInfo->paired = NULL; + ptr->spriteInfo->paired = NULL; + XTestptr->spriteInfo->paired = NULL; + XTestkeybd->spriteInfo->paired = NULL; + + /* disable the remove the devices, XTest devices must be done first + else the sprites they rely on will be destroyed */ + DisableDevice(XTestptr, FALSE); + DisableDevice(XTestkeybd, FALSE); + DisableDevice(keybd, FALSE); + DisableDevice(ptr, FALSE); + flags[XTestptr->id] |= XIDeviceDisabled | XISlaveDetached; + flags[XTestkeybd->id] |= XIDeviceDisabled | XISlaveDetached; + flags[keybd->id] |= XIDeviceDisabled; + flags[ptr->id] |= XIDeviceDisabled; + + RemoveDevice(XTestptr, FALSE); + RemoveDevice(XTestkeybd, FALSE); + RemoveDevice(keybd, FALSE); + RemoveDevice(ptr, FALSE); + flags[XTestptr->id] |= XISlaveRemoved; + flags[XTestkeybd->id] |= XISlaveRemoved; + flags[keybd->id] |= XIMasterRemoved; + flags[ptr->id] |= XIMasterRemoved; + } + break; + case XIDetachSlave: + { + xXIDetachSlaveInfo* c = (xXIDetachSlaveInfo*)any; + + rc = dixLookupDevice(&ptr, c->deviceid, client, + DixManageAccess); + if (rc != Success) + goto unwind; + + if (IsMaster(ptr)) + { + client->errorValue = c->deviceid; + rc = BadDevice; + goto unwind; + } + + /* Don't allow changes to XTest Devices, these are fixed */ + if (IsXTestDevice(ptr, NULL)) + { + client->errorValue = c->deviceid; + rc = BadDevice; + goto unwind; + } + + AttachDevice(client, ptr, NULL); + flags[ptr->id] |= XISlaveDetached; + } + break; + case XIAttachSlave: + { + xXIAttachSlaveInfo* c = (xXIAttachSlaveInfo*)any; + DeviceIntPtr newmaster; + + rc = dixLookupDevice(&ptr, c->deviceid, client, + DixManageAccess); + if (rc != Success) + goto unwind; + + if (IsMaster(ptr)) + { + client->errorValue = c->deviceid; + rc = BadDevice; + goto unwind; + } + + /* Don't allow changes to XTest Devices, these are fixed */ + if (IsXTestDevice(ptr, NULL)) + { + client->errorValue = c->deviceid; + rc = BadDevice; + goto unwind; + } + + rc = dixLookupDevice(&newmaster, c->new_master, + client, DixAddAccess); + if (rc != Success) + goto unwind; + if (!IsMaster(newmaster)) + { + client->errorValue = c->new_master; + rc = BadDevice; + goto unwind; + } + + if (!((IsPointerDevice(newmaster) && + IsPointerDevice(ptr)) || + (IsKeyboardDevice(newmaster) && + IsKeyboardDevice(ptr)))) + { + rc = BadDevice; + goto unwind; + } + AttachDevice(client, ptr, newmaster); + flags[ptr->id] |= XISlaveAttached; + } + break; + } + + any = (xXIAnyHierarchyChangeInfo*)((char*)any + any->length * 4); + } + +unwind: + + XISendDeviceHierarchyEvent(flags); + return rc; +} + diff --git a/xorg-server/Xi/xichangehierarchy.h b/xorg-server/Xi/xichangehierarchy.h new file mode 100644 index 000000000..483c6cd72 --- /dev/null +++ b/xorg-server/Xi/xichangehierarchy.h @@ -0,0 +1,44 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request change in the device hierarchy. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef CHDEVHIER_H +#define CHDEVHIER_H 1 + +int SProcXIChangeHierarchy(ClientPtr /* client */); +int ProcXIChangeHierarchy(ClientPtr /* client */); + +void XISendDeviceHierarchyEvent(int flags[]); + +#endif /* CHDEVHIER_H */ diff --git a/xorg-server/Xi/xigetclientpointer.c b/xorg-server/Xi/xigetclientpointer.c new file mode 100644 index 000000000..401e89fb4 --- /dev/null +++ b/xorg-server/Xi/xigetclientpointer.c @@ -0,0 +1,106 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "xigetclientpointer.h" + +/*********************************************************************** + * This procedure allows a client to query another client's client pointer + * setting. + */ + +int +SProcXIGetClientPointer(ClientPtr client) +{ + char n; + REQUEST(xXIGetClientPointerReq); + + swaps(&stuff->length, n); + swapl(&stuff->win, n); + return ProcXIGetClientPointer(client); +} + +int ProcXIGetClientPointer(ClientPtr client) +{ + int rc; + ClientPtr winclient; + xXIGetClientPointerReply rep; + REQUEST(xXIGetClientPointerReq); + REQUEST_SIZE_MATCH(xXIGetClientPointerReq); + + if (stuff->win != None) + { + rc = dixLookupClient(&winclient, stuff->win, client, + DixGetAttrAccess); + + if (rc != Success) + return BadWindow; + } else + winclient = client; + + rep.repType = X_Reply; + rep.RepType = X_XIGetClientPointer; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.set = (winclient->clientPtr != NULL); + rep.deviceid = (winclient->clientPtr) ? winclient->clientPtr->id : 0; + + WriteReplyToClient(client, sizeof(xXIGetClientPointerReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetClientPointer function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXIGetClientPointer(ClientPtr client, int size, + xXIGetClientPointerReply* rep) +{ + char n; + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->deviceid, n); + WriteToClient(client, size, (char *)rep); +} + diff --git a/xorg-server/Xi/xigetclientpointer.h b/xorg-server/Xi/xigetclientpointer.h new file mode 100644 index 000000000..1539aa8a9 --- /dev/null +++ b/xorg-server/Xi/xigetclientpointer.h @@ -0,0 +1,38 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef GETCPTR_H +#define GETCPTR_H 1 +int SProcXIGetClientPointer(ClientPtr /* client */); +int ProcXIGetClientPointer(ClientPtr /* client */); +void SRepXIGetClientPointer(ClientPtr /* client */, + int /* size */, + xXIGetClientPointerReply* /* rep */); + +#endif /* GETCPTR_H */ diff --git a/xorg-server/Xi/xigrabdev.c b/xorg-server/Xi/xigrabdev.c new file mode 100644 index 000000000..24ededcb1 --- /dev/null +++ b/xorg-server/Xi/xigrabdev.c @@ -0,0 +1,161 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ + +/*********************************************************************** + * + * Request to grab or ungrab input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include + +#include "exglobals.h" /* BadDevice */ +#include "exevents.h" +#include "xigrabdev.h" + +int +SProcXIGrabDevice(ClientPtr client) +{ + char n; + + REQUEST(xXIGrabDeviceReq); + + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->grab_window, n); + swapl(&stuff->cursor, n); + swapl(&stuff->time, n); + swaps(&stuff->mask_len, n); + + return ProcXIGrabDevice(client); +} + +int +ProcXIGrabDevice(ClientPtr client) +{ + DeviceIntPtr dev; + xXIGrabDeviceReply rep; + int ret = Success; + uint8_t status; + GrabMask mask; + int mask_len; + + REQUEST(xXIGrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (ret != Success) + return ret; + + if (!IsMaster(dev)) + stuff->paired_device_mode = GrabModeAsync; + + if (XICheckInvalidMaskBits((unsigned char*)&stuff[1], + stuff->mask_len * 4) != Success) + return BadValue; + + mask_len = min(sizeof(mask.xi2mask[stuff->deviceid]), stuff->mask_len * 4); + memset(mask.xi2mask, 0, sizeof(mask.xi2mask)); + memcpy(mask.xi2mask, (char*)&stuff[1], mask_len); + + ret = GrabDevice(client, dev, stuff->grab_mode, + stuff->paired_device_mode, + stuff->grab_window, + stuff->owner_events, + stuff->time, + &mask, + GRABTYPE_XI2, + stuff->cursor, + None /* confineTo */, + &status); + + if (ret != Success) + return ret; + + rep.repType = X_Reply; + rep.RepType = X_XIGrabDevice; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.status = status; + + + WriteReplyToClient(client, sizeof(rep), &rep); + return ret; +} + +int +SProcXIUngrabDevice(ClientPtr client) +{ + char n; + + REQUEST(xXIUngrabDeviceReq); + + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->time, n); + + return ProcXIUngrabDevice(client); +} + +int +ProcXIUngrabDevice(ClientPtr client) +{ + DeviceIntPtr dev; + GrabPtr grab; + int ret = Success; + TimeStamp time; + + REQUEST(xXIUngrabDeviceReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (ret != Success) + return ret; + + grab = dev->deviceGrab.grab; + + time = ClientTimeToServerTime(stuff->time); + if ((CompareTimeStamps(time, currentTime) != LATER) && + (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) && + (grab) && SameClient(grab, client) && grab->grabtype == GRABTYPE_XI2) + (*dev->deviceGrab.DeactivateGrab) (dev); + + return Success; +} + +void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server/Xi/xigrabdev.h b/xorg-server/Xi/xigrabdev.h new file mode 100644 index 000000000..08309c932 --- /dev/null +++ b/xorg-server/Xi/xigrabdev.h @@ -0,0 +1,41 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef XIGRABDEV_H +#define XIGRABDEV_H 1 + +int ProcXIGrabDevice(ClientPtr client); +int SProcXIGrabDevice(ClientPtr client); + +int ProcXIUngrabDevice(ClientPtr client); +int SProcXIUngrabDevice(ClientPtr client); + +void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep); + +#endif /* XIGRABDEV_H */ diff --git a/xorg-server/Xi/xipassivegrab.c b/xorg-server/Xi/xipassivegrab.c new file mode 100644 index 000000000..41a56b14e --- /dev/null +++ b/xorg-server/Xi/xipassivegrab.c @@ -0,0 +1,313 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ + +/*********************************************************************** + * + * Request to grab or ungrab input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include +#include "swaprep.h" + +#include "exglobals.h" /* BadDevice */ +#include "exevents.h" +#include "xipassivegrab.h" +#include "dixgrabs.h" + +int +SProcXIPassiveGrabDevice(ClientPtr client) +{ + int i; + char n; + xXIModifierInfo *mods; + + REQUEST(xXIPassiveGrabDeviceReq); + + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->grab_window, n); + swapl(&stuff->cursor, n); + swapl(&stuff->time, n); + swapl(&stuff->detail, n); + swaps(&stuff->mask_len, n); + swaps(&stuff->num_modifiers, n); + + mods = (xXIModifierInfo*)&stuff[1]; + + for (i = 0; i < stuff->num_modifiers; i++, mods++) + { + swapl(&mods->base_mods, n); + swapl(&mods->latched_mods, n); + swapl(&mods->locked_mods, n); + } + + return ProcXIPassiveGrabDevice(client); +} + +int +ProcXIPassiveGrabDevice(ClientPtr client) +{ + DeviceIntPtr dev, mod_dev; + xXIPassiveGrabDeviceReply rep; + int i, ret = Success; + uint8_t status; + uint32_t *modifiers; + xXIGrabModifierInfo *modifiers_failed; + GrabMask mask; + GrabParameters param; + void *tmp; + int mask_len; + + REQUEST(xXIPassiveGrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq); + + if (stuff->deviceid == XIAllDevices) + dev = inputInfo.all_devices; + else if (stuff->deviceid == XIAllMasterDevices) + dev = inputInfo.all_master_devices; + else + { + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (ret != Success) + return ret; + } + + if (stuff->grab_type != XIGrabtypeButton && + stuff->grab_type != XIGrabtypeKeycode && + stuff->grab_type != XIGrabtypeEnter && + stuff->grab_type != XIGrabtypeFocusIn) + { + client->errorValue = stuff->grab_type; + return BadValue; + } + + if ((stuff->grab_type == XIGrabtypeEnter || + stuff->grab_type == XIGrabtypeFocusIn) && stuff->detail != 0) + { + client->errorValue = stuff->detail; + return BadValue; + } + + if (XICheckInvalidMaskBits((unsigned char*)&stuff[1], + stuff->mask_len * 4) != Success) + return BadValue; + + mask_len = min(sizeof(mask.xi2mask[stuff->deviceid]), stuff->mask_len * 4); + memset(mask.xi2mask, 0, sizeof(mask.xi2mask)); + memcpy(mask.xi2mask[stuff->deviceid], &stuff[1], mask_len * 4); + + rep.repType = X_Reply; + rep.RepType = X_XIPassiveGrabDevice; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.num_modifiers = 0; + + memset(¶m, 0, sizeof(param)); + param.grabtype = GRABTYPE_XI2; + param.ownerEvents = stuff->owner_events; + param.this_device_mode = stuff->grab_mode; + param.other_devices_mode = stuff->paired_device_mode; + param.grabWindow = stuff->grab_window; + param.cursor = stuff->cursor; + + if (stuff->cursor != None) + { + status = dixLookupResourceByType(&tmp, stuff->cursor, + RT_CURSOR, client, DixUseAccess); + if (status != Success) + { + client->errorValue = stuff->cursor; + return (status == BadValue) ? BadCursor : status; + } + } + + status = dixLookupWindow((WindowPtr*)&tmp, stuff->grab_window, client, DixSetAttrAccess); + if (status != Success) + return status; + + status = CheckGrabValues(client, ¶m); + + modifiers = (uint32_t*)&stuff[1] + stuff->mask_len; + modifiers_failed = xcalloc(stuff->num_modifiers, sizeof(xXIGrabModifierInfo)); + if (!modifiers_failed) + return BadAlloc; + + if (!IsMaster(dev) && dev->u.master) + mod_dev = GetMaster(dev, MASTER_KEYBOARD); + else + mod_dev = dev; + + for (i = 0; i < stuff->num_modifiers; i++, modifiers++) + { + param.modifiers = *modifiers; + switch(stuff->grab_type) + { + case XIGrabtypeButton: + status = GrabButton(client, dev, mod_dev, stuff->detail, + ¶m, GRABTYPE_XI2, &mask); + break; + case XIGrabtypeKeycode: + status = GrabKey(client, dev, mod_dev, stuff->detail, + ¶m, GRABTYPE_XI2, &mask); + break; + case XIGrabtypeEnter: + case XIGrabtypeFocusIn: + status = GrabWindow(client, dev, stuff->grab_type, + ¶m, &mask); + break; + } + + if (status != GrabSuccess) + { + xXIGrabModifierInfo *info = modifiers_failed + rep.num_modifiers; + + info->status = status; + info->modifiers = *modifiers; + rep.num_modifiers++; + rep.length++; + } + } + + WriteReplyToClient(client, sizeof(rep), &rep); + if (rep.num_modifiers) + { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, rep.num_modifiers * 4, (char*)modifiers_failed); + } + xfree(modifiers_failed); + return ret; +} + +void +SRepXIPassiveGrabDevice(ClientPtr client, int size, + xXIPassiveGrabDeviceReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->num_modifiers, n); + + WriteToClient(client, size, (char *)rep); +} + +int +SProcXIPassiveUngrabDevice(ClientPtr client) +{ + char n; + int i; + uint32_t *modifiers; + + REQUEST(xXIPassiveUngrabDeviceReq); + + swaps(&stuff->length, n); + swapl(&stuff->grab_window, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->detail, n); + swaps(&stuff->num_modifiers, n); + + modifiers = (uint32_t*)&stuff[1]; + + for (i = 0; i < stuff->num_modifiers; i++, modifiers++) + swapl(modifiers, n); + + return ProcXIPassiveUngrabDevice(client); +} + +int +ProcXIPassiveUngrabDevice(ClientPtr client) +{ + DeviceIntPtr dev, mod_dev; + WindowPtr win; + GrabRec tempGrab; + uint32_t* modifiers; + int i, rc; + + REQUEST(xXIPassiveUngrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (rc != Success) + return rc; + + if (stuff->grab_type != XIGrabtypeButton && + stuff->grab_type != XIGrabtypeKeycode && + stuff->grab_type != XIGrabtypeEnter && + stuff->grab_type != XIGrabtypeFocusIn) + { + client->errorValue = stuff->grab_type; + return BadValue; + } + + if ((stuff->grab_type == XIGrabtypeEnter || + stuff->grab_type == XIGrabtypeFocusIn) && stuff->detail != 0) + { + client->errorValue = stuff->detail; + return BadValue; + } + + rc = dixLookupWindow(&win, stuff->grab_window, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + if (!IsMaster(dev) && dev->u.master) + mod_dev = GetMaster(dev, MASTER_KEYBOARD); + else + mod_dev = dev; + + tempGrab.resource = client->clientAsMask; + tempGrab.device = dev; + tempGrab.window = win; + switch(stuff->grab_type) + { + case XIGrabtypeButton: tempGrab.type = XI_ButtonPress; break; + case XIGrabtypeKeycode: tempGrab.type = XI_KeyPress; break; + case XIGrabtypeEnter: tempGrab.type = XI_Enter; break; + case XIGrabtypeFocusIn: tempGrab.type = XI_FocusIn; break; + } + tempGrab.grabtype = GRABTYPE_XI2; + tempGrab.modifierDevice = mod_dev; + tempGrab.modifiersDetail.pMask = NULL; + tempGrab.detail.exact = stuff->detail; + tempGrab.detail.pMask = NULL; + + modifiers = (uint32_t*)&stuff[1]; + + for (i = 0; i < stuff->num_modifiers; i++, modifiers++) + { + tempGrab.modifiersDetail.exact = *modifiers; + DeletePassiveGrabFromList(&tempGrab); + } + + return Success; +} diff --git a/xorg-server/Xi/xipassivegrab.h b/xorg-server/Xi/xipassivegrab.h new file mode 100644 index 000000000..079e7c61b --- /dev/null +++ b/xorg-server/Xi/xipassivegrab.h @@ -0,0 +1,39 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef XIPASSIVEGRAB_H +#define XIPASSIVEGRAB_H 1 + +int SProcXIPassiveUngrabDevice(ClientPtr client); +int ProcXIPassiveUngrabDevice(ClientPtr client); +void SRepXIPassiveGrabDevice(ClientPtr client, int size, xXIPassiveGrabDeviceReply * rep); +int ProcXIPassiveGrabDevice(ClientPtr client); +int SProcXIPassiveGrabDevice(ClientPtr client); + +#endif /* XIPASSIVEGRAB_H */ diff --git a/xorg-server/Xi/xiproperty.c b/xorg-server/Xi/xiproperty.c index b04ee9433..024dc444b 100644 --- a/xorg-server/Xi/xiproperty.c +++ b/xorg-server/Xi/xiproperty.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "exglobals.h" #include "exevents.h" #include "swaprep.h" @@ -50,18 +51,323 @@ static struct dev_properties char *name; } dev_properties[] = { {0, XI_PROP_ENABLED}, - {0, XATOM_FLOAT} + {0, XI_PROP_XTEST_DEVICE}, + {0, XATOM_FLOAT}, + {0, ACCEL_PROP_PROFILE_NUMBER}, + {0, ACCEL_PROP_CONSTANT_DECELERATION}, + {0, ACCEL_PROP_ADAPTIVE_DECELERATION}, + {0, ACCEL_PROP_VELOCITY_SCALING}, + {0, AXIS_LABEL_PROP}, + {0, AXIS_LABEL_PROP_REL_X}, + {0, AXIS_LABEL_PROP_REL_Y}, + {0, AXIS_LABEL_PROP_REL_Z}, + {0, AXIS_LABEL_PROP_REL_RX}, + {0, AXIS_LABEL_PROP_REL_RY}, + {0, AXIS_LABEL_PROP_REL_RZ}, + {0, AXIS_LABEL_PROP_REL_HWHEEL}, + {0, AXIS_LABEL_PROP_REL_DIAL}, + {0, AXIS_LABEL_PROP_REL_WHEEL}, + {0, AXIS_LABEL_PROP_REL_MISC}, + {0, AXIS_LABEL_PROP_ABS_X}, + {0, AXIS_LABEL_PROP_ABS_Y}, + {0, AXIS_LABEL_PROP_ABS_Z}, + {0, AXIS_LABEL_PROP_ABS_RX}, + {0, AXIS_LABEL_PROP_ABS_RY}, + {0, AXIS_LABEL_PROP_ABS_RZ}, + {0, AXIS_LABEL_PROP_ABS_THROTTLE}, + {0, AXIS_LABEL_PROP_ABS_RUDDER}, + {0, AXIS_LABEL_PROP_ABS_WHEEL}, + {0, AXIS_LABEL_PROP_ABS_GAS}, + {0, AXIS_LABEL_PROP_ABS_BRAKE}, + {0, AXIS_LABEL_PROP_ABS_HAT0X}, + {0, AXIS_LABEL_PROP_ABS_HAT0Y}, + {0, AXIS_LABEL_PROP_ABS_HAT1X}, + {0, AXIS_LABEL_PROP_ABS_HAT1Y}, + {0, AXIS_LABEL_PROP_ABS_HAT2X}, + {0, AXIS_LABEL_PROP_ABS_HAT2Y}, + {0, AXIS_LABEL_PROP_ABS_HAT3X}, + {0, AXIS_LABEL_PROP_ABS_HAT3Y}, + {0, AXIS_LABEL_PROP_ABS_PRESSURE}, + {0, AXIS_LABEL_PROP_ABS_DISTANCE}, + {0, AXIS_LABEL_PROP_ABS_TILT_X}, + {0, AXIS_LABEL_PROP_ABS_TILT_Y}, + {0, AXIS_LABEL_PROP_ABS_TOOL_WIDTH}, + {0, AXIS_LABEL_PROP_ABS_VOLUME}, + {0, AXIS_LABEL_PROP_ABS_MISC}, + + {0, BTN_LABEL_PROP}, + {0, BTN_LABEL_PROP_BTN_UNKNOWN}, + {0, BTN_LABEL_PROP_BTN_WHEEL_UP}, + {0, BTN_LABEL_PROP_BTN_WHEEL_DOWN}, + {0, BTN_LABEL_PROP_BTN_HWHEEL_LEFT}, + {0, BTN_LABEL_PROP_BTN_HWHEEL_RIGHT}, + {0, BTN_LABEL_PROP_BTN_0}, + {0, BTN_LABEL_PROP_BTN_1}, + {0, BTN_LABEL_PROP_BTN_2}, + {0, BTN_LABEL_PROP_BTN_3}, + {0, BTN_LABEL_PROP_BTN_4}, + {0, BTN_LABEL_PROP_BTN_5}, + {0, BTN_LABEL_PROP_BTN_6}, + {0, BTN_LABEL_PROP_BTN_7}, + {0, BTN_LABEL_PROP_BTN_8}, + {0, BTN_LABEL_PROP_BTN_9}, + + {0, BTN_LABEL_PROP_BTN_LEFT}, + {0, BTN_LABEL_PROP_BTN_RIGHT}, + {0, BTN_LABEL_PROP_BTN_MIDDLE}, + {0, BTN_LABEL_PROP_BTN_SIDE}, + {0, BTN_LABEL_PROP_BTN_EXTRA}, + {0, BTN_LABEL_PROP_BTN_FORWARD}, + {0, BTN_LABEL_PROP_BTN_BACK}, + {0, BTN_LABEL_PROP_BTN_TASK}, + + {0, BTN_LABEL_PROP_BTN_TRIGGER}, + {0, BTN_LABEL_PROP_BTN_THUMB}, + {0, BTN_LABEL_PROP_BTN_THUMB2}, + {0, BTN_LABEL_PROP_BTN_TOP}, + {0, BTN_LABEL_PROP_BTN_TOP2}, + {0, BTN_LABEL_PROP_BTN_PINKIE}, + {0, BTN_LABEL_PROP_BTN_BASE}, + {0, BTN_LABEL_PROP_BTN_BASE2}, + {0, BTN_LABEL_PROP_BTN_BASE3}, + {0, BTN_LABEL_PROP_BTN_BASE4}, + {0, BTN_LABEL_PROP_BTN_BASE5}, + {0, BTN_LABEL_PROP_BTN_BASE6}, + {0, BTN_LABEL_PROP_BTN_DEAD}, + + {0, BTN_LABEL_PROP_BTN_A}, + {0, BTN_LABEL_PROP_BTN_B}, + {0, BTN_LABEL_PROP_BTN_C}, + {0, BTN_LABEL_PROP_BTN_X}, + {0, BTN_LABEL_PROP_BTN_Y}, + {0, BTN_LABEL_PROP_BTN_Z}, + {0, BTN_LABEL_PROP_BTN_TL}, + {0, BTN_LABEL_PROP_BTN_TR}, + {0, BTN_LABEL_PROP_BTN_TL2}, + {0, BTN_LABEL_PROP_BTN_TR2}, + {0, BTN_LABEL_PROP_BTN_SELECT}, + {0, BTN_LABEL_PROP_BTN_START}, + {0, BTN_LABEL_PROP_BTN_MODE}, + {0, BTN_LABEL_PROP_BTN_THUMBL}, + {0, BTN_LABEL_PROP_BTN_THUMBR}, + + {0, BTN_LABEL_PROP_BTN_TOOL_PEN}, + {0, BTN_LABEL_PROP_BTN_TOOL_RUBBER}, + {0, BTN_LABEL_PROP_BTN_TOOL_BRUSH}, + {0, BTN_LABEL_PROP_BTN_TOOL_PENCIL}, + {0, BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH}, + {0, BTN_LABEL_PROP_BTN_TOOL_FINGER}, + {0, BTN_LABEL_PROP_BTN_TOOL_MOUSE}, + {0, BTN_LABEL_PROP_BTN_TOOL_LENS}, + {0, BTN_LABEL_PROP_BTN_TOUCH}, + {0, BTN_LABEL_PROP_BTN_STYLUS}, + {0, BTN_LABEL_PROP_BTN_STYLUS2}, + {0, BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP}, + {0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP}, + + {0, BTN_LABEL_PROP_BTN_GEAR_DOWN}, + {0, BTN_LABEL_PROP_BTN_GEAR_UP} }; static long XIPropHandlerID = 1; +static void send_property_event(DeviceIntPtr dev, Atom property, int what) +{ + devicePropertyNotify event; + xXIPropertyEvent xi2; + int state; + + if (what == XIPropertyDeleted) + state = PropertyDelete; + else + state = PropertyNewValue; + + event.type = DevicePropertyNotify; + event.deviceid = dev->id; + event.state = state; + event.atom = property; + event.time = currentTime.milliseconds; + SendEventToAllWindows(dev, DevicePropertyNotifyMask, + (xEvent*)&event, 1); + + xi2.type = GenericEvent; + xi2.extension = IReqCode; + xi2.length = 0; + xi2.evtype = XI_PropertyEvent; + xi2.deviceid = dev->id; + xi2.time = currentTime.milliseconds; + xi2.property = property; + xi2.what = what; + SendEventToAllWindows(dev, GetEventFilter(dev, (xEvent*)&xi2), + (xEvent*)&xi2, 1); +} + +static int list_atoms(DeviceIntPtr dev, int *natoms, Atom **atoms_return) +{ + XIPropertyPtr prop; + Atom *atoms = NULL; + int nprops = 0; + + for (prop = dev->properties.properties; prop; prop = prop->next) + nprops++; + if (nprops) + { + Atom *a; + + atoms = xalloc(nprops * sizeof(Atom)); + if(!atoms) + return BadAlloc; + a = atoms; + for (prop = dev->properties.properties; prop; prop = prop->next, a++) + *a = prop->propertyName; + } + + *natoms = nprops; + *atoms_return = atoms; + return Success; +} + +static int +get_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type, + BOOL delete, int offset, int length, + int *bytes_after, Atom *type_return, int *format, int *nitems, + int *length_return, char **data) +{ + unsigned long n, len, ind; + int rc; + XIPropertyPtr prop; + XIPropertyValuePtr prop_value; + + if (!ValidAtom(property)) + { + client->errorValue = property; + return(BadAtom); + } + if ((delete != xTrue) && (delete != xFalse)) + { + client->errorValue = delete; + return(BadValue); + } + + if ((type != AnyPropertyType) && !ValidAtom(type)) + { + client->errorValue = type; + return(BadAtom); + } + + for (prop = dev->properties.properties; prop; prop = prop->next) + if (prop->propertyName == property) + break; + + if (!prop) + { + *bytes_after = 0; + *type_return = None; + *format = 0; + *nitems = 0; + *length_return = 0; + return Success; + } + + rc = XIGetDeviceProperty(dev, property, &prop_value); + if (rc != Success) + { + client->errorValue = property; + return rc; + } + + /* If the request type and actual type don't match. Return the + property information, but not the data. */ + + if (((type != prop_value->type) && (type != AnyPropertyType))) + { + *bytes_after = prop_value->size; + *format = prop_value->format; + *length_return = 0; + *nitems = 0; + *type_return = prop_value->type; + return Success; + } + + /* Return type, format, value to client */ + n = (prop_value->format/8) * prop_value->size; /* size (bytes) of prop */ + ind = offset << 2; + + /* If offset is invalid such that it causes "len" to + be negative, it's a value error. */ + + if (n < ind) + { + client->errorValue = offset; + return BadValue; + } + + len = min(n - ind, 4 * length); + + *bytes_after = n - (ind + len); + *format = prop_value->format; + *length_return = len; + if (prop_value->format) + *nitems = len / (prop_value->format / 8); + else + *nitems = 0; + *type_return = prop_value->type; + + *data = (char*)prop_value->data + ind; + + return Success; +} + +static int +check_change_property(ClientPtr client, Atom property, Atom type, int format, + int mode, int nitems) +{ + if ((mode != PropModeReplace) && (mode != PropModeAppend) && + (mode != PropModePrepend)) + { + client->errorValue = mode; + return BadValue; + } + if ((format != 8) && (format != 16) && (format != 32)) + { + client->errorValue = format; + return BadValue; + } + + if (!ValidAtom(property)) + { + client->errorValue = property; + return(BadAtom); + } + if (!ValidAtom(type)) + { + client->errorValue = type; + return(BadAtom); + } + + return Success; +} + +static int +change_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type, + int format, int mode, int len, void *data) +{ + int rc = Success; + + rc = XIChangeDeviceProperty(dev, property, type, format, mode, len, data, TRUE); + if (rc != Success) + client->errorValue = property; + + return rc; +} + /** - * Return the type assigned to the specified atom or 0 if the atom isn't known + * Return the atom assigned to the specified string or 0 if the atom isn't known * to the DIX. * * If name is NULL, None is returned. */ -_X_EXPORT Atom +Atom XIGetKnownProperty(char *name) { int i; @@ -71,8 +377,16 @@ XIGetKnownProperty(char *name) for (i = 0; i < (sizeof(dev_properties)/sizeof(struct dev_properties)); i++) { - if (strcmp(name, dev_properties[i].name) == 0) + if (strcmp(name, dev_properties[i].name) == 0){ + if (dev_properties[i].type == None){ + dev_properties[i].type = + MakeAtom(dev_properties[i].name, + strlen(dev_properties[i].name), + TRUE); + } + return dev_properties[i].type; + } } return 0; @@ -197,24 +511,6 @@ XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return) return Success; } -/** - * Init those properties that are allocated by the server and most likely used - * by the DIX or the DDX. - */ -void -XIInitKnownProperties(void) -{ - int i; - for (i = 0; i < (sizeof(dev_properties)/sizeof(struct dev_properties)); i++) - { - dev_properties[i].type = - MakeAtom(dev_properties[i].name, - strlen(dev_properties[i].name), - TRUE); - } -} - - /* Registers a new property handler on the given device and returns a unique * identifier for this handler. This identifier is required to unregister the * property handler again. @@ -318,20 +614,11 @@ XIDeleteAllDeviceProperties (DeviceIntPtr device) { XIPropertyPtr prop, next; XIPropertyHandlerPtr curr_handler, next_handler; - devicePropertyNotify event; for (prop = device->properties.properties; prop; prop = next) { next = prop->next; - - event.type = DevicePropertyNotify; - event.deviceid = device->id; - event.state = PropertyDelete; - event.atom = prop->propertyName; - event.time = currentTime.milliseconds; - SendEventToAllWindows(device, DevicePropertyNotifyMask, - (xEvent*)&event, 1); - + send_property_event(device, prop->propertyName, XIPropertyDeleted); XIDestroyDeviceProperty(prop); } @@ -350,7 +637,6 @@ int XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient) { XIPropertyPtr prop, *prev; - devicePropertyNotify event; int rc = Success; for (prev = &device->properties.properties; (prop = *prev); prev = &(prop->next)) @@ -377,13 +663,7 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient) if (prop) { *prev = prop->next; - event.type = DevicePropertyNotify; - event.deviceid = device->id; - event.state = PropertyDelete; - event.atom = prop->propertyName; - event.time = currentTime.milliseconds; - SendEventToAllWindows(device, DevicePropertyNotifyMask, - (xEvent*)&event, 1); + send_property_event(device, prop->propertyName, XIPropertyDeleted); XIDestroyDeviceProperty (prop); } @@ -396,7 +676,6 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, pointer value, Bool sendevent) { XIPropertyPtr prop; - devicePropertyNotify event; int size_in_bytes; int total_size; unsigned long total_len; @@ -515,15 +794,9 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, } if (sendevent) - { - event.type = DevicePropertyNotify; - event.deviceid = dev->id; - event.state = PropertyNewValue; - event.atom = prop->propertyName; - event.time = currentTime.milliseconds; - SendEventToAllWindows(dev, DevicePropertyNotifyMask, - (xEvent*)&event, 1); - } + send_property_event(dev, prop->propertyName, + (add) ? XIPropertyCreated : XIPropertyModified); + return(Success); } @@ -577,41 +850,35 @@ XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable) int ProcXListDeviceProperties (ClientPtr client) { - Atom *pAtoms = NULL, *temppAtoms; + Atom *atoms; xListDevicePropertiesReply rep; - int numProps = 0; + int natoms; DeviceIntPtr dev; - XIPropertyPtr prop; int rc = Success; REQUEST(xListDevicePropertiesReq); REQUEST_SIZE_MATCH(xListDevicePropertiesReq); - rc = dixLookupDevice (&dev, stuff->deviceid, client, DixReadAccess); + rc = dixLookupDevice (&dev, stuff->deviceid, client, DixListPropAccess); if (rc != Success) return rc; - for (prop = dev->properties.properties; prop; prop = prop->next) - numProps++; - if (numProps) - if(!(pAtoms = (Atom *)xalloc(numProps * sizeof(Atom)))) - return(BadAlloc); + rc = list_atoms(dev, &natoms, &atoms); + if (rc != Success) + return rc; rep.repType = X_Reply; rep.RepType = X_ListDeviceProperties; - rep.length = (numProps * sizeof(Atom)) >> 2; + rep.length = natoms; rep.sequenceNumber = client->sequence; - rep.nAtoms = numProps; - temppAtoms = pAtoms; - for (prop = dev->properties.properties; prop; prop = prop->next) - *temppAtoms++ = prop->propertyName; + rep.nAtoms = natoms; WriteReplyToClient(client, sizeof(xListDevicePropertiesReply), &rep); - if (numProps) + if (natoms) { client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; - WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); - xfree(pAtoms); + WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms); + xfree(atoms); } return rc; } @@ -621,55 +888,29 @@ ProcXChangeDeviceProperty (ClientPtr client) { REQUEST(xChangeDevicePropertyReq); DeviceIntPtr dev; - char format, mode; unsigned long len; - int sizeInBytes; int totalSize; int rc; REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq); UpdateCurrentTime(); - format = stuff->format; - mode = stuff->mode; - if ((mode != PropModeReplace) && (mode != PropModeAppend) && - (mode != PropModePrepend)) - { - client->errorValue = mode; - return BadValue; - } - if ((format != 8) && (format != 16) && (format != 32)) - { - client->errorValue = format; - return BadValue; - } - len = stuff->nUnits; - if (len > ((0xffffffff - sizeof(xChangeDevicePropertyReq)) >> 2)) - return BadLength; - sizeInBytes = format>>3; - totalSize = len * sizeInBytes; - REQUEST_FIXED_SIZE(xChangeDevicePropertyReq, totalSize); - rc = dixLookupDevice (&dev, stuff->deviceid, client, DixWriteAccess); + rc = dixLookupDevice (&dev, stuff->deviceid, client, DixSetPropAccess); if (rc != Success) return rc; - if (!ValidAtom(stuff->property)) - { - client->errorValue = stuff->property; - return(BadAtom); - } - if (!ValidAtom(stuff->type)) - { - client->errorValue = stuff->type; - return(BadAtom); - } + rc = check_change_property(client, stuff->property, stuff->type, + stuff->format, stuff->mode, stuff->nUnits); - rc = XIChangeDeviceProperty(dev, stuff->property, - stuff->type, (int)format, - (int)mode, len, (pointer)&stuff[1], TRUE); + len = stuff->nUnits; + if (len > (bytes_to_int32(0xffffffff - sizeof(xChangeDevicePropertyReq)))) + return BadLength; - if (rc != Success) - client->errorValue = stuff->property; + totalSize = len * (stuff->format/8); + REQUEST_FIXED_SIZE(xChangeDevicePropertyReq, totalSize); + + rc = change_property(client, dev, stuff->property, stuff->type, + stuff->format, stuff->mode, len, (void*)&stuff[1]); return rc; } @@ -682,7 +923,7 @@ ProcXDeleteDeviceProperty (ClientPtr client) REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq); UpdateCurrentTime(); - rc = dixLookupDevice (&dev, stuff->deviceid, client, DixWriteAccess); + rc = dixLookupDevice (&dev, stuff->deviceid, client, DixSetPropAccess); if (rc != Success) return rc; @@ -700,137 +941,69 @@ int ProcXGetDeviceProperty (ClientPtr client) { REQUEST(xGetDevicePropertyReq); - XIPropertyPtr prop, *prev; - XIPropertyValuePtr prop_value; - unsigned long n, len, ind; DeviceIntPtr dev; + int length; + int rc, format, nitems, bytes_after; + char *data; + Atom type; xGetDevicePropertyReply reply; - int rc; REQUEST_SIZE_MATCH(xGetDevicePropertyReq); if (stuff->delete) UpdateCurrentTime(); rc = dixLookupDevice (&dev, stuff->deviceid, client, - stuff->delete ? DixWriteAccess : - DixReadAccess); + stuff->delete ? DixSetPropAccess : + DixGetPropAccess); if (rc != Success) return rc; - if (!ValidAtom(stuff->property)) - { - client->errorValue = stuff->property; - return(BadAtom); - } - if ((stuff->delete != xTrue) && (stuff->delete != xFalse)) - { - client->errorValue = stuff->delete; - return(BadValue); - } - if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type)) - { - client->errorValue = stuff->type; - return(BadAtom); - } + rc = get_property(client, dev, stuff->property, stuff->type, + stuff->delete, stuff->longOffset, stuff->longLength, + &bytes_after, &type, &format, &nitems, &length, &data); - for (prev = &dev->properties.properties; (prop = *prev); prev = &prop->next) - if (prop->propertyName == stuff->property) - break; + if (rc != Success) + return rc; reply.repType = X_Reply; reply.RepType = X_GetDeviceProperty; reply.sequenceNumber = client->sequence; reply.deviceid = dev->id; - if (!prop) - { - reply.nItems = 0; - reply.length = 0; - reply.bytesAfter = 0; - reply.propertyType = None; - reply.format = 0; - WriteReplyToClient(client, sizeof(xGetDevicePropertyReply), &reply); - return(client->noClientException); - } - - rc = XIGetDeviceProperty(dev, stuff->property, &prop_value); - if (rc != Success) - { - client->errorValue = stuff->property; - return rc; - } - - /* If the request type and actual type don't match. Return the - property information, but not the data. */ - - if (((stuff->type != prop_value->type) && - (stuff->type != AnyPropertyType)) - ) - { - reply.bytesAfter = prop_value->size; - reply.format = prop_value->format; - reply.length = 0; - reply.nItems = 0; - reply.propertyType = prop_value->type; - WriteReplyToClient(client, sizeof(xGetDevicePropertyReply), &reply); - return(client->noClientException); - } - -/* - * Return type, format, value to client - */ - n = (prop_value->format/8) * prop_value->size; /* size (bytes) of prop */ - ind = stuff->longOffset << 2; - - /* If longOffset is invalid such that it causes "len" to - be negative, it's a value error. */ - - if (n < ind) - { - client->errorValue = stuff->longOffset; - return BadValue; - } - - len = min(n - ind, 4 * stuff->longLength); - - reply.bytesAfter = n - (ind + len); - reply.format = prop_value->format; - reply.length = (len + 3) >> 2; - if (prop_value->format) - reply.nItems = len / (prop_value->format / 8); - else - reply.nItems = 0; - reply.propertyType = prop_value->type; + reply.nItems = nitems; + reply.format = format; + reply.bytesAfter = bytes_after; + reply.propertyType = type; + reply.length = bytes_to_int32(length); if (stuff->delete && (reply.bytesAfter == 0)) - { - devicePropertyNotify event; - - event.type = DevicePropertyNotify; - event.deviceid = dev->id; - event.state = PropertyDelete; - event.atom = prop->propertyName; - event.time = currentTime.milliseconds; - SendEventToAllWindows(dev, DevicePropertyNotifyMask, - (xEvent*)&event, 1); - } + send_property_event(dev, stuff->property, XIPropertyDeleted); WriteReplyToClient(client, sizeof(xGenericReply), &reply); - if (len) + + if (length) { switch (reply.format) { - case 32: client->pSwapReplyFunc = (ReplySwapPtr)CopySwap32Write; break; - case 16: client->pSwapReplyFunc = (ReplySwapPtr)CopySwap16Write; break; - default: client->pSwapReplyFunc = (ReplySwapPtr)WriteToClient; break; + case 32: client->pSwapReplyFunc = (ReplySwapPtr)CopySwap32Write; break; + case 16: client->pSwapReplyFunc = (ReplySwapPtr)CopySwap16Write; break; + default: client->pSwapReplyFunc = (ReplySwapPtr)WriteToClient; break; } - WriteSwappedDataToClient(client, len, - (char *)prop_value->data + ind); + WriteSwappedDataToClient(client, length, data); } + /* delete the Property */ if (stuff->delete && (reply.bytesAfter == 0)) - { /* delete the Property */ - *prev = prop->next; - XIDestroyDeviceProperty (prop); + { + XIPropertyPtr prop, *prev; + for (prev = &dev->properties.properties; (prop = *prev); prev = &prop->next) + { + if (prop->propertyName == stuff->property) + { + *prev = prop->next; + XIDestroyDeviceProperty(prop); + break; + } + } } - return(client->noClientException); + return Success; } @@ -916,3 +1089,248 @@ SRepXGetDeviceProperty(ClientPtr client, int size, /* data will be swapped, see ProcXGetDeviceProperty */ WriteToClient(client, size, (char*)rep); } + +/* XI2 Request/reply handling */ +int +ProcXIListProperties(ClientPtr client) +{ + Atom *atoms; + xXIListPropertiesReply rep; + int natoms; + DeviceIntPtr dev; + int rc = Success; + + REQUEST(xXIListPropertiesReq); + REQUEST_SIZE_MATCH(xXIListPropertiesReq); + + rc = dixLookupDevice (&dev, stuff->deviceid, client, DixListPropAccess); + if (rc != Success) + return rc; + + rc = list_atoms(dev, &natoms, &atoms); + if (rc != Success) + return rc; + + rep.repType = X_Reply; + rep.RepType = X_XIListProperties; + rep.length = natoms; + rep.sequenceNumber = client->sequence; + rep.num_properties = natoms; + + WriteReplyToClient(client, sizeof(xXIListPropertiesReply), &rep); + if (natoms) + { + client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; + WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms); + xfree(atoms); + } + return rc; +} + +int +ProcXIChangeProperty(ClientPtr client) +{ + int rc; + DeviceIntPtr dev; + int totalSize; + unsigned long len; + + REQUEST(xXIChangePropertyReq); + REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq); + UpdateCurrentTime(); + + rc = dixLookupDevice (&dev, stuff->deviceid, client, DixSetPropAccess); + if (rc != Success) + return rc; + + rc = check_change_property(client, stuff->property, stuff->type, + stuff->format, stuff->mode, stuff->num_items); + len = stuff->num_items; + if (len > bytes_to_int32(0xffffffff - sizeof(xXIChangePropertyReq))) + return BadLength; + + totalSize = len * (stuff->format/8); + REQUEST_FIXED_SIZE(xXIChangePropertyReq, totalSize); + + rc = change_property(client, dev, stuff->property, stuff->type, + stuff->format, stuff->mode, len, (void*)&stuff[1]); + return rc; +} + +int +ProcXIDeleteProperty(ClientPtr client) +{ + DeviceIntPtr dev; + int rc; + REQUEST(xXIDeletePropertyReq); + + REQUEST_SIZE_MATCH(xXIDeletePropertyReq); + UpdateCurrentTime(); + rc = dixLookupDevice (&dev, stuff->deviceid, client, DixSetPropAccess); + if (rc != Success) + return rc; + + if (!ValidAtom(stuff->property)) + { + client->errorValue = stuff->property; + return (BadAtom); + } + + rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE); + return rc; +} + + +int +ProcXIGetProperty(ClientPtr client) +{ + REQUEST(xXIGetPropertyReq); + DeviceIntPtr dev; + xXIGetPropertyReply reply; + int length; + int rc, format, nitems, bytes_after; + char *data; + Atom type; + + REQUEST_SIZE_MATCH(xXIGetPropertyReq); + if (stuff->delete) + UpdateCurrentTime(); + rc = dixLookupDevice (&dev, stuff->deviceid, client, + stuff->delete ? DixSetPropAccess : + DixGetPropAccess); + if (rc != Success) + return rc; + + rc = get_property(client, dev, stuff->property, stuff->type, + stuff->delete, stuff->offset, stuff->len, + &bytes_after, &type, &format, &nitems, &length, &data); + + if (rc != Success) + return rc; + + reply.repType = X_Reply; + reply.RepType = X_XIGetProperty; + reply.sequenceNumber = client->sequence; + reply.num_items = nitems; + reply.format = format; + reply.bytes_after = bytes_after; + reply.type = type; + reply.length = bytes_to_int32(length); + + if (length && stuff->delete && (reply.bytes_after == 0)) + send_property_event(dev, stuff->property, XIPropertyDeleted); + + WriteReplyToClient(client, sizeof(xXIGetPropertyReply), &reply); + + if (length) + { + switch (reply.format) { + case 32: client->pSwapReplyFunc = (ReplySwapPtr)CopySwap32Write; break; + case 16: client->pSwapReplyFunc = (ReplySwapPtr)CopySwap16Write; break; + default: client->pSwapReplyFunc = (ReplySwapPtr)WriteToClient; break; + } + WriteSwappedDataToClient(client, length, data); + } + + /* delete the Property */ + if (stuff->delete && (reply.bytes_after == 0)) + { + XIPropertyPtr prop, *prev; + for (prev = &dev->properties.properties; (prop = *prev); prev = &prop->next) + { + if (prop->propertyName == stuff->property) + { + *prev = prop->next; + XIDestroyDeviceProperty(prop); + break; + } + } + } + + return Success; +} + +int +SProcXIListProperties(ClientPtr client) +{ + char n; + REQUEST(xXIListPropertiesReq); + + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + + REQUEST_SIZE_MATCH(xXIListPropertiesReq); + return (ProcXIListProperties(client)); +} + +int +SProcXIChangeProperty(ClientPtr client) +{ + char n; + REQUEST(xXIChangePropertyReq); + + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->property, n); + swapl(&stuff->type, n); + swapl(&stuff->num_items, n); + REQUEST_SIZE_MATCH(xXIChangePropertyReq); + return (ProcXIChangeProperty(client)); +} + +int +SProcXIDeleteProperty(ClientPtr client) +{ + char n; + REQUEST(xXIDeletePropertyReq); + + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->property, n); + REQUEST_SIZE_MATCH(xXIDeletePropertyReq); + return (ProcXIDeleteProperty(client)); +} + +int +SProcXIGetProperty(ClientPtr client) +{ + char n; + REQUEST(xXIGetPropertyReq); + + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->property, n); + swapl(&stuff->type, n); + swapl(&stuff->offset, n); + swapl(&stuff->len, n); + REQUEST_SIZE_MATCH(xXIGetPropertyReq); + return (ProcXIGetProperty(client)); +} + + +void +SRepXIListProperties(ClientPtr client, int size, + xXIListPropertiesReply *rep) +{ + char n; + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->num_properties, n); + /* properties will be swapped later, see ProcXIListProperties */ + WriteToClient(client, size, (char*)rep); +} + +void +SRepXIGetProperty(ClientPtr client, int size, + xXIGetPropertyReply *rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->type, n); + swapl(&rep->bytes_after, n); + swapl(&rep->num_items, n); + /* data will be swapped, see ProcXIGetProperty */ + WriteToClient(client, size, (char*)rep); +} diff --git a/xorg-server/Xi/xiproperty.h b/xorg-server/Xi/xiproperty.h index 12026e9e8..69b41fafd 100644 --- a/xorg-server/Xi/xiproperty.h +++ b/xorg-server/Xi/xiproperty.h @@ -23,8 +23,12 @@ * Author: Peter Hutterer */ -#ifndef XIPROPERTY_C -#define XIPROPERTY_C +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef XIPROPERTY_H +#define XIPROPERTY_H 1 int ProcXListDeviceProperties (ClientPtr client); int ProcXChangeDeviceProperty (ClientPtr client); @@ -43,6 +47,19 @@ void SRepXListDeviceProperties(ClientPtr client, int size, void SRepXGetDeviceProperty(ClientPtr client, int size, xGetDevicePropertyReply *rep); -void XIInitKnownProperties(void); +/* XI2 request/reply handling */ +int ProcXIListProperties (ClientPtr client); +int ProcXIChangeProperty (ClientPtr client); +int ProcXIDeleteProperty (ClientPtr client); +int ProcXIGetProperty (ClientPtr client); + +int SProcXIListProperties (ClientPtr client); +int SProcXIChangeProperty (ClientPtr client); +int SProcXIDeleteProperty (ClientPtr client); +int SProcXIGetProperty (ClientPtr client); -#endif /* XIPROPERTY_C */ +void SRepXIListProperties(ClientPtr client, int size, + xXIListPropertiesReply *rep); +void SRepXIGetProperty(ClientPtr client, int size, + xXIGetPropertyReply *rep); +#endif /* XIPROPERTY_H */ diff --git a/xorg-server/Xi/xiquerydevice.c b/xorg-server/Xi/xiquerydevice.c new file mode 100644 index 000000000..68d91fa87 --- /dev/null +++ b/xorg-server/Xi/xiquerydevice.c @@ -0,0 +1,487 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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 + * + */ + +/** + * @file Protocol handling for the XIQueryDevice request/reply. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "inputstr.h" +#include +#include +#include +#include "xkbstr.h" +#include "xkbsrv.h" +#include "xserver-properties.h" +#include "exevents.h" +#include "xace.h" + +#include "xiquerydevice.h" + +static Bool ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr d); +static int ListDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info); +static int SizeDeviceInfo(DeviceIntPtr dev); +static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info); +int +SProcXIQueryDevice(ClientPtr client) +{ + char n; + + REQUEST(xXIQueryDeviceReq); + + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + + return ProcXIQueryDevice(client); +} + +int +ProcXIQueryDevice(ClientPtr client) +{ + xXIQueryDeviceReply rep; + DeviceIntPtr dev = NULL; + int rc = Success; + int i = 0, len = 0; + char *info, *ptr; + Bool *skip = NULL; + + REQUEST(xXIQueryDeviceReq); + REQUEST_SIZE_MATCH(xXIQueryDeviceReq); + + if (stuff->deviceid != XIAllDevices && stuff->deviceid != XIAllMasterDevices) + { + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + { + client->errorValue = stuff->deviceid; + return rc; + } + len += SizeDeviceInfo(dev); + } + else + { + skip = xcalloc(sizeof(Bool), inputInfo.numDevices); + if (!skip) + return BadAlloc; + + for (dev = inputInfo.devices; dev; dev = dev->next, i++) + { + skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev); + if (!skip[i]) + len += SizeDeviceInfo(dev); + } + + for (dev = inputInfo.off_devices; dev; dev = dev->next, i++) + { + skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev); + if (!skip[i]) + len += SizeDeviceInfo(dev); + } + } + + info = xcalloc(1, len); + if (!info) + return BadAlloc; + + memset(&rep, 0, sizeof(xXIQueryDeviceReply)); + rep.repType = X_Reply; + rep.RepType = X_XIQueryDevice; + rep.sequenceNumber = client->sequence; + rep.length = len/4; + rep.num_devices = 0; + + ptr = info; + if (dev) + { + len = ListDeviceInfo(dev, (xXIDeviceInfo*)info); + if (client->swapped) + SwapDeviceInfo(dev, (xXIDeviceInfo*)info); + info += len; + rep.num_devices = 1; + } else + { + i = 0; + for (dev = inputInfo.devices; dev; dev = dev->next, i++) + { + if (!skip[i]) + { + len = ListDeviceInfo(dev, (xXIDeviceInfo*)info); + if (client->swapped) + SwapDeviceInfo(dev, (xXIDeviceInfo*)info); + info += len; + rep.num_devices++; + } + } + + for (dev = inputInfo.off_devices; dev; dev = dev->next, i++) + { + if (!skip[i]) + { + len = ListDeviceInfo(dev, (xXIDeviceInfo*)info); + if (client->swapped) + SwapDeviceInfo(dev, (xXIDeviceInfo*)info); + info += len; + rep.num_devices++; + } + } + } + + WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep); + WriteToClient(client, rep.length * 4, ptr); + xfree(ptr); + xfree(skip); + return rc; +} + +void +SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply *rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->num_devices, n); + + /* Device info is already swapped, see ProcXIQueryDevice */ + + WriteToClient(client, size, (char *)rep); +} + + +/** + * @return Whether the device should be included in the returned list. + */ +static Bool +ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr dev) +{ + /* if all devices are not being queried, only master devices are */ + if (deviceid == XIAllDevices || IsMaster(dev)) + { + int rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess); + if (rc == Success) + return FALSE; + } + return TRUE; +} + +/** + * @return The number of bytes needed to store this device's xXIDeviceInfo + * (and its classes). + */ +static int +SizeDeviceInfo(DeviceIntPtr dev) +{ + int len = sizeof(xXIDeviceInfo); + + /* 4-padded name */ + len += pad_to_int32(strlen(dev->name)); + + return len + SizeDeviceClasses(dev); + +} + +/* + * @return The number of bytes needed to store this device's classes. + */ +int +SizeDeviceClasses(DeviceIntPtr dev) +{ + int len = 0; + + if (dev->button) + { + len += sizeof(xXIButtonInfo); + len += dev->button->numButtons * sizeof(Atom); + len += pad_to_int32(bits_to_bytes(dev->button->numButtons)); + } + + if (dev->key) + { + XkbDescPtr xkb = dev->key->xkbInfo->desc; + len += sizeof(xXIKeyInfo); + len += (xkb->max_key_code - xkb->min_key_code + 1) * sizeof(uint32_t); + } + + if (dev->valuator) + len += sizeof(xXIValuatorInfo) * dev->valuator->numAxes; + + return len; +} + + +/** + * Write button information into info. + * @return Number of bytes written into info. + */ +int +ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info) +{ + unsigned char *bits; + int mask_len; + int i; + + mask_len = bytes_to_int32(bits_to_bytes(dev->button->numButtons)); + + info->type = ButtonClass; + info->num_buttons = dev->button->numButtons; + info->length = bytes_to_int32(sizeof(xXIButtonInfo)) + + info->num_buttons + mask_len; + info->sourceid = dev->button->sourceid; + + bits = (unsigned char*)&info[1]; + memset(bits, 0, mask_len * 4); + + for (i = 0; dev && dev->button && i < dev->button->numButtons; i++) + if (BitIsOn(dev->button->down, i)) + SetBit(bits, i); + bits += mask_len * 4; + memcpy(bits, dev->button->labels, dev->button->numButtons * sizeof(Atom)); + + return info->length * 4; +} + +static void +SwapButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info) +{ + char n; + Atom *btn; + int i; + swaps(&info->type, n); + swaps(&info->length, n); + swaps(&info->sourceid, n); + + for (i = 0, btn = (Atom*)&info[1]; i < info->num_buttons; i++, btn++) + swaps(btn, n); + + swaps(&info->num_buttons, n); +} + +/** + * Write key information into info. + * @return Number of bytes written into info. + */ +int +ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info) +{ + int i; + XkbDescPtr xkb = dev->key->xkbInfo->desc; + uint32_t *kc; + + info->type = KeyClass; + info->num_keycodes = xkb->max_key_code - xkb->min_key_code + 1; + info->length = sizeof(xXIKeyInfo)/4 + info->num_keycodes; + info->sourceid = dev->key->sourceid; + + kc = (uint32_t*)&info[1]; + for (i = xkb->min_key_code; i <= xkb->max_key_code; i++, kc++) + *kc = i; + + return info->length * 4; +} + +static void +SwapKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info) +{ + char n; + uint32_t *key; + int i; + swaps(&info->type, n); + swaps(&info->length, n); + swaps(&info->sourceid, n); + + for (i = 0, key = (uint32_t*)&info[1]; i < info->num_keycodes; i++, key++) + swapl(key, n); + + swaps(&info->num_keycodes, n); +} + +/** + * List axis information for the given axis. + * + * @return The number of bytes written into info. + */ +int +ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber) +{ + ValuatorClassPtr v = dev->valuator; + + info->type = ValuatorClass; + info->length = sizeof(xXIValuatorInfo)/4; + info->label = v->axes[axisnumber].label; + info->min.integral = v->axes[axisnumber].min_value; + info->min.frac = 0; + info->max.integral = v->axes[axisnumber].max_value; + info->max.frac = 0; + info->value.integral = (int)v->axisVal[axisnumber]; + info->value.frac = (int)(v->axisVal[axisnumber] * (1 << 16) * (1 << 16)); + info->resolution = v->axes[axisnumber].resolution; + info->number = axisnumber; + info->mode = v->mode; /* Server doesn't have per-axis mode yet */ + info->sourceid = v->sourceid; + + return info->length * 4; +} + +static void +SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info) +{ + char n; + swaps(&info->type, n); + swaps(&info->length, n); + swapl(&info->label, n); + swapl(&info->min.integral, n); + swapl(&info->min.frac, n); + swapl(&info->max.integral, n); + swapl(&info->max.frac, n); + swaps(&info->number, n); + swaps(&info->sourceid, n); +} + +int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment) +{ + DeviceIntPtr master = dev->u.master; + int use; + + if (IsMaster(dev)) + { + DeviceIntPtr paired = GetPairedDevice(dev); + use = IsPointerDevice(dev) ? XIMasterPointer : XIMasterKeyboard; + *attachment = (paired ? paired->id : 0); + } else if (master) + { + use = IsPointerDevice(master) ? XISlavePointer : XISlaveKeyboard; + *attachment = master->id; + } else + use = XIFloatingSlave; + + return use; +} + +/** + * Write the info for device dev into the buffer pointed to by info. + * + * @return The number of bytes used. + */ +static int +ListDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info) +{ + char *any = (char*)&info[1]; + int len = 0, total_len = 0; + + info->deviceid = dev->id; + info->use = GetDeviceUse(dev, &info->attachment); + info->num_classes = 0; + info->name_len = strlen(dev->name); + info->enabled = dev->enabled; + total_len = sizeof(xXIDeviceInfo); + + len = pad_to_int32(info->name_len); + memset(any, 0, len); + strncpy(any, dev->name, info->name_len); + any += len; + total_len += len; + + return total_len + ListDeviceClasses(dev, any, &info->num_classes); +} + +/** + * Write the class info of the device into the memory pointed to by any, set + * nclasses to the number of classes in total and return the number of bytes + * written. + */ +int +ListDeviceClasses(DeviceIntPtr dev, char *any, uint16_t *nclasses) +{ + int total_len = 0; + int len; + int i; + + if (dev->button) + { + (*nclasses)++; + len = ListButtonInfo(dev, (xXIButtonInfo*)any); + any += len; + total_len += len; + } + + if (dev->key) + { + (*nclasses)++; + len = ListKeyInfo(dev, (xXIKeyInfo*)any); + any += len; + total_len += len; + } + + for (i = 0; dev->valuator && i < dev->valuator->numAxes; i++) + { + (*nclasses)++; + len = ListValuatorInfo(dev, (xXIValuatorInfo*)any, i); + any += len; + total_len += len; + } + + return total_len; +} + +static void +SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info) +{ + char n; + char *any = (char*)&info[1]; + int i; + + /* Skip over name */ + any += pad_to_int32(info->name_len); + + for (i = 0; i < info->num_classes; i++) + { + int len = ((xXIAnyInfo*)any)->length; + switch(((xXIAnyInfo*)any)->type) + { + case XIButtonClass: + SwapButtonInfo(dev, (xXIButtonInfo*)any); + break; + case XIKeyClass: + SwapKeyInfo(dev, (xXIKeyInfo*)any); + break; + case XIValuatorClass: + SwapValuatorInfo(dev, (xXIValuatorInfo*)any); + break; + } + + any += len * 4; + } + + swaps(&info->deviceid, n); + swaps(&info->use, n); + swaps(&info->attachment, n); + swaps(&info->num_classes, n); + swaps(&info->name_len, n); + +} diff --git a/xorg-server/Xi/xiquerydevice.h b/xorg-server/Xi/xiquerydevice.h new file mode 100644 index 000000000..34e87bdde --- /dev/null +++ b/xorg-server/Xi/xiquerydevice.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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 + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef QUERYDEV_H +#define QUERYDEV_H 1 + +#include + +int SProcXIQueryDevice(ClientPtr client); +int ProcXIQueryDevice(ClientPtr client); +void SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply *rep); +int SizeDeviceClasses(DeviceIntPtr dev); +int ListDeviceClasses(DeviceIntPtr dev, char* any, uint16_t* nclasses); +int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment); +int ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info); +int ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info); +int ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber); +#endif /* QUERYDEV_H */ diff --git a/xorg-server/Xi/xiquerypointer.c b/xorg-server/Xi/xiquerypointer.c new file mode 100644 index 000000000..93ceba4c3 --- /dev/null +++ b/xorg-server/Xi/xiquerypointer.c @@ -0,0 +1,228 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request to query the pointer location of an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" +#include "eventconvert.h" +#include "xkbsrv.h" + +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#endif + +#include "xiquerypointer.h" + +/*********************************************************************** + * + * This procedure allows a client to query the pointer of a device. + * + */ + +int +SProcXIQueryPointer(ClientPtr client) +{ + char n; + + REQUEST(xXIQueryPointerReq); + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->win, n); + return (ProcXIQueryPointer(client)); +} + +int +ProcXIQueryPointer(ClientPtr client) +{ + int rc; + xXIQueryPointerReply rep; + DeviceIntPtr pDev, kbd; + WindowPtr pWin, t; + SpritePtr pSprite; + XkbStatePtr state; + char *buttons = NULL; + int buttons_size = 0; /* size of buttons array */ + + REQUEST(xXIQueryPointerReq); + REQUEST_SIZE_MATCH(xXIQueryPointerReq); + + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixReadAccess); + if (rc != Success) + { + client->errorValue = stuff->deviceid; + return rc; + } + + if (pDev->valuator == NULL || IsKeyboardDevice(pDev) || + (!IsMaster(pDev) && pDev->u.master)) /* no attached devices */ + { + client->errorValue = stuff->deviceid; + return BadDevice; + } + + rc = dixLookupWindow(&pWin, stuff->win, client, DixGetAttrAccess); + if (rc != Success) + { + SendErrorToClient(client, IReqCode, X_XIQueryPointer, + stuff->win, rc); + return Success; + } + + if (pDev->valuator->motionHintWindow) + MaybeStopHint(pDev, client); + + if (IsMaster(pDev)) + kbd = GetPairedDevice(pDev); + else + kbd = (pDev->key) ? pDev : NULL; + + pSprite = pDev->spriteInfo->sprite; + + memset(&rep, 0, sizeof(rep)); + rep.repType = X_Reply; + rep.RepType = X_XIQueryPointer; + rep.length = 6; + rep.sequenceNumber = client->sequence; + rep.root = (GetCurrentRootWindow(pDev))->drawable.id; + rep.root_x = FP1616(pSprite->hot.x, 0); + rep.root_y = FP1616(pSprite->hot.y, 0); + rep.child = None; + + if (kbd) + { + state = &kbd->key->xkbInfo->prev_state; + rep.mods.base_mods = state->base_mods; + rep.mods.latched_mods = state->latched_mods; + rep.mods.locked_mods = state->locked_mods; + + rep.group.base_group = state->base_group; + rep.group.latched_group = state->latched_group; + rep.group.locked_group = state->locked_group; + } + + if (pDev->button) + { + int i, down; + rep.buttons_len = bytes_to_int32(bits_to_bytes(pDev->button->numButtons)); + rep.length += rep.buttons_len; + buttons_size = rep.buttons_len * 4; + buttons = xcalloc(1, buttons_size); + if (!buttons) + return BadAlloc; + + down = pDev->button->buttonsDown; + + for (i = 0; i < pDev->button->numButtons && down; i++) + { + if (BitIsOn(pDev->button->down, i)) + { + SetBit(buttons, i); + down--; + } + } + } else + rep.buttons_len = 0; + + if (pSprite->hot.pScreen == pWin->drawable.pScreen) + { + rep.same_screen = xTrue; + rep.win_x = FP1616(pSprite->hot.x - pWin->drawable.x, 0); + rep.win_y = FP1616(pSprite->hot.y - pWin->drawable.y, 0); + for (t = pSprite->win; t; t = t->parent) + if (t->parent == pWin) + { + rep.child = t->drawable.id; + break; + } + } else + { + rep.same_screen = xFalse; + rep.win_x = 0; + rep.win_y = 0; + } + +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + rep.root_x += FP1616(panoramiXdataPtr[0].x, 0); + rep.root_y += FP1616(panoramiXdataPtr[0].y, 0); + if (stuff->win == rep.root) + { + rep.win_x += FP1616(panoramiXdataPtr[0].x, 0); + rep.win_y += FP1616(panoramiXdataPtr[0].y, 0); + } + } +#endif + + WriteReplyToClient(client, sizeof(xXIQueryPointerReply), &rep); + if (buttons) + WriteToClient(client, buttons_size, buttons); + + xfree(buttons); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XIQueryPointer function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXIQueryPointer(ClientPtr client, int size, + xXIQueryPointerReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->root, n); + swapl(&rep->child, n); + swapl(&rep->root_x, n); + swapl(&rep->root_y, n); + swapl(&rep->win_x, n); + swapl(&rep->win_y, n); + swaps(&rep->buttons_len, n); + + WriteToClient(client, size, (char *)rep); +} + diff --git a/xorg-server/Xi/xiquerypointer.h b/xorg-server/Xi/xiquerypointer.h new file mode 100644 index 000000000..ea22376a6 --- /dev/null +++ b/xorg-server/Xi/xiquerypointer.h @@ -0,0 +1,39 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef QUERYDP_H +#define QUERYDP_H 1 + +int SProcXIQueryPointer(ClientPtr /* client */); +int ProcXIQueryPointer(ClientPtr /* client */); +void SRepXIQueryPointer(ClientPtr /* client */ , + int /* size */ , + xXIQueryPointerReply * /* rep */); + +#endif /* QUERYDP_H */ diff --git a/xorg-server/Xi/xiqueryversion.c b/xorg-server/Xi/xiqueryversion.c new file mode 100644 index 000000000..ae63297da --- /dev/null +++ b/xorg-server/Xi/xiqueryversion.c @@ -0,0 +1,128 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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 + * + */ + +/** + * @file xiqueryversion.c + * Protocol handling for the XIQueryVersion request/reply. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + + +#include "inputstr.h" + +#include +#include +#include + +#include "exglobals.h" +#include "exevents.h" +#include "xiqueryversion.h" +#include "misc.h" + +extern XExtensionVersion XIVersion; /* defined in getvers.c */ +/** + * Return the supported XI version. + * + * Saves the version the client claims to support as well, for future + * reference. + */ +int +ProcXIQueryVersion(ClientPtr client) +{ + xXIQueryVersionReply rep; + XIClientPtr pXIClient; + int major, minor; + unsigned int sversion, cversion; + + REQUEST(xXIQueryVersionReq); + REQUEST_SIZE_MATCH(xXIQueryVersionReq); + + /* This request only exists after XI2 */ + if (stuff->major_version < 2) + { + client->errorValue = stuff->major_version; + return BadValue; + } + + pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); + + sversion = XIVersion.major_version * 1000 + XIVersion.minor_version; + cversion = stuff->major_version * 1000 + stuff->minor_version; + + if (sversion > cversion) + { + major = stuff->major_version; + minor = stuff->minor_version; + } else + { + major = XIVersion.major_version; + minor = XIVersion.minor_version; + } + + pXIClient->major_version = major; + pXIClient->minor_version = minor; + + memset(&rep, 0, sizeof(xXIQueryVersionReply)); + rep.repType = X_Reply; + rep.RepType = X_XIQueryVersion; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.major_version = major; + rep.minor_version = minor; + + WriteReplyToClient(client, sizeof(xXIQueryVersionReply), &rep); + + return Success; +} + +/* Swapping routines */ + +int +SProcXIQueryVersion(ClientPtr client) +{ + char n; + + REQUEST(xXIQueryVersionReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq); + swaps(&stuff->major_version, n); + swaps(&stuff->minor_version, n); + return (ProcXIQueryVersion(client)); +} + +void +SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply *rep) +{ + char n; + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->major_version, n); + swaps(&rep->minor_version, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server/Xi/xiqueryversion.h b/xorg-server/Xi/xiqueryversion.h new file mode 100644 index 000000000..06bb7291a --- /dev/null +++ b/xorg-server/Xi/xiqueryversion.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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 + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#ifndef QUERYVERSION_H +#define QUERYVERSION_H 1 + +int SProcXIQueryVersion(ClientPtr client); +int ProcXIQueryVersion(ClientPtr client); +void SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply* rep); + +#endif /* QUERYVERSION_H */ diff --git a/xorg-server/Xi/xiselectev.c b/xorg-server/Xi/xiselectev.c new file mode 100644 index 000000000..672edab3b --- /dev/null +++ b/xorg-server/Xi/xiselectev.c @@ -0,0 +1,299 @@ +/* + * Copyright 2008 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + + +#include "dixstruct.h" +#include "windowstr.h" +#include "exglobals.h" +#include "exevents.h" +#include + +#include "xiselectev.h" + +/** + * Check the given mask (in len bytes) for invalid mask bits. + * Invalid mask bits are any bits above XI2LastEvent. + * + * @return BadValue if at least one invalid bit is set or Success otherwise. + */ +int XICheckInvalidMaskBits(unsigned char *mask, int len) +{ + if (len >= XIMaskLen(XI2LASTEVENT)) + { + int i; + for (i = XI2LASTEVENT + 1; i < len * 8; i++) + if (BitIsOn(mask, i)) + return BadValue; + } + + return Success; +} + +int +SProcXISelectEvents(ClientPtr client) +{ + char n; + int i; + xXIEventMask* evmask; + + REQUEST(xXISelectEventsReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xXISelectEventsReq); + swapl(&stuff->win, n); + swaps(&stuff->num_masks, n); + + evmask = (xXIEventMask*)&stuff[1]; + for (i = 0; i < stuff->num_masks; i++) + { + swaps(&evmask->deviceid, n); + swaps(&evmask->mask_len, n); + evmask = (xXIEventMask*)(((char*)&evmask[1]) + evmask->mask_len * 4); + } + + return (ProcXISelectEvents(client)); +} + +int +ProcXISelectEvents(ClientPtr client) +{ + int rc, num_masks; + WindowPtr win; + DeviceIntPtr dev; + DeviceIntRec dummy; + xXIEventMask *evmask; + int *types = NULL; + int len; + + REQUEST(xXISelectEventsReq); + REQUEST_AT_LEAST_SIZE(xXISelectEventsReq); + + if (stuff->num_masks == 0) + return BadValue; + + rc = dixLookupWindow(&win, stuff->win, client, DixReceiveAccess); + if (rc != Success) + return rc; + + len = sz_xXISelectEventsReq; + + /* check request validity */ + evmask = (xXIEventMask*)&stuff[1]; + num_masks = stuff->num_masks; + while(num_masks--) + { + len += sizeof(xXIEventMask) + evmask->mask_len * 4; + + if (bytes_to_int32(len) > stuff->length) + return BadLength; + + if (evmask->deviceid != XIAllDevices && + evmask->deviceid != XIAllMasterDevices) + rc = dixLookupDevice(&dev, evmask->deviceid, client, DixUseAccess); + else { + /* XXX: XACE here? */ + } + if (rc != Success) + return rc; + + /* hierarchy event mask is not allowed on devices */ + if (evmask->deviceid != XIAllDevices && evmask->mask_len >= 1) + { + unsigned char *bits = (unsigned char*)&evmask[1]; + if (BitIsOn(bits, XI_HierarchyChanged)) + return BadValue; + } + + /* Raw events may only be selected on root windows */ + if (win->parent && evmask->mask_len >= 1) + { + unsigned char *bits = (unsigned char*)&evmask[1]; + if (BitIsOn(bits, XI_RawKeyPress) || + BitIsOn(bits, XI_RawKeyRelease) || + BitIsOn(bits, XI_RawButtonPress) || + BitIsOn(bits, XI_RawButtonRelease) || + BitIsOn(bits, XI_RawMotion)) + return BadValue; + } + + if (XICheckInvalidMaskBits((unsigned char*)&evmask[1], + evmask->mask_len * 4) != Success) + return BadValue; + + evmask = (xXIEventMask*)(((unsigned char*)evmask) + evmask->mask_len * 4); + evmask++; + } + + if (bytes_to_int32(len) != stuff->length) + return BadLength; + + /* Set masks on window */ + evmask = (xXIEventMask*)&stuff[1]; + num_masks = stuff->num_masks; + while(num_masks--) + { + if (evmask->deviceid == XIAllDevices || + evmask->deviceid == XIAllMasterDevices) + { + dummy.id = evmask->deviceid; + dev = &dummy; + } else + dixLookupDevice(&dev, evmask->deviceid, client, DixUseAccess); + if (XISetEventMask(dev, win, client, evmask->mask_len * 4, + (unsigned char*)&evmask[1]) != Success) + return BadAlloc; + evmask = (xXIEventMask*)(((unsigned char*)evmask) + evmask->mask_len * 4); + evmask++; + } + + RecalculateDeliverableEvents(win); + + xfree(types); + return Success; +} + + +int +SProcXIGetSelectedEvents(ClientPtr client) +{ + char n; + + REQUEST(xXIGetSelectedEventsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq); + swapl(&stuff->win, n); + + return (ProcXIGetSelectedEvents(client)); +} + +int +ProcXIGetSelectedEvents(ClientPtr client) +{ + int rc, i; + WindowPtr win; + char n; + char *buffer = NULL; + xXIGetSelectedEventsReply reply; + OtherInputMasks *masks; + InputClientsPtr others = NULL; + xXIEventMask *evmask = NULL; + DeviceIntPtr dev; + + REQUEST(xXIGetSelectedEventsReq); + REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq); + + rc = dixLookupWindow(&win, stuff->win, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + reply.repType = X_Reply; + reply.RepType = X_XIGetSelectedEvents; + reply.length = 0; + reply.sequenceNumber = client->sequence; + reply.num_masks = 0; + + masks = wOtherInputMasks(win); + if (masks) + { + for (others = wOtherInputMasks(win)->inputClients; others; + others = others->next) { + if (SameClient(others, client)) { + break; + } + } + } + + if (!others) + { + WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply); + return Success; + } + + buffer = xcalloc(MAXDEVICES, sizeof(xXIEventMask) + pad_to_int32(XI2MASKSIZE)); + if (!buffer) + return BadAlloc; + + evmask = (xXIEventMask*)buffer; + for (i = 0; i < MAXDEVICES; i++) + { + int j; + unsigned char *devmask = others->xi2mask[i]; + + if (i > 2) + { + rc = dixLookupDevice(&dev, i, client, DixGetAttrAccess); + if (rc != Success) + continue; + } + + + for (j = XI2MASKSIZE - 1; j >= 0; j--) + { + if (devmask[j] != 0) + { + int mask_len = (j + 4)/4; /* j is an index, hence + 4, not + 3 */ + evmask->deviceid = i; + evmask->mask_len = mask_len; + reply.num_masks++; + reply.length += sizeof(xXIEventMask)/4 + evmask->mask_len; + + if (client->swapped) + { + swaps(&evmask->deviceid, n); + swaps(&evmask->mask_len, n); + } + + memcpy(&evmask[1], devmask, j + 1); + evmask = (xXIEventMask*)((char*)evmask + + sizeof(xXIEventMask) + mask_len * 4); + break; + } + } + } + + WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply); + + if (reply.num_masks) + WriteToClient(client, reply.length * 4, buffer); + + xfree(buffer); + return Success; +} + +void SRepXIGetSelectedEvents(ClientPtr client, + int len, xXIGetSelectedEventsReply *rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->num_masks, n); + WriteToClient(client, len, (char *)rep); +} + + diff --git a/xorg-server/Xi/xiselectev.h b/xorg-server/Xi/xiselectev.h new file mode 100644 index 000000000..21ec9371b --- /dev/null +++ b/xorg-server/Xi/xiselectev.h @@ -0,0 +1,40 @@ +/* + * Copyright 2008 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef XISELECTEVENTS_H +#define XISELECTEVENTS_H 1 + +int SProcXISelectEvents(ClientPtr client); +int ProcXISelectEvents(ClientPtr client); +int SProcXIGetSelectedEvents(ClientPtr client); +int ProcXIGetSelectedEvents(ClientPtr client); +void SRepXIGetSelectedEvents(ClientPtr client, + int len, xXIGetSelectedEventsReply *rep); + +#endif /* _XISELECTEVENTS_H_ */ diff --git a/xorg-server/Xi/xisetclientpointer.c b/xorg-server/Xi/xisetclientpointer.c new file mode 100644 index 000000000..09db8ff75 --- /dev/null +++ b/xorg-server/Xi/xisetclientpointer.c @@ -0,0 +1,109 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request to set the client pointer for the owner of the given window. + * All subsequent calls that are ambiguous will choose the client pointer as + * default value. + */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" + +#include "xisetclientpointer.h" + +int +SProcXISetClientPointer(ClientPtr client) +{ + char n; + + REQUEST(xXISetClientPointerReq); + swaps(&stuff->length, n); + swapl(&stuff->win, n); + swaps(&stuff->deviceid, n); + REQUEST_SIZE_MATCH(xXISetClientPointerReq); + return (ProcXISetClientPointer(client)); +} + +int +ProcXISetClientPointer(ClientPtr client) +{ + DeviceIntPtr pDev; + ClientPtr targetClient; + int rc; + + REQUEST(xXISetClientPointerReq); + REQUEST_SIZE_MATCH(xXISetClientPointerReq); + + + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixManageAccess); + if (rc != Success) + { + client->errorValue = stuff->deviceid; + return rc; + } + + if (!IsMaster(pDev)) + { + client->errorValue = stuff->deviceid; + return BadDevice; + } + + pDev = GetMaster(pDev, MASTER_POINTER); + + if (stuff->win != None) + { + rc = dixLookupClient(&targetClient, stuff->win, client, + DixManageAccess); + + if (rc != Success) + return BadWindow; + + } else + targetClient = client; + + rc = SetClientPointer(targetClient, pDev); + if (rc != Success) + { + client->errorValue = stuff->deviceid; + return rc; + } + + return Success; +} diff --git a/xorg-server/Xi/xisetclientpointer.h b/xorg-server/Xi/xisetclientpointer.h new file mode 100644 index 000000000..5968d98da --- /dev/null +++ b/xorg-server/Xi/xisetclientpointer.h @@ -0,0 +1,36 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef SETCPTR_H +#define SETCPTR_H 1 + +int SProcXISetClientPointer(ClientPtr /* client */); +int ProcXISetClientPointer(ClientPtr /* client */); + +#endif /* SETCPTR_H */ diff --git a/xorg-server/Xi/xisetdevfocus.c b/xorg-server/Xi/xisetdevfocus.c new file mode 100644 index 000000000..059424e41 --- /dev/null +++ b/xorg-server/Xi/xisetdevfocus.c @@ -0,0 +1,130 @@ +/* + * Copyright 2008 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ +/*********************************************************************** + * + * Request to set and get an input device's focus. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include + +#include "exglobals.h" /* BadDevice */ +#include "xisetdevfocus.h" + +int +SProcXISetFocus(ClientPtr client) +{ + char n; + + REQUEST(xXISetFocusReq); + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + swapl(&stuff->focus, n); + swapl(&stuff->time, n); + + return ProcXISetFocus(client); +} + +int +SProcXIGetFocus(ClientPtr client) +{ + char n; + + REQUEST(xXIGetFocusReq); + swaps(&stuff->length, n); + swaps(&stuff->deviceid, n); + + return ProcXIGetFocus(client); +} + +int +ProcXISetFocus(ClientPtr client) +{ + DeviceIntPtr dev; + int ret; + + REQUEST(xXISetFocusReq); + REQUEST_AT_LEAST_SIZE(xXISetFocusReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetFocusAccess); + if (ret != Success) + return ret; + if (!dev->focus) + return BadDevice; + + return SetInputFocus(client, dev, stuff->focus, RevertToParent, + stuff->time, TRUE); +} + +int +ProcXIGetFocus(ClientPtr client) +{ + xXIGetFocusReply rep; + DeviceIntPtr dev; + int ret; + + REQUEST(xXIGetFocusReq); + REQUEST_AT_LEAST_SIZE(xXIGetFocusReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess); + if (ret != Success) + return ret; + if (!dev->focus) + return BadDevice; + + rep.repType = X_Reply; + rep.RepType = X_XIGetFocus; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + if (dev->focus->win == NoneWin) + rep.focus = None; + else if (dev->focus->win == PointerRootWin) + rep.focus = PointerRoot; + else if (dev->focus->win == FollowKeyboardWin) + rep.focus = FollowKeyboard; + else + rep.focus = dev->focus->win->drawable.id; + + WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep); + return Success; +} + +void +SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply *rep) +{ + char n; + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->focus, n); + WriteToClient(client, len, (char *)rep); +} diff --git a/xorg-server/Xi/xisetdevfocus.h b/xorg-server/Xi/xisetdevfocus.h new file mode 100644 index 000000000..2c3243d86 --- /dev/null +++ b/xorg-server/Xi/xisetdevfocus.h @@ -0,0 +1,40 @@ +/* + * Copyright 2008 Red Hat, Inc. + * + * 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. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef XISETDEVFOCUS_H +#define XISETDEVFOCUS_H 1 + +int SProcXISetFocus(ClientPtr client); +int ProcXISetFocus(ClientPtr client); + +int SProcXIGetFocus(ClientPtr client); +int ProcXIGetFocus(ClientPtr client); + +void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply* rep); +#endif /* XISETDEVFOCUS_H */ diff --git a/xorg-server/Xi/xiwarppointer.c b/xorg-server/Xi/xiwarppointer.c new file mode 100644 index 000000000..7276e6faf --- /dev/null +++ b/xorg-server/Xi/xiwarppointer.c @@ -0,0 +1,201 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request to Warp the pointer location of an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" +#include "mipointer.h" /* for miPointerUpdateSprite */ + + +#include "xiwarppointer.h" +/*********************************************************************** + * + * This procedure allows a client to warp the pointer of a device. + * + */ + +int +SProcXIWarpPointer(ClientPtr client) +{ + char n; + + REQUEST(xXIWarpPointerReq); + swaps(&stuff->length, n); + swapl(&stuff->src_win, n); + swapl(&stuff->dst_win, n); + swapl(&stuff->src_x, n); + swapl(&stuff->src_y, n); + swaps(&stuff->src_width, n); + swaps(&stuff->src_height, n); + swapl(&stuff->dst_x, n); + swapl(&stuff->dst_y, n); + swaps(&stuff->deviceid, n); + return (ProcXIWarpPointer(client)); +} + +int +ProcXIWarpPointer(ClientPtr client) +{ + int rc; + int x, y; + WindowPtr dest = NULL; + DeviceIntPtr pDev; + SpritePtr pSprite; + ScreenPtr newScreen; + int src_x, src_y; + int dst_x, dst_y; + + REQUEST(xXIWarpPointerReq); + REQUEST_SIZE_MATCH(xXIWarpPointerReq); + + /* FIXME: panoramix stuff is missing, look at ProcWarpPointer */ + + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess); + + if (rc != Success) + { + client->errorValue = stuff->deviceid; + return rc; + } + + if ((!IsMaster(pDev) && pDev->u.master) || + (IsMaster(pDev) && !IsPointerDevice(pDev))) + { + client->errorValue = stuff->deviceid; + return BadDevice; + } + + if (stuff->dst_win != None) + { + rc = dixLookupWindow(&dest, stuff->dst_win, client, DixGetAttrAccess); + if (rc != Success) + { + client->errorValue = stuff->dst_win; + return rc; + } + } + + pSprite = pDev->spriteInfo->sprite; + x = pSprite->hotPhys.x; + y = pSprite->hotPhys.y; + + src_x = stuff->src_x / (double)(1 << 16); + src_y = stuff->src_y / (double)(1 << 16); + dst_x = stuff->dst_x / (double)(1 << 16); + dst_y = stuff->dst_y / (double)(1 << 16); + + if (stuff->src_win != None) + { + int winX, winY; + WindowPtr src; + + rc = dixLookupWindow(&src, stuff->src_win, client, DixGetAttrAccess); + if (rc != Success) + { + client->errorValue = stuff->src_win; + return rc; + } + + winX = src->drawable.x; + winY = src->drawable.y; + if (src->drawable.pScreen != pSprite->hotPhys.pScreen || + x < winX + src_x || + y < winY + src_y || + (stuff->src_width != 0 && + winX + src_x + (int)stuff->src_width < 0) || + (stuff->src_height != 0 && + winY + src_y + (int)stuff->src_height < y) || + !PointInWindowIsVisible(src, x, y)) + return Success; + } + + if (dest) + { + x = dest->drawable.x; + y = dest->drawable.y; + newScreen = dest->drawable.pScreen; + } else + newScreen = pSprite->hotPhys.pScreen; + + x += dst_x; + y += dst_y; + + if (x < 0) + x = 0; + else if (x > newScreen->width) + x = newScreen->width - 1; + + if (y < 0) + y = 0; + else if (y > newScreen->height) + y = newScreen->height - 1; + + if (newScreen == pSprite->hotPhys.pScreen) + { + if (x < pSprite->physLimits.x1) + x = pSprite->physLimits.x1; + else if (x >= pSprite->physLimits.x2) + x = pSprite->physLimits.x2 - 1; + + if (y < pSprite->physLimits.y1) + y = pSprite->physLimits.y1; + else if (y >= pSprite->physLimits.y2) + y = pSprite->physLimits.y2 - 1; + + if (pSprite->hotShape) + ConfineToShape(pDev, pSprite->hotShape, &x, &y); + (*newScreen->SetCursorPosition)(pDev, newScreen, x, y, TRUE); + } else if (!PointerConfinedToScreen(pDev)) + { + NewCurrentScreen(pDev, newScreen, x, y); + } + + /* if we don't update the device, we get a jump next time it moves */ + pDev->last.valuators[0] = x; + pDev->last.valuators[1] = y; + miPointerUpdateSprite(pDev); + + /* FIXME: XWarpPointer is supposed to generate an event. It doesn't do it + here though. */ + return Success; +} + diff --git a/xorg-server/Xi/xiwarppointer.h b/xorg-server/Xi/xiwarppointer.h new file mode 100644 index 000000000..aafc73904 --- /dev/null +++ b/xorg-server/Xi/xiwarppointer.h @@ -0,0 +1,36 @@ +/* + * 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. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef WARPDEVP_H +#define WARPDEVP_H 1 + +int SProcXIWarpPointer(ClientPtr /* client */); +int ProcXIWarpPointer(ClientPtr /* client */); + +#endif /* WARPDEVP_H */ diff --git a/xorg-server/aclocal.m4 b/xorg-server/aclocal.m4 index cb4698743..8357ddece 100644 --- a/xorg-server/aclocal.m4 +++ b/xorg-server/aclocal.m4 @@ -13,7977 +13,12 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, -[m4_warning([this file was generated for autoconf 2.64. +m4_if(m4_defn([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'.])]) -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# 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. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -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 - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# 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 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# 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 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# 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. - -# Generated from ltversion.in. - -# serial 3012 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6]) -m4_define([LT_PACKAGE_REVISION], [1.3012]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6' -macro_revision='1.3012' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# 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 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) - # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . @@ -8052,16 +87,14 @@ fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -8105,9 +138,9 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD @@ -9134,6 +1167,14 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ac_define_dir.m4]) +m4_include([m4/dolt.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/shave.m4]) dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. @@ -9455,7 +1496,7 @@ AC_SUBST(MAKE_HTML) # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ AC_ARG_ENABLE(malloc0returnsnull, - AC_HELP_STRING([--enable-malloc0returnsnull], + AS_HELP_STRING([--enable-malloc0returnsnull], [malloc(0) returns NULL (default: auto)]), [MALLOC_ZERO_RETURNS_NULL=$enableval], [MALLOC_ZERO_RETURNS_NULL=auto]) @@ -9507,7 +1548,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS]) AC_DEFUN([XORG_WITH_LINT],[ # Allow checking code with lint, sparse, etc. -AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], +AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], [Use a lint-style source code checker (default: disabled)])], [use_lint=$withval], [use_lint=no]) if test "x$use_lint" = "xyes" ; then @@ -9548,7 +1589,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno]) AC_DEFUN([XORG_LINT_LIBRARY],[ AC_REQUIRE([XORG_WITH_LINT]) # Build lint "library" for more indepth checks of programs calling this library -AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], +AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], [Create lint library (default: disabled)])], [make_lint_lib=$enableval], [make_lint_lib=no]) if test "x$make_lint_lib" != "xno" ; then @@ -9591,6 +1632,49 @@ else fi AC_SUBST(CWARNFLAGS) ]) # XORG_CWARNFLAGS + +# XORG_STRICT_OPTION +# ----------------------- +# Minimum version: 1.3.0 +# +# Add configure option to enable strict compilation +AC_DEFUN([XORG_STRICT_OPTION], [ +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_CC_C99]) +AC_REQUIRE([XORG_CWARNFLAGS]) + +AC_ARG_ENABLE(strict-compilation, + AS_HELP_STRING([--enable-strict-compilation], + [Enable all warnings from compiler and make them errors (default: disabled)]), + [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) +if test "x$STRICT_COMPILE" = "xyes"; then + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) + if test "x$GCC" = xyes ; then + STRICT_CFLAGS="-pedantic -Werror" + elif test "x$SUNCC" = "xyes"; then + STRICT_CFLAGS="-errwarn" + elif test "x$INTELCC" = "xyes"; then + STRICT_CFLAGS="-Werror" + fi +fi +CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" +AC_SUBST([CWARNFLAGS]) +]) # XORG_STRICT_OPTION + +# XORG_DEFAULT_OPTIONS +# -------------------- +# Minimum version: 1.3.0 +# +# Defines default options for X.Org modules. +# +AC_DEFUN([XORG_DEFAULT_OPTIONS], [ +XORG_CWARNFLAGS +XORG_STRICT_OPTION +XORG_RELEASE_VERSION +XORG_CHANGELOG +XORG_MANPAGE_SECTIONS +]) # XORG_DEFAULT_OPTIONS dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its @@ -9625,7 +1709,7 @@ dnl AC_DEFUN([XORG_RELEASE_VERSION],[ AC_ARG_WITH(release-version, - AC_HELP_STRING([--with-release-version=STRING], + AS_HELP_STRING([--with-release-version=STRING], [Use release version string in package name]), [RELEASE_VERSION="$withval"], [RELEASE_VERSION=""]) @@ -9810,4 +1894,3 @@ AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], ]) # XTRANS_SECURE_RPC_FLAGS -m4_include([acinclude.m4]) diff --git a/xorg-server/composite/Makefile.am b/xorg-server/composite/Makefile.am index d7bead137..c2f5123f2 100644 --- a/xorg-server/composite/Makefile.am +++ b/xorg-server/composite/Makefile.am @@ -2,6 +2,10 @@ noinst_LTLIBRARIES = libcomposite.la AM_CFLAGS = $(DIX_CFLAGS) +if XORG +sdk_HEADERS = compositeext.h +endif + libcomposite_la_SOURCES = \ compalloc.c \ compext.c \ diff --git a/xorg-server/composite/Makefile.in b/xorg-server/composite/Makefile.in index cac2db48e..5c358d474 100644 --- a/xorg-server/composite/Makefile.in +++ b/xorg-server/composite/Makefile.in @@ -15,6 +15,7 @@ @SET_MAKE@ + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -35,10 +36,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = composite -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -68,6 +74,30 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcomposite_la_SOURCES) DIST_SOURCES = $(libcomposite_la_SOURCES) +am__sdk_HEADERS_DIST = compositeext.h +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 = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(sdkdir)" +HEADERS = $(sdk_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -76,6 +106,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -96,9 +127,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -127,7 +161,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -136,9 +172,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -177,12 +217,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -202,7 +243,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -212,6 +252,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -225,11 +266,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -265,6 +305,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -289,7 +330,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -312,6 +352,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -343,7 +384,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -351,6 +394,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcomposite.la AM_CFLAGS = $(DIX_CFLAGS) +@XORG_TRUE@sdk_HEADERS = compositeext.h libcomposite_la_SOURCES = \ compalloc.c \ compext.c \ @@ -443,6 +487,26 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sdkdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sdkdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -528,8 +592,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -578,7 +645,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-sdkHEADERS install-dvi: install-dvi-am @@ -624,7 +691,7 @@ ps: ps-am ps-am: -uninstall-am: +uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip @@ -636,10 +703,11 @@ uninstall-am: 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-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/xorg-server/composite/compalloc.c b/xorg-server/composite/compalloc.c index a2f3f140a..3f427dbe1 100644 --- a/xorg-server/composite/compalloc.c +++ b/xorg-server/composite/compalloc.c @@ -1,23 +1,30 @@ /* - * Copyright © 2006 Sun Microsystems + * Copyright © 2006 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, 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. + * 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. * - * 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. + * 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. * * Copyright © 2003 Keith Packard * @@ -134,6 +141,8 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) } REGION_NULL (pScreen, &cw->borderClip); + cw->borderClipX = 0; + cw->borderClipY = 0; cw->update = CompositeRedirectAutomatic; cw->clients = 0; cw->oldx = COMP_ORIGIN_INVALID; diff --git a/xorg-server/composite/compext.c b/xorg-server/composite/compext.c index 4fff20efa..56b4f2784 100644 --- a/xorg-server/composite/compext.c +++ b/xorg-server/composite/compext.c @@ -1,23 +1,30 @@ /* - * Copyright © 2006 Sun Microsystems + * Copyright © 2006 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, 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. + * 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. * - * 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. + * 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. * * Copyright © 2003 Keith Packard * @@ -136,21 +143,30 @@ ProcCompositeQueryVersion (ClientPtr client) return(client->noClientException); } +#define VERIFY_WINDOW(pWindow, wid, client, mode) \ + do { \ + int err; \ + err = dixLookupResourceByType((pointer *) &pWindow, wid, \ + RT_WINDOW, client, mode); \ + if (err == BadValue) { \ + client->errorValue = wid; \ + return BadWindow; \ + } else if (err != Success) { \ + client->errorValue = wid; \ + return err; \ + } \ + } while (0) + static int ProcCompositeRedirectWindow (ClientPtr client) { WindowPtr pWin; - int rc; REQUEST(xCompositeRedirectWindowReq); REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); - rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, - DixSetAttrAccess|DixManageAccess|DixBlendAccess); - if (rc != Success) - { - client->errorValue = stuff->window; - return (rc == BadValue) ? BadWindow : rc; - } + VERIFY_WINDOW(pWin, stuff->window, client, + DixSetAttrAccess|DixManageAccess|DixBlendAccess); + return compRedirectWindow (client, pWin, stuff->update); } @@ -158,17 +174,12 @@ static int ProcCompositeRedirectSubwindows (ClientPtr client) { WindowPtr pWin; - int rc; REQUEST(xCompositeRedirectSubwindowsReq); REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); - rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, - DixSetAttrAccess|DixManageAccess|DixBlendAccess); - if (rc != Success) - { - client->errorValue = stuff->window; - return (rc == BadValue) ? BadWindow : rc; - } + VERIFY_WINDOW(pWin, stuff->window, client, + DixSetAttrAccess|DixManageAccess|DixBlendAccess); + return compRedirectSubwindows (client, pWin, stuff->update); } @@ -179,12 +190,9 @@ ProcCompositeUnredirectWindow (ClientPtr client) REQUEST(xCompositeUnredirectWindowReq); REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) - { - client->errorValue = stuff->window; - return BadWindow; - } + VERIFY_WINDOW(pWin, stuff->window, client, + DixSetAttrAccess|DixManageAccess|DixBlendAccess); + return compUnredirectWindow (client, pWin, stuff->update); } @@ -195,12 +203,9 @@ ProcCompositeUnredirectSubwindows (ClientPtr client) REQUEST(xCompositeUnredirectSubwindowsReq); REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) - { - client->errorValue = stuff->window; - return BadWindow; - } + VERIFY_WINDOW(pWin, stuff->window, client, + DixSetAttrAccess|DixManageAccess|DixBlendAccess); + return compUnredirectSubwindows (client, pWin, stuff->update); } @@ -210,18 +215,10 @@ ProcCompositeCreateRegionFromBorderClip (ClientPtr client) WindowPtr pWin; CompWindowPtr cw; RegionPtr pBorderClip, pRegion; - int rc; REQUEST(xCompositeCreateRegionFromBorderClipReq); REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq); - rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, - DixGetAttrAccess); - if (rc != Success) - { - client->errorValue = stuff->window; - return (rc == BadValue) ? BadWindow : rc; - } - + VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); LEGAL_NEW_RESOURCE (stuff->region, client); cw = GetCompWindow (pWin); @@ -250,13 +247,7 @@ ProcCompositeNameWindowPixmap (ClientPtr client) REQUEST(xCompositeNameWindowPixmapReq); REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); - rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, - DixGetAttrAccess); - if (rc != Success) - { - client->errorValue = stuff->window; - return (rc == BadValue) ? BadWindow : rc; - } + VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); if (!pWin->viewable) return BadMatch; @@ -298,13 +289,7 @@ ProcCompositeGetOverlayWindow (ClientPtr client) int rc; REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); - rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, - DixGetAttrAccess); - if (rc != Success) - { - client->errorValue = stuff->window; - return (rc == BadValue) ? BadWindow : rc; - } + VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); pScreen = pWin->drawable.pScreen; /* @@ -360,12 +345,7 @@ ProcCompositeReleaseOverlayWindow (ClientPtr client) CompOverlayClientPtr pOc; REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) - { - client->errorValue = stuff->window; - return BadWindow; - } + VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); pScreen = pWin->drawable.pScreen; /* @@ -589,9 +569,14 @@ CompositeExtensionInit (void) if (!dixRequestPrivate(CompositeClientPrivateKey, sizeof(CompositeClientRec))) return; + if (!AddCallback (&ClientStateCallback, CompositeClientCallback, 0)) return; + for (s = 0; s < screenInfo.numScreens; s++) + if (!compScreenInit (screenInfo.screens[s])) + return; + extEntry = AddExtension (COMPOSITE_NAME, 0, 0, ProcCompositeDispatch, SProcCompositeDispatch, NULL, StandardMinorOpcode); @@ -599,9 +584,6 @@ CompositeExtensionInit (void) return; CompositeReqCode = (CARD8) extEntry->base; - for (s = 0; s < screenInfo.numScreens; s++) - if (!compScreenInit (screenInfo.screens[s])) - return; miRegisterRedirectBorderClipProc (compSetRedirectBorderClip, compGetRedirectBorderClip); diff --git a/xorg-server/composite/compinit.c b/xorg-server/composite/compinit.c index b2a9861ea..6159e4e49 100644 --- a/xorg-server/composite/compinit.c +++ b/xorg-server/composite/compinit.c @@ -1,23 +1,30 @@ /* - * Copyright © 2006 Sun Microsystems + * Copyright © 2006 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, 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. + * 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. * - * 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. + * 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. * * Copyright © 2003 Keith Packard * @@ -45,6 +52,7 @@ #endif #include "compint.h" +#include "compositeext.h" static int CompScreenPrivateKeyIndex; DevPrivateKey CompScreenPrivateKey = &CompScreenPrivateKeyIndex; @@ -213,7 +221,6 @@ compRegisterAlternateVisuals (CompScreenPtr cs, VisualID *vids, int nVisuals) return TRUE; } -_X_EXPORT Bool CompositeRegisterAlternateVisuals (ScreenPtr pScreen, VisualID *vids, int nVisuals) { @@ -231,6 +238,7 @@ static CompAlternateVisual altVisuals[] = { { 24, PICT_r8g8b8 }, #endif { 32, PICT_a8r8g8b8 }, + { 32, PICT_b8g8r8a8 }, }; static const int NUM_COMP_ALTERNATE_VISUALS = sizeof(altVisuals) / @@ -265,7 +273,8 @@ compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs, return TRUE; pPictFormat = PictureMatchFormat (pScreen, alt->depth, alt->format); - if (!pPictFormat) + if (!pPictFormat || + pPictFormat->direct.red != pScreen->visuals[0].offsetRed) return FALSE; vid = xalloc(sizeof(VisualID)); @@ -297,10 +306,12 @@ compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs, * for all colormaps. */ for (i = 0; i < numInstalledCmaps; i++) { - int j; + int j, rc; - installedCmap = LookupIDByType (installedCmaps[i], RT_COLORMAP); - if (!installedCmap) + rc = dixLookupResourceByType((pointer *)&installedCmap, + installedCmaps[i], RT_COLORMAP, + serverClient, DixReadAccess); + if (rc != Success) continue; j = installedCmap->pVisual - pScreen->visuals; installedCmap->pVisual = &visuals[j]; diff --git a/xorg-server/composite/compint.h b/xorg-server/composite/compint.h index 1c19ccd39..852c277c2 100644 --- a/xorg-server/composite/compint.h +++ b/xorg-server/composite/compint.h @@ -1,23 +1,30 @@ /* - * Copyright © 2006 Sun Microsystems + * Copyright © 2006 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, 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. + * 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. * - * 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. + * 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. * * Copyright © 2003 Keith Packard * @@ -224,10 +231,6 @@ CompositeExtensionInit (void); * compinit.c */ -Bool -CompositeRegisterAlternateVisuals (ScreenPtr pScreen, - VisualID *vids, int nVisuals); - Bool compScreenInit (ScreenPtr pScreen); diff --git a/xorg-server/composite/compositeext.h b/xorg-server/composite/compositeext.h new file mode 100644 index 000000000..b20bab158 --- /dev/null +++ b/xorg-server/composite/compositeext.h @@ -0,0 +1,38 @@ +/* + * Copyright © 2009 NVIDIA Corporation + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _COMPOSITEEXT_H_ +#define _COMPOSITEEXT_H_ + +#include "misc.h" +#include "scrnintstr.h" + +extern _X_EXPORT Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen, + VisualID *vids, + int nVisuals); + +#endif /* _COMPOSITEEXT_H_ */ diff --git a/xorg-server/composite/compoverlay.c b/xorg-server/composite/compoverlay.c index 94e5b0346..e213ce71e 100644 --- a/xorg-server/composite/compoverlay.c +++ b/xorg-server/composite/compoverlay.c @@ -1,23 +1,30 @@ /* - * Copyright © 2006 Sun Microsystems + * Copyright © 2006 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, 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. + * 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. * - * 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. + * 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. * * Copyright © 2003 Keith Packard * @@ -125,13 +132,13 @@ compCreateOverlayWindow (ScreenPtr pScreen) CompScreenPtr cs = GetCompScreen(pScreen); WindowPtr pRoot = WindowTable[pScreen->myNum]; WindowPtr pWin; - XID overrideRedirect = TRUE; + XID attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */ int result; pWin = cs->pOverlayWin = CreateWindow (cs->overlayWid, pRoot, 0, 0, pScreen->width, pScreen->height, 0, - InputOutput, CWOverrideRedirect, &overrideRedirect, + InputOutput, CWBackPixmap | CWOverrideRedirect, &attrs[0], pRoot->drawable.depth, serverClient, pScreen->rootVisual, &result); if (pWin == NULL) diff --git a/xorg-server/composite/compwindow.c b/xorg-server/composite/compwindow.c index 577fa733e..4267a51c7 100644 --- a/xorg-server/composite/compwindow.c +++ b/xorg-server/composite/compwindow.c @@ -1,23 +1,30 @@ /* - * Copyright © 2006 Sun Microsystems + * Copyright © 2006 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, 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. + * 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. * - * 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. + * 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. * * Copyright © 2003 Keith Packard * diff --git a/xorg-server/config.guess b/xorg-server/config.guess index e3a2116a7..da8331460 100644 --- a/xorg-server/config.guess +++ b/xorg-server/config.guess @@ -1,10 +1,10 @@ #! /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, 2007, 2008, 2009 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. -timestamp='2009-06-10' +timestamp='2009-04-27' # 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 @@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ + | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -656,7 +656,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ + grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -822,9 +822,6 @@ EOF [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; - 8664:Windows_NT:*) - echo x86_64-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 @@ -885,17 +882,40 @@ EOF m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:* | mips64:Linux:*:*) + mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + 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 @@ -927,7 +947,7 @@ EOF EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac - objdump --private-headers /bin/sh | grep -q ld.so.1 + 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 ;; @@ -981,6 +1001,14 @@ EOF elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + 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 @@ -1046,7 +1074,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1154,7 +1182,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) diff --git a/xorg-server/config.sub b/xorg-server/config.sub index eb0389a69..a39437d01 100644 --- a/xorg-server/config.sub +++ b/xorg-server/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. -timestamp='2009-06-11' +timestamp='2009-04-17' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -153,9 +153,6 @@ case $os in os= basic_machine=$1 ;; - -bluegene*) - os=-cnk - ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -470,10 +467,6 @@ case $basic_machine in basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; c90) basic_machine=c90-cray os=-unicos @@ -1267,7 +1260,7 @@ case $os in # 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* | -cnk* | -sunos | -sunos[34]*\ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ @@ -1620,7 +1613,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -cnk*|-aix*) + -aix*) vendor=ibm ;; -beos*) diff --git a/xorg-server/config/Makefile.am b/xorg-server/config/Makefile.am index 1e7c501c3..7fa2df877 100644 --- a/xorg-server/config/Makefile.am +++ b/xorg-server/config/Makefile.am @@ -1,22 +1,22 @@ AM_CFLAGS = @DIX_CFLAGS@ -noinst_LIBRARIES = libconfig.a -libconfig_a_SOURCES = config.c config-backends.h +noinst_LTLIBRARIES = libconfig.la +libconfig_la_SOURCES = config.c config-backends.h if CONFIG_NEED_DBUS AM_CFLAGS += @DBUS_CFLAGS@ -libconfig_a_SOURCES += dbus-core.c +libconfig_la_SOURCES += dbus-core.c endif if CONFIG_DBUS_API dbusconfigdir = $(sysconfdir)/dbus-1/system.d dbusconfig_DATA = xorg-server.conf -libconfig_a_SOURCES += dbus.c +libconfig_la_SOURCES += dbus.c endif if CONFIG_HAL -libconfig_a_SOURCES += hal.c +libconfig_la_SOURCES += hal.c endif EXTRA_DIST = xorg-server.conf x11-input.fdi diff --git a/xorg-server/config/Makefile.in b/xorg-server/config/Makefile.in index aad49d11d..833fcc595 100644 --- a/xorg-server/config/Makefile.in +++ b/xorg-server/config/Makefile.in @@ -42,8 +42,11 @@ host_triplet = @host@ subdir = config DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -53,21 +56,20 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libconfig_a_AR = $(AR) $(ARFLAGS) -libconfig_a_LIBADD = -am__libconfig_a_SOURCES_DIST = config.c config-backends.h dbus-core.c \ +LTLIBRARIES = $(noinst_LTLIBRARIES) +libconfig_la_LIBADD = +am__libconfig_la_SOURCES_DIST = config.c config-backends.h dbus-core.c \ dbus.c hal.c -@CONFIG_NEED_DBUS_TRUE@am__objects_1 = dbus-core.$(OBJEXT) -@CONFIG_DBUS_API_TRUE@am__objects_2 = dbus.$(OBJEXT) -@CONFIG_HAL_TRUE@am__objects_3 = hal.$(OBJEXT) -am_libconfig_a_OBJECTS = config.$(OBJEXT) $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) -libconfig_a_OBJECTS = $(am_libconfig_a_OBJECTS) +@CONFIG_NEED_DBUS_TRUE@am__objects_1 = dbus-core.lo +@CONFIG_DBUS_API_TRUE@am__objects_2 = dbus.lo +@CONFIG_HAL_TRUE@am__objects_3 = hal.lo +am_libconfig_la_OBJECTS = config.lo $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) +libconfig_la_OBJECTS = $(am_libconfig_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -78,8 +80,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libconfig_a_SOURCES) -DIST_SOURCES = $(am__libconfig_a_SOURCES_DIST) +SOURCES = $(libconfig_la_SOURCES) +DIST_SOURCES = $(am__libconfig_la_SOURCES_DIST) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -111,6 +113,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -131,9 +134,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -162,7 +168,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -171,9 +179,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -212,12 +224,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -237,7 +250,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -247,6 +259,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -260,11 +273,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -300,6 +312,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -324,7 +337,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -347,6 +359,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -378,15 +391,17 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = @DIX_CFLAGS@ $(am__append_1) -noinst_LIBRARIES = libconfig.a -libconfig_a_SOURCES = config.c config-backends.h $(am__append_2) \ +noinst_LTLIBRARIES = libconfig.la +libconfig_la_SOURCES = config.c config-backends.h $(am__append_2) \ $(am__append_3) $(am__append_4) @CONFIG_DBUS_API_TRUE@dbusconfigdir = $(sysconfdir)/dbus-1/system.d @CONFIG_DBUS_API_TRUE@dbusconfig_DATA = xorg-server.conf @@ -426,12 +441,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libconfig.a: $(libconfig_a_OBJECTS) $(libconfig_a_DEPENDENCIES) - -rm -f libconfig.a - $(libconfig_a_AR) libconfig.a $(libconfig_a_OBJECTS) $(libconfig_a_LIBADD) - $(RANLIB) libconfig.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libconfig.la: $(libconfig_la_OBJECTS) $(libconfig_la_DEPENDENCIES) + $(LINK) $(libconfig_la_OBJECTS) $(libconfig_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -439,10 +458,10 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-core.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hal.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -575,7 +594,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(DATA) +all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(dbusconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -607,7 +626,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -679,7 +698,7 @@ uninstall-am: uninstall-dbusconfigDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ diff --git a/xorg-server/config/config.c b/xorg-server/config/config.c index 882b699a0..b01329339 100644 --- a/xorg-server/config/config.c +++ b/xorg-server/config/config.c @@ -32,7 +32,7 @@ #include "config-backends.h" void -config_init() +config_init(void) { #if defined(CONFIG_DBUS_API) || defined(CONFIG_HAL) if (config_dbus_core_init()) { @@ -52,7 +52,7 @@ config_init() } void -config_fini() +config_fini(void) { #if defined(CONFIG_DBUS_API) || defined(CONFIG_HAL) # ifdef CONFIG_HAL diff --git a/xorg-server/config/dbus-core.c b/xorg-server/config/dbus-core.c index b349c6e3c..4c5e10f51 100644 --- a/xorg-server/config/dbus-core.c +++ b/xorg-server/config/dbus-core.c @@ -27,7 +27,6 @@ #include #endif -#define DBUS_API_SUBJECT_TO_CHANGE #include #include diff --git a/xorg-server/config/dbus.c b/xorg-server/config/dbus.c index cef8ed5db..37462ace0 100644 --- a/xorg-server/config/dbus.c +++ b/xorg-server/config/dbus.c @@ -175,7 +175,7 @@ add_device(DBusMessage *message, DBusMessage *reply, DBusError *error) unwind: if (ret != Success) { if (dev) - RemoveDevice(dev); + RemoveDevice(dev, TRUE); err = -ret; dbus_message_iter_append_basic(&reply_iter, DBUS_TYPE_INT32, &err); diff --git a/xorg-server/configure b/xorg-server/configure index 5a147107d..e305008de 100644 --- a/xorg-server/configure +++ b/xorg-server/configure @@ -1,22 +1,20 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for xorg-server 1.6.3.901. +# Generated by GNU Autoconf 2.63 for xorg-server 1.6.99.900. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. -# +# 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. ## -## -------------------- ## +## --------------------- ## +## 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 : +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 @@ -24,15 +22,23 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; + 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 @@ -40,13 +46,7 @@ export as_nl 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 -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +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 @@ -57,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in #( + case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -80,6 +80,13 @@ if test "${PATH_SEPARATOR+set}" != set; then } 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 @@ -89,15 +96,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( +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 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done IFS=$as_save_IFS ;; @@ -109,16 +116,12 @@ if test "x$as_myself" = x; then 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); exit 1; } fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +# 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='> ' @@ -130,250 +133,7 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="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_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - 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_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - +# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -387,12 +147,8 @@ else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -412,125 +168,414 @@ $as_echo X/"$0" | } s/.*/./; q'` -# 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 +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # 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; as_fn_exit 1; } +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi - # 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 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 } -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +exitcode=0 +if as_func_success; then + : else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + exitcode=1 + echo as_func_success failed. 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' + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. 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='mkdir -p "$as_dir"' +if as_func_ret_success; then + : else - test -d ./-p && rmdir ./-p - as_mkdir_p=false + exitcode=1 + echo as_func_ret_success failed. fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' +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 - 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 - ' + exitcode=1 + echo positional parameters were not saved. 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'" +test \$exitcode = 0) || { (exit 1); exit 1; } -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +( + 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'" -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) @@ -695,14 +740,14 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xorg-server' PACKAGE_TARNAME='xorg-server' -PACKAGE_VERSION='1.6.3.901' -PACKAGE_STRING='xorg-server 1.6.3.901' +PACKAGE_VERSION='1.6.99.900' +PACKAGE_STRING='xorg-server 1.6.99.900' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' -PACKAGE_URL='' ac_unique_file="Makefile.am" # Factoring default headers for most tests. @@ -745,6 +790,16 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +Q +V +F77 +FC +CXX +AM_MAKEFLAGS +MAKEFLAGS +shavedir +distcleancheck_listfiles +CHANGELOG_CMD ADMIN_MAN_DIR DRIVER_MAN_DIR MISC_MAN_DIR @@ -761,10 +816,6 @@ DIX_CFLAGS BUILD_TIME BUILD_DATE PROJECTROOT -XKB_COMPILED_DIR -XKM_OUTPUT_DIR -XKB_BIN_DIRECTORY -XKB_BASE_DIRECTORY XFAKESERVER_FALSE XFAKESERVER_TRUE BUILD_KDRIVEFBDEVLIB_FALSE @@ -823,12 +874,10 @@ DMXMODULES_LIBS DMXMODULES_CFLAGS STANDALONE_XPBPROXY_FALSE STANDALONE_XPBPROXY_TRUE +XQUARTZ_SPARKLE_FALSE +XQUARTZ_SPARKLE_TRUE XQUARTZ_FALSE XQUARTZ_TRUE -HAVE_AGL_FRAMEWORK_FALSE -HAVE_AGL_FRAMEWORK_TRUE -HAVE_XPLUGIN_FALSE -HAVE_XPLUGIN_TRUE am__fastdepOBJC_FALSE am__fastdepOBJC_TRUE OBJCDEPMODE @@ -861,15 +910,16 @@ XWIN_SYS_LIBS XWIN_SERVER_NAME XWINMODULES_LIBS XWINMODULES_CFLAGS +WINDRES XWIN_LIBS XF86VIDMODE_FALSE XF86VIDMODE_TRUE DGA_FALSE DGA_TRUE +SOLARIS_VT_FALSE +SOLARIS_VT_TRUE SOLARIS_ASM_INLINE_FALSE SOLARIS_ASM_INLINE_TRUE -SOLARIS_USL_CONSOLE_FALSE -SOLARIS_USL_CONSOLE_TRUE LNXACPI_FALSE LNXACPI_TRUE LINUX_ALPHA_FALSE @@ -884,7 +934,6 @@ XORG_BUS_LINUXPCI_FALSE XORG_BUS_LINUXPCI_TRUE XORG_FALSE XORG_TRUE -abi_font abi_extension abi_xinput abi_videodrv @@ -916,6 +965,7 @@ SOLARIS_ASM_CFLAGS SOLARIS_INOUT_ARCH PCIACCESS_LIBS PCIACCESS_CFLAGS +symbol_visibility XNEST_SYS_LIBS XNEST_LIBS XNEST_FALSE @@ -927,6 +977,7 @@ XVFB_LIBS XVFB_FALSE XVFB_TRUE LD_EXPORT_SYMBOLS_FLAG +CWARNFLAGS UTILS_SYS_LIBS XSERVER_SYS_LIBS XSERVER_LIBS @@ -934,12 +985,14 @@ XSERVERLIBS_LIBS XSERVERLIBS_CFLAGS XSERVERCFLAGS_LIBS XSERVERCFLAGS_CFLAGS +MAIN_LIB +UNITTESTS_FALSE +UNITTESTS_TRUE +GLIB_LIBS +GLIB_CFLAGS DEBUG_FALSE DEBUG_TRUE -VENDOR_MAN_VERSION -VENDOR_RELEASE VENDOR_NAME_SHORT -VENDOR_NAME DRI_DRIVER_PATH BASE_FONT_PATH SERVER_MISC_CONFIG_PATH @@ -951,6 +1004,18 @@ XDMCP_FALSE XDMCP_TRUE XDMCP_LIBS XDMCP_CFLAGS +XKB_COMPILED_DIR +XKM_OUTPUT_DIR +XKB_BIN_DIRECTORY +XKB_BASE_DIRECTORY +INT10MODULE_FALSE +INT10MODULE_TRUE +VBE_FALSE +VBE_TRUE +VGAHW_FALSE +VGAHW_TRUE +XAA_FALSE +XAA_TRUE XF86UTILS_FALSE XF86UTILS_TRUE XCALIBRATE_FALSE @@ -979,6 +1044,8 @@ DRI2_FALSE DRI2_TRUE DRI2PROTO_LIBS DRI2PROTO_CFLAGS +DRI_LIBS +DRI_CFLAGS DRIPROTO_LIBS DRIPROTO_CFLAGS DRI_FALSE @@ -986,7 +1053,6 @@ DRI_TRUE GLX_DEFINES AIGLX_FALSE AIGLX_TRUE -MESA_SOURCE GLX_FALSE GLX_TRUE GL_LIBS @@ -1045,11 +1111,10 @@ SECURE_RPC_FALSE SECURE_RPC_TRUE INSTALL_SETUID_FALSE INSTALL_SETUID_TRUE +XQUARTZ_SPARKLE APPLE_APPLICATION_ID APPLE_APPLICATION_NAME APPLE_APPLICATIONS_DIR -KDRIVE_HW_FALSE -KDRIVE_HW_TRUE SPARC64_VIDEO_FALSE SPARC64_VIDEO_TRUE PPC_VIDEO_FALSE @@ -1199,7 +1264,6 @@ bindir program_transform_name prefix exec_prefix -PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -1223,6 +1287,7 @@ with_dtrace with_release_version enable_werror enable_debug +enable_unit_tests with_int10 with_vendor_name with_vendor_name_short @@ -1237,14 +1302,20 @@ with_fontdir with_default_font_path with_xkb_path with_xkb_output +with_default_xkb_rules +with_default_xkb_model +with_default_xkb_layout +with_default_xkb_variant +with_default_xkb_options with_serverconfig_path with_apple_applications_dir with_apple_application_name with_apple_application_id +enable_sparkle enable_builddocs enable_install_libxf86config enable_null_root_cursor -with_mesa_source +enable_visibility with_dri_driver_path enable_aiglx enable_glx_tls @@ -1276,6 +1347,10 @@ enable_dpms enable_config_dbus enable_config_hal enable_xfree86_utils +enable_xaa +enable_vgahw +enable_vbe +enable_int10_module enable_xorg enable_dmx enable_xvfb @@ -1294,6 +1369,7 @@ enable_tcp_transport enable_ipv6 enable_local_transport enable_secure_rpc +enable_shave ' ac_precious_vars='build_alias host_alias @@ -1319,12 +1395,16 @@ GL_CFLAGS GL_LIBS DRIPROTO_CFLAGS DRIPROTO_LIBS +DRI_CFLAGS +DRI_LIBS DRI2PROTO_CFLAGS DRI2PROTO_LIBS LIBDRM_CFLAGS LIBDRM_LIBS XDMCP_CFLAGS XDMCP_LIBS +GLIB_CFLAGS +GLIB_LIBS XSERVERCFLAGS_CFLAGS XSERVERCFLAGS_LIBS XSERVERLIBS_CFLAGS @@ -1471,7 +1551,8 @@ do 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_fn_error "invalid feature name: $ac_useropt" + { $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 @@ -1497,7 +1578,8 @@ do 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_fn_error "invalid feature name: $ac_useropt" + { $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 @@ -1701,7 +1783,8 @@ do 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_fn_error "invalid package name: $ac_useropt" + { $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 @@ -1717,7 +1800,8 @@ do 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_fn_error "invalid package name: $ac_useropt" + { $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 @@ -1747,17 +1831,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) { $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. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac + 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 ;; @@ -1774,13 +1858,15 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + { $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_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + 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 @@ -1803,7 +1889,8 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + { $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' @@ -1833,9 +1920,11 @@ 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_fn_error "working directory cannot be determined" + { $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_fn_error "pwd does not report name of working directory" + { $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. @@ -1874,11 +1963,13 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + { $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_fn_error "$ac_msg" + 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 @@ -1904,7 +1995,7 @@ 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 xorg-server 1.6.3.901 to adapt to many kinds of systems. +\`configure' configures xorg-server 1.6.99.900 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1974,7 +2065,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xorg-server 1.6.3.901:";; + short | recursive ) echo "Configuration of xorg-server 1.6.99.900:";; esac cat <<\_ACEOF @@ -1994,11 +2085,15 @@ Optional Features: --disable-largefile omit support for large files --enable-werror Treat warnings as errors (default: disabled) --enable-debug Enable debugging (default: disabled) + --enable-unit-tests Enable unit-tests (default: auto) + --enable-sparkle Enable updating of X11.app using the Sparkle + Framework (default: disabled) --enable-builddocs Build docs (default: disabled) --enable-install-libxf86config Install libxf86config (default: disabled) --enable-null-root-cursor Use an empty root cursor (default: use core cursor) + --enable-visibility Enable symbol visibility (default: auto) --enable-aiglx Build accelerated indirect GLX (default: enabled) --enable-glx-tls Build GLX with TLS support (default: disabled) --disable-registry Build string registry module (default: enabled) @@ -2030,13 +2125,17 @@ Optional Features: --enable-config-dbus Build D-BUS API support (default: no) --disable-config-hal Build HAL support (default: auto) --enable-xfree86-utils Build xfree86 DDX utilities (default: enabled) + --enable-xaa Build XAA (default: enabled) + --enable-vgahw Build Xorg with vga access (default: enabled) + --enable-vbe Build Xorg with VBE module (default: enabled) + --enable-int10-module Build Xorg with int10 module (default: enabled) --enable-xorg Build Xorg server (default: auto) --enable-dmx Build DMX server (default: no) --enable-xvfb Build Xvfb server (default: yes) - --enable-xnest Build Xnest server (default: auto) + --enable-xnest Build Xnest server (default: yes) --enable-xquartz Build Xquartz server for OS-X (default: auto) --enable-standalone-xpbproxy - Build a standalone xpbproxy (in addigion to the one + Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no) --enable-xwin Build XWin server (default: auto) @@ -2049,6 +2148,7 @@ Optional Features: --enable-install-setuid Install Xorg server as owned by root with setuid bit (default: auto) --enable-secure-rpc Enable Secure RPC + --enable-shave use shave to make the build pretty [default=yes] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -2086,6 +2186,16 @@ Optional Packages: --with-xkb-path=PATH Path to XKB base dir (default: ${datadir}/X11/xkb) --with-xkb-output=PATH Path to XKB output dir (default: ${datadir}/X11/xkb/compiled) + --with-default-xkb-rules=RULES + Keyboard ruleset (default: base/evdev) + --with-default-xkb-model=MODEL + Keyboard model (default: pc104) + --with-default-xkb-layout=LAYOUT + Keyboard layout (default: us) + --with-default-xkb-variant=VARIANT + Keyboard variant (default: (none)) + --with-default-xkb-options=OPTIONS + Keyboard layout options (default: (none)) --with-serverconfig-path=PATH Directory where ancillary server config files are installed (default: ${libdir}/xorg) @@ -2097,8 +2207,6 @@ Optional Packages: --with-apple-application-id=VALUE CFBundleIdentification for the .app (default: org.x.X11) - --with-mesa-source=MESA_SOURCE - Path to Mesa source tree --with-dri-driver-path=PATH Path to DRI drivers (default: ${libdir}/dri) @@ -2131,6 +2239,8 @@ Some influential environment variables: C compiler flags for DRIPROTO, overriding pkg-config DRIPROTO_LIBS linker flags for DRIPROTO, overriding pkg-config + DRI_CFLAGS C compiler flags for DRI, overriding pkg-config + DRI_LIBS linker flags for DRI, overriding pkg-config DRI2PROTO_CFLAGS C compiler flags for DRI2PROTO, overriding pkg-config DRI2PROTO_LIBS @@ -2141,6 +2251,8 @@ Some influential environment variables: XDMCP_CFLAGS C compiler flags for XDMCP, overriding pkg-config XDMCP_LIBS linker flags for XDMCP, overriding pkg-config + GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config + GLIB_LIBS linker flags for GLIB, overriding pkg-config XSERVERCFLAGS_CFLAGS C compiler flags for XSERVERCFLAGS, overriding pkg-config XSERVERCFLAGS_LIBS @@ -2280,1011 +2392,413 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xorg-server configure 1.6.3.901 -generated by GNU Autoconf 2.64 +xorg-server configure 1.6.99.900 +generated by GNU Autoconf 2.63 -Copyright (C) 2009 Free Software Foundation, Inc. +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. -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## +It was created by xorg-server $as_me 1.6.99.900, which was +generated by GNU Autoconf 2.63. Invocation command line was -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () + $ $0 $@ + +_ACEOF +exec 5>>config.log { - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval +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` -} # ac_fn_c_try_compile +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - 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_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/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` - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval +_ASUNAME -} # ac_fn_c_try_link +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 -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} >&5 -} # ac_fn_c_check_header_compile +cat >&5 <<_ACEOF -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval +## ----------- ## +## Core tests. ## +## ----------- ## -} # ac_fn_c_try_cpp +_ACEOF -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval +# 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; } -} # ac_fn_c_try_run +# 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 -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 + 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 -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + 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 -#ifdef __STDC__ -# include -#else -# include -#endif + 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 -#undef $2 + 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 -/* 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 $2 (); -/* 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_$2 || defined __stub___$2 -choke me -#endif +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h -int -main () -{ -return $2 (); - ; - return 0; -} +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -} # ac_fn_c_check_func -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ---------------------------------------------------------------------- ## -## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## -## ---------------------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -} # ac_fn_c_check_header_mongrel +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid +# 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 - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi else - ac_retval=1 + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -rm -f conftest.val +# 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 - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval +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_fn_c_compute_int -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : -else - eval "$3=yes" -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 -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -} # ac_fn_c_check_type -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $2 - (void) $2; -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl -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 xorg-server $as_me 1.6.3.901, which was -generated by GNU Autoconf 2.64. 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) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append 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 - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset 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:${as_lineno-$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= ;; #( - *) { eval $ac_var=; 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'; as_fn_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 -$as_echo "/* confdefs.h */" > 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 +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 -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +RELEASE_DATE="(unreleased)" +am__api_version='1.11' -# 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:${as_lineno-$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" +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 -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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$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. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$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_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -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.11' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi +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. @@ -3309,10 +2823,10 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # 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:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +{ $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 : +if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3320,11 +2834,11 @@ 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]/* | \ + # 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[\\/]* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -3361,7 +2875,7 @@ case $as_dir/ in #(( ;; esac - done +done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -3377,7 +2891,7 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -3388,7 +2902,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +{ $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 @@ -3399,11 +2913,15 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 +$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} + { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 +$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} + { (exit 1); exit 1; }; };; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3425,8 +2943,11 @@ if ( # 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_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 + { { $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 @@ -3435,10 +2956,13 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 + { { $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:${as_lineno-$LINENO}: result: yes" >&5 +{ $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" @@ -3466,7 +2990,7 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 + { $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 @@ -3487,9 +3011,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3500,24 +3024,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3527,9 +3051,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3540,24 +3064,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3566,7 +3090,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -3579,10 +3103,10 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +{ $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 : + if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3590,7 +3114,7 @@ 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_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 #( @@ -3602,7 +3126,7 @@ do esac done done - done +done IFS=$as_save_IFS fi @@ -3618,7 +3142,7 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" @@ -3631,9 +3155,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3644,24 +3168,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3669,11 +3193,11 @@ fi test -n "$AWK" && break done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $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 : +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 @@ -3691,11 +3215,11 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3715,7 +3239,9 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + { { $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 @@ -3731,7 +3257,7 @@ fi # Define the identity of the package. PACKAGE='xorg-server' - VERSION='1.6.3.901' + VERSION='1.6.99.900' cat >>confdefs.h <<_ACEOF @@ -3772,16 +3298,16 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +{ $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 : +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:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 + { $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= @@ -3795,7 +3321,22 @@ fi -RELEASE_DATE="2009-8-25" +ac_config_files="$ac_config_files shave shave-libtool" + + +# Require xorg-macros version 1.2.0 or newer for XORG_CHANGELOG and +# XORG_CWARNFLAGS + + + + + + + + + + + ac_config_headers="$ac_config_headers include/do-not-use-config.h" @@ -3811,6 +3352,8 @@ ac_config_headers="$ac_config_headers include/xwin-config.h" ac_config_headers="$ac_config_headers include/kdrive-config.h" +ac_config_headers="$ac_config_headers include/version-config.h" + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3820,9 +3363,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3833,24 +3376,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3860,9 +3403,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3873,24 +3416,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3899,7 +3442,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -3913,9 +3456,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3926,24 +3469,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3953,9 +3496,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3967,18 +3510,18 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -3997,10 +3540,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4012,9 +3555,9 @@ if test -z "$CC"; then 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4025,24 +3568,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4056,9 +3599,9 @@ if test -z "$CC"; then 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4069,24 +3612,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4099,7 +3642,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -4110,55 +3653,73 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +{ { $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:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" +{ (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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +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=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + $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 confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; 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 conftest.out" +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:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +{ $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[^ ]*//'` @@ -4175,17 +3736,17 @@ do done rm -f $ac_rmfiles -if { { ac_try="$ac_link_default" +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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +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:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + $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, @@ -4202,7 +3763,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4221,75 +3782,84 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then : +if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +{ { $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:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +{ $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 + { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +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:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then + $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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +{ { $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." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +{ $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 conftest.out +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:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +{ $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:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +{ $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" +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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +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:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + $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 @@ -4304,24 +3874,32 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +{ { $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:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +{ $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:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +{ $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 : +if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -4333,17 +3911,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" +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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +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:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + $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 @@ -4356,23 +3934,31 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +{ { $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:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +{ $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:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +{ $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 : +if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -4386,16 +3972,37 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 - ac_compiler_gnu=no + $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:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +{ $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 @@ -4404,16 +4011,20 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +{ $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 : +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 confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -4424,11 +4035,35 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + $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 @@ -4439,12 +4074,36 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +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 - ac_c_werror_flag=$ac_save_c_werror_flag + $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 confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -4455,17 +4114,42 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +{ $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 @@ -4482,14 +4166,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +{ $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 : +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -4546,9 +4234,32 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + 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 @@ -4559,19 +4270,17 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 + { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4590,7 +4299,7 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +{ $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= @@ -4618,12 +4327,12 @@ if test "$am__include" = "#"; then fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +{ $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 : +if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi @@ -4643,9 +4352,9 @@ fi depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +{ $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 : +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 @@ -4753,7 +4462,7 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +{ $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 @@ -4777,9 +4486,9 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then : +if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -4885,7 +4594,7 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:$LINENO: result: $am_cv_CCAS_dependencies_compiler_type" >&5 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type @@ -4900,46 +4609,146 @@ else fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +# 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 - 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 && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift + 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 ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then + $as_echo_n "(cached) " >&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 && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_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` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_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 @@ -4950,24 +4759,28 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&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` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4990,9 +4803,9 @@ case $host in if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AS+set}" = set; then : +if test "${ac_cv_prog_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AS"; then @@ -5003,24 +4816,24 @@ 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 + 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_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 + { $as_echo "$as_me:$LINENO: result: $AS" >&5 $as_echo "$AS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -5030,9 +4843,9 @@ if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_AS+set}" = set; then : +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then @@ -5043,24 +4856,24 @@ 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 + 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_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -5069,7 +4882,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -5082,9 +4895,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then : +if test "${ac_cv_prog_DLLTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then @@ -5095,24 +4908,24 @@ 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 + 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_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 + { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -5122,9 +4935,9 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_DLLTOOL+set}" = set; then : +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then @@ -5135,24 +4948,24 @@ 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 + 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_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -5161,7 +4974,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -5174,9 +4987,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -5187,24 +5000,24 @@ 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 + 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_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -5214,9 +5027,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_OBJDUMP+set}" = set; then : +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -5227,24 +5040,24 @@ 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 + 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_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -5253,7 +5066,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -5287,7 +5100,7 @@ test -z "$OBJDUMP" && OBJDUMP=objdump # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : +if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -5319,7 +5132,7 @@ fi case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 + { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -5342,9 +5155,9 @@ macro_revision='1.3012' ltmain="$ac_aux_dir/ltmain.sh" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if test "${ac_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5352,7 +5165,7 @@ else ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} + $as_unset ac_script || ac_script= if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -5361,7 +5174,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue @@ -5381,7 +5194,7 @@ case `"$ac_path_SED" --version 2>&1` in $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val + ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" @@ -5396,17 +5209,19 @@ esac $ac_path_SED_found && break 3 done done - done +done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5424,9 +5239,9 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -5437,7 +5252,7 @@ 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_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 @@ -5457,7 +5272,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_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 - as_fn_arith $ac_count + 1 && ac_count=$as_val + 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" @@ -5472,24 +5287,26 @@ esac $ac_path_GREP_found && break 3 done done - done +done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -5503,7 +5320,7 @@ 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_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 @@ -5523,7 +5340,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_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 - as_fn_arith $ac_count + 1 && ac_count=$as_val + 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" @@ -5538,10 +5355,12 @@ esac $ac_path_EGREP_found && break 3 done done - done +done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP @@ -5549,14 +5368,14 @@ fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if test "${ac_cv_path_FGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -5570,7 +5389,7 @@ 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 fgrep; do + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue @@ -5590,7 +5409,7 @@ case `"$ac_path_FGREP" --version 2>&1` in $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val + ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" @@ -5605,10 +5424,12 @@ esac $ac_path_FGREP_found && break 3 done done - done +done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP @@ -5616,7 +5437,7 @@ fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5642,7 +5463,7 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no @@ -5651,7 +5472,7 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 + { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) @@ -5681,13 +5502,13 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -5718,16 +5539,18 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 + { $as_echo "$as_me:$LINENO: result: $LD" >&5 $as_echo "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -5740,7 +5563,7 @@ case `$LD -v 2>&1 &5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5752,9 +5575,9 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if test "${lt_cv_path_NM+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -5801,7 +5624,7 @@ else : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" @@ -5812,9 +5635,9 @@ else 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if test "${ac_cv_prog_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -5825,24 +5648,24 @@ 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 + 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_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 + { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -5856,9 +5679,9 @@ if test -z "$DUMPBIN"; then 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_DUMPBIN+set}" = set; then : +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -5869,24 +5692,24 @@ 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 + 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_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -5899,7 +5722,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -5919,33 +5742,33 @@ test -z "$NM" && NM=nm -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if test "${lt_cv_nm_interface+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5929: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5752: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5932: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5755: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5935: output\"" >&5) + (eval echo "\"\$as_me:5758: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if test "${lt_cv_sys_max_cmd_len+set}" = set; then $as_echo_n "(cached) " >&6 else i=0 @@ -6063,10 +5886,10 @@ else fi if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 + { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 + { $as_echo "$as_me:$LINENO: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -6080,7 +5903,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no @@ -6090,17 +5913,17 @@ xsi_shell=no && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } @@ -6135,14 +5958,14 @@ esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in @@ -6171,9 +5994,9 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -6184,24 +6007,24 @@ 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 + 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_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -6211,9 +6034,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_OBJDUMP+set}" = set; then : +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -6224,24 +6047,24 @@ 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 + 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_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -6250,7 +6073,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -6267,9 +6090,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if test "${lt_cv_deplibs_check_method+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -6388,7 +6211,7 @@ linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -6463,7 +6286,7 @@ tpf*) esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method @@ -6483,9 +6306,9 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if test "${ac_cv_prog_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -6496,24 +6319,24 @@ 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 + 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_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 + { $as_echo "$as_me:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -6523,9 +6346,9 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_AR+set}" = set; then : +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -6536,24 +6359,24 @@ 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 + 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_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -6562,7 +6385,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -6588,9 +6411,9 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -6601,24 +6424,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -6628,9 +6451,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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 : +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -6641,24 +6464,24 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -6667,7 +6490,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -6687,9 +6510,9 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6700,24 +6523,24 @@ 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 + 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_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -6727,9 +6550,9 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_RANLIB+set}" = set; then : +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6740,24 +6563,24 @@ 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 + 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_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -6766,7 +6589,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -6844,9 +6667,9 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else @@ -6962,18 +6785,18 @@ void nm_test_func(void){} int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7026,11 +6849,11 @@ _LT_EOF lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" @@ -7064,10 +6887,10 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 + { $as_echo "$as_me:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 + { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi @@ -7094,7 +6917,7 @@ fi # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : +if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi @@ -7106,11 +6929,11 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" @@ -7124,12 +6947,12 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7127 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + echo '#line 6950 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -7163,11 +6986,11 @@ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in @@ -7216,9 +7039,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 + { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if test "${lt_cv_cc_needs_belf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_ext=c @@ -7227,7 +7050,11 @@ 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -7238,13 +7065,38 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +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 lt_cv_cc_needs_belf=yes else - lt_cv_cc_needs_belf=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7252,7 +7104,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -7262,11 +7114,11 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in @@ -7292,9 +7144,9 @@ need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -7305,24 +7157,24 @@ 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 + 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_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 + { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7332,9 +7184,9 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_DSYMUTIL+set}" = set; then : +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -7345,24 +7197,24 @@ 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 + 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_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7371,7 +7223,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7384,9 +7236,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if test "${ac_cv_prog_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -7397,24 +7249,24 @@ 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 + 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_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 + { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7424,9 +7276,9 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_NMEDIT+set}" = set; then : +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -7437,24 +7289,24 @@ 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 + 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_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7463,7 +7315,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7476,9 +7328,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if test "${ac_cv_prog_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -7489,24 +7341,24 @@ 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 + 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_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 + { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7516,9 +7368,9 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_LIPO+set}" = set; then : +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -7529,24 +7381,24 @@ 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 + 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_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7555,7 +7407,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7568,9 +7420,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if test "${ac_cv_prog_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -7581,24 +7433,24 @@ 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 + 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_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 + { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7608,9 +7460,9 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_OTOOL+set}" = set; then : +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -7621,24 +7473,24 @@ 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 + 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_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7647,7 +7499,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7660,9 +7512,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if test "${ac_cv_prog_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -7673,24 +7525,24 @@ 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 + 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_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 + { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7700,9 +7552,9 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $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_OTOOL64+set}" = set; then : +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -7713,24 +7565,24 @@ 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 + 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_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7739,7 +7591,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7775,9 +7627,9 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 + { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if test "${lt_cv_apple_cc_single_mod+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -7802,18 +7654,22 @@ else rm -f conftest.* fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 + { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -7824,17 +7680,42 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +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 lt_cv_ld_exported_symbols_list=yes else - lt_cv_ld_exported_symbols_list=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) @@ -7876,14 +7757,14 @@ 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&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 : + if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -7898,7 +7779,11 @@ do # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 @@ -7907,34 +7792,78 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : else + $as_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 confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/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 + $as_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 : +if $ac_preproc_ok; then break fi @@ -7946,7 +7875,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -7957,7 +7886,11 @@ do # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 @@ -7966,40 +7899,87 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : else + $as_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 confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/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 + $as_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 : - +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_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 @@ -8009,12 +7989,16 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -8029,23 +8013,48 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_header_stdc=yes else - ac_cv_header_stdc=no + $as_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 confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - + $EGREP "memchr" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -8055,14 +8064,18 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - + $EGREP "free" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -8072,10 +8085,14 @@ 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 : + if test "$cross_compiling" = yes; then : else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -8102,34 +8119,118 @@ main () return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - +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 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); } && { ac_try='./conftest$ac_exeext' + { (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 + : else - ac_cv_header_stdc=no + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_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.beam conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+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. */ +$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 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 + eval "$as_ac_Header=yes" +else + $as_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 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8139,13 +8240,62 @@ fi done + for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+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. */ +$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 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 + eval "$as_ac_Header=yes" +else + $as_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 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -8163,7 +8313,7 @@ done # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -8196,7 +8346,7 @@ fi # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : +if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default @@ -8212,7 +8362,7 @@ test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : +if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -8293,9 +8443,9 @@ if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if test "${lt_cv_objdir+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -8308,7 +8458,7 @@ else fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -8401,9 +8551,9 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 + { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8454,10 +8604,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -8467,9 +8617,9 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 + { $as_echo "$as_me:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8520,10 +8670,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -8593,6 +8743,10 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= @@ -8600,9 +8754,9 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -8618,11 +8772,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8621: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8775: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8625: \$? = $ac_status" >&5 + echo "$as_me:8779: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8635,7 +8789,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then @@ -8655,7 +8809,7 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then @@ -8927,7 +9081,7 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } @@ -8939,9 +9093,9 @@ $as_echo "$lt_prog_compiler_pic" >&6; } # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 + { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -8957,11 +9111,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8960: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9114: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8964: \$? = $ac_status" >&5 + echo "$as_me:9118: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8974,7 +9128,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then @@ -8998,9 +9152,9 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if test "${lt_cv_prog_compiler_static_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -9026,7 +9180,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then @@ -9041,9 +9195,9 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9062,11 +9216,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9065: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9219: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9069: \$? = $ac_status" >&5 + echo "$as_me:9223: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9088,7 +9242,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -9096,9 +9250,9 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9117,11 +9271,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9120: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9274: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9124: \$? = $ac_status" >&5 + echo "$as_me:9278: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9143,7 +9297,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -9152,7 +9306,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 + { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* @@ -9160,10 +9314,10 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi @@ -9176,7 +9330,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= @@ -9236,9 +9390,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) - link_all_deplibs=no - ;; esac ld_shlibs=yes @@ -9421,7 +9572,7 @@ _LT_EOF fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -9596,7 +9747,6 @@ _LT_EOF if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi - link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then @@ -9622,7 +9772,11 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -9633,7 +9787,27 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +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 lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9647,9 +9821,16 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi +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_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -9662,7 +9843,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -9673,7 +9858,27 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +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 lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9687,9 +9892,16 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi +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_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -9901,16 +10113,42 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +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 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +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_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' @@ -9923,7 +10161,7 @@ rm -f core conftest.err conftest.$ac_objext \ link_all_deplibs=yes ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -10166,7 +10404,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no @@ -10203,16 +10441,16 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 + { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext @@ -10226,11 +10464,11 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } then archive_cmds_need_lc=no else @@ -10241,7 +10479,7 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } cat conftest.err 1>&5 fi $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac @@ -10405,7 +10643,7 @@ esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 + { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then @@ -10827,7 +11065,11 @@ linux* | k*bsd*-gnu) save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -10838,13 +11080,41 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : +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 + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi + +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_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -10853,10 +11123,13 @@ rm -f core conftest.err conftest.$ac_objext \ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -10868,18 +11141,6 @@ rm -f core conftest.err conftest.$ac_objext \ dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -11068,43 +11329,4781 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 dlopen (); +int +main () +{ +return dlopen (); + ; + 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_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 +$as_echo_n "checking for shl_load... " >&6; } +if test "${ac_cv_func_shl_load+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 shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* 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 shl_load (); +/* 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_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + 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_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=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_shl_load" >&5 +$as_echo "$ac_cv_func_shl_load" >&6; } +if test "x$ac_cv_func_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 shl_load (); +int +main () +{ +return shl_load (); + ; + 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_lib_dld_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+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 dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* 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 dlopen (); +/* 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_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + 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_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=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_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 dlopen (); +int +main () +{ +return dlopen (); + ; + 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_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 dlopen (); +int +main () +{ +return dlopen (); + ; + 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_lib_svld_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 dld_link (); +int +main () +{ +return dld_link (); + ; + 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_lib_dld_dld_link=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 12077 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 12173 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +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 + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + + +# dolt, a replacement for libtool +# Josh Triplett +# Extract the first word of "bash", so it can be a program name with args. +set dummy bash; 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_path_DOLT_BASH+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $DOLT_BASH in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOLT_BASH="$DOLT_BASH" # Let the user override the test with a path. + ;; + *) + 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_path_DOLT_BASH="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +DOLT_BASH=$ac_cv_path_DOLT_BASH +if test -n "$DOLT_BASH"; then + { $as_echo "$as_me:$LINENO: result: $DOLT_BASH" >&5 +$as_echo "$DOLT_BASH" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +{ $as_echo "$as_me:$LINENO: checking if dolt supports this host" >&5 +$as_echo_n "checking if dolt supports this host... " >&6; } +dolt_supported=yes +if test x$DOLT_BASH = x; then + dolt_supported=no +fi +if test x$GCC != xyes; then + dolt_supported=no +fi +case $host in +i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \ +|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*) + pic_options='-fPIC' + ;; +i?86-apple-darwin*) + pic_options='-fno-common' + ;; +*) + dolt_supported=no + ;; +esac +if test x$dolt_supported = xno ; then + { $as_echo "$as_me:$LINENO: result: no, falling back to libtool" >&5 +$as_echo "no, falling back to libtool" >&6; } + LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)' + LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)' +else + { $as_echo "$as_me:$LINENO: result: yes, replacing libtool" >&5 +$as_echo "yes, replacing libtool" >&6; } + + cat <<__DOLTCOMPILE__EOF__ >doltcompile +#!$DOLT_BASH +__DOLTCOMPILE__EOF__ + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +args=("$@") +for ((arg=0; arg<${#args[@]}; arg++)) ; do + if test x"${args[$arg]}" = x-o ; then + objarg=$((arg+1)) + break + fi +done +if test x$objarg = x ; then + echo 'Error: no -o on compiler command line' 1>&2 + exit 1 +fi +lo="${args[$objarg]}" +obj="${lo%.lo}" +if test x"$lo" = x"$obj" ; then + echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2 + exit 1 +fi +objbase="${obj##*/}" +__DOLTCOMPILE__EOF__ + + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +libobjdir="${obj%$objbase}.libs" +if test ! -d "$libobjdir" ; then + mkdir_out="$(mkdir "$libobjdir" 2>&1)" + mkdir_ret=$? + if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then + echo "$mkdir_out" 1>&2 + exit $mkdir_ret + fi +fi +pic_object="$libobjdir/$objbase.o" +args[$objarg]="$pic_object" +__DOLTCOMPILE__EOF__ + cat <<__DOLTCOMPILE__EOF__ >>doltcompile +"\${args[@]}" $pic_options -DPIC || exit \$? +__DOLTCOMPILE__EOF__ + fi + + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +non_pic_object="$obj.o" +args[$objarg]="$non_pic_object" +__DOLTCOMPILE__EOF__ + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args[@]}" >/dev/null 2>&1 || exit $? +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args[@]}" || exit $? +__DOLTCOMPILE__EOF__ + fi + fi + + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +{ +echo "# $lo - a libtool object file" +echo "# Generated by doltcompile, not libtool" +__DOLTCOMPILE__EOF__ + + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "pic_object='.libs/${objbase}.o'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo pic_object=none +__DOLTCOMPILE__EOF__ + fi + + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "non_pic_object='${objbase}.o'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo non_pic_object=none +__DOLTCOMPILE__EOF__ + fi + + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +} > "$lo" +__DOLTCOMPILE__EOF__ + + chmod +x doltcompile + LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)' + LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)' + + cat <<__DOLTLIBTOOL__EOF__ > doltlibtool +#!$DOLT_BASH +__DOLTLIBTOOL__EOF__ + cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool +top_builddir_slash="${0%%doltlibtool}" +: ${top_builddir_slash:=./} +args=() +modeok=false +tagok=false +for arg in "$@"; do + case "$arg" in + --silent) ;; + --mode=compile) modeok=true ;; + --tag=CC|--tag=CXX) tagok=true ;; + *) args[${#args[@]}]="$arg" ;; + esac +done +if $modeok && $tagok ; then + . ${top_builddir_slash}doltcompile "${args[@]}" +else + exec ${top_builddir_slash}libtool "$@" +fi +__DOLTLIBTOOL__EOF__ + + chmod +x doltlibtool + LIBTOOL='$(top_builddir)/doltlibtool' +fi + + +# end dolt + +{ $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 + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; 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_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + 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_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; 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_path_ac_pt_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + 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_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + 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 + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +fi +for ac_prog in flex lex +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_LEX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # 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_LEX="$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 +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { $as_echo "$as_me:$LINENO: result: $LEX" >&5 +$as_echo "$LEX" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ (ac_try="$LEX conftest.l" +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 "$LEX conftest.l") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ $as_echo "$as_me:$LINENO: checking lex output file root" >&5 +$as_echo_n "checking lex output file root... " >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then + $as_echo_n "(cached) " >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { { $as_echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +$as_echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +$as_echo "$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { $as_echo "$as_me:$LINENO: checking lex library" >&5 +$as_echo_n "checking lex library... " >&6; } +if test "${ac_cv_lib_lex+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_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_lib_lex=$ac_lib +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 +$as_echo "$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ $as_echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +$as_echo_n "checking whether yytext is a pointer... " >&6; } +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat >conftest.$ac_ext <<_ACEOF +#define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_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_prog_lex_yytext_pointer=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +cat >>confdefs.h <<\_ACEOF +#define YYTEXT_POINTER 1 +_ACEOF + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +for ac_prog in 'bison -y' byacc +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_YACC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # 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_YACC="$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 +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { $as_echo "$as_me:$LINENO: result: $YACC" >&5 +$as_echo "$YACC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +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 + break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + 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_sys_largefile_CC=' -n32'; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + $as_echo_n "(cached) " >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +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_sys_file_offset_bits=no; break +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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +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_sys_file_offset_bits=64; break +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 + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + $as_echo_n "(cached) " >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +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_sys_large_files=no; break +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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +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_sys_large_files=1; break +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 + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi +fi + + + +for ac_prog in cpp +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_path_RAWCPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $RAWCPP in + [\\/]* | ?:[\\/]*) + ac_cv_path_RAWCPP="$RAWCPP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib" +for as_dir in $as_dummy +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_path_RAWCPP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +RAWCPP=$ac_cv_path_RAWCPP +if test -n "$RAWCPP"; then + { $as_echo "$as_me:$LINENO: result: $RAWCPP" >&5 +$as_echo "$RAWCPP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$RAWCPP" && break +done +test -n "$RAWCPP" || RAWCPP="${CPP}" + + +# Check for flag to avoid builtin definitions - assumes unix is predefined, +# which is not the best choice for supporting other OS'es, but covers most +# of the ones we need for now. +{ $as_echo "$as_me:$LINENO: checking if $RAWCPP requires -undef" >&5 +$as_echo_n "checking if $RAWCPP requires -undef... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +Does cpp redefine unix ? +_ACEOF +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS=-undef + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + # under Cygwin unix is still defined even with -undef + elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS="-undef -ansi" + { $as_echo "$as_me:$LINENO: result: yes, with -ansi" >&5 +$as_echo "yes, with -ansi" >&6; } + else + { { $as_echo "$as_me:$LINENO: error: ${RAWCPP} defines unix with or without -undef. I don't know what to do." >&5 +$as_echo "$as_me: error: ${RAWCPP} defines unix with or without -undef. I don't know what to do." >&2;} + { (exit 1); exit 1; }; } + fi +fi +rm -f conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking if $RAWCPP requires -traditional" >&5 +$as_echo_n "checking if $RAWCPP requires -traditional... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +Does cpp preserve "whitespace"? +_ACEOF +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { { $as_echo "$as_me:$LINENO: error: ${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." >&5 +$as_echo "$as_me: error: ${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." >&2;} + { (exit 1); exit 1; }; } + fi +fi +rm -f conftest.$ac_ext + + +# Extract the first word of "sed", so it can be a program name with args. +set dummy sed; 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_path_SED+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $SED in + [\\/]* | ?:[\\/]*) + ac_cv_path_SED="$SED" # Let the user override the test with a path. + ;; + *) + 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_path_SED="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +SED=$ac_cv_path_SED +if test -n "$SED"; then + { $as_echo "$as_me:$LINENO: result: $SED" >&5 +$as_echo "$SED" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +# Check whether --with-dtrace was given. +if test "${with_dtrace+set}" = set; then + withval=$with_dtrace; WDTRACE=$withval +else + WDTRACE=auto +fi + +if test "x$WDTRACE" = xauto; then + case $host_os in + darwin*) WDTRACE="no" ;; + esac +fi +if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then + # Extract the first word of "dtrace", so it can be a program name with args. +set dummy dtrace; 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_path_DTRACE+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $DTRACE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/sbin" +for as_dir in $as_dummy +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_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not_found" + ;; +esac +fi +DTRACE=$ac_cv_path_DTRACE +if test -n "$DTRACE"; then + { $as_echo "$as_me:$LINENO: result: $DTRACE" >&5 +$as_echo "$DTRACE" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$DTRACE" = "xnot_found" ; then + if test "x$WDTRACE" = "xyes" ; 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: dtrace requested but not found +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: dtrace requested but not found +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + WDTRACE="no" + else + if test "${ac_cv_header_sys_sdt_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +$as_echo_n "checking for sys/sdt.h... " >&6; } +if test "${ac_cv_header_sys_sdt_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +$as_echo "$ac_cv_header_sys_sdt_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +$as_echo_n "checking sys/sdt.h usability... " >&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 +_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_header_compiler=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +$as_echo_n "checking sys/sdt.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/sdt.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/sdt.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/sdt.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sdt.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/sdt.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sdt.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/sdt.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/sdt.h: 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 +{ $as_echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +$as_echo_n "checking for sys/sdt.h... " >&6; } +if test "${ac_cv_header_sys_sdt_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_sys_sdt_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +$as_echo "$ac_cv_header_sys_sdt_h" >&6; } + +fi +if test "x$ac_cv_header_sys_sdt_h" = x""yes; then + HAS_SDT_H="yes" +else + HAS_SDT_H="no" +fi + + + if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then + WDTRACE="no" + fi + fi +fi +if test "x$WDTRACE" != "xno" ; then + +cat >>confdefs.h <<\_ACEOF +#define XSERVER_DTRACE 1 +_ACEOF + +fi + if test "x$WDTRACE" != "xno"; then + XSERVER_DTRACE_TRUE= + XSERVER_DTRACE_FALSE='#' +else + XSERVER_DTRACE_TRUE='#' + XSERVER_DTRACE_FALSE= +fi + + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+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. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +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 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 + eval "$as_ac_Header=yes" +else + $as_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 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + 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_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + 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_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+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. */ +#include +#include +#include +#include + +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_header_stdc=yes +else + $as_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 + +_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 + +_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 +#include +#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 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); } && { ac_try='./conftest$ac_exeext' + { (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 + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + + + + + + + +for ac_header in fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+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 () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#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_cv_c_const=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const /**/ +_ACEOF + +fi + + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_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 + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +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 + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #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 + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #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_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #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 + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #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_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + 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 + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +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 +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 +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + 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 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); } && { ac_try='./conftest$ac_exeext' + { (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 + ac_cv_c_bigendian=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + ENDIAN="X_BIG_ENDIAN";; #( + no) + ENDIAN="X_LITTLE_ENDIAN" ;; #( + universal) + +cat >>confdefs.h <<\_ACEOF +#define AC_APPLE_UNIVERSAL_BUILD 1 +_ACEOF + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of unsigned long" >&5 +$as_echo_n "checking size of unsigned long... " >&6; } +if test "${ac_cv_sizeof_unsigned_long+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +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 +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (unsigned long))) >= 0)]; +test_array [0] = 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 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_lo=0 ac_mid=0 + while :; do + 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 +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (unsigned long))) <= $ac_mid)]; +test_array [0] = 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 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_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (unsigned long))) < 0)]; +test_array [0] = 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 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_hi=-1 ac_mid=-1 + while :; do + 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 +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (unsigned long))) >= $ac_mid)]; +test_array [0] = 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 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_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + 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 +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (unsigned long))) <= $ac_mid)]; +test_array [0] = 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 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_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_unsigned_long=$ac_lo;; +'') if test "$ac_cv_type_unsigned_long" = yes; 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: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_unsigned_long=0 + fi ;; +esac +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 +static long int longval () { return (long int) (sizeof (unsigned long)); } +static unsigned long int ulongval () { return (long int) (sizeof (unsigned long)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (unsigned long))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (unsigned long)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (unsigned long)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + 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 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); } && { ac_try='./conftest$ac_exeext' + { (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 + ac_cv_sizeof_unsigned_long=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_unsigned_long" = yes; 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: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_unsigned_long=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5 +$as_echo "$ac_cv_sizeof_unsigned_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long +_ACEOF + + +if test "$ac_cv_sizeof_unsigned_long" = 8; then + +cat >>confdefs.h <<\_ACEOF +#define _XSERVER64 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 +$as_echo_n "checking for pid_t... " >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_pid_t=no +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 +int +main () +{ +if (sizeof (pid_t)) + 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 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 + 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 +int +main () +{ +if (sizeof ((pid_t))) + 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 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_cv_type_pid_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +$as_echo "$ac_cv_type_pid_t" >&6; } +if test "x$ac_cv_type_pid_t" = x""yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + + +# Checks for headers/macros for byte swapping +# Known variants: +# bswap_16, bswap_32, bswap_64 (glibc) +# __swap16, __swap32, __swap64 (OpenBSD) +# bswap16, bswap32, bswap64 (other BSD's) +# and a fallback to local macros if none of the above are found + +# if is found, assume it's the correct version + +for ac_header in byteswap.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# if is found, have to check which version +if test "${ac_cv_header_sys_endian_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/endian.h" >&5 +$as_echo_n "checking for sys/endian.h... " >&6; } +if test "${ac_cv_header_sys_endian_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_endian_h" >&5 +$as_echo "$ac_cv_header_sys_endian_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/endian.h usability" >&5 +$as_echo_n "checking sys/endian.h usability... " >&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 +_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_header_compiler=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/endian.h presence" >&5 +$as_echo_n "checking sys/endian.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/endian.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/endian.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/endian.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/endian.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/endian.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/endian.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/endian.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/endian.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/endian.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/endian.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/endian.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/endian.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/endian.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/endian.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/endian.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/endian.h: 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 +{ $as_echo "$as_me:$LINENO: checking for sys/endian.h" >&5 +$as_echo_n "checking for sys/endian.h... " >&6; } +if test "${ac_cv_header_sys_endian_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_sys_endian_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_endian_h" >&5 +$as_echo "$ac_cv_header_sys_endian_h" >&6; } + +fi +if test "x$ac_cv_header_sys_endian_h" = x""yes; then + HAVE_SYS_ENDIAN_H="yes" +else + HAVE_SYS_ENDIAN_H="no" +fi + + + +if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then + { $as_echo "$as_me:$LINENO: checking for __swap16 variant of byteswapping macros" >&5 +$as_echo_n "checking for __swap16 variant of byteswapping macros... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + +int +main () +{ + +int a = 1, b; +b = __swap16(a); + + ; + 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 + SYS_ENDIAN__SWAP='yes' +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + SYS_ENDIAN__SWAP='no' +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $SYS_ENDIAN__SWAP" >&5 +$as_echo "$SYS_ENDIAN__SWAP" >&6; } + + { $as_echo "$as_me:$LINENO: checking for bswap16 variant of byteswapping macros" >&5 +$as_echo_n "checking for bswap16 variant of byteswapping macros... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + +int +main () +{ + +int a = 1, b; +b = bswap16(a); + + ; + 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 + SYS_ENDIAN_BSWAP='yes' +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + SYS_ENDIAN_BSWAP='no' +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $SYS_ENDIAN_BSWAP" >&5 +$as_echo "$SYS_ENDIAN_BSWAP" >&6; } + + if test "$SYS_ENDIAN_BSWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=bswap + else + if test "$SYS_ENDIAN__SWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=__swap + else + USE_SYS_ENDIAN_H=no + fi + fi + + if test "$USE_SYS_ENDIAN_H" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define USE_SYS_ENDIAN_H 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define bswap_16 ${BSWAP}16 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define bswap_32 ${BSWAP}32 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define bswap_64 ${BSWAP}64 +_ACEOF + + fi +fi + +{ $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+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 dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* 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 dlopen (); +/* 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_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + 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_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=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_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + : +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 dlopen (); +int +main () +{ +return dlopen (); + ; + 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_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + ac_cv_lib_dl_dlopen=no fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + DLOPEN_LIBS="-ldl" fi +fi +for ac_func in vprintf +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+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 $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif +int +main () +{ +return $ac_func (); + ; + 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 + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +{ $as_echo "$as_me:$LINENO: checking for _doprnt" >&5 +$as_echo_n "checking for _doprnt... " >&6; } +if test "${ac_cv_func__doprnt+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 _doprnt to an innocuous variant, in case declares _doprnt. + For example, HP-UX 11i declares gettimeofday. */ +#define _doprnt innocuous__doprnt +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _doprnt (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +#undef _doprnt +/* 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 _doprnt (); +/* 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__doprnt || defined __stub____doprnt +choke me +#endif +int +main () +{ +return _doprnt (); + ; + 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__doprnt=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func__doprnt=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__doprnt" >&5 +$as_echo "$ac_cv_func__doprnt" >&6; } +if test "x$ac_cv_func__doprnt" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOPRNT 1 +_ACEOF +fi +fi +done @@ -11126,129 +16125,329 @@ fi +for ac_func in geteuid getuid link memmove memset mkstemp strchr strrchr \ + strtol getopt getopt_long vsnprintf walkcontext backtrace \ + getisax getzoneid shmctl64 strcasestr ffs +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+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 $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif +int +main () +{ +return $ac_func (); + ; + 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 + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi +done +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if test "${ac_cv_working_alloca_h+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. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + 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_working_alloca_h=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_working_alloca_h=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_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF +fi +{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if test "${ac_cv_func_alloca_works+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. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + 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_alloca_works=yes else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless + ac_cv_func_alloca_works=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_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } +if test $ac_cv_func_alloca_works = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= +cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; +{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if test "${ac_cv_os_cray+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. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -11256,95 +16455,182 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char dlopen (); +char $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + int main () { -return dlopen (); +return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes +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 + eval "$as_ac_var=yes" else - ac_cv_lib_dl_dlopen=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + +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:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + break fi - ;; + done +fi - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +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 +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} -/* 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 shl_load (); int main () { -return shl_load (); - ; - return 0; + return find_stack_direction () < 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes +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 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); } && { ac_try='./conftest$ac_exeext' + { (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 + ac_cv_c_stack_direction=1 else - ac_cv_lib_dld_shl_load=no + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_stack_direction=-1 fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } + +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + +{ $as_echo "$as_me:$LINENO: checking for getdtablesize" >&5 +$as_echo_n "checking for getdtablesize... " >&6; } +if test "${ac_cv_func_getdtablesize+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define getdtablesize to an innocuous variant, in case declares getdtablesize. + For example, HP-UX 11i declares gettimeofday. */ +#define getdtablesize innocuous_getdtablesize + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getdtablesize (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getdtablesize /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -11352,77 +16638,92 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char dlopen (); +char getdtablesize (); +/* 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_getdtablesize || defined __stub___getdtablesize +choke me +#endif + int main () { -return dlopen (); +return getdtablesize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes +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_getdtablesize=yes else - ac_cv_lib_dl_dlopen=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getdtablesize=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + +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:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getdtablesize" >&5 +$as_echo "$ac_cv_func_getdtablesize" >&6; } +if test "x$ac_cv_func_getdtablesize" = x""yes; then -/* 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 dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define HAS_GETDTABLESIZE 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : + +{ $as_echo "$as_me:$LINENO: checking for getifaddrs" >&5 +$as_echo_n "checking for getifaddrs... " >&6; } +if test "${ac_cv_func_getifaddrs+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define getifaddrs to an innocuous variant, in case declares getifaddrs. + For example, HP-UX 11i declares gettimeofday. */ +#define getifaddrs innocuous_getifaddrs + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getifaddrs (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getifaddrs /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -11430,2489 +16731,3690 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char dld_link (); +char getifaddrs (); +/* 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_getifaddrs || defined __stub___getifaddrs +choke me +#endif + int main () { -return dld_link (); +return getifaddrs (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes +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_getifaddrs=yes else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_getifaddrs=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_getifaddrs" >&5 +$as_echo "$ac_cv_func_getifaddrs" >&6; } +if test "x$ac_cv_func_getifaddrs" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define HAS_GETIFADDRS 1 +_ACEOF fi - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +{ $as_echo "$as_me:$LINENO: checking for getpeereid" >&5 +$as_echo_n "checking for getpeereid... " >&6; } +if test "${ac_cv_func_getpeereid+set}" = set; then $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11503 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getpeereid to an innocuous variant, in case declares getpeereid. + For example, HP-UX 11i declares gettimeofday. */ +#define getpeereid innocuous_getpeereid -#include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getpeereid (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL +#ifdef __STDC__ +# include #else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif +# include #endif -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif +#undef getpeereid + +/* 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 getpeereid (); +/* 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_getpeereid || defined __stub___getpeereid +choke me #endif -void fnord() { int i=42;} -int main () +int +main () { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; +return getpeereid (); + ; + return 0; } -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 +_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=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi + 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_getpeereid=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getpeereid=no fi -rm -fr conftest* +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_getpeereid" >&5 +$as_echo "$ac_cv_func_getpeereid" >&6; } +if test "x$ac_cv_func_getpeereid" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_GETPEEREID 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +{ $as_echo "$as_me:$LINENO: checking for getpeerucred" >&5 +$as_echo_n "checking for getpeerucred... " >&6; } +if test "${ac_cv_func_getpeerucred+set}" = set; then $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11599 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getpeerucred to an innocuous variant, in case declares getpeerucred. + For example, HP-UX 11i declares gettimeofday. */ +#define getpeerucred innocuous_getpeerucred -#include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getpeerucred (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL +#ifdef __STDC__ +# include #else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif +# include #endif -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif +#undef getpeerucred + +/* 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 getpeerucred (); +/* 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_getpeerucred || defined __stub___getpeerucred +choke me #endif -void fnord() { int i=42;} -int main () +int +main () { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; +return getpeerucred (); + ; + return 0; } -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 +_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=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi + 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_getpeerucred=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getpeerucred=no fi -rm -fr conftest* +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_getpeerucred" >&5 +$as_echo "$ac_cv_func_getpeerucred" >&6; } +if test "x$ac_cv_func_getpeerucred" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_GETPEERUCRED 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac +{ $as_echo "$as_me:$LINENO: checking for strlcat" >&5 +$as_echo_n "checking for strlcat... " >&6; } +if test "${ac_cv_func_strlcat+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 strlcat to an innocuous variant, in case declares strlcat. + For example, HP-UX 11i declares gettimeofday. */ +#define strlcat innocuous_strlcat - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strlcat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef strlcat +/* 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 strlcat (); +/* 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_strlcat || defined __stub___strlcat +choke me +#endif +int +main () +{ +return strlcat (); + ; + 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_strlcat=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_strlcat=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_strlcat" >&5 +$as_echo "$ac_cv_func_strlcat" >&6; } +if test "x$ac_cv_func_strlcat" = x""yes; then + HAVE_STRLCAT=yes +else + HAVE_STRLCAT=no +fi + if test x$HAVE_STRLCAT = xno; then + NEED_STRLCAT_TRUE= + NEED_STRLCAT_FALSE='#' +else + NEED_STRLCAT_TRUE='#' + NEED_STRLCAT_FALSE= +fi +{ $as_echo "$as_me:$LINENO: checking for strlcpy" >&5 +$as_echo_n "checking for strlcpy... " >&6; } +if test "${ac_cv_func_strlcpy+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 strlcpy to an innocuous variant, in case declares strlcpy. + For example, HP-UX 11i declares gettimeofday. */ +#define strlcpy innocuous_strlcpy +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strlcpy (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strlcpy +/* 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 strlcpy (); +/* 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_strlcpy || defined __stub___strlcpy +choke me +#endif +int +main () +{ +return strlcpy (); + ; + 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_strlcpy=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_strlcpy=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_strlcpy" >&5 +$as_echo "$ac_cv_func_strlcpy" >&6; } +if test "x$ac_cv_func_strlcpy" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define HAS_STRLCPY 1 +_ACEOF +fi -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + if test x$HAVE_VSNPRINTF = xno; then + NEED_VSNPRINTF_TRUE= + NEED_VSNPRINTF_FALSE='#' else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac + NEED_VSNPRINTF_TRUE='#' + NEED_VSNPRINTF_FALSE= fi +{ $as_echo "$as_me:$LINENO: checking for mmap" >&5 +$as_echo_n "checking for mmap... " >&6; } +if test "${ac_cv_func_mmap+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 mmap to an innocuous variant, in case declares mmap. + For example, HP-UX 11i declares gettimeofday. */ +#define mmap innocuous_mmap +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mmap (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +#undef mmap +/* 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 mmap (); +/* 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_mmap || defined __stub___mmap +choke me +#endif +int +main () +{ +return mmap (); + ; + 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_mmap=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_mmap=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_mmap" >&5 +$as_echo "$ac_cv_func_mmap" >&6; } +if test "x$ac_cv_func_mmap" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define HAS_MMAP 1 +_ACEOF +fi - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; +{ $as_echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if test "${ac_cv_lib_m_sqrt+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } +/* 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 sqrt (); +int +main () +{ +return sqrt (); + ; + 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_lib_m_sqrt=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + ac_cv_lib_m_sqrt=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" +fi +{ $as_echo "$as_me:$LINENO: checking for cbrt in -lm" >&5 +$as_echo_n "checking for cbrt in -lm... " >&6; } +if test "${ac_cv_lib_m_cbrt+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* 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 cbrt (); +int +main () +{ +return cbrt (); + ; + 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_lib_m_cbrt=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_m_cbrt=no 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 -CC="$lt_save_CC" +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_cbrt" >&5 +$as_echo "$ac_cv_lib_m_cbrt" >&6; } +if test "x$ac_cv_lib_m_cbrt" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_CBRT 1 +_ACEOF +fi +for ac_header in ndbm.h dbm.h rpcsvc/dbm.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } - ac_config_commands="$ac_config_commands libtool" +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done -# Only expand once: -# dolt, a replacement for libtool -# Josh Triplett -# Extract the first word of "bash", so it can be a program name with args. -set dummy bash; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DOLT_BASH+set}" = set; then : +for ac_header in linux/agpgart.h sys/agpio.h sys/agpgart.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - case $DOLT_BASH in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOLT_BASH="$DOLT_BASH" # Let the user override the test with a path. - ;; - *) - 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_path_DOLT_BASH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 -fi -DOLT_BASH=$ac_cv_path_DOLT_BASH -if test -n "$DOLT_BASH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOLT_BASH" >&5 -$as_echo "$DOLT_BASH" >&6; } +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_header_compiler=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dolt supports this host" >&5 -$as_echo_n "checking if dolt supports this host... " >&6; } -dolt_supported=yes -if test x$DOLT_BASH = x; then - dolt_supported=no -fi -if test x$GCC != xyes; then - dolt_supported=no +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi -case $host in -i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \ -|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*) - pic_options='-fPIC' - ;; -i?86-apple-darwin*) - pic_options='-fno-common' + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; -*) - dolt_supported=no + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 -if test x$dolt_supported = xno ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, falling back to libtool" >&5 -$as_echo "no, falling back to libtool" >&6; } - LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)' - LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)' +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, replacing libtool" >&5 -$as_echo "yes, replacing libtool" >&6; } + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + AGP=yes +fi - cat <<__DOLTCOMPILE__EOF__ >doltcompile -#!$DOLT_BASH -__DOLTCOMPILE__EOF__ - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -args=("$@") -for ((arg=0; arg<${#args[@]}; arg++)) ; do - if test x"${args[$arg]}" = x-o ; then - objarg=$((arg+1)) - break - fi done -if test x$objarg = x ; then - echo 'Error: no -o on compiler command line' 1>&2 - exit 1 + + if test "x$AGP" = xyes; then + AGP_TRUE= + AGP_FALSE='#' +else + AGP_TRUE='#' + AGP_FALSE= fi -lo="${args[$objarg]}" -obj="${lo%.lo}" -if test x"$lo" = x"$obj" ; then - echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2 - exit 1 + + + +for ac_header in linux/apm_bios.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 fi -objbase="${obj##*/}" -__DOLTCOMPILE__EOF__ +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -libobjdir="${obj%$objbase}.libs" -if test ! -d "$libobjdir" ; then - mkdir_out="$(mkdir "$libobjdir" 2>&1)" - mkdir_ret=$? - if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then - echo "$mkdir_out" 1>&2 - exit $mkdir_ret - fi + ac_header_compiler=no fi -pic_object="$libobjdir/$objbase.o" -args[$objarg]="$pic_object" -__DOLTCOMPILE__EOF__ - cat <<__DOLTCOMPILE__EOF__ >>doltcompile -"\${args[@]}" $pic_options -DPIC || exit \$? -__DOLTCOMPILE__EOF__ - fi - if test x$enable_static = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -non_pic_object="$obj.o" -args[$objarg]="$non_pic_object" -__DOLTCOMPILE__EOF__ - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -"${args[@]}" >/dev/null 2>&1 || exit $? -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -"${args[@]}" || exit $? -__DOLTCOMPILE__EOF__ - fi - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -{ -echo "# $lo - a libtool object file" -echo "# Generated by doltcompile, not libtool" -__DOLTCOMPILE__EOF__ +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo "pic_object='.libs/${objbase}.o'" -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo pic_object=none -__DOLTCOMPILE__EOF__ - fi + ac_header_preproc=no +fi - if test x$enable_static = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo "non_pic_object='${objbase}.o'" -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo non_pic_object=none -__DOLTCOMPILE__EOF__ - fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -} > "$lo" -__DOLTCOMPILE__EOF__ +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } - chmod +x doltcompile - LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)' - LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)' +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + LNXAPM=yes +fi - cat <<__DOLTLIBTOOL__EOF__ > doltlibtool -#!$DOLT_BASH -__DOLTLIBTOOL__EOF__ - cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool -top_builddir_slash="${0%%doltlibtool}" -: ${top_builddir_slash:=./} -args=() -modeok=false -tagok=false -for arg in "$@"; do - case "$arg" in - --mode=compile) modeok=true ;; - --tag=CC|--tag=CXX) tagok=true ;; - *) args[${#args[@]}]="$arg" ;; - esac done -if $modeok && $tagok ; then - . ${top_builddir_slash}doltcompile "${args[@]}" -else - exec ${top_builddir_slash}libtool "$@" -fi -__DOLTLIBTOOL__EOF__ - chmod +x doltlibtool - LIBTOOL='$(top_builddir)/doltlibtool' + if test "x$LNXAPM" = xyes; then + LNXAPM_TRUE= + LNXAPM_FALSE='#' +else + LNXAPM_TRUE='#' + LNXAPM_FALSE= fi -# end dolt -{ $as_echo "$as_me:${as_lineno-$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 : +for ac_header in linux/fb.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _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;; +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 -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= +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_header_compiler=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - 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_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } - ;; -esac fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + FBDEV=yes fi +done + if test "x$FBDEV" = xyes; then + FBDEVHW_TRUE= + FBDEVHW_FALSE='#' +else + FBDEVHW_TRUE='#' + FBDEVHW_FALSE= fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : + + + +for ac_header in asm/mtrr.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - 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_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$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 ;; +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" + eval "$as_ac_Header=\$ac_header_preproc" fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + ac_cv_asm_mtrr_h=yes +fi + +done +if test "x$ac_cv_asm_mtrr_h" = xyes; then + HAVE_MTRR=yes fi -for ac_prog in flex lex + + +for ac_header in sys/memrange.h 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LEX+set}" = set; then : +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes 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_LEX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi -fi -LEX=$ac_cv_prog_LEX -if test -n "$LEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 -$as_echo "$LEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_header_compiler=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - test -n "$LEX" && break -done -test -n "$LEX" || LEX=":" - -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF -%% -a { ECHO; } -b { REJECT; } -c { yymore (); } -d { yyless (1); } -e { yyless (input () != 0); } -f { unput (yytext[0]); } -. { BEGIN INITIAL; } -%% -#ifdef YYTEXT_POINTER -extern char *yytext; -#endif -int -main (void) -{ - return ! yylex () + ! yywrap (); -} +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 -{ { ac_try="$LEX conftest.l" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$LEX conftest.l") 2>&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 -$as_echo_n "checking lex output file root... " >&6; } -if test "${ac_cv_prog_lex_root+set}" = set; then : - $as_echo_n "(cached) " >&6 + 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5 -fi + ac_header_preproc=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 -$as_echo "$ac_cv_prog_lex_root" >&6; } -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root -if test -z "${LEXLIB+set}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 -$as_echo_n "checking lex library... " >&6; } -if test "${ac_cv_lib_lex+set}" = set; then : +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } - ac_save_LIBS=$LIBS - ac_cv_lib_lex='none needed' - for ac_lib in '' -lfl -ll; do - LIBS="$ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -`cat $LEX_OUTPUT_ROOT.c` +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lex=$ac_lib + ac_cv_memrange_h=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - test "$ac_cv_lib_lex" != 'none needed' && break - done - LIBS=$ac_save_LIBS +done + +if test "x$ac_cv_memrange_h" = xyes; then + HAVE_MTRR=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 -$as_echo "$ac_cv_lib_lex" >&6; } - test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex + +if test "x$HAVE_MTRR" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_MTRR_SUPPORT 1 +_ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 -$as_echo_n "checking whether yytext is a pointer... " >&6; } -if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then : +for ac_header in machine/mtrr.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -ac_save_LIBS=$LIBS -LIBS="$LEXLIB $ac_save_LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define YYTEXT_POINTER 1 -`cat $LEX_OUTPUT_ROOT.c` +$ac_includes_default +#include <$ac_header> _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_lex_yytext_pointer=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_save_LIBS +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_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 -$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } -if test $ac_cv_prog_lex_yytext_pointer = yes; then -$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi -rm -f conftest.l $LEX_OUTPUT_ROOT.c -fi -for ac_prog in 'bison -y' byacc -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_YACC+set}" = set; then : +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + ac_cv_machine_mtrr_h=yes +fi + +done + +if test "x$ac_cv_machine_mtrr_h" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_MTRR_BUILTIN 1 +_ACEOF + +fi + + +for ac_header in sys/linker.h 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_YACC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+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. */ +#include + +#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 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 + eval "$as_ac_Header=yes" +else + $as_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 -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + ac_cv_sys_linker_h=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_sys_linker_h=no fi - - test -n "$YACC" && break done -test -n "$YACC" || YACC="yacc" -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; + if test "x$ac_cv_sys_linker_h" = xyes; then + FREEBSD_KLDLOAD_TRUE= + FREEBSD_KLDLOAD_FALSE='#' +else + FREEBSD_KLDLOAD_TRUE='#' + FREEBSD_KLDLOAD_FALSE= fi -if test "$enable_largefile" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +{ $as_echo "$as_me:$LINENO: checking for SYSV IPC" >&5 +$as_echo_n "checking for SYSV IPC... " >&6; } +if test "${ac_cv_sysv_ipc+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; +#include +#include + int main () { +{ + int id; + id = shmget(IPC_PRIVATE, 512, SHM_W | SHM_R); + if (id < 0) return -1; + return shmctl(id, IPC_RMID, 0); +} ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break +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_sysv_ipc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_sysv_ipc=no fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sysv_ipc" >&5 +$as_echo "$ac_cv_sysv_ipc" >&6; } +if test "x$ac_cv_sysv_ipc" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYSV_IPC 1 +_ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if test -c /dev/xf86 ; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_APERTURE_DRV 1 +_ACEOF + +fi + +if test "${ac_cv_header_machine_apmvar_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for machine/apmvar.h" >&5 +$as_echo_n "checking for machine/apmvar.h... " >&6; } +if test "${ac_cv_header_machine_apmvar_h+set}" = set; then $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_machine_apmvar_h" >&5 +$as_echo "$ac_cv_header_machine_apmvar_h" >&6; } else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking machine/apmvar.h usability" >&5 +$as_echo_n "checking machine/apmvar.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} +$ac_includes_default +#include _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break +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_header_compiler=yes +else + $as_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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - ; - return 0; -} +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking machine/apmvar.h presence" >&5 +$as_echo_n "checking machine/apmvar.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include _ACEOF -;; +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: machine/apmvar.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: machine/apmvar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: machine/apmvar.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: machine/apmvar.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: machine/apmvar.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: machine/apmvar.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: machine/apmvar.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: machine/apmvar.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: machine/apmvar.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: machine/apmvar.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: machine/apmvar.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: machine/apmvar.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: machine/apmvar.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: machine/apmvar.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: machine/apmvar.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: machine/apmvar.h: 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 +{ $as_echo "$as_me:$LINENO: checking for machine/apmvar.h" >&5 +$as_echo_n "checking for machine/apmvar.h... " >&6; } +if test "${ac_cv_header_machine_apmvar_h+set}" = set; then $as_echo_n "(cached) " >&6 else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_header_machine_apmvar_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_machine_apmvar_h" >&5 +$as_echo "$ac_cv_header_machine_apmvar_h" >&6; } + +fi +if test "x$ac_cv_header_machine_apmvar_h" = x""yes; then + + if test "${ac_cv_header_sys_event_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/event.h" >&5 +$as_echo_n "checking for sys/event.h... " >&6; } +if test "${ac_cv_header_sys_event_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_event_h" >&5 +$as_echo "$ac_cv_header_sys_event_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/event.h usability" >&5 +$as_echo_n "checking sys/event.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ +$ac_includes_default +#include +_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_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break + ac_header_compiler=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - ; - return 0; -} +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/event.h presence" >&5 +$as_echo_n "checking sys/event.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include _ACEOF -;; +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -rm -rf conftest* - fi -fi +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -for ac_prog in cpp -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_RAWCPP+set}" = set; then : +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/event.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/event.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/event.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/event.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/event.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/event.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/event.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/event.h: 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 +{ $as_echo "$as_me:$LINENO: checking for sys/event.h" >&5 +$as_echo_n "checking for sys/event.h... " >&6; } +if test "${ac_cv_header_sys_event_h+set}" = set; then $as_echo_n "(cached) " >&6 else - case $RAWCPP in - [\\/]* | ?:[\\/]*) - ac_cv_path_RAWCPP="$RAWCPP" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib" -for as_dir in $as_dummy -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_path_RAWCPP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + ac_cv_header_sys_event_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_event_h" >&5 +$as_echo "$ac_cv_header_sys_event_h" >&6; } - ;; -esac fi -RAWCPP=$ac_cv_path_RAWCPP -if test -n "$RAWCPP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAWCPP" >&5 -$as_echo "$RAWCPP" >&6; } +if test "x$ac_cv_header_sys_event_h" = x""yes; then + ac_cv_BSD_KQUEUE_APM=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_BSD_APM=yes fi - test -n "$RAWCPP" && break -done -test -n "$RAWCPP" || RAWCPP="${CPP}" +fi -# Check for flag to avoid builtin definitions - assumes unix is predefined, -# which is not the best choice for supporting other OS'es, but covers most -# of the ones we need for now. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -undef" >&5 -$as_echo_n "checking if $RAWCPP requires -undef... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + if test "x$ac_cv_BSD_APM" = xyes; then + BSD_APM_TRUE= + BSD_APM_FALSE='#' +else + BSD_APM_TRUE='#' + BSD_APM_FALSE= +fi + + if test "x$ac_cv_BSD_KQUEUE_APM" = xyes; then + BSD_KQUEUE_APM_TRUE= + BSD_KQUEUE_APM_FALSE='#' +else + BSD_KQUEUE_APM_TRUE='#' + BSD_KQUEUE_APM_FALSE= +fi + + +if test "${ac_cv_header_execinfo_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for execinfo.h" >&5 +$as_echo_n "checking for execinfo.h... " >&6; } +if test "${ac_cv_header_execinfo_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_execinfo_h" >&5 +$as_echo "$ac_cv_header_execinfo_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking execinfo.h usability" >&5 +$as_echo_n "checking execinfo.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -Does cpp redefine unix ? +$ac_includes_default +#include _ACEOF -if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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_header_compiler=yes else - if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then - RAWCPPFLAGS=-undef - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - # under Cygwin unix is still defined even with -undef - elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then - RAWCPPFLAGS="-undef -ansi" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with -ansi" >&5 -$as_echo "yes, with -ansi" >&6; } - else - as_fn_error "${RAWCPP} defines unix with or without -undef. I don't know what to do." "$LINENO" 5 - fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -rm -f conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -traditional" >&5 -$as_echo_n "checking if $RAWCPP requires -traditional... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking execinfo.h presence" >&5 +$as_echo_n "checking execinfo.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -Does cpp preserve "whitespace"? +#include _ACEOF -if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then - RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - as_fn_error "${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." "$LINENO" 5 - fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi -rm -f conftest.$ac_ext + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: execinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: execinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: execinfo.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: execinfo.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: execinfo.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: execinfo.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: execinfo.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: execinfo.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: execinfo.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: execinfo.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: execinfo.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: execinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: execinfo.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: execinfo.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: execinfo.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: execinfo.h: 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 +{ $as_echo "$as_me:$LINENO: checking for execinfo.h" >&5 +$as_echo_n "checking for execinfo.h... " >&6; } +if test "${ac_cv_header_execinfo_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_execinfo_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_execinfo_h" >&5 +$as_echo "$ac_cv_header_execinfo_h" >&6; } + +fi +if test "x$ac_cv_header_execinfo_h" = x""yes; then + + { $as_echo "$as_me:$LINENO: checking for backtrace in -lc" >&5 +$as_echo_n "checking for backtrace in -lc... " >&6; } +if test "${ac_cv_lib_c_backtrace+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 backtrace (); +int +main () +{ +return backtrace (); + ; + 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_lib_c_backtrace=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_c_backtrace=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_backtrace" >&5 +$as_echo "$ac_cv_lib_c_backtrace" >&6; } +if test "x$ac_cv_lib_c_backtrace" = x""yes; then -# Extract the first word of "sed", so it can be a program name with args. -set dummy sed; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $SED in - [\\/]* | ?:[\\/]*) - ac_cv_path_SED="$SED" # Let the user override the test with a path. - ;; - *) - 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_path_SED="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +cat >>confdefs.h <<\_ACEOF +#define HAVE_BACKTRACE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EXECINFO_H 1 +_ACEOF + - ;; -esac fi -SED=$ac_cv_path_SED -if test -n "$SED"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 -$as_echo "$SED" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + + fi +DEFAULT_INT10="x86emu" -# Check whether --with-dtrace was given. -if test "${with_dtrace+set}" = set; then : - withval=$with_dtrace; WDTRACE=$withval -else - WDTRACE=auto -fi -if test "x$WDTRACE" = xauto; then +case $host_cpu in + alpha*) + ALPHA_VIDEO=yes case $host_os in - darwin*) WDTRACE="no" ;; + *freebsd*) SYS_LIBS=-lio ;; + *netbsd*) +cat >>confdefs.h <<\_ACEOF +#define USE_ALPHA_PIO 1 +_ACEOF + ;; esac -fi -if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then - # Extract the first word of "dtrace", so it can be a program name with args. -set dummy dtrace; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DTRACE+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $DTRACE in - [\\/]* | ?:[\\/]*) - ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="$PATH:/usr/sbin" -for as_dir in $as_dummy -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_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" + ;; + arm*) + ARM_VIDEO=yes + ;; + i*86) + I386_VIDEO=yes + case $host_os in + *freebsd*) cat >>confdefs.h <<\_ACEOF +#define USE_DEV_IO 1 +_ACEOF + ;; + *dragonfly*) cat >>confdefs.h <<\_ACEOF +#define USE_DEV_IO 1 +_ACEOF + ;; + *netbsd*) cat >>confdefs.h <<\_ACEOF +#define USE_I386_IOPL 1 +_ACEOF - test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not_found" - ;; + SYS_LIBS=-li386 + ;; + *openbsd*) cat >>confdefs.h <<\_ACEOF +#define USE_I386_IOPL 1 +_ACEOF + + SYS_LIBS=-li386 + ;; + esac + ;; + powerpc*) + PPC_VIDEO=yes + case $host_os in + *freebsd*) DEFAULT_INT10=stub ;; + esac + ;; + sparc*) + SPARC64_VIDEO=yes + BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + x86_64*|amd64*) + I386_VIDEO=yes + case $host_os in + *freebsd*) +cat >>confdefs.h <<\_ACEOF +#define USE_DEV_IO 1 +_ACEOF + ;; + *dragonfly*) +cat >>confdefs.h <<\_ACEOF +#define USE_DEV_IO 1 +_ACEOF + ;; + *netbsd*) +cat >>confdefs.h <<\_ACEOF +#define USE_I386_IOPL 1 +_ACEOF + + SYS_LIBS=-lx86_64 + ;; + *openbsd*) +cat >>confdefs.h <<\_ACEOF +#define USE_AMD64_IOPL 1 +_ACEOF + + SYS_LIBS=-lamd64 + ;; + esac + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + ia64*) + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + s390*) + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; esac -fi -DTRACE=$ac_cv_path_DTRACE -if test -n "$DTRACE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 -$as_echo "$DTRACE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$DTRACE" = "xnot_found" ; then - if test "x$WDTRACE" = "xyes" ; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "dtrace requested but not found -See \`config.log' for more details." "$LINENO" 5; } - fi - WDTRACE="no" - else - ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sdt_h" = x""yes; then : - HAS_SDT_H="yes" + if test "x$ALPHA_VIDEO" = xyes; then + ALPHA_VIDEO_TRUE= + ALPHA_VIDEO_FALSE='#' else - HAS_SDT_H="no" + ALPHA_VIDEO_TRUE='#' + ALPHA_VIDEO_FALSE= fi - - if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then - WDTRACE="no" - fi - fi + if test "x$ARM_VIDEO" = xyes; then + ARM_VIDEO_TRUE= + ARM_VIDEO_FALSE='#' +else + ARM_VIDEO_TRUE='#' + ARM_VIDEO_FALSE= fi -if test "x$WDTRACE" != "xno" ; then -$as_echo "#define XSERVER_DTRACE 1" >>confdefs.h + if test "x$I386_VIDEO" = xyes; then + I386_VIDEO_TRUE= + I386_VIDEO_FALSE='#' +else + I386_VIDEO_TRUE='#' + I386_VIDEO_FALSE= +fi + if test "x$PPC_VIDEO" = xyes; then + PPC_VIDEO_TRUE= + PPC_VIDEO_FALSE='#' +else + PPC_VIDEO_TRUE='#' + PPC_VIDEO_FALSE= fi - if test "x$WDTRACE" != "xno"; then - XSERVER_DTRACE_TRUE= - XSERVER_DTRACE_FALSE='#' + + if test "x$SPARC64_VIDEO" = xyes; then + SPARC64_VIDEO_TRUE= + SPARC64_VIDEO_FALSE='#' else - XSERVER_DTRACE_TRUE='#' - XSERVER_DTRACE_FALSE= + SPARC64_VIDEO_TRUE='#' + SPARC64_VIDEO_FALSE= fi -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include <$ac_hdr> +DRI=no +case $host_os in + *freebsd* | *dragonfly*) + case $host_os in + kfreebsd*-gnu) ;; + *) +cat >>confdefs.h <<\_ACEOF +#define CSRG_BASED 1 +_ACEOF + ;; + esac -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define PCCONS_SUPPORT 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 + + +cat >>confdefs.h <<\_ACEOF +#define PCVT_SUPPORT 1 _ACEOF -ac_header_dirent=$ac_hdr; break -fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define SYSCONS_SUPPORT 1 +_ACEOF + + DRI=yes + ;; + *netbsd*) + +cat >>confdefs.h <<\_ACEOF +#define CSRG_BASED 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define PCCONS_SUPPORT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define PCVT_SUPPORT 1 +_ACEOF + -/* 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 opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define WSCONS_SUPPORT 1 _ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + DRI=yes + ;; + *openbsd*) -fi +cat >>confdefs.h <<\_ACEOF +#define CSRG_BASED 1 +_ACEOF -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* 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 opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define PCVT_SUPPORT 1 _ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : + +cat >>confdefs.h <<\_ACEOF +#define WSCONS_SUPPORT 1 +_ACEOF + + ;; + *linux*) + DRI=yes + ;; + *solaris*) + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + DRI=yes else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + DRI=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + ;; + darwin*) -fi +cat >>confdefs.h <<\_ACEOF +#define CSRG_BASED 1 +_ACEOF -fi + ;; +esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes +# Check whether --with-release-version was given. +if test "${with_release_version+set}" = set; then + withval=$with_release_version; RELEASE_VERSION="$withval" else - ac_cv_header_stdc=no + RELEASE_VERSION="" 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + 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 -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* + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` + if test "x$PVM" = "x"; then + PVM="0" + fi -fi +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MINOR $PVM +_ACEOF -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + 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 -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* +PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1` +PVS=`echo $PACKAGE_VERSION | cut -d . -f 4 | cut -d - -f 1` +if test "x$PVS" = "x"; then + PVS="0" 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#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 +VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)" +VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}" + +VENDOR_NAME="The X.Org Foundation" +VENDOR_NAME_SHORT="X.Org" +VENDOR_WEB="http://wiki.x.org" -#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 -if ac_fn_c_try_run "$LINENO"; then : + +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then + enableval=$enable_werror; WERROR=$enableval else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + WERROR=no fi +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; DEBUGGING=$enableval +else + DEBUGGING=no fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +# Check whether --enable-unit-tests was given. +if test "${enable_unit_tests+set}" = set; then + enableval=$enable_unit_tests; UNITTESTS=$enableval +else + UNITTESTS=auto fi -for ac_header in fcntl.h stdlib.h string.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +# Check whether --with-int10 was given. +if test "${with_int10+set}" = set; then + withval=$with_int10; INT10="$withval" +else + INT10="$DEFAULT_INT10" fi -done +# Check whether --with-vendor-name was given. +if test "${with_vendor_name+set}" = set; then + withval=$with_vendor_name; VENDOR_NAME="$withval" +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; +# Check whether --with-vendor-name-short was given. +if test "${with_vendor_name_short+set}" = set; then + withval=$with_vendor_name_short; VENDOR_NAME_SHORT="$withval" +fi - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes +# Check whether --with-vendor-web was given. +if test "${with_vendor_web+set}" = set; then + withval=$with_vendor_web; VENDOR_WEB="$withval" +fi + + +# Check whether --with-module-dir was given. +if test "${with_module_dir+set}" = set; then + withval=$with_module_dir; moduledir="$withval" else - ac_cv_c_const=no + moduledir="${libdir}/xorg/modules" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +# Check whether --with-log-dir was given. +if test "${with_log_dir+set}" = set; then + withval=$with_log_dir; logdir="$withval" +else + logdir="$localstatedir/log" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h +# Check whether --with-builder-addr was given. +if test "${with_builder_addr+set}" = set; then + withval=$with_builder_addr; BUILDERADDR="$withval" +else + BUILDERADDR="xorg@lists.freedesktop.org" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : - $as_echo_n "(cached) " >&6 + +# Check whether --with-os-name was given. +if test "${with_os_name+set}" = set; then + withval=$with_os_name; OSNAME="$withval" else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; + OSNAME=`uname -srm` +fi -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done +# Check whether --with-os-vendor was given. +if test "${with_os_vendor+set}" = set; then + withval=$with_os_vendor; OSVENDOR="$withval" +else + OSVENDOR="" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include +# Check whether --with-builderstring was given. +if test "${with_builderstring+set}" = set; then + withval=$with_builderstring; BUILDERSTRING="$withval" -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif +fi - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes + +# Check whether --with-fontdir was given. +if test "${with_fontdir+set}" = set; then + withval=$with_fontdir; FONTDIR="$withval" else - ac_cv_c_bigendian=no + FONTDIR="${libdir}/X11/fonts" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/TTF/,${FONTDIR}/OTF,${FONTDIR}/Type1/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/" +case $host_os in + darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; +esac + +# Check whether --with-default-font-path was given. +if test "${with_default_font_path+set}" = set; then + withval=$with_default_font_path; FONTPATH="$withval" +else + FONTPATH="${DEFAULT_FONT_PATH}" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +# Check whether --with-xkb-path was given. +if test "${with_xkb_path+set}" = set; then + withval=$with_xkb_path; XKBPATH="$withval" +else + XKBPATH="${datadir}/X11/xkb" +fi -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +# Check whether --with-xkb-output was given. +if test "${with_xkb_output+set}" = set; then + withval=$with_xkb_output; XKBOUTPUT="$withval" else - ac_cv_c_bigendian=no + XKBOUTPUT="compiled" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +# Check whether --with-default-xkb-rules was given. +if test "${with_default_xkb_rules+set}" = set; then + withval=$with_default_xkb_rules; XKB_DFLT_RULES="$withval" +else + XKB_DFLT_RULES="" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi + +# Check whether --with-default-xkb-model was given. +if test "${with_default_xkb_model+set}" = set; then + withval=$with_default_xkb_model; XKB_DFLT_MODEL="$withval" +else + XKB_DFLT_MODEL="pc104" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +# Check whether --with-default-xkb-layout was given. +if test "${with_default_xkb_layout+set}" = set; then + withval=$with_default_xkb_layout; XKB_DFLT_LAYOUT="$withval" else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ + XKB_DFLT_LAYOUT="us" +fi - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no +# Check whether --with-default-xkb-variant was given. +if test "${with_default_xkb_variant+set}" = set; then + withval=$with_default_xkb_variant; XKB_DFLT_VARIANT="$withval" else - ac_cv_c_bigendian=yes + XKB_DFLT_VARIANT="" fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + + +# Check whether --with-default-xkb-options was given. +if test "${with_default_xkb_options+set}" = set; then + withval=$with_default_xkb_options; XKB_DFLT_OPTIONS="$withval" +else + XKB_DFLT_OPTIONS="" fi - fi + +# Check whether --with-serverconfig-path was given. +if test "${with_serverconfig_path+set}" = set; then + withval=$with_serverconfig_path; SERVERCONFIG="$withval" +else + SERVERCONFIG="${libdir}/xorg" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - ENDIAN="X_BIG_ENDIAN";; #( - no) - ENDIAN="X_LITTLE_ENDIAN" ;; #( - universal) -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - ;; #( - *) - as_fn_error "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac +# Check whether --with-apple-applications-dir was given. +if test "${with_apple_applications_dir+set}" = set; then + withval=$with_apple_applications_dir; APPLE_APPLICATIONS_DIR="${withval}" +else + APPLE_APPLICATIONS_DIR="/Applications/Utilities" +fi + -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 -$as_echo_n "checking size of unsigned long... " >&6; } -if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : - $as_echo_n "(cached) " >&6 +# Check whether --with-apple-application-name was given. +if test "${with_apple_application_name+set}" = set; then + withval=$with_apple_application_name; APPLE_APPLICATION_NAME="${withval}" else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : + APPLE_APPLICATION_NAME="X11" +fi + + +# Check whether --with-apple-application-id was given. +if test "${with_apple_application_id+set}" = set; then + withval=$with_apple_application_id; APPLE_APPLICATION_ID="${withval}" else - if test "$ac_cv_type_unsigned_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned long) -See \`config.log' for more details." "$LINENO" 5; }; } - else - ac_cv_sizeof_unsigned_long=0 - fi + APPLE_APPLICATION_ID="org.x.X11" fi + +# Check whether --enable-sparkle was given. +if test "${enable_sparkle+set}" = set; then + enableval=$enable_sparkle; XQUARTZ_SPARKLE="${enableval}" +else + XQUARTZ_SPARKLE="no" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 -$as_echo "$ac_cv_sizeof_unsigned_long" >&6; } +# Check whether --enable-builddocs was given. +if test "${enable_builddocs+set}" = set; then + enableval=$enable_builddocs; BUILDDOCS=$enableval +else + BUILDDOCS=no +fi -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long -_ACEOF +# Check whether --enable-install-libxf86config was given. +if test "${enable_install_libxf86config+set}" = set; then + enableval=$enable_install_libxf86config; INSTALL_LIBXF86CONFIG=$enableval +else + INSTALL_LIBXF86CONFIG=no +fi + +# Check whether --enable-null-root-cursor was given. +if test "${enable_null_root_cursor+set}" = set; then + enableval=$enable_null_root_cursor; NULL_ROOT_CURSOR=$enableval +else + NULL_ROOT_CURSOR=no +fi +# Check whether --enable-visibility was given. +if test "${enable_visibility+set}" = set; then + enableval=$enable_visibility; SYMBOL_VISIBILITY=$enableval +else + SYMBOL_VISIBILITY=auto +fi -if test "$ac_cv_sizeof_unsigned_long" = 8; then -$as_echo "#define _XSERVER64 1" >>confdefs.h +# Check whether --with-dri-driver-path was given. +if test "${with_dri_driver_path+set}" = set; then + withval=$with_dri_driver_path; DRI_DRIVER_PATH="$withval" +else + DRI_DRIVER_PATH="${libdir}/dri" fi -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +# Check whether --enable-aiglx was given. +if test "${enable_aiglx+set}" = set; then + enableval=$enable_aiglx; AIGLX=$enableval +else + AIGLX=yes +fi +# Check whether --enable-glx-tls was given. +if test "${enable_glx_tls+set}" = set; then + enableval=$enable_glx_tls; GLX_USE_TLS=$enableval else + GLX_USE_TLS=no +fi -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF +# Check whether --enable-registry was given. +if test "${enable_registry+set}" = set; then + enableval=$enable_registry; XREGISTRY=$enableval +else + XREGISTRY=yes fi +# Check whether --enable-composite was given. +if test "${enable_composite+set}" = set; then + enableval=$enable_composite; COMPOSITE=$enableval +else + COMPOSITE=yes +fi -# Checks for headers/macros for byte swapping -# Known variants: -# bswap_16, bswap_32, bswap_64 (glibc) -# __swap16, __swap32, __swap64 (OpenBSD) -# bswap16, bswap32, bswap64 (other BSD's) -# and a fallback to local macros if none of the above are found +# Check whether --enable-mitshm was given. +if test "${enable_mitshm+set}" = set; then + enableval=$enable_mitshm; MITSHM=$enableval +else + MITSHM=yes +fi -# if is found, assume it's the correct version -for ac_header in byteswap.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" -if test "x$ac_cv_header_byteswap_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BYTESWAP_H 1 -_ACEOF +# Check whether --enable-xres was given. +if test "${enable_xres+set}" = set; then + enableval=$enable_xres; RES=$enableval +else + RES=yes +fi +# Check whether --enable-record was given. +if test "${enable_record+set}" = set; then + enableval=$enable_record; RECORD=$enableval +else + RECORD=no fi -done +# Check whether --enable-xv was given. +if test "${enable_xv+set}" = set; then + enableval=$enable_xv; XV=$enableval +else + XV=yes +fi +# Check whether --enable-xvmc was given. +if test "${enable_xvmc+set}" = set; then + enableval=$enable_xvmc; XVMC=$enableval +else + XVMC=yes +fi -# if is found, have to check which version -ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_endian_h" = x""yes; then : - HAVE_SYS_ENDIAN_H="yes" +# Check whether --enable-dga was given. +if test "${enable_dga+set}" = set; then + enableval=$enable_dga; DGA=$enableval else - HAVE_SYS_ENDIAN_H="no" + DGA=auto fi +# Check whether --enable-screensaver was given. +if test "${enable_screensaver+set}" = set; then + enableval=$enable_screensaver; SCREENSAVER=$enableval +else + SCREENSAVER=yes +fi +# Check whether --enable-xdmcp was given. +if test "${enable_xdmcp+set}" = set; then + enableval=$enable_xdmcp; XDMCP=$enableval +else + XDMCP=auto +fi -if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __swap16 variant of byteswapping macros" >&5 -$as_echo_n "checking for __swap16 variant of byteswapping macros... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# Check whether --enable-xdm-auth-1 was given. +if test "${enable_xdm_auth_1+set}" = set; then + enableval=$enable_xdm_auth_1; XDMAUTH=$enableval +else + XDMAUTH=auto +fi -#include -#include +# Check whether --enable-glx was given. +if test "${enable_glx+set}" = set; then + enableval=$enable_glx; GLX=$enableval +else + GLX=yes +fi -int -main () -{ +# Check whether --enable-dri was given. +if test "${enable_dri+set}" = set; then + enableval=$enable_dri; DRI=$enableval +fi -int a = 1, b; -b = __swap16(a); +# Check whether --enable-dri2 was given. +if test "${enable_dri2+set}" = set; then + enableval=$enable_dri2; DRI2=$enableval +else + DRI2=auto +fi - ; - return 0; -} +# Check whether --enable-xinerama was given. +if test "${enable_xinerama+set}" = set; then + enableval=$enable_xinerama; XINERAMA=$enableval +else + XINERAMA=yes +fi -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - SYS_ENDIAN__SWAP='yes' +# Check whether --enable-xf86vidmode was given. +if test "${enable_xf86vidmode+set}" = set; then + enableval=$enable_xf86vidmode; XF86VIDMODE=$enableval else - SYS_ENDIAN__SWAP='no' + XF86VIDMODE=auto fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYS_ENDIAN__SWAP" >&5 -$as_echo "$SYS_ENDIAN__SWAP" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap16 variant of byteswapping macros" >&5 -$as_echo_n "checking for bswap16 variant of byteswapping macros... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# Check whether --enable-xace was given. +if test "${enable_xace+set}" = set; then + enableval=$enable_xace; XACE=$enableval +else + XACE=yes +fi -#include -#include +# Check whether --enable-xselinux was given. +if test "${enable_xselinux+set}" = set; then + enableval=$enable_xselinux; XSELINUX=$enableval +else + XSELINUX=no +fi -int -main () -{ +# Check whether --enable-xcsecurity was given. +if test "${enable_xcsecurity+set}" = set; then + enableval=$enable_xcsecurity; XCSECURITY=$enableval +else + XCSECURITY=no +fi -int a = 1, b; -b = bswap16(a); +# Check whether --enable-xcalibrate was given. +if test "${enable_xcalibrate+set}" = set; then + enableval=$enable_xcalibrate; XCALIBRATE=$enableval +else + XCALIBRATE=no +fi - ; - return 0; -} +# Check whether --enable-tslib was given. +if test "${enable_tslib+set}" = set; then + enableval=$enable_tslib; TSLIB=$enableval +else + TSLIB=no +fi -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - SYS_ENDIAN_BSWAP='yes' +# Check whether --enable-multibuffer was given. +if test "${enable_multibuffer+set}" = set; then + enableval=$enable_multibuffer; MULTIBUFFER=$enableval else - SYS_ENDIAN_BSWAP='no' + MULTIBUFFER=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYS_ENDIAN_BSWAP" >&5 -$as_echo "$SYS_ENDIAN_BSWAP" >&6; } - if test "$SYS_ENDIAN_BSWAP" = "yes" ; then - USE_SYS_ENDIAN_H=yes - BSWAP=bswap - else - if test "$SYS_ENDIAN__SWAP" = "yes" ; then - USE_SYS_ENDIAN_H=yes - BSWAP=__swap - else - USE_SYS_ENDIAN_H=no - fi - fi +# Check whether --enable-dbe was given. +if test "${enable_dbe+set}" = set; then + enableval=$enable_dbe; DBE=$enableval +else + DBE=yes +fi - if test "$USE_SYS_ENDIAN_H" = "yes" ; then +# Check whether --enable-xf86bigfont was given. +if test "${enable_xf86bigfont+set}" = set; then + enableval=$enable_xf86bigfont; XF86BIGFONT=$enableval +else + XF86BIGFONT=no +fi -$as_echo "#define USE_SYS_ENDIAN_H 1" >>confdefs.h +# Check whether --enable-dpms was given. +if test "${enable_dpms+set}" = set; then + enableval=$enable_dpms; DPMSExtension=$enableval +else + DPMSExtension=yes +fi +# Check whether --enable-config-dbus was given. +if test "${enable_config_dbus+set}" = set; then + enableval=$enable_config_dbus; CONFIG_DBUS_API=$enableval +else + CONFIG_DBUS_API=no +fi -cat >>confdefs.h <<_ACEOF -#define bswap_16 ${BSWAP}16 -_ACEOF +# Check whether --enable-config-hal was given. +if test "${enable_config_hal+set}" = set; then + enableval=$enable_config_hal; CONFIG_HAL=$enableval +else + CONFIG_HAL=auto +fi +# Check whether --enable-xfree86-utils was given. +if test "${enable_xfree86_utils+set}" = set; then + enableval=$enable_xfree86_utils; XF86UTILS=$enableval +else + XF86UTILS=yes +fi -cat >>confdefs.h <<_ACEOF -#define bswap_32 ${BSWAP}32 -_ACEOF +# Check whether --enable-xaa was given. +if test "${enable_xaa+set}" = set; then + enableval=$enable_xaa; XAA=$enableval +else + XAA=yes +fi +# Check whether --enable-vgahw was given. +if test "${enable_vgahw+set}" = set; then + enableval=$enable_vgahw; VGAHW=$enableval +else + VGAHW=yes +fi -cat >>confdefs.h <<_ACEOF -#define bswap_64 ${BSWAP}64 -_ACEOF +# Check whether --enable-vbe was given. +if test "${enable_vbe+set}" = set; then + enableval=$enable_vbe; VBE=$enableval +else + VBE=yes +fi - fi +# Check whether --enable-int10-module was given. +if test "${enable_int10_module+set}" = set; then + enableval=$enable_int10_module; INT10MODULE=$enableval +else + INT10MODULE=yes fi -ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +# Check whether --enable-xorg was given. +if test "${enable_xorg+set}" = set; then + enableval=$enable_xorg; XORG=$enableval else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 + XORG=auto +fi + +# Check whether --enable-dmx was given. +if test "${enable_dmx+set}" = set; then + enableval=$enable_dmx; DMX=$enableval else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + DMX=no +fi -/* 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 dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes +# Check whether --enable-xvfb was given. +if test "${enable_xvfb+set}" = set; then + enableval=$enable_xvfb; XVFB=$enableval else - ac_cv_lib_dl_dlopen=no + XVFB=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + +# Check whether --enable-xnest was given. +if test "${enable_xnest+set}" = set; then + enableval=$enable_xnest; XNEST=$enableval +else + XNEST=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - DLOPEN_LIBS="-ldl" + +# Check whether --enable-xquartz was given. +if test "${enable_xquartz+set}" = set; then + enableval=$enable_xquartz; XQUARTZ=$enableval +else + XQUARTZ=auto fi +# Check whether --enable-standalone-xpbproxy was given. +if test "${enable_standalone_xpbproxy+set}" = set; then + enableval=$enable_standalone_xpbproxy; STANDALONE_XPBPROXY=$enableval +else + STANDALONE_XPBPROXY=no fi +# Check whether --enable-xwin was given. +if test "${enable_xwin+set}" = set; then + enableval=$enable_xwin; XWIN=$enableval +else + XWIN=auto +fi -for ac_func in vprintf -do : - ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -if test "x$ac_cv_func_vprintf" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VPRINTF 1 -_ACEOF +# Check whether --enable-kdrive was given. +if test "${enable_kdrive+set}" = set; then + enableval=$enable_kdrive; KDRIVE=$enableval +else + KDRIVE=no +fi -ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = x""yes; then : +# Check whether --enable-xephyr was given. +if test "${enable_xephyr+set}" = set; then + enableval=$enable_xephyr; XEPHYR=$enableval +else + XEPHYR=auto +fi -$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h +# Check whether --enable-xsdl was given. +if test "${enable_xsdl+set}" = set; then + enableval=$enable_xsdl; XSDL=$enableval +else + XSDL=auto +fi +# Check whether --enable-xfake was given. +if test "${enable_xfake+set}" = set; then + enableval=$enable_xfake; XFAKE=$enableval +else + XFAKE=auto fi +# Check whether --enable-xfbdev was given. +if test "${enable_xfbdev+set}" = set; then + enableval=$enable_xfbdev; XFBDEV=$enableval +else + XFBDEV=auto fi -done -for ac_func in geteuid getuid link memmove memset mkstemp strchr strrchr \ - strtol getopt getopt_long vsnprintf walkcontext backtrace \ - getisax getzoneid shmctl64 strcasestr ffs -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +# Check whether --enable-install-setuid was given. +if test "${enable_install_setuid+set}" = set; then + enableval=$enable_install_setuid; SETUID=$enableval +else + SETUID=auto fi -done -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes -else - ac_cv_working_alloca_h=no +{ $as_echo "$as_me:$LINENO: checking to see if we can install the Xorg server as root" >&5 +$as_echo_n "checking to see if we can install the Xorg server as root... " >&6; } +if test "x$SETUID" = "xauto" ; then + case $host_os in + darwin*) SETUID="no" ;; + *) + case $host_cpu in + sparc) SETUID="no" ;; + *) SETUID="yes" ;; + esac + esac + if test "x$SETUID" = xyes; then + touch testfile + chown root testfile > /dev/null 2>&1 || SETUID="no" + rm -f testfile + fi fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $SETUID" >&5 +$as_echo "$SETUID" >&6; } + if test "x$SETUID" = "xyes"; then + INSTALL_SETUID_TRUE= + INSTALL_SETUID_FALSE='#' +else + INSTALL_SETUID_TRUE='#' + INSTALL_SETUID_FALSE= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes +# Transport selection macro from xtrans.m4 + + + + case $host_os in + mingw*) unixdef="no" ;; + *) unixdef="yes" ;; + esac + # Check whether --enable-unix-transport was given. +if test "${enable_unix_transport+set}" = set; then + enableval=$enable_unix_transport; UNIXCONN=$enableval else - ac_cv_func_alloca_works=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + UNIXCONN=$unixdef fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } -if test $ac_cv_func_alloca_works = yes; then + { $as_echo "$as_me:$LINENO: checking if Xtrans should support UNIX socket connections" >&5 +$as_echo_n "checking if Xtrans should support UNIX socket connections... " >&6; } + if test "$UNIXCONN" = "yes"; then -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define UNIXCONN 1 +_ACEOF + fi + { $as_echo "$as_me:$LINENO: result: $UNIXCONN" >&5 +$as_echo "$UNIXCONN" >&6; } + # Check whether --enable-tcp-transport was given. +if test "${enable_tcp_transport+set}" = set; then + enableval=$enable_tcp_transport; TCPCONN=$enableval else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. + TCPCONN=yes +fi -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + { $as_echo "$as_me:$LINENO: checking if Xtrans should support TCP socket connections" >&5 +$as_echo_n "checking if Xtrans should support TCP socket connections... " >&6; } + { $as_echo "$as_me:$LINENO: result: $TCPCONN" >&5 +$as_echo "$TCPCONN" >&6; } + if test "$TCPCONN" = "yes"; then -$as_echo "#define C_ALLOCA 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define TCPCONN 1 +_ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : + # SVR4 hides these in libraries other than libc + { $as_echo "$as_me:$LINENO: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if test "${ac_cv_search_socket+set}" = set; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif +/* 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 socket (); +int +main () +{ +return socket (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + 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_search_socket=$ac_res else - ac_cv_os_cray=no -fi -rm -f conftest* + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF +fi - break +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_socket+set}" = set; then + break +fi +done +if test "${ac_cv_search_socket+set}" = set; then + : +else + ac_cv_search_socket=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : + { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if test "${ac_cv_search_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +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 -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} +/* 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 gethostbyname (); int main () { - return find_stack_direction () < 0; +return gethostbyname (); + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + 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_search_gethostbyname=$ac_res else - ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 fi -ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize" -if test "x$ac_cv_func_getdtablesize" = x""yes; then : - -$as_echo "#define HAS_GETDTABLESIZE 1" >>confdefs.h - +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_gethostbyname+set}" = set; then + break fi - -ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" -if test "x$ac_cv_func_getifaddrs" = x""yes; then : - -$as_echo "#define HAS_GETIFADDRS 1" >>confdefs.h - +done +if test "${ac_cv_search_gethostbyname+set}" = set; then + : +else + ac_cv_search_gethostbyname=no fi - -ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid" -if test "x$ac_cv_func_getpeereid" = x""yes; then : - -$as_echo "#define HAS_GETPEEREID 1" >>confdefs.h - +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi - -ac_fn_c_check_func "$LINENO" "getpeerucred" "ac_cv_func_getpeerucred" -if test "x$ac_cv_func_getpeerucred" = x""yes; then : - -$as_echo "#define HAS_GETPEERUCRED 1" >>confdefs.h +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" -if test "x$ac_cv_func_strlcat" = x""yes; then : - HAVE_STRLCAT=yes -else - HAVE_STRLCAT=no -fi - if test x$HAVE_STRLCAT = xno; then - NEED_STRLCAT_TRUE= - NEED_STRLCAT_FALSE='#' +{ $as_echo "$as_me:$LINENO: checking for main in -lws2_32" >&5 +$as_echo_n "checking for main in -lws2_32... " >&6; } +if test "${ac_cv_lib_ws2_32_main+set}" = set; then + $as_echo_n "(cached) " >&6 else - NEED_STRLCAT_TRUE='#' - NEED_STRLCAT_FALSE= -fi + ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" -if test "x$ac_cv_func_strlcpy" = x""yes; then : -$as_echo "#define HAS_STRLCPY 1" >>confdefs.h +int +main () +{ +return main (); + ; + 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_lib_ws2_32_main=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_ws2_32_main=no fi - - if test x$HAVE_VSNPRINTF = xno; then - NEED_VSNPRINTF_TRUE= - NEED_VSNPRINTF_FALSE='#' -else - NEED_VSNPRINTF_TRUE='#' - NEED_VSNPRINTF_FALSE= +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ws2_32_main" >&5 +$as_echo "$ac_cv_lib_ws2_32_main" >&6; } +if test "x$ac_cv_lib_ws2_32_main" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWS2_32 1 +_ACEOF - -ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = x""yes; then : - -$as_echo "#define HAS_MMAP 1" >>confdefs.h + LIBS="-lws2_32 $LIBS" fi +ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 -$as_echo_n "checking for sqrt in -lm... " >&6; } -if test "${ac_cv_lib_m_sqrt+set}" = set; then : + # Needs to come after above checks for libsocket & libnsl for SVR4 systems + # Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then + enableval=$enable_ipv6; IPV6CONN=$enableval +else + { $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +$as_echo_n "checking for getaddrinfo... " >&6; } +if test "${ac_cv_func_getaddrinfo+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. + For example, HP-UX 11i declares gettimeofday. */ +#define getaddrinfo innocuous_getaddrinfo + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getaddrinfo (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getaddrinfo /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -13920,329 +20422,463 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char sqrt (); +char getaddrinfo (); +/* 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_getaddrinfo || defined __stub___getaddrinfo +choke me +#endif + int main () { -return sqrt (); +return getaddrinfo (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_sqrt=yes +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_getaddrinfo=yes else - ac_cv_lib_m_sqrt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getaddrinfo=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 -$as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - LIBS="-lm $LIBS" +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_getaddrinfo" >&5 +$as_echo "$ac_cv_func_getaddrinfo" >&6; } +if test "x$ac_cv_func_getaddrinfo" = x""yes; then + IPV6CONN=yes +else + IPV6CONN=no +fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cbrt in -lm" >&5 -$as_echo_n "checking for cbrt in -lm... " >&6; } -if test "${ac_cv_lib_m_cbrt+set}" = set; then : + { $as_echo "$as_me:$LINENO: checking if IPv6 support should be built" >&5 +$as_echo_n "checking if IPv6 support should be built... " >&6; } + if test "$IPV6CONN" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define IPv6 1 +_ACEOF + + fi + { $as_echo "$as_me:$LINENO: result: $IPV6CONN" >&5 +$as_echo "$IPV6CONN" >&6; } + + # 4.3BSD-Reno added a new member to struct sockaddr_in + { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5 +$as_echo_n "checking for struct sockaddr_in.sin_len... " >&6; } +if test "${ac_cv_member_struct_sockaddr_in_sin_len+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + + +int +main () +{ +static struct sockaddr_in ac_aggr; +if (ac_aggr.sin_len) +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 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_member_struct_sockaddr_in_sin_len=yes +else + $as_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. */ -/* 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 cbrt (); +#include +#include +#include + + int main () { -return cbrt (); +static struct sockaddr_in ac_aggr; +if (sizeof ac_aggr.sin_len) +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_cbrt=yes +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_member_struct_sockaddr_in_sin_len=yes else - ac_cv_lib_m_cbrt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cbrt" >&5 -$as_echo "$ac_cv_lib_m_cbrt" >&6; } -if test "x$ac_cv_lib_m_cbrt" = x""yes; then : - -$as_echo "#define HAVE_CBRT 1" >>confdefs.h + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_member_struct_sockaddr_in_sin_len=no fi - -for ac_header in ndbm.h dbm.h rpcsvc/dbm.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in_sin_len" >&5 +$as_echo "$ac_cv_member_struct_sockaddr_in_sin_len" >&6; } +if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = x""yes; then -for ac_header in linux/agpgart.h sys/agpio.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<\_ACEOF +#define BSD44SOCKETS 1 _ACEOF - AGP=yes + fi -done - if test "x$AGP" = xyes; then - AGP_TRUE= - AGP_FALSE='#' + # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. + { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 +$as_echo_n "checking for socklen_t... " >&6; } +if test "${ac_cv_type_socklen_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - AGP_TRUE='#' - AGP_FALSE= -fi + ac_cv_type_socklen_t=no +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 -for ac_header in linux/apm_bios.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "linux/apm_bios.h" "ac_cv_header_linux_apm_bios_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_apm_bios_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_APM_BIOS_H 1 +int +main () +{ +if (sizeof (socklen_t)) + return 0; + ; + return 0; +} _ACEOF - LNXAPM=yes -fi +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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -done +$ac_includes_default +#include - if test "x$LNXAPM" = xyes; then - LNXAPM_TRUE= - LNXAPM_FALSE='#' +int +main () +{ +if (sizeof ((socklen_t))) + 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 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 - LNXAPM_TRUE='#' - LNXAPM_FALSE= -fi - + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -for ac_header in linux/fb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "linux/fb.h" "ac_cv_header_linux_fb_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_fb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_FB_H 1 -_ACEOF - FBDEV=yes + ac_cv_type_socklen_t=yes fi -done - - if test "x$FBDEV" = xyes; then - FBDEVHW_TRUE= - FBDEVHW_FALSE='#' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - FBDEVHW_TRUE='#' - FBDEVHW_FALSE= -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -for ac_header in asm/mtrr.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "asm/mtrr.h" "ac_cv_header_asm_mtrr_h" "$ac_includes_default" -if test "x$ac_cv_header_asm_mtrr_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ASM_MTRR_H 1 -_ACEOF - ac_cv_asm_mtrr_h=yes fi -done - -if test "x$ac_cv_asm_mtrr_h" = xyes; then - HAVE_MTRR=yes +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +$as_echo "$ac_cv_type_socklen_t" >&6; } +if test "x$ac_cv_type_socklen_t" = x""yes; then -for ac_header in sys/memrange.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/memrange.h" "ac_cv_header_sys_memrange_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_memrange_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_MEMRANGE_H 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKLEN_T 1 _ACEOF - ac_cv_memrange_h=yes -fi -done -if test "x$ac_cv_memrange_h" = xyes; then - HAVE_MTRR=yes fi -if test "x$HAVE_MTRR" = xyes; then -$as_echo "#define HAS_MTRR_SUPPORT 1" >>confdefs.h + fi + case $host_os in + solaris*|sco*|sysv4*) localdef="yes" ;; + *) localdef="no" ;; + esac + # Check whether --enable-local-transport was given. +if test "${enable_local_transport+set}" = set; then + enableval=$enable_local_transport; LOCALCONN=$enableval +else + LOCALCONN=$localdef fi -for ac_header in machine/mtrr.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "machine/mtrr.h" "ac_cv_header_machine_mtrr_h" "$ac_includes_default" -if test "x$ac_cv_header_machine_mtrr_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACHINE_MTRR_H 1 + { $as_echo "$as_me:$LINENO: checking if Xtrans should support os-specific local connections" >&5 +$as_echo_n "checking if Xtrans should support os-specific local connections... " >&6; } + { $as_echo "$as_me:$LINENO: result: $LOCALCONN" >&5 +$as_echo "$LOCALCONN" >&6; } + if test "$LOCALCONN" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define LOCALCONN 1 _ACEOF - ac_cv_machine_mtrr_h=yes -fi -done + fi -if test "x$ac_cv_machine_mtrr_h" = xyes; then -$as_echo "#define HAS_MTRR_BUILTIN 1" >>confdefs.h -fi +# Secure RPC detection macro from xtrans.m4 -for ac_header in sys/linker.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/linker.h" "ac_cv_header_sys_linker_h" "#include -" -if test "x$ac_cv_header_sys_linker_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_LINKER_H 1 -_ACEOF - ac_cv_sys_linker_h=yes + # Check whether --enable-secure-rpc was given. +if test "${enable_secure_rpc+set}" = set; then + enableval=$enable_secure_rpc; SECURE_RPC=$enableval else - ac_cv_sys_linker_h=no + SECURE_RPC="try" fi -done - if test "x$ac_cv_sys_linker_h" = xyes; then - FREEBSD_KLDLOAD_TRUE= - FREEBSD_KLDLOAD_FALSE='#' -else - FREEBSD_KLDLOAD_TRUE='#' - FREEBSD_KLDLOAD_FALSE= -fi + if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then + FOUND_SECURE_RPC="no" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSV IPC" >&5 -$as_echo_n "checking for SYSV IPC... " >&6; } -if test "${ac_cv_sysv_ipc+set}" = set; then : +for ac_func in authdes_seccreate authdes_create +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -#include -#include -#include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif int main () { - -{ - int id; - id = shmget(IPC_PRIVATE, 512, SHM_W | SHM_R); - if (id < 0) return -1; - return shmctl(id, IPC_RMID, 0); -} +return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sysv_ipc=yes -else - ac_cv_sysv_ipc=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sysv_ipc" >&5 -$as_echo "$ac_cv_sysv_ipc" >&6; } -if test "x$ac_cv_sysv_ipc" = xyes; then - -$as_echo "#define HAVE_SYSV_IPC 1" >>confdefs.h - -fi - -if test -c /dev/xf86 ; then - -$as_echo "#define HAS_APERTURE_DRV 1" >>confdefs.h - -fi - -ac_fn_c_check_header_mongrel "$LINENO" "machine/apmvar.h" "ac_cv_header_machine_apmvar_h" "$ac_includes_default" -if test "x$ac_cv_header_machine_apmvar_h" = x""yes; then : - - ac_fn_c_check_header_mongrel "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_event_h" = x""yes; then : - ac_cv_BSD_KQUEUE_APM=yes -else - ac_cv_BSD_APM=yes -fi - +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 + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi - - - if test "x$ac_cv_BSD_APM" = xyes; then - BSD_APM_TRUE= - BSD_APM_FALSE='#' -else - BSD_APM_TRUE='#' - BSD_APM_FALSE= +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - - if test "x$ac_cv_BSD_KQUEUE_APM" = xyes; then - BSD_KQUEUE_APM_TRUE= - BSD_KQUEUE_APM_FALSE='#' -else - BSD_KQUEUE_APM_TRUE='#' - BSD_KQUEUE_APM_FALSE= +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + FOUND_SECURE_RPC="yes" fi +done - -ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_execinfo_h" = x""yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lc" >&5 -$as_echo_n "checking for backtrace in -lc... " >&6; } -if test "${ac_cv_lib_c_backtrace+set}" = set; then : + if test "x$FOUND_SECURE_RPC" = "xno" ; then + if test "x$SECURE_RPC" = "xyes" ; then + { { $as_echo "$as_me:$LINENO: error: Secure RPC requested, but required functions not found" >&5 +$as_echo "$as_me: error: Secure RPC requested, but required functions not found" >&2;} + { (exit 1); exit 1; }; } + fi + SECURE_RPC="no" + else + { $as_echo "$as_me:$LINENO: checking for library containing getsecretkey" >&5 +$as_echo_n "checking for library containing getsecretkey... " >&6; } +if test "${ac_cv_search_getsecretkey+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -14251,1523 +20887,1844 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char backtrace (); +char getsecretkey (); int main () { -return backtrace (); +return getsecretkey (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_c_backtrace=yes +for ac_lib in '' rpcsvc; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + 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_search_getsecretkey=$ac_res else - ac_cv_lib_c_backtrace=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_backtrace" >&5 -$as_echo "$ac_cv_lib_c_backtrace" >&6; } -if test "x$ac_cv_lib_c_backtrace" = x""yes; then : - - -$as_echo "#define HAVE_BACKTRACE 1" >>confdefs.h - - -$as_echo "#define HAVE_EXECINFO_H 1" >>confdefs.h + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 fi - +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_getsecretkey+set}" = set; then + break fi +done +if test "${ac_cv_search_getsecretkey+set}" = set; then + : +else + ac_cv_search_getsecretkey=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getsecretkey" >&5 +$as_echo "$ac_cv_search_getsecretkey" >&6; } +ac_res=$ac_cv_search_getsecretkey +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +fi + SECURE_RPC="yes" + fi + fi + { $as_echo "$as_me:$LINENO: checking if Secure RPC authentication (\"SUN-DES-1\") should be supported" >&5 +$as_echo_n "checking if Secure RPC authentication (\"SUN-DES-1\") should be supported... " >&6; } + if test "x$SECURE_RPC" = "xyes" ; then -DEFAULT_INT10="x86emu" - - -case $host_cpu in - alpha*) - ALPHA_VIDEO=yes - case $host_os in - *freebsd*) SYS_LIBS=-lio ;; - *netbsd*) -$as_echo "#define USE_ALPHA_PIO 1" >>confdefs.h - ;; - esac - GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" - ;; - arm*) - ARM_VIDEO=yes - ;; - i*86) - I386_VIDEO=yes - case $host_os in - *freebsd*) $as_echo "#define USE_DEV_IO 1" >>confdefs.h - ;; - *dragonfly*) $as_echo "#define USE_DEV_IO 1" >>confdefs.h - ;; - *netbsd*) $as_echo "#define USE_I386_IOPL 1" >>confdefs.h - - SYS_LIBS=-li386 - ;; - *openbsd*) $as_echo "#define USE_I386_IOPL 1" >>confdefs.h - - SYS_LIBS=-li386 - ;; - esac - ;; - powerpc*) - PPC_VIDEO=yes - case $host_os in - *freebsd*) DEFAULT_INT10=stub ;; - esac - ;; - sparc*) - SPARC64_VIDEO=yes - BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" - GLX_ARCH_DEFINES="-D__GLX_ALIGN64" - ;; - x86_64*|amd64*) - I386_VIDEO=yes - case $host_os in - *freebsd*) -$as_echo "#define USE_DEV_IO 1" >>confdefs.h - ;; - *dragonfly*) -$as_echo "#define USE_DEV_IO 1" >>confdefs.h - ;; - *netbsd*) -$as_echo "#define USE_I386_IOPL 1" >>confdefs.h - - SYS_LIBS=-lx86_64 - ;; - *openbsd*) -$as_echo "#define USE_AMD64_IOPL 1" >>confdefs.h - - SYS_LIBS=-lamd64 - ;; - esac - GLX_ARCH_DEFINES="-D__GLX_ALIGN64" - ;; - ia64*) - GLX_ARCH_DEFINES="-D__GLX_ALIGN64" - ;; - s390*) - GLX_ARCH_DEFINES="-D__GLX_ALIGN64" - ;; -esac +cat >>confdefs.h <<\_ACEOF +#define SECURE_RPC 1 +_ACEOF + fi + { $as_echo "$as_me:$LINENO: result: $SECURE_RPC" >&5 +$as_echo "$SECURE_RPC" >&6; } - if test "x$ALPHA_VIDEO" = xyes; then - ALPHA_VIDEO_TRUE= - ALPHA_VIDEO_FALSE='#' + if test "x$SECURE_RPC" = xyes; then + SECURE_RPC_TRUE= + SECURE_RPC_FALSE='#' else - ALPHA_VIDEO_TRUE='#' - ALPHA_VIDEO_FALSE= + SECURE_RPC_TRUE='#' + SECURE_RPC_FALSE= fi - if test "x$ARM_VIDEO" = xyes; then - ARM_VIDEO_TRUE= - ARM_VIDEO_FALSE='#' -else - ARM_VIDEO_TRUE='#' - ARM_VIDEO_FALSE= -fi - if test "x$I386_VIDEO" = xyes; then - I386_VIDEO_TRUE= - I386_VIDEO_FALSE='#' + if test "x$INT10" = xvm86; then + INT10_VM86_TRUE= + INT10_VM86_FALSE='#' else - I386_VIDEO_TRUE='#' - I386_VIDEO_FALSE= + INT10_VM86_TRUE='#' + INT10_VM86_FALSE= fi - if test "x$PPC_VIDEO" = xyes; then - PPC_VIDEO_TRUE= - PPC_VIDEO_FALSE='#' + if test "x$INT10" = xx86emu; then + INT10_X86EMU_TRUE= + INT10_X86EMU_FALSE='#' else - PPC_VIDEO_TRUE='#' - PPC_VIDEO_FALSE= + INT10_X86EMU_TRUE='#' + INT10_X86EMU_FALSE= fi - if test "x$SPARC64_VIDEO" = xyes; then - SPARC64_VIDEO_TRUE= - SPARC64_VIDEO_FALSE='#' + if test "x$INT10" = xstub; then + INT10_STUB_TRUE= + INT10_STUB_FALSE='#' else - SPARC64_VIDEO_TRUE='#' - SPARC64_VIDEO_FALSE= + INT10_STUB_TRUE='#' + INT10_STUB_FALSE= fi - -DRI=no -KDRIVE_HW=no -case $host_os in - *freebsd* | *dragonfly*) - case $host_os in - kfreebsd*-gnu) ;; - *) -$as_echo "#define CSRG_BASED 1" >>confdefs.h - ;; - esac - -$as_echo "#define PCCONS_SUPPORT 1" >>confdefs.h - - -$as_echo "#define PCVT_SUPPORT 1" >>confdefs.h +if test "x$INT10" = xyes; then -$as_echo "#define SYSCONS_SUPPORT 1" >>confdefs.h +for ac_header in sys/vm86.h sys/io.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - DRI=yes - ;; - *netbsd*) + ac_header_compiler=no +fi -$as_echo "#define CSRG_BASED 1" >>confdefs.h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define PCCONS_SUPPORT 1" >>confdefs.h + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -$as_echo "#define PCVT_SUPPORT 1" >>confdefs.h +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -$as_echo "#define WSCONS_SUPPORT 1" >>confdefs.h +fi - DRI=yes - ;; - *openbsd*) +done -$as_echo "#define CSRG_BASED 1" >>confdefs.h +fi + if test "x$BUILDDOCS" = xyes; then + BUILDDOCS_TRUE= + BUILDDOCS_FALSE='#' +else + BUILDDOCS_TRUE='#' + BUILDDOCS_FALSE= +fi -$as_echo "#define PCVT_SUPPORT 1" >>confdefs.h -$as_echo "#define WSCONS_SUPPORT 1" >>confdefs.h +if test x$XORG_SGML_PATH = x ; then + XORG_SGML_PATH=$prefix/share/sgml +fi +HAVE_DEFS_ENT= - ;; - *linux*) - DRI=yes - KDRIVE_HW=yes - ;; - *solaris*) - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libdrm") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - DRI=yes +if test x"$cross_compiling" = x"yes" ; then + HAVE_DEFS_ENT=no else - DRI=no + as_ac_File=`$as_echo "ac_cv_file_$XORG_SGML_PATH/X11/defs.ent" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $XORG_SGML_PATH/X11/defs.ent" >&5 +$as_echo_n "checking for $XORG_SGML_PATH/X11/defs.ent... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "$XORG_SGML_PATH/X11/defs.ent"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + HAVE_DEFS_ENT=yes fi - ;; - darwin*) -$as_echo "#define CSRG_BASED 1" >>confdefs.h +fi - ;; +# Extract the first word of "linuxdoc", so it can be a program name with args. +set dummy linuxdoc; 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_path_LINUXDOC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $LINUXDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_LINUXDOC="$LINUXDOC" # Let the user override the test with a path. + ;; + *) + 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_path_LINUXDOC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; esac - if test "x$KDRIVE_HW" = xyes; then - KDRIVE_HW_TRUE= - KDRIVE_HW_FALSE='#' +fi +LINUXDOC=$ac_cv_path_LINUXDOC +if test -n "$LINUXDOC"; then + { $as_echo "$as_me:$LINENO: result: $LINUXDOC" >&5 +$as_echo "$LINUXDOC" >&6; } else - KDRIVE_HW_TRUE='#' - KDRIVE_HW_FALSE= + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +# Extract the first word of "ps2pdf", so it can be a program name with args. +set dummy ps2pdf; 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_path_PS2PDF+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $PS2PDF in + [\\/]* | ?:[\\/]*) + ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path. + ;; + *) + 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_path_PS2PDF="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS - -# Check whether --with-release-version was given. -if test "${with_release_version+set}" = set; then : - withval=$with_release_version; RELEASE_VERSION="$withval" + ;; +esac +fi +PS2PDF=$ac_cv_path_PS2PDF +if test -n "$PS2PDF"; then + { $as_echo "$as_me:$LINENO: result: $PS2PDF" >&5 +$as_echo "$PS2PDF" >&6; } else - RELEASE_VERSION="" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$RELEASE_VERSION" != "x"; then - PACKAGE="$PACKAGE-$RELEASE_VERSION" - PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" - { $as_echo "$as_me:${as_lineno-$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 +{ $as_echo "$as_me:$LINENO: checking Whether to build documentation" >&5 +$as_echo_n "checking Whether to build documentation... " >&6; } -PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1` -PVS=`echo $PACKAGE_VERSION | cut -d . -f 4 | cut -d - -f 1` -if test "x$PVS" = "x"; then - PVS="0" +if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then + BUILDDOC=yes +else + BUILDDOC=no fi -VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)" -VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}" + if test x$BUILDDOC = xyes; then + BUILD_LINUXDOC_TRUE= + BUILD_LINUXDOC_FALSE='#' +else + BUILD_LINUXDOC_TRUE='#' + BUILD_LINUXDOC_FALSE= +fi -VENDOR_NAME="The X.Org Foundation" -VENDOR_NAME_SHORT="X.Org" -VENDOR_WEB="http://wiki.x.org" +{ $as_echo "$as_me:$LINENO: result: $BUILDDOC" >&5 +$as_echo "$BUILDDOC" >&6; } +{ $as_echo "$as_me:$LINENO: checking Whether to build pdf documentation" >&5 +$as_echo_n "checking Whether to build pdf documentation... " >&6; } -# Check whether --enable-werror was given. -if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; WERROR=$enableval +if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes else - WERROR=no + BUILDPDFDOC=no fi -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; DEBUGGING=$enableval + if test x$BUILDPDFDOC = xyes; then + BUILD_PDFDOC_TRUE= + BUILD_PDFDOC_FALSE='#' else - DEBUGGING=no + BUILD_PDFDOC_TRUE='#' + BUILD_PDFDOC_FALSE= fi -# Check whether --with-int10 was given. -if test "${with_int10+set}" = set; then : - withval=$with_int10; INT10="$withval" -else - INT10="$DEFAULT_INT10" -fi +{ $as_echo "$as_me:$LINENO: result: $BUILDPDFDOC" >&5 +$as_echo "$BUILDPDFDOC" >&6; } +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" +MAKE_PDF="$PS2PDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" -# Check whether --with-vendor-name was given. -if test "${with_vendor_name+set}" = set; then : - withval=$with_vendor_name; VENDOR_NAME="$withval" -fi -# Check whether --with-vendor-name-short was given. -if test "${with_vendor_name_short+set}" = set; then : - withval=$with_vendor_name_short; VENDOR_NAME_SHORT="$withval" -fi -# Check whether --with-vendor-web was given. -if test "${with_vendor_web+set}" = set; then : - withval=$with_vendor_web; VENDOR_WEB="$withval" -fi -# Check whether --with-module-dir was given. -if test "${with_module_dir+set}" = set; then : - withval=$with_module_dir; moduledir="$withval" + if test "x$INSTALL_LIBXF86CONFIG" = xyes; then + INSTALL_LIBXF86CONFIG_TRUE= + INSTALL_LIBXF86CONFIG_FALSE='#' else - moduledir="${libdir}/xorg/modules" + INSTALL_LIBXF86CONFIG_TRUE='#' + INSTALL_LIBXF86CONFIG_FALSE= fi -# Check whether --with-log-dir was given. -if test "${with_log_dir+set}" = set; then : - withval=$with_log_dir; logdir="$withval" -else - logdir="$localstatedir/log" -fi +case $host_os in + darwin*) + DRI2=no + if test x$XQUARTZ = xauto; then + { $as_echo "$as_me:$LINENO: checking whether to build Xquartz" >&5 +$as_echo_n "checking whether to build Xquartz... " >&6; } +if test "${xorg_cv_Carbon_framework+set}" = set; then + $as_echo_n "(cached) " >&6 +else -# Check whether --with-builder-addr was given. -if test "${with_builder_addr+set}" = set; then : - withval=$with_builder_addr; BUILDERADDR="$withval" + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -framework Carbon" + cat >conftest.$ac_ext <<_ACEOF +char FSFindFolder(); int main() { FSFindFolder(); 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 + xorg_cv_Carbon_framework=yes else - BUILDERADDR="xorg@lists.freedesktop.org" -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + xorg_cv_Carbon_framework=no +fi -# Check whether --with-os-name was given. -if test "${with_os_name+set}" = set; then : - withval=$with_os_name; OSNAME="$withval" -else - OSNAME=`uname -srm` +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS fi +{ $as_echo "$as_me:$LINENO: result: $xorg_cv_Carbon_framework" >&5 +$as_echo "$xorg_cv_Carbon_framework" >&6; } + + if test "X$xorg_cv_Carbon_framework" = Xyes; then + XQUARTZ=yes + else + XQUARTZ=no + fi + fi + if test "x$XQUARTZ" = xyes ; then + XQUARTZ=yes + XVFB=no + XNEST=no -# Check whether --with-os-vendor was given. -if test "${with_os_vendor+set}" = set; then : - withval=$with_os_vendor; OSVENDOR="$withval" -else - OSVENDOR="" -fi + COMPOSITE=no + DGA=no + DPMSExtension=no + XF86VIDMODE=no + fi + ;; +esac +XEXT_INC='-I$(top_srcdir)/Xext' +XEXT_LIB='$(top_builddir)/Xext/libXext.la' +XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' -# Check whether --with-builderstring was given. -if test "${with_builderstring+set}" = set; then : - withval=$with_builderstring; BUILDERSTRING="$withval" +REQUIRED_MODULES="randrproto >= 1.2.99.3 renderproto >= 0.11 fixesproto >= 4.0 damageproto >= 1.1 xcmiscproto >= 1.2.0 xextproto >= 7.0.99.3 xproto >= 7.0.13 xtrans >= 1.2.2 bigreqsproto >= 1.1.0 resourceproto fontsproto inputproto >= 1.9.99.902 kbproto >= 1.0.3" +REQUIRED_LIBS="xfont xau pixman-1 >= 0.15.20" -fi +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for DBUS" >&5 +$as_echo_n "checking for DBUS... " >&6; } -# Check whether --with-fontdir was given. -if test "${with_fontdir+set}" = set; then : - withval=$with_fontdir; FONTDIR="$withval" +if test -n "$DBUS_CFLAGS"; then + pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null` else - FONTDIR="${libdir}/X11/fonts" + pkg_failed=yes fi - -DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/TTF/,${FONTDIR}/OTF,${FONTDIR}/Type1/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/" -case $host_os in - darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; -esac - -# Check whether --with-default-font-path was given. -if test "${with_default_font_path+set}" = set; then : - withval=$with_default_font_path; FONTPATH="$withval" + else + pkg_failed=untried +fi +if test -n "$DBUS_LIBS"; then + pkg_cv_DBUS_LIBS="$DBUS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null` else - FONTPATH="${DEFAULT_FONT_PATH}" + pkg_failed=yes +fi + else + pkg_failed=untried fi -# Check whether --with-xkb-path was given. -if test "${with_xkb_path+set}" = set; then : - withval=$with_xkb_path; XKBPATH="$withval" -else - XKBPATH="${datadir}/X11/xkb" -fi +if test $pkg_failed = yes; then -# Check whether --with-xkb-output was given. -if test "${with_xkb_output+set}" = set; then : - withval=$with_xkb_output; XKBOUTPUT="$withval" +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - XKBOUTPUT="compiled" + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1" 2>&1` + else + DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DBUS_PKG_ERRORS" >&5 - -# Check whether --with-serverconfig-path was given. -if test "${with_serverconfig_path+set}" = set; then : - withval=$with_serverconfig_path; SERVERCONFIG="$withval" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + HAVE_DBUS=no +elif test $pkg_failed = untried; then + HAVE_DBUS=no else - SERVERCONFIG="${libdir}/xorg" + DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS + DBUS_LIBS=$pkg_cv_DBUS_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_DBUS=yes fi +if test "x$HAVE_DBUS" = xyes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_DBUS 1 +_ACEOF -# Check whether --with-apple-applications-dir was given. -if test "${with_apple_applications_dir+set}" = set; then : - withval=$with_apple_applications_dir; APPLE_APPLICATIONS_DIR="${withval}" +fi + if test "x$HAVE_DBUS" = xyes; then + HAVE_DBUS_TRUE= + HAVE_DBUS_FALSE='#' else - APPLE_APPLICATIONS_DIR="/Applications/Utilities" + HAVE_DBUS_TRUE='#' + HAVE_DBUS_FALSE= fi - -# Check whether --with-apple-application-name was given. -if test "${with_apple_application_name+set}" = set; then : - withval=$with_apple_application_name; APPLE_APPLICATION_NAME="${withval}" -else - APPLE_APPLICATION_NAME="X11" +if test "x$CONFIG_DBUS_API" = xauto; then + CONFIG_DBUS_API="$HAVE_DBUS" fi +if test "x$CONFIG_DBUS_API" = xyes; then + if ! test "x$HAVE_DBUS" = xyes; then + { { $as_echo "$as_me:$LINENO: error: D-Bus configuration API requested, but D-Bus is not installed." >&5 +$as_echo "$as_me: error: D-Bus configuration API requested, but D-Bus is not installed." >&2;} + { (exit 1); exit 1; }; } + fi +cat >>confdefs.h <<\_ACEOF +#define CONFIG_DBUS_API 1 +_ACEOF -# Check whether --with-apple-application-id was given. -if test "${with_apple_application_id+set}" = set; then : - withval=$with_apple_application_id; APPLE_APPLICATION_ID="${withval}" + CONFIG_NEED_DBUS="yes" +fi + if test "x$CONFIG_DBUS_API" = xyes; then + CONFIG_DBUS_API_TRUE= + CONFIG_DBUS_API_FALSE='#' else - APPLE_APPLICATION_ID="org.x.X11" + CONFIG_DBUS_API_TRUE='#' + CONFIG_DBUS_API_FALSE= fi -# Check whether --enable-builddocs was given. -if test "${enable_builddocs+set}" = set; then : - enableval=$enable_builddocs; BUILDDOCS=$enableval -else - BUILDDOCS=no -fi -# Check whether --enable-install-libxf86config was given. -if test "${enable_install_libxf86config+set}" = set; then : - enableval=$enable_install_libxf86config; INSTALL_LIBXF86CONFIG=$enableval +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for HAL" >&5 +$as_echo_n "checking for HAL... " >&6; } + +if test -n "$HAL_CFLAGS"; then + pkg_cv_HAL_CFLAGS="$HAL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal\"") >&5 + ($PKG_CONFIG --exists --print-errors "hal") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_HAL_CFLAGS=`$PKG_CONFIG --cflags "hal" 2>/dev/null` else - INSTALL_LIBXF86CONFIG=no + pkg_failed=yes fi - -# Check whether --enable-null-root-cursor was given. -if test "${enable_null_root_cursor+set}" = set; then : - enableval=$enable_null_root_cursor; NULL_ROOT_CURSOR=$enableval + else + pkg_failed=untried +fi +if test -n "$HAL_LIBS"; then + pkg_cv_HAL_LIBS="$HAL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal\"") >&5 + ($PKG_CONFIG --exists --print-errors "hal") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_HAL_LIBS=`$PKG_CONFIG --libs "hal" 2>/dev/null` else - NULL_ROOT_CURSOR=no + pkg_failed=yes +fi + else + pkg_failed=untried fi -# Check whether --with-mesa-source was given. -if test "${with_mesa_source+set}" = set; then : - withval=$with_mesa_source; MESA_SOURCE="$withval" -else - MESA_SOURCE="" -fi - +if test $pkg_failed = yes; then -# Check whether --with-dri-driver-path was given. -if test "${with_dri_driver_path+set}" = set; then : - withval=$with_dri_driver_path; DRI_DRIVER_PATH="$withval" +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - DRI_DRIVER_PATH="${libdir}/dri" + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "hal" 2>&1` + else + HAL_PKG_ERRORS=`$PKG_CONFIG --print-errors "hal" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HAL_PKG_ERRORS" >&5 -# Check whether --enable-aiglx was given. -if test "${enable_aiglx+set}" = set; then : - enableval=$enable_aiglx; AIGLX=$enableval + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + HAVE_HAL=no +elif test $pkg_failed = untried; then + HAVE_HAL=no else - AIGLX=yes + HAL_CFLAGS=$pkg_cv_HAL_CFLAGS + HAL_LIBS=$pkg_cv_HAL_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_HAL=yes fi - -# Check whether --enable-glx-tls was given. -if test "${enable_glx_tls+set}" = set; then : - enableval=$enable_glx_tls; GLX_USE_TLS=$enableval -else - GLX_USE_TLS=no +if test "x$CONFIG_HAL" = xauto; then + CONFIG_HAL="$HAVE_HAL" fi +if test "x$CONFIG_HAL" = xyes; then + if ! test "x$HAVE_HAL" = xyes; then + { { $as_echo "$as_me:$LINENO: error: HAL hotplug API requested, but HAL is not installed." >&5 +$as_echo "$as_me: error: HAL hotplug API requested, but HAL is not installed." >&2;} + { (exit 1); exit 1; }; } + fi -# Check whether --enable-registry was given. -if test "${enable_registry+set}" = set; then : - enableval=$enable_registry; XREGISTRY=$enableval -else - XREGISTRY=yes -fi +cat >>confdefs.h <<\_ACEOF +#define CONFIG_HAL 1 +_ACEOF -# Check whether --enable-composite was given. -if test "${enable_composite+set}" = set; then : - enableval=$enable_composite; COMPOSITE=$enableval -else - COMPOSITE=yes + REQUIRED_LIBS="$REQUIRED_LIBS hal" + CONFIG_NEED_DBUS="yes" fi - -# Check whether --enable-mitshm was given. -if test "${enable_mitshm+set}" = set; then : - enableval=$enable_mitshm; MITSHM=$enableval + if test "x$CONFIG_HAL" = xyes; then + CONFIG_HAL_TRUE= + CONFIG_HAL_FALSE='#' else - MITSHM=yes + CONFIG_HAL_TRUE='#' + CONFIG_HAL_FALSE= fi -# Check whether --enable-xres was given. -if test "${enable_xres+set}" = set; then : - enableval=$enable_xres; RES=$enableval -else - RES=yes -fi -# Check whether --enable-record was given. -if test "${enable_record+set}" = set; then : - enableval=$enable_record; RECORD=$enableval -else - RECORD=no -fi +if test "x$CONFIG_NEED_DBUS" = xyes; then + REQUIRED_LIBS="$REQUIRED_LIBS dbus-1" -# Check whether --enable-xv was given. -if test "${enable_xv+set}" = set; then : - enableval=$enable_xv; XV=$enableval -else - XV=yes -fi +cat >>confdefs.h <<\_ACEOF +#define CONFIG_NEED_DBUS 1 +_ACEOF -# Check whether --enable-xvmc was given. -if test "${enable_xvmc+set}" = set; then : - enableval=$enable_xvmc; XVMC=$enableval -else - XVMC=yes fi - -# Check whether --enable-dga was given. -if test "${enable_dga+set}" = set; then : - enableval=$enable_dga; DGA=$enableval + if test "x$CONFIG_NEED_DBUS" = xyes; then + CONFIG_NEED_DBUS_TRUE= + CONFIG_NEED_DBUS_FALSE='#' else - DGA=auto + CONFIG_NEED_DBUS_TRUE='#' + CONFIG_NEED_DBUS_FALSE= fi -# Check whether --enable-screensaver was given. -if test "${enable_screensaver+set}" = set; then : - enableval=$enable_screensaver; SCREENSAVER=$enableval -else - SCREENSAVER=yes -fi +CONFIG_LIB='$(top_builddir)/config/libconfig.la' -# Check whether --enable-xdmcp was given. -if test "${enable_xdmcp+set}" = set; then : - enableval=$enable_xdmcp; XDMCP=$enableval -else - XDMCP=auto -fi +{ $as_echo "$as_me:$LINENO: checking for glibc..." >&5 +$as_echo_n "checking for glibc...... " >&6; } +cat >conftest.$ac_ext <<_ACEOF + +#include +#ifndef __GLIBC__ +#error +#endif -# Check whether --enable-xdm-auth-1 was given. -if test "${enable_xdm_auth_1+set}" = set; then : - enableval=$enable_xdm_auth_1; XDMAUTH=$enableval +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + glibc=yes else - XDMAUTH=auto -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --enable-glx was given. -if test "${enable_glx+set}" = set; then : - enableval=$enable_glx; GLX=$enableval -else - GLX=yes + glibc=no fi -# Check whether --enable-dri was given. -if test "${enable_dri+set}" = set; then : - enableval=$enable_dri; DRI=$enableval -fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $glibc" >&5 +$as_echo "$glibc" >&6; } -# Check whether --enable-dri2 was given. -if test "${enable_dri2+set}" = set; then : - enableval=$enable_dri2; DRI2=$enableval -else - DRI2=auto -fi -# Check whether --enable-xinerama was given. -if test "${enable_xinerama+set}" = set; then : - enableval=$enable_xinerama; XINERAMA=$enableval +for ac_func in clock_gettime +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - XINERAMA=yes -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -# Check whether --enable-xf86vidmode was given. -if test "${enable_xf86vidmode+set}" = set; then : - enableval=$enable_xf86vidmode; XF86VIDMODE=$enableval -else - XF86VIDMODE=auto -fi +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -# Check whether --enable-xace was given. -if test "${enable_xace+set}" = set; then : - enableval=$enable_xace; XACE=$enableval -else - XACE=yes -fi +#ifdef __STDC__ +# include +#else +# include +#endif -# Check whether --enable-xselinux was given. -if test "${enable_xselinux+set}" = set; then : - enableval=$enable_xselinux; XSELINUX=$enableval -else - XSELINUX=no -fi +#undef $ac_func -# Check whether --enable-xcsecurity was given. -if test "${enable_xcsecurity+set}" = set; then : - enableval=$enable_xcsecurity; XCSECURITY=$enableval -else - XCSECURITY=no -fi +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif -# Check whether --enable-xcalibrate was given. -if test "${enable_xcalibrate+set}" = set; then : - enableval=$enable_xcalibrate; XCALIBRATE=$enableval +int +main () +{ +return $ac_func (); + ; + 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 + eval "$as_ac_var=yes" else - XCALIBRATE=no -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --enable-tslib was given. -if test "${enable_tslib+set}" = set; then : - enableval=$enable_tslib; TSLIB=$enableval -else - TSLIB=no + eval "$as_ac_var=no" fi -# Check whether --enable-multibuffer was given. -if test "${enable_multibuffer+set}" = set; then : - enableval=$enable_multibuffer; MULTIBUFFER=$enableval -else - MULTIBUFFER=no +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - -# Check whether --enable-dbe was given. -if test "${enable_dbe+set}" = set; then : - enableval=$enable_dbe; DBE=$enableval +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_clock_gettime=yes else - DBE=yes -fi - -# Check whether --enable-xf86bigfont was given. -if test "${enable_xf86bigfont+set}" = set; then : - enableval=$enable_xf86bigfont; XF86BIGFONT=$enableval + { $as_echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then + $as_echo_n "(cached) " >&6 else - XF86BIGFONT=no -fi + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# Check whether --enable-dpms was given. -if test "${enable_dpms+set}" = set; then : - enableval=$enable_dpms; DPMSExtension=$enableval +/* 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 clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + 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_lib_rt_clock_gettime=yes else - DPMSExtension=yes -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --enable-config-dbus was given. -if test "${enable_config_dbus+set}" = set; then : - enableval=$enable_config_dbus; CONFIG_DBUS_API=$enableval -else - CONFIG_DBUS_API=no + ac_cv_lib_rt_clock_gettime=no fi -# Check whether --enable-config-hal was given. -if test "${enable_config_hal+set}" = set; then : - enableval=$enable_config_hal; CONFIG_HAL=$enableval +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then + have_clock_gettime=-lrt else - CONFIG_HAL=auto + have_clock_gettime=no fi -# Check whether --enable-xfree86-utils was given. -if test "${enable_xfree86_utils+set}" = set; then : - enableval=$enable_xfree86_utils; XF86UTILS=$enableval -else - XF86UTILS=yes fi +done -# Check whether --enable-xorg was given. -if test "${enable_xorg+set}" = set; then : - enableval=$enable_xorg; XORG=$enableval -else - XORG=auto -fi +{ $as_echo "$as_me:$LINENO: checking for a useful monotonic clock ..." >&5 +$as_echo_n "checking for a useful monotonic clock ...... " >&6; } -# Check whether --enable-dmx was given. -if test "${enable_dmx+set}" = set; then : - enableval=$enable_dmx; DMX=$enableval -else - DMX=no -fi +if ! test "x$have_clock_gettime" = xno; then + if ! test "x$have_clock_gettime" = xyes; then + CLOCK_LIBS="$have_clock_gettime" + else + CLOCK_LIBS="" + fi -# Check whether --enable-xvfb was given. -if test "${enable_xvfb+set}" = set; then : - enableval=$enable_xvfb; XVFB=$enableval -else - XVFB=yes -fi + LIBS_SAVE="$LIBS" + LIBS="$CLOCK_LIBS" + CPPFLAGS_SAVE="$CPPFLAGS" -# Check whether --enable-xnest was given. -if test "${enable_xnest+set}" = set; then : - enableval=$enable_xnest; XNEST=$enableval -else - XNEST=auto -fi + if test x"$glibc" = xyes; then + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" + fi -# Check whether --enable-xquartz was given. -if test "${enable_xquartz+set}" = set; then : - enableval=$enable_xquartz; XQUARTZ=$enableval + if test "$cross_compiling" = yes; then + MONOTONIC_CLOCK="cross compiling" else - XQUARTZ=auto -fi + cat >conftest.$ac_ext <<_ACEOF -# Check whether --enable-standalone-xpbproxy was given. -if test "${enable_standalone_xpbproxy+set}" = set; then : - enableval=$enable_standalone_xpbproxy; STANDALONE_XPBPROXY=$enableval -else - STANDALONE_XPBPROXY=no -fi +#include -# Check whether --enable-xwin was given. -if test "${enable_xwin+set}" = set; then : - enableval=$enable_xwin; XWIN=$enableval -else - XWIN=auto -fi +int main(int argc, char *argv[]) { + struct timespec tp; -# Check whether --enable-kdrive was given. -if test "${enable_kdrive+set}" = set; then : - enableval=$enable_kdrive; KDRIVE=$enableval -else - KDRIVE=no -fi + if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) + return 0; + else + return 1; +} -# Check whether --enable-xephyr was given. -if test "${enable_xephyr+set}" = set; then : - enableval=$enable_xephyr; XEPHYR=$enableval +_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 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); } && { ac_try='./conftest$ac_exeext' + { (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 + MONOTONIC_CLOCK=yes else - XEPHYR=auto + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +MONOTONIC_CLOCK=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -# Check whether --enable-xsdl was given. -if test "${enable_xsdl+set}" = set; then : - enableval=$enable_xsdl; XSDL=$enableval + + + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" else - XSDL=auto + MONOTONIC_CLOCK=no fi -# Check whether --enable-xfake was given. -if test "${enable_xfake+set}" = set; then : - enableval=$enable_xfake; XFAKE=$enableval -else - XFAKE=auto +{ $as_echo "$as_me:$LINENO: result: $MONOTONIC_CLOCK" >&5 +$as_echo "$MONOTONIC_CLOCK" >&6; } + +if test "x$MONOTONIC_CLOCK" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define MONOTONIC_CLOCK 1 +_ACEOF + + LIBS="$LIBS $CLOCK_LIBS" fi -# Check whether --enable-xfbdev was given. -if test "${enable_xfbdev+set}" = set; then : - enableval=$enable_xfbdev; XFBDEV=$enableval + if test "x$XV" = xyes; then + XV_TRUE= + XV_FALSE='#' else - XFBDEV=auto + XV_TRUE='#' + XV_FALSE= fi +if test "x$XV" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XV 1 +_ACEOF -# Check whether --enable-install-setuid was given. -if test "${enable_install_setuid+set}" = set; then : - enableval=$enable_install_setuid; SETUID=$enableval +cat >>confdefs.h <<\_ACEOF +#define XvExtension 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES videoproto" else - SETUID=auto + XVMC=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we can install the Xorg server as root" >&5 -$as_echo_n "checking to see if we can install the Xorg server as root... " >&6; } -if test "x$SETUID" = "xauto" ; then - case $host_os in - darwin*) SETUID="no" ;; - *) - case $host_cpu in - sparc) SETUID="no" ;; - *) SETUID="yes" ;; - esac - esac - if test "x$SETUID" = xyes; then - touch testfile - chown root testfile > /dev/null 2>&1 || SETUID="no" - rm -f testfile - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETUID" >&5 -$as_echo "$SETUID" >&6; } - if test "x$SETUID" = "xyes"; then - INSTALL_SETUID_TRUE= - INSTALL_SETUID_FALSE='#' + if test "x$XVMC" = xyes; then + XVMC_TRUE= + XVMC_FALSE='#' else - INSTALL_SETUID_TRUE='#' - INSTALL_SETUID_FALSE= + XVMC_TRUE='#' + XVMC_FALSE= fi +if test "x$XVMC" = xyes; then +cat >>confdefs.h <<\_ACEOF +#define XvMCExtension 1 +_ACEOF +fi -# Transport selection macro from xtrans.m4 + if test "x$XREGISTRY" = xyes; then + XREGISTRY_TRUE= + XREGISTRY_FALSE='#' +else + XREGISTRY_TRUE='#' + XREGISTRY_FALSE= +fi +if test "x$XREGISTRY" = xyes; then +cat >>confdefs.h <<\_ACEOF +#define XREGISTRY 1 +_ACEOF - case $host_os in - mingw*) unixdef="no" ;; - *) unixdef="yes" ;; - esac - # Check whether --enable-unix-transport was given. -if test "${enable_unix_transport+set}" = set; then : - enableval=$enable_unix_transport; UNIXCONN=$enableval +fi + + if test "x$COMPOSITE" = xyes; then + COMPOSITE_TRUE= + COMPOSITE_FALSE='#' else - UNIXCONN=$unixdef + COMPOSITE_TRUE='#' + COMPOSITE_FALSE= fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support UNIX socket connections" >&5 -$as_echo_n "checking if Xtrans should support UNIX socket connections... " >&6; } - if test "$UNIXCONN" = "yes"; then +if test "x$COMPOSITE" = xyes; then -$as_echo "#define UNIXCONN 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define COMPOSITE 1 +_ACEOF - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIXCONN" >&5 -$as_echo "$UNIXCONN" >&6; } - # Check whether --enable-tcp-transport was given. -if test "${enable_tcp_transport+set}" = set; then : - enableval=$enable_tcp_transport; TCPCONN=$enableval -else - TCPCONN=yes + REQUIRED_MODULES="$REQUIRED_MODULES compositeproto >= 0.4" + COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' + COMPOSITE_INC='-I$(top_srcdir)/composite' fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support TCP socket connections" >&5 -$as_echo_n "checking if Xtrans should support TCP socket connections... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCPCONN" >&5 -$as_echo "$TCPCONN" >&6; } - if test "$TCPCONN" = "yes"; then + if test "x$MITSHM" = xyes; then + MITSHM_TRUE= + MITSHM_FALSE='#' +else + MITSHM_TRUE='#' + MITSHM_FALSE= +fi -$as_echo "#define TCPCONN 1" >>confdefs.h +if test "x$MITSHM" = xyes; then +cat >>confdefs.h <<\_ACEOF +#define MITSHM 1 +_ACEOF - # SVR4 hides these in libraries other than libc - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -$as_echo_n "checking for library containing socket... " >&6; } -if test "${ac_cv_search_socket+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* 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 socket (); -int -main () -{ -return socket (); - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define HAS_SHM 1 _ACEOF -for ac_lib in '' socket; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_socket=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_socket+set}" = set; then : - break + fi -done -if test "${ac_cv_search_socket+set}" = set; then : + if test "x$RECORD" = xyes; then + RECORD_TRUE= + RECORD_FALSE='#' else - ac_cv_search_socket=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + RECORD_TRUE='#' + RECORD_FALSE= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -$as_echo "$ac_cv_search_socket" >&6; } -ac_res=$ac_cv_search_socket -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +if test "x$RECORD" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XRECORD 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES recordproto >= 1.13.99.1" + RECORD_LIB='$(top_builddir)/record/librecord.la' fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 -$as_echo_n "checking for library containing gethostbyname... " >&6; } -if test "${ac_cv_search_gethostbyname+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test "x$SCREENSAVER" = xyes; then + SCREENSAVER_TRUE= + SCREENSAVER_FALSE='#' else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + SCREENSAVER_TRUE='#' + SCREENSAVER_FALSE= +fi -/* 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 gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} +if test "x$SCREENSAVER" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define SCREENSAVER 1 _ACEOF -for ac_lib in '' nsl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_gethostbyname=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_gethostbyname+set}" = set; then : - break + + REQUIRED_MODULES="$REQUIRED_MODULES scrnsaverproto >= 1.1" fi -done -if test "${ac_cv_search_gethostbyname+set}" = set; then : + if test "x$RES" = xyes; then + RES_TRUE= + RES_FALSE='#' else - ac_cv_search_gethostbyname=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + RES_TRUE='#' + RES_FALSE= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 -$as_echo "$ac_cv_search_gethostbyname" >&6; } -ac_res=$ac_cv_search_gethostbyname -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +if test "x$RES" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define RES 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES resourceproto" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 -$as_echo_n "checking for main in -lws2_32... " >&6; } -if test "${ac_cv_lib_ws2_32_main+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lws2_32 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +if test "x$GLX" = xyes; then +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for XLIB" >&5 +$as_echo_n "checking for XLIB... " >&6; } -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ws2_32_main=yes +if test -n "$XLIB_CFLAGS"; then + pkg_cv_XLIB_CFLAGS="$XLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XLIB_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XLIB_LIBS"; then + pkg_cv_XLIB_LIBS="$XLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XLIB_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` else - ac_cv_lib_ws2_32_main=no + pkg_failed=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + else + pkg_failed=untried fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 -$as_echo "$ac_cv_lib_ws2_32_main" >&6; } -if test "x$ac_cv_lib_ws2_32_main" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBWS2_32 1 -_ACEOF - LIBS="-lws2_32 $LIBS" -fi -ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main +if test $pkg_failed = yes; then - # Needs to come after above checks for libsocket & libnsl for SVR4 systems - # Check whether --enable-ipv6 was given. -if test "${enable_ipv6+set}" = set; then : - enableval=$enable_ipv6; IPV6CONN=$enableval -else - ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" -if test "x$ac_cv_func_getaddrinfo" = x""yes; then : - IPV6CONN=yes +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - IPV6CONN=no -fi - + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1` + else + XLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XLIB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IPv6 support should be built" >&5 -$as_echo_n "checking if IPv6 support should be built... " >&6; } - if test "$IPV6CONN" = "yes"; then - -$as_echo "#define IPv6 1" >>confdefs.h + { { $as_echo "$as_me:$LINENO: error: Package requirements (x11) were not met: - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IPV6CONN" >&5 -$as_echo "$IPV6CONN" >&6; } +$XLIB_PKG_ERRORS - # 4.3BSD-Reno added a new member to struct sockaddr_in - ac_fn_c_check_member "$LINENO" "struct sockaddr_in" "sin_len" "ac_cv_member_struct_sockaddr_in_sin_len" " -#include -#include -#include +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -" -if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = x""yes; then : +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (x11) were not met: -$as_echo "#define BSD44SOCKETS 1" >>confdefs.h +$XLIB_PKG_ERRORS -fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; 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: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. - ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " -$ac_includes_default -#include -" -if test "x$ac_cv_type_socklen_t" = x""yes; then : +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -cat >>confdefs.h <<_ACEOF -#define HAVE_SOCKLEN_T 1 -_ACEOF +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + XLIB_CFLAGS=$pkg_cv_XLIB_CFLAGS + XLIB_LIBS=$pkg_cv_XLIB_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : fi +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GL" >&5 +$as_echo_n "checking for GL... " >&6; } - - fi - case $host_os in - solaris*|sco*|sysv4*) localdef="yes" ;; - *) localdef="no" ;; - esac - # Check whether --enable-local-transport was given. -if test "${enable_local_transport+set}" = set; then : - enableval=$enable_local_transport; LOCALCONN=$enableval +if test -n "$GL_CFLAGS"; then + pkg_cv_GL_CFLAGS="$GL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.9 gl >= 7.1.0" 2>/dev/null` else - LOCALCONN=$localdef + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$GL_LIBS"; then + pkg_cv_GL_LIBS="$GL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.9 gl >= 7.1.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support os-specific local connections" >&5 -$as_echo_n "checking if Xtrans should support os-specific local connections... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCALCONN" >&5 -$as_echo "$LOCALCONN" >&6; } - if test "$LOCALCONN" = "yes"; then - -$as_echo "#define LOCALCONN 1" >>confdefs.h - - fi -# Secure RPC detection macro from xtrans.m4 +if test $pkg_failed = yes; then - # Check whether --enable-secure-rpc was given. -if test "${enable_secure_rpc+set}" = set; then : - enableval=$enable_secure_rpc; SECURE_RPC=$enableval +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - SECURE_RPC="try" + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glproto >= 1.4.9 gl >= 7.1.0" 2>&1` + else + GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "glproto >= 1.4.9 gl >= 7.1.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (glproto >= 1.4.9 gl >= 7.1.0) were not met: - if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then - FOUND_SECURE_RPC="no" - for ac_func in authdes_seccreate authdes_create -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - FOUND_SECURE_RPC="yes" -fi -done +$GL_PKG_ERRORS - if test "x$FOUND_SECURE_RPC" = "xno" ; then - if test "x$SECURE_RPC" = "xyes" ; then - as_fn_error "Secure RPC requested, but required functions not found" "$LINENO" 5 - fi - SECURE_RPC="no" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsecretkey" >&5 -$as_echo_n "checking for library containing getsecretkey... " >&6; } -if test "${ac_cv_search_getsecretkey+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -/* 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 getsecretkey (); -int -main () -{ -return getsecretkey (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rpcsvc; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_getsecretkey=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_getsecretkey+set}" = set; then : - break -fi -done -if test "${ac_cv_search_getsecretkey+set}" = set; then : +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (glproto >= 1.4.9 gl >= 7.1.0) were not met: -else - ac_cv_search_getsecretkey=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsecretkey" >&5 -$as_echo "$ac_cv_search_getsecretkey" >&6; } -ac_res=$ac_cv_search_getsecretkey -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +$GL_PKG_ERRORS -fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - SECURE_RPC="yes" - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Secure RPC authentication (\"SUN-DES-1\") should be supported" >&5 -$as_echo_n "checking if Secure RPC authentication (\"SUN-DES-1\") should be supported... " >&6; } - if test "x$SECURE_RPC" = "xyes" ; then +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; 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: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -$as_echo "#define SECURE_RPC 1" >>confdefs.h +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SECURE_RPC" >&5 -$as_echo "$SECURE_RPC" >&6; } +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - if test "x$SECURE_RPC" = xyes; then - SECURE_RPC_TRUE= - SECURE_RPC_FALSE='#' +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else - SECURE_RPC_TRUE='#' - SECURE_RPC_FALSE= + GL_CFLAGS=$pkg_cv_GL_CFLAGS + GL_LIBS=$pkg_cv_GL_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : fi - if test "x$INT10" = xvm86; then - INT10_VM86_TRUE= - INT10_VM86_FALSE='#' -else - INT10_VM86_TRUE='#' - INT10_VM86_FALSE= -fi +cat >>confdefs.h <<\_ACEOF +#define GLXEXT 1 +_ACEOF - if test "x$INT10" = xx86emu; then - INT10_X86EMU_TRUE= - INT10_X86EMU_FALSE='#' + GLX_LIBS='$(top_builddir)/glx/libglx.la' + GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS" else - INT10_X86EMU_TRUE='#' - INT10_X86EMU_FALSE= + GLX=no fi - - if test "x$INT10" = xstub; then - INT10_STUB_TRUE= - INT10_STUB_FALSE='#' + if test "x$GLX" = xyes; then + GLX_TRUE= + GLX_FALSE='#' else - INT10_STUB_TRUE='#' - INT10_STUB_FALSE= + GLX_TRUE='#' + GLX_FALSE= fi -if test "x$INT10" = xyes; then - for ac_header in sys/vm86.h sys/io.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + +if test "x$AIGLX" = xyes -a "x$GLX" = xyes -a "x$DRI" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define AIGLX 1 _ACEOF +else + AIGLX=no +fi + if test "x$AIGLX" = xyes; then + AIGLX_TRUE= + AIGLX_FALSE='#' +else + AIGLX_TRUE='#' + AIGLX_FALSE= fi -done +if test "x$GLX_USE_TLS" = xyes -a "x$AIGLX" = xyes; then + GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS" + GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread" fi - if test "x$BUILDDOCS" = xyes; then - BUILDDOCS_TRUE= - BUILDDOCS_FALSE='#' + + if test "x$DRI" = xyes; then + DRI_TRUE= + DRI_FALSE='#' else - BUILDDOCS_TRUE='#' - BUILDDOCS_FALSE= + DRI_TRUE='#' + DRI_FALSE= fi +if test "x$DRI" = xyes; then +cat >>confdefs.h <<\_ACEOF +#define XF86DRI 1 +_ACEOF -if test x$XORG_SGML_PATH = x ; then - XORG_SGML_PATH=$prefix/share/sgml -fi -HAVE_DEFS_ENT= -if test x"$cross_compiling" = x"yes" ; then - HAVE_DEFS_ENT=no -else - as_ac_File=`$as_echo "ac_cv_file_$XORG_SGML_PATH/X11/defs.ent" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XORG_SGML_PATH/X11/defs.ent" >&5 -$as_echo_n "checking for $XORG_SGML_PATH/X11/defs.ent... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$XORG_SGML_PATH/X11/defs.ent"; then - eval "$as_ac_File=yes" +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for DRIPROTO" >&5 +$as_echo_n "checking for DRIPROTO... " >&6; } + +if test -n "$DRIPROTO_CFLAGS"; then + pkg_cv_DRIPROTO_CFLAGS="$DRIPROTO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86driproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRIPROTO_CFLAGS=`$PKG_CONFIG --cflags "xf86driproto" 2>/dev/null` else - eval "$as_ac_File=no" + pkg_failed=yes fi + else + pkg_failed=untried fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - if test "x$as_val" = x""yes; then : - HAVE_DEFS_ENT=yes +if test -n "$DRIPROTO_LIBS"; then + pkg_cv_DRIPROTO_LIBS="$DRIPROTO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86driproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRIPROTO_LIBS=`$PKG_CONFIG --libs "xf86driproto" 2>/dev/null` +else + pkg_failed=yes fi - + else + pkg_failed=untried fi -# Extract the first word of "linuxdoc", so it can be a program name with args. -set dummy linuxdoc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LINUXDOC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $LINUXDOC in - [\\/]* | ?:[\\/]*) - ac_cv_path_LINUXDOC="$LINUXDOC" # Let the user override the test with a path. - ;; - *) - 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_path_LINUXDOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac -fi -LINUXDOC=$ac_cv_path_LINUXDOC -if test -n "$LINUXDOC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUXDOC" >&5 -$as_echo "$LINUXDOC" >&6; } + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86driproto" 2>&1` + else + DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86driproto" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRIPROTO_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (xf86driproto) were not met: -# Extract the first word of "ps2pdf", so it can be a program name with args. -set dummy ps2pdf; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PS2PDF+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PS2PDF in - [\\/]* | ?:[\\/]*) - ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path. - ;; - *) - 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_path_PS2PDF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +$DRIPROTO_PKG_ERRORS - ;; -esac -fi -PS2PDF=$ac_cv_path_PS2PDF -if test -n "$PS2PDF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PS2PDF" >&5 -$as_echo "$PS2PDF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DRIPROTO_CFLAGS +and DRIPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (xf86driproto) were not met: +$DRIPROTO_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to build documentation" >&5 -$as_echo_n "checking Whether to build documentation... " >&6; } +Alternatively, you may set the environment variables DRIPROTO_CFLAGS +and DRIPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; 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: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then - BUILDDOC=yes +Alternatively, you may set the environment variables DRIPROTO_CFLAGS +and DRIPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DRIPROTO_CFLAGS +and DRIPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else - BUILDDOC=no + DRIPROTO_CFLAGS=$pkg_cv_DRIPROTO_CFLAGS + DRIPROTO_LIBS=$pkg_cv_DRIPROTO_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : fi - if test x$BUILDDOC = xyes; then - BUILD_LINUXDOC_TRUE= - BUILD_LINUXDOC_FALSE='#' +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for DRI" >&5 +$as_echo_n "checking for DRI... " >&6; } + +if test -n "$DRI_CFLAGS"; then + pkg_cv_DRI_CFLAGS="$DRI_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1 dri >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1 dri >= 7.1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRI_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.1 dri >= 7.1.0" 2>/dev/null` else - BUILD_LINUXDOC_TRUE='#' - BUILD_LINUXDOC_FALSE= + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DRI_LIBS"; then + pkg_cv_DRI_LIBS="$DRI_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1 dri >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1 dri >= 7.1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRI_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.1 dri >= 7.1.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILDDOC" >&5 -$as_echo "$BUILDDOC" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to build pdf documentation" >&5 -$as_echo_n "checking Whether to build pdf documentation... " >&6; } +if test $pkg_failed = yes; then -if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then - BUILDPDFDOC=yes +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - BUILDPDFDOC=no + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + DRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glproto >= 1.4.1 dri >= 7.1.0" 2>&1` + else + DRI_PKG_ERRORS=`$PKG_CONFIG --print-errors "glproto >= 1.4.1 dri >= 7.1.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRI_PKG_ERRORS" >&5 - if test x$BUILDPDFDOC = xyes; then - BUILD_PDFDOC_TRUE= - BUILD_PDFDOC_FALSE='#' -else - BUILD_PDFDOC_TRUE='#' - BUILD_PDFDOC_FALSE= -fi + { { $as_echo "$as_me:$LINENO: error: Package requirements (glproto >= 1.4.1 dri >= 7.1.0) were not met: +$DRI_PKG_ERRORS -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILDPDFDOC" >&5 -$as_echo "$BUILDPDFDOC" >&6; } +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" -MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" -MAKE_PDF="$PS2PDF" -MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" +Alternatively, you may set the environment variables DRI_CFLAGS +and DRI_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (glproto >= 1.4.1 dri >= 7.1.0) were not met: +$DRI_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables DRI_CFLAGS +and DRI_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; 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: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables DRI_CFLAGS +and DRI_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables DRI_CFLAGS +and DRI_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - if test "x$INSTALL_LIBXF86CONFIG" = xyes; then - INSTALL_LIBXF86CONFIG_TRUE= - INSTALL_LIBXF86CONFIG_FALSE='#' +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else - INSTALL_LIBXF86CONFIG_TRUE='#' - INSTALL_LIBXF86CONFIG_FALSE= + DRI_CFLAGS=$pkg_cv_DRI_CFLAGS + DRI_LIBS=$pkg_cv_DRI_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : fi +fi -case $host_os in - darwin*) - DRI2=no - if test x$XQUARTZ = xauto; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xquartz" >&5 -$as_echo_n "checking whether to build Xquartz... " >&6; } -if test "${xorg_cv_Carbon_framework+set}" = set; then : - $as_echo_n "(cached) " >&6 +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for DRI2PROTO" >&5 +$as_echo_n "checking for DRI2PROTO... " >&6; } + +if test -n "$DRI2PROTO_CFLAGS"; then + pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 2.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "dri2proto >= 2.1") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRI2PROTO_CFLAGS=`$PKG_CONFIG --cflags "dri2proto >= 2.1" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DRI2PROTO_LIBS"; then + pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 2.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "dri2proto >= 2.1") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRI2PROTO_LIBS=`$PKG_CONFIG --libs "dri2proto >= 2.1" 2>/dev/null` else + pkg_failed=yes +fi + else + pkg_failed=untried +fi - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -framework Carbon" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -char FSFindFolder(); int main() { FSFindFolder(); return 0;} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - xorg_cv_Carbon_framework=yes + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - xorg_cv_Carbon_framework=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS + _pkg_short_errors_supported=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_Carbon_framework" >&5 -$as_echo "$xorg_cv_Carbon_framework" >&6; } + if test $_pkg_short_errors_supported = yes; then + DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dri2proto >= 2.1" 2>&1` + else + DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "dri2proto >= 2.1" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRI2PROTO_PKG_ERRORS" >&5 - if test "X$xorg_cv_Carbon_framework" = Xyes; then - XQUARTZ=yes - else - XQUARTZ=no - fi - fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + HAVE_DRI2PROTO=no +elif test $pkg_failed = untried; then + HAVE_DRI2PROTO=no +else + DRI2PROTO_CFLAGS=$pkg_cv_DRI2PROTO_CFLAGS + DRI2PROTO_LIBS=$pkg_cv_DRI2PROTO_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_DRI2PROTO=yes +fi +case "$DRI2,$HAVE_DRI2PROTO" in + yes,no) + { { $as_echo "$as_me:$LINENO: error: DRI2 requested, but dri2proto not found." >&5 +$as_echo "$as_me: error: DRI2 requested, but dri2proto not found." >&2;} + { (exit 1); exit 1; }; } + ;; + yes,yes | auto,yes) - if test "x$XQUARTZ" = xyes ; then - XQUARTZ=yes - XVFB=no - XNEST=no +cat >>confdefs.h <<\_ACEOF +#define DRI2 1 +_ACEOF - COMPOSITE=no - DGA=no - DPMSExtension=no - XF86VIDMODE=no - fi + DRI2=yes ;; esac + if test "x$DRI2" = xyes; then + DRI2_TRUE= + DRI2_FALSE='#' +else + DRI2_TRUE='#' + DRI2_FALSE= +fi -XEXT_INC='-I$(top_srcdir)/Xext' -XEXT_LIB='$(top_builddir)/Xext/libXext.la' -XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' - -REQUIRED_MODULES="randrproto >= 1.2.99.1 renderproto >= 0.9.3 fixesproto >= 4.0 damageproto >= 1.1 xcmiscproto xextproto >= 7.0.3 xproto >= 7.0.13 xtrans >= 1.2.2 bigreqsproto resourceproto fontsproto inputproto >= 1.5 kbproto >= 1.0.3" -REQUIRED_LIBS="xfont xau fontenc pixman-1 >= 0.13.2" +if test "x$DRI" = xyes || test "x$DRI2" = xyes; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5 -$as_echo_n "checking for DBUS... " >&6; } +{ $as_echo "$as_me:$LINENO: checking for LIBDRM" >&5 +$as_echo_n "checking for LIBDRM... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DBUS_CFLAGS"; then - pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 +if test -n "$LIBDRM_CFLAGS"; then + pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.3.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm >= 2.3.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.3.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DBUS_LIBS"; then - pkg_cv_DBUS_LIBS="$DBUS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 +if test -n "$LIBDRM_LIBS"; then + pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.3.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm >= 2.3.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.3.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -15780,208 +22737,592 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-1"` + LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm >= 2.3.0" 2>&1` else - DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1"` + LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm >= 2.3.0" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$DBUS_PKG_ERRORS" >&5 + echo "$LIBDRM_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_DBUS=no + { { $as_echo "$as_me:$LINENO: error: Package requirements (libdrm >= 2.3.0) were not met: + +$LIBDRM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libdrm >= 2.3.0) were not met: + +$LIBDRM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - HAVE_DBUS=no + { { $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: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else - DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS - DBUS_LIBS=$pkg_cv_DBUS_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS + LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_DBUS=yes + : fi -if test "x$HAVE_DBUS" = xyes; then -$as_echo "#define HAVE_DBUS 1" >>confdefs.h fi - if test "x$HAVE_DBUS" = xyes; then - HAVE_DBUS_TRUE= - HAVE_DBUS_FALSE='#' + +if test "x$DRI2" = xyes; then + save_CFLAGS=$CFLAGS + CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#ifndef __DRI_DRI2 +#error DRI2 extension not available. +#endif +_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 + HAVE_DRI2EXTENSION=yes else - HAVE_DBUS_TRUE='#' - HAVE_DBUS_FALSE= + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + HAVE_DRI2EXTENSION=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$save_CFLAGS + if test "x$HAVE_DRI2EXTENSION" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define DRI2_AIGLX 1 +_ACEOF -if test "x$CONFIG_DBUS_API" = xauto; then - CONFIG_DBUS_API="$HAVE_DBUS" + DRI2_AIGLX=yes + else + { $as_echo "$as_me:$LINENO: DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h." >&5 +$as_echo "$as_me: DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h." >&6;} + DRI2_AIGLX=no + fi fi -if test "x$CONFIG_DBUS_API" = xyes; then - if ! test "x$HAVE_DBUS" = xyes; then - as_fn_error "D-Bus configuration API requested, but D-Bus is not installed." "$LINENO" 5 + if test "x$DRI2_AIGLX" = xyes; then + DRI2_AIGLX_TRUE= + DRI2_AIGLX_FALSE='#' +else + DRI2_AIGLX_TRUE='#' + DRI2_AIGLX_FALSE= +fi + + + + if test "x$XINERAMA" = xyes; then + XINERAMA_TRUE= + XINERAMA_FALSE='#' +else + XINERAMA_TRUE='#' + XINERAMA_FALSE= +fi + +if test "x$XINERAMA" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XINERAMA 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define PANORAMIX 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto" +fi + + if test "x$XACE" = xyes; then + XACE_TRUE= + XACE_FALSE='#' +else + XACE_TRUE='#' + XACE_FALSE= +fi + +if test "x$XACE" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XACE 1 +_ACEOF + +fi + + if test "x$XSELINUX" = xyes; then + XSELINUX_TRUE= + XSELINUX_FALSE='#' +else + XSELINUX_TRUE='#' + XSELINUX_FALSE= +fi + +if test "x$XSELINUX" = xyes; then + if test "x$XACE" != xyes; then + { { $as_echo "$as_me:$LINENO: error: cannot build SELinux extension without X-ACE" >&5 +$as_echo "$as_me: error: cannot build SELinux extension without X-ACE" >&2;} + { (exit 1); exit 1; }; } fi -$as_echo "#define CONFIG_DBUS_API 1" >>confdefs.h +for ac_header in selinux/selinux.h selinux/avc.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - CONFIG_NEED_DBUS="yes" + ac_header_compiler=no fi - if test "x$CONFIG_DBUS_API" = xyes; then - CONFIG_DBUS_API_TRUE= - CONFIG_DBUS_API_FALSE='#' + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - CONFIG_DBUS_API_TRUE='#' - CONFIG_DBUS_API_FALSE= -fi - + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no +fi -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HAL" >&5 -$as_echo_n "checking for HAL... " >&6; } +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$HAL_CFLAGS"; then - pkg_cv_HAL_CFLAGS="$HAL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5 - ($PKG_CONFIG --exists --print-errors "hal") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_HAL_CFLAGS=`$PKG_CONFIG --cflags "hal" 2>/dev/null` -else - pkg_failed=yes -fi - fi +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + eval "$as_ac_Header=\$ac_header_preproc" fi -if test -n "$PKG_CONFIG"; then - if test -n "$HAL_LIBS"; then - pkg_cv_HAL_LIBS="$HAL_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5 - ($PKG_CONFIG --exists --print-errors "hal") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_HAL_LIBS=`$PKG_CONFIG --libs "hal" 2>/dev/null` -else - pkg_failed=yes +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + fi - fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + else - pkg_failed=untried + { { $as_echo "$as_me:$LINENO: error: SELinux include files not found" >&5 +$as_echo "$as_me: error: SELinux include files not found" >&2;} + { (exit 1); exit 1; }; } fi +done -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +{ $as_echo "$as_me:$LINENO: checking for avc_init in -lselinux" >&5 +$as_echo_n "checking for avc_init in -lselinux... " >&6; } +if test "${ac_cv_lib_selinux_avc_init+set}" = set; then + $as_echo_n "(cached) " >&6 else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "hal"` - else - HAL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hal"` - fi - # Put the nasty error message in config.log where it belongs - echo "$HAL_PKG_ERRORS" >&5 + ac_check_lib_save_LIBS=$LIBS +LIBS="-lselinux $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_HAL=no -elif test $pkg_failed = untried; then - HAVE_HAL=no +/* 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 avc_init (); +int +main () +{ +return avc_init (); + ; + 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_lib_selinux_avc_init=yes else - HAL_CFLAGS=$pkg_cv_HAL_CFLAGS - HAL_LIBS=$pkg_cv_HAL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_HAL=yes -fi -if test "x$CONFIG_HAL" = xauto; then - CONFIG_HAL="$HAVE_HAL" + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_selinux_avc_init=no fi -if test "x$CONFIG_HAL" = xyes; then - if ! test "x$HAVE_HAL" = xyes; then - as_fn_error "HAL hotplug API requested, but HAL is not installed." "$LINENO" 5 - fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_avc_init" >&5 +$as_echo "$ac_cv_lib_selinux_avc_init" >&6; } +if test "x$ac_cv_lib_selinux_avc_init" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSELINUX 1 +_ACEOF -$as_echo "#define CONFIG_HAL 1" >>confdefs.h + LIBS="-lselinux $LIBS" - REQUIRED_LIBS="$REQUIRED_LIBS hal" - CONFIG_NEED_DBUS="yes" -fi - if test "x$CONFIG_HAL" = xyes; then - CONFIG_HAL_TRUE= - CONFIG_HAL_FALSE='#' else - CONFIG_HAL_TRUE='#' - CONFIG_HAL_FALSE= + { { $as_echo "$as_me:$LINENO: error: SELinux library not found" >&5 +$as_echo "$as_me: error: SELinux library not found" >&2;} + { (exit 1); exit 1; }; } fi -if test "x$CONFIG_NEED_DBUS" = xyes; then - REQUIRED_LIBS="$REQUIRED_LIBS dbus-1" - -$as_echo "#define CONFIG_NEED_DBUS 1" >>confdefs.h - +for ac_header in libaudit.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 fi - if test "x$CONFIG_NEED_DBUS" = xyes; then - CONFIG_NEED_DBUS_TRUE= - CONFIG_NEED_DBUS_FALSE='#' +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - CONFIG_NEED_DBUS_TRUE='#' - CONFIG_NEED_DBUS_FALSE= + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -CONFIG_LIB='$(top_builddir)/config/libconfig.a' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc..." >&5 -$as_echo_n "checking for glibc...... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#include -#ifndef __GLIBC__ -#error -#endif - +#include <$ac_header> _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - glibc=yes +if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - glibc=no + $as_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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibc" >&5 -$as_echo "$glibc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -for ac_func in clock_gettime -do : - ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = x""yes; then : +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_CLOCK_GETTIME 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - have_clock_gettime=yes + else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -$as_echo_n "checking for clock_gettime in -lrt... " >&6; } -if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then : + { { $as_echo "$as_me:$LINENO: error: SELinux extension requires audit system headers" >&5 +$as_echo "$as_me: error: SELinux extension requires audit system headers" >&2;} + { (exit 1); exit 1; }; } +fi + +done + + +{ $as_echo "$as_me:$LINENO: checking for audit_open in -laudit" >&5 +$as_echo_n "checking for audit_open in -laudit... " >&6; } +if test "${ac_cv_lib_audit_audit_open+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +LIBS="-laudit $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -15990,684 +23331,762 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char clock_gettime (); +char audit_open (); int main () { -return clock_gettime (); +return audit_open (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rt_clock_gettime=yes -else - ac_cv_lib_rt_clock_gettime=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then : - have_clock_gettime=-lrt +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_lib_audit_audit_open=yes else - have_clock_gettime=no -fi - -fi -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a useful monotonic clock ..." >&5 -$as_echo_n "checking for a useful monotonic clock ...... " >&6; } - -if ! test "x$have_clock_gettime" = xno; then - if ! test "x$have_clock_gettime" = xyes; then - CLOCK_LIBS="$have_clock_gettime" - else - CLOCK_LIBS="" - fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - LIBS_SAVE="$LIBS" - LIBS="$CLOCK_LIBS" - CPPFLAGS_SAVE="$CPPFLAGS" + ac_cv_lib_audit_audit_open=no +fi - if test x"$glibc" = xyes; then - CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" - fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_audit_audit_open" >&5 +$as_echo "$ac_cv_lib_audit_audit_open" >&6; } +if test "x$ac_cv_lib_audit_audit_open" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBAUDIT 1 +_ACEOF + + LIBS="-laudit $LIBS" - if test "$cross_compiling" = yes; then : - MONOTONIC_CLOCK="cross compiling" else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + { { $as_echo "$as_me:$LINENO: error: SELinux extension requires audit system library" >&5 +$as_echo "$as_me: error: SELinux extension requires audit system library" >&2;} + { (exit 1); exit 1; }; } +fi -#include + { $as_echo "$as_me:$LINENO: checking whether avc_netlink_acquire_fd is declared" >&5 +$as_echo_n "checking whether avc_netlink_acquire_fd is declared... " >&6; } +if test "${ac_cv_have_decl_avc_netlink_acquire_fd+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. */ +#include -int main(int argc, char *argv[]) { - struct timespec tp; +int +main () +{ +#ifndef avc_netlink_acquire_fd + (void) avc_netlink_acquire_fd; +#endif - if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) - return 0; - else - return 1; + ; + return 0; } - _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - MONOTONIC_CLOCK=yes +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_have_decl_avc_netlink_acquire_fd=yes else - MONOTONIC_CLOCK=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_avc_netlink_acquire_fd=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_avc_netlink_acquire_fd" >&5 +$as_echo "$ac_cv_have_decl_avc_netlink_acquire_fd" >&6; } +if test "x$ac_cv_have_decl_avc_netlink_acquire_fd" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_AVC_NETLINK_ACQUIRE_FD 1 +_ACEOF - LIBS="$LIBS_SAVE" - CPPFLAGS="$CPPFLAGS_SAVE" -else - MONOTONIC_CLOCK=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MONOTONIC_CLOCK" >&5 -$as_echo "$MONOTONIC_CLOCK" >&6; } - -if test "x$MONOTONIC_CLOCK" = xyes; then -$as_echo "#define MONOTONIC_CLOCK 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XSELINUX 1 +_ACEOF - LIBS="$LIBS $CLOCK_LIBS" + SELINUX_LIB="-lselinux -laudit" fi - if test "x$XV" = xyes; then - XV_TRUE= - XV_FALSE='#' + if test "x$XCSECURITY" = xyes; then + XCSECURITY_TRUE= + XCSECURITY_FALSE='#' else - XV_TRUE='#' - XV_FALSE= + XCSECURITY_TRUE='#' + XCSECURITY_FALSE= fi -if test "x$XV" = xyes; then - -$as_echo "#define XV 1" >>confdefs.h - +if test "x$XCSECURITY" = xyes; then + if test "x$XACE" != xyes; then + { { $as_echo "$as_me:$LINENO: error: cannot build Security extension without X-ACE" >&5 +$as_echo "$as_me: error: cannot build Security extension without X-ACE" >&2;} + { (exit 1); exit 1; }; } + fi -$as_echo "#define XvExtension 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XCSECURITY 1 +_ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES videoproto" -else - XVMC=no fi - if test "x$XVMC" = xyes; then - XVMC_TRUE= - XVMC_FALSE='#' + if test "x$MULTIBUFFER" = xyes; then + MULTIBUFFER_TRUE= + MULTIBUFFER_FALSE='#' else - XVMC_TRUE='#' - XVMC_FALSE= + MULTIBUFFER_TRUE='#' + MULTIBUFFER_FALSE= fi -if test "x$XVMC" = xyes; then +if test "x$MULTIBUFFER" = xyes; then -$as_echo "#define XvMCExtension 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define MULTIBUFFER 1 +_ACEOF + # Requires xextproto which is always required fi - if test "x$XREGISTRY" = xyes; then - XREGISTRY_TRUE= - XREGISTRY_FALSE='#' + if test "x$DBE" = xyes; then + DBE_TRUE= + DBE_FALSE='#' else - XREGISTRY_TRUE='#' - XREGISTRY_FALSE= + DBE_TRUE='#' + DBE_FALSE= fi -if test "x$XREGISTRY" = xyes; then +if test "x$DBE" = xyes; then -$as_echo "#define XREGISTRY 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define DBE 1 +_ACEOF + DBE_LIB='$(top_builddir)/dbe/libdbe.la' fi - if test "x$COMPOSITE" = xyes; then - COMPOSITE_TRUE= - COMPOSITE_FALSE='#' + if test "x$XF86BIGFONT" = xyes; then + XF86BIGFONT_TRUE= + XF86BIGFONT_FALSE='#' else - COMPOSITE_TRUE='#' - COMPOSITE_FALSE= + XF86BIGFONT_TRUE='#' + XF86BIGFONT_FALSE= fi -if test "x$COMPOSITE" = xyes; then +if test "x$XF86BIGFONT" = xyes; then -$as_echo "#define COMPOSITE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XF86BIGFONT 1 +_ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES compositeproto >= 0.4" - COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' - COMPOSITE_INC='-I$(top_srcdir)/composite' + REQUIRED_MODULES="$REQUIRED_MODULES xf86bigfontproto >= 1.2.0" fi - if test "x$MITSHM" = xyes; then - MITSHM_TRUE= - MITSHM_FALSE='#' + if test "x$DPMSExtension" = xyes; then + DPMSExtension_TRUE= + DPMSExtension_FALSE='#' else - MITSHM_TRUE='#' - MITSHM_FALSE= + DPMSExtension_TRUE='#' + DPMSExtension_FALSE= fi -if test "x$MITSHM" = xyes; then +if test "x$DPMSExtension" = xyes; then -$as_echo "#define MITSHM 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define DPMSExtension 1 +_ACEOF +fi -$as_echo "#define HAS_SHM 1" >>confdefs.h +if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then -fi +cat >>confdefs.h <<\_ACEOF +#define XCALIBRATE 1 +_ACEOF - if test "x$RECORD" = xyes; then - RECORD_TRUE= - RECORD_FALSE='#' + REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" else - RECORD_TRUE='#' - RECORD_FALSE= + XCALIBRATE=no +fi + if test "x$XCALIBRATE" = xyes; then + XCALIBRATE_TRUE= + XCALIBRATE_FALSE='#' +else + XCALIBRATE_TRUE='#' + XCALIBRATE_FALSE= fi -if test "x$RECORD" = xyes; then -$as_echo "#define XRECORD 1" >>confdefs.h - REQUIRED_MODULES="$REQUIRED_MODULES recordproto" - RECORD_LIB='$(top_builddir)/record/librecord.la' -fi +cat >>confdefs.h <<\_ACEOF +#define RENDER 1 +_ACEOF - if test "x$SCREENSAVER" = xyes; then - SCREENSAVER_TRUE= - SCREENSAVER_FALSE='#' -else - SCREENSAVER_TRUE='#' - SCREENSAVER_FALSE= -fi +RENDER_LIB='$(top_builddir)/render/librender.la' +RENDER_INC='-I$(top_srcdir)/render' -if test "x$SCREENSAVER" = xyes; then -$as_echo "#define SCREENSAVER 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define RANDR 1 +_ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES scrnsaverproto >= 1.1" -fi +RANDR_LIB='$(top_builddir)/randr/librandr.la' +RANDR_INC='-I$(top_srcdir)/randr' - if test "x$RES" = xyes; then - RES_TRUE= - RES_FALSE='#' -else - RES_TRUE='#' - RES_FALSE= -fi -if test "x$RES" = xyes; then +cat >>confdefs.h <<\_ACEOF +#define XFIXES 1 +_ACEOF -$as_echo "#define RES 1" >>confdefs.h +FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la' +FIXES_INC='-I$(top_srcdir)/xfixes' - REQUIRED_MODULES="$REQUIRED_MODULES resourceproto" -fi -if test "x$GLX" = xyes; then +cat >>confdefs.h <<\_ACEOF +#define DAMAGE 1 +_ACEOF -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIB" >&5 -$as_echo_n "checking for XLIB... " >&6; } +DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la' +DAMAGE_INC='-I$(top_srcdir)/damageext' +MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' +MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' -if test -n "$PKG_CONFIG"; then - if test -n "$XLIB_CFLAGS"; then - pkg_cv_XLIB_CFLAGS="$XLIB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XLIB_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` +# XINPUT extension is integral part of the server +XI_LIB='$(top_builddir)/Xi/libXi.la' +XI_INC='-I$(top_srcdir)/Xi' + + if test "x$XF86UTILS" = xyes; then + XF86UTILS_TRUE= + XF86UTILS_FALSE='#' else - pkg_failed=yes + XF86UTILS_TRUE='#' + XF86UTILS_FALSE= fi - fi + + if test "x$XAA" = xyes; then + XAA_TRUE= + XAA_FALSE='#' else - pkg_failed=untried + XAA_TRUE='#' + XAA_FALSE= fi -if test -n "$PKG_CONFIG"; then - if test -n "$XLIB_LIBS"; then - pkg_cv_XLIB_LIBS="$XLIB_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XLIB_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` + + if test "x$VGAHW" = xyes; then + VGAHW_TRUE= + VGAHW_FALSE='#' else - pkg_failed=yes + VGAHW_TRUE='#' + VGAHW_FALSE= fi - fi + + if test "x$VBE" = xyes; then + VBE_TRUE= + VBE_FALSE='#' +else + VBE_TRUE='#' + VBE_FALSE= +fi + + if test "x$INT10MODULE" = xyes; then + INT10MODULE_TRUE= + INT10MODULE_FALSE='#' else - pkg_failed=untried + INT10MODULE_TRUE='#' + INT10MODULE_FALSE= fi -if test $pkg_failed = yes; then +cat >>confdefs.h <<\_ACEOF +#define SHAPE 1 +_ACEOF + + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XKBPATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + XKB_BASE_DIRECTORY="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XKB_BASE_DIRECTORY "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$bindir\"" + eval ac_define_dir="\"$ac_define_dir\"" + XKB_BIN_DIRECTORY="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XKB_BIN_DIRECTORY "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no + +XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` +if [ x$XKBOUTPUT_FIRSTCHAR != x/ ] ; then + XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" fi - if test $_pkg_short_errors_supported = yes; then - XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` - else - XLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` - fi - # Put the nasty error message in config.log where it belongs - echo "$XLIB_PKG_ERRORS" >&5 - as_fn_error "Package requirements (x11) were not met: -$XLIB_PKG_ERRORS +XKBOUTPUT=`echo $XKBOUTPUT/ | sed 's|/*$|/|'` +XKB_COMPILED_DIR=`echo $XKBOUTPUT | sed 's|/*$||'` -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XKBOUTPUT\"" + eval ac_define_dir="\"$ac_define_dir\"" + XKM_OUTPUT_DIR="$ac_define_dir" -Alternatively, you may set the environment variables XLIB_CFLAGS -and XLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. -Alternatively, you may set the environment variables XLIB_CFLAGS -and XLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +cat >>confdefs.h <<_ACEOF +#define XKM_OUTPUT_DIR "$ac_define_dir" +_ACEOF -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } -else - XLIB_CFLAGS=$pkg_cv_XLIB_CFLAGS - XLIB_LIBS=$pkg_cv_XLIB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 -$as_echo_n "checking for GL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$GL_CFLAGS"; then - pkg_cv_GL_CFLAGS="$GL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.9 gl >= 7.1.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$GL_LIBS"; then - pkg_cv_GL_LIBS="$GL_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.9 gl >= 7.1.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi +if test "x$XKB_DFLT_RULES" = x; then + case $host_os in + linux*) + if test "x$CONFIG_HAL" = xyes; then + XKB_DFLT_RULES="evdev" + else + XKB_DFLT_RULES="base" + fi + ;; + *) + XKB_DFLT_RULES="base" + ;; + esac +fi +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_RULES "$XKB_DFLT_RULES" +_ACEOF -if test $pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glproto >= 1.4.9 gl >= 7.1.0"` - else - GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glproto >= 1.4.9 gl >= 7.1.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$GL_PKG_ERRORS" >&5 +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_MODEL "$XKB_DFLT_MODEL" +_ACEOF - as_fn_error "Package requirements (glproto >= 1.4.9 gl >= 7.1.0) were not met: -$GL_PKG_ERRORS +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_LAYOUT "$XKB_DFLT_LAYOUT" +_ACEOF -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables GL_CFLAGS -and GL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_VARIANT "$XKB_DFLT_VARIANT" +_ACEOF -Alternatively, you may set the environment variables GL_CFLAGS -and GL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } -else - GL_CFLAGS=$pkg_cv_GL_CFLAGS - GL_LIBS=$pkg_cv_GL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_OPTIONS "$XKB_DFLT_OPTIONS" +_ACEOF -$as_echo "#define GLXEXT 1" >>confdefs.h +XKB_LIB='$(top_builddir)/xkb/libxkb.la' +XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' +REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" - GLX_LIBS='$(top_builddir)/glx/libglx.la' - GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS" -else - GLX=no -fi - if test "x$GLX" = xyes; then - GLX_TRUE= - GLX_FALSE='#' +{ $as_echo "$as_me:$LINENO: checking for strcasecmp" >&5 +$as_echo_n "checking for strcasecmp... " >&6; } +if test "${ac_cv_func_strcasecmp+set}" = set; then + $as_echo_n "(cached) " >&6 else - GLX_TRUE='#' - GLX_FALSE= -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strcasecmp to an innocuous variant, in case declares strcasecmp. + For example, HP-UX 11i declares gettimeofday. */ +#define strcasecmp innocuous_strcasecmp +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strcasecmp (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif -if test "x$AIGLX" = xyes -a "x$GLX" = xyes -a "x$DRI" = xyes; then +#undef strcasecmp -$as_echo "#define AIGLX 1" >>confdefs.h +/* 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 strcasecmp (); +/* 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_strcasecmp || defined __stub___strcasecmp +choke me +#endif +int +main () +{ +return strcasecmp (); + ; + 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_strcasecmp=yes else - AIGLX=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_strcasecmp=no fi - if test "x$AIGLX" = xyes; then - AIGLX_TRUE= - AIGLX_FALSE='#' -else - AIGLX_TRUE='#' - AIGLX_FALSE= + +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_strcasecmp" >&5 +$as_echo "$ac_cv_func_strcasecmp" >&6; } +if test "x$ac_cv_func_strcasecmp" = x""yes; then + : +else +cat >>confdefs.h <<\_ACEOF +#define NEED_STRCASECMP 1 +_ACEOF -if test "x$GLX_USE_TLS" = xyes -a "x$AIGLX" = xyes; then - GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS" - GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread" fi - - if test "x$DRI" = xyes; then - DRI_TRUE= - DRI_FALSE='#' +{ $as_echo "$as_me:$LINENO: checking for strncasecmp" >&5 +$as_echo_n "checking for strncasecmp... " >&6; } +if test "${ac_cv_func_strncasecmp+set}" = set; then + $as_echo_n "(cached) " >&6 else - DRI_TRUE='#' - DRI_FALSE= -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strncasecmp to an innocuous variant, in case declares strncasecmp. + For example, HP-UX 11i declares gettimeofday. */ +#define strncasecmp innocuous_strncasecmp -if test "x$DRI" = xyes; then +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strncasecmp (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -$as_echo "#define XF86DRI 1" >>confdefs.h +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strncasecmp -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRIPROTO" >&5 -$as_echo_n "checking for DRIPROTO... " >&6; } +/* 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 strncasecmp (); +/* 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_strncasecmp || defined __stub___strncasecmp +choke me +#endif -if test -n "$PKG_CONFIG"; then - if test -n "$DRIPROTO_CFLAGS"; then - pkg_cv_DRIPROTO_CFLAGS="$DRIPROTO_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86driproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DRIPROTO_CFLAGS=`$PKG_CONFIG --cflags "xf86driproto" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$DRIPROTO_LIBS"; then - pkg_cv_DRIPROTO_LIBS="$DRIPROTO_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86driproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 +int +main () +{ +return strncasecmp (); + ; + 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=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DRIPROTO_LIBS=`$PKG_CONFIG --libs "xf86driproto" 2>/dev/null` -else - pkg_failed=yes -fi - fi + 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_strncasecmp=yes else - pkg_failed=untried -fi - - + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $pkg_failed = yes; then + ac_cv_func_strncasecmp=no +fi -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - if test $_pkg_short_errors_supported = yes; then - DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86driproto"` - else - DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86driproto"` - fi - # Put the nasty error message in config.log where it belongs - echo "$DRIPROTO_PKG_ERRORS" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +$as_echo "$ac_cv_func_strncasecmp" >&6; } +if test "x$ac_cv_func_strncasecmp" = x""yes; then + : +else - as_fn_error "Package requirements (xf86driproto) were not met: +cat >>confdefs.h <<\_ACEOF +#define NEED_STRNCASECMP 1 +_ACEOF -$DRIPROTO_PKG_ERRORS +fi -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. +{ $as_echo "$as_me:$LINENO: checking for strcasestr" >&5 +$as_echo_n "checking for strcasestr... " >&6; } +if test "${ac_cv_func_strcasestr+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 strcasestr to an innocuous variant, in case declares strcasestr. + For example, HP-UX 11i declares gettimeofday. */ +#define strcasestr innocuous_strcasestr -Alternatively, you may set the environment variables DRIPROTO_CFLAGS -and DRIPROTO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strcasestr (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -Alternatively, you may set the environment variables DRIPROTO_CFLAGS -and DRIPROTO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +#ifdef __STDC__ +# include +#else +# include +#endif -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } -else - DRIPROTO_CFLAGS=$pkg_cv_DRIPROTO_CFLAGS - DRIPROTO_LIBS=$pkg_cv_DRIPROTO_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi +#undef strcasestr -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 -$as_echo_n "checking for GL... " >&6; } +/* 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 strcasestr (); +/* 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_strcasestr || defined __stub___strcasestr +choke me +#endif -if test -n "$PKG_CONFIG"; then - if test -n "$GL_CFLAGS"; then - pkg_cv_GL_CFLAGS="$GL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1 dri >= 7.1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1 dri >= 7.1.0") 2>&5 +int +main () +{ +return strcasestr (); + ; + 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=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.1 dri >= 7.1.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + 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_strcasestr=yes else - pkg_failed=untried + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_strcasestr=no fi -if test -n "$PKG_CONFIG"; then - if test -n "$GL_LIBS"; then - pkg_cv_GL_LIBS="$GL_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1 dri >= 7.1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1 dri >= 7.1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.1 dri >= 7.1.0" 2>/dev/null` -else - pkg_failed=yes + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strcasestr" >&5 +$as_echo "$ac_cv_func_strcasestr" >&6; } +if test "x$ac_cv_func_strcasestr" = x""yes; then + : else - pkg_failed=untried -fi - +cat >>confdefs.h <<\_ACEOF +#define NEED_STRCASESTR 1 +_ACEOF -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no fi - if test $_pkg_short_errors_supported = yes; then - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glproto >= 1.4.1 dri >= 7.1.0"` - else - GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glproto >= 1.4.1 dri >= 7.1.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$GL_PKG_ERRORS" >&5 - as_fn_error "Package requirements (glproto >= 1.4.1 dri >= 7.1.0) were not met: -$GL_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GL_CFLAGS -and GL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GL_CFLAGS -and GL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } -else - GL_CFLAGS=$pkg_cv_GL_CFLAGS - GL_LIBS=$pkg_cv_GL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi +if test "x$NULL_ROOT_CURSOR" = xyes; then +cat >>confdefs.h <<\_ACEOF +#define NULL_ROOT_CURSOR 1 +_ACEOF fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRI2PROTO" >&5 -$as_echo_n "checking for DRI2PROTO... " >&6; } +{ $as_echo "$as_me:$LINENO: checking for XDMCP" >&5 +$as_echo_n "checking for XDMCP... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DRI2PROTO_CFLAGS"; then - pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 2.1\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dri2proto >= 2.1") 2>&5 +if test -n "$XDMCP_CFLAGS"; then + pkg_cv_XDMCP_CFLAGS="$XDMCP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DRI2PROTO_CFLAGS=`$PKG_CONFIG --cflags "dri2proto >= 2.1" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XDMCP_CFLAGS=`$PKG_CONFIG --cflags "xdmcp" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DRI2PROTO_LIBS"; then - pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 2.1\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dri2proto >= 2.1") 2>&5 +if test -n "$XDMCP_LIBS"; then + pkg_cv_XDMCP_LIBS="$XDMCP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DRI2PROTO_LIBS=`$PKG_CONFIG --libs "dri2proto >= 2.1" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XDMCP_LIBS=`$PKG_CONFIG --libs "xdmcp" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -16680,623 +24099,680 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dri2proto >= 2.1"` + XDMCP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xdmcp" 2>&1` else - DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dri2proto >= 2.1"` + XDMCP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xdmcp" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$DRI2PROTO_PKG_ERRORS" >&5 + echo "$XDMCP_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - HAVE_DRI2PROTO=no + have_libxdmcp="no" elif test $pkg_failed = untried; then - HAVE_DRI2PROTO=no + have_libxdmcp="no" else - DRI2PROTO_CFLAGS=$pkg_cv_DRI2PROTO_CFLAGS - DRI2PROTO_LIBS=$pkg_cv_DRI2PROTO_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + XDMCP_CFLAGS=$pkg_cv_XDMCP_CFLAGS + XDMCP_LIBS=$pkg_cv_XDMCP_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_DRI2PROTO=yes + have_libxdmcp="yes" fi -case "$DRI2,$HAVE_DRI2PROTO" in - yes,no) - as_fn_error "DRI2 requested, but dri2proto not found." "$LINENO" 5 - ;; - yes,yes | auto,yes) - -$as_echo "#define DRI2 1" >>confdefs.h +if test "x$have_libxdmcp" = xyes; then + { $as_echo "$as_me:$LINENO: checking for XdmcpWrap in -lXdmcp" >&5 +$as_echo_n "checking for XdmcpWrap in -lXdmcp... " >&6; } +if test "${ac_cv_lib_Xdmcp_XdmcpWrap+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXdmcp $XDMCP_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - DRI2=yes - ;; +/* 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 XdmcpWrap (); +int +main () +{ +return XdmcpWrap (); + ; + 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 - if test "x$DRI2" = xyes; then - DRI2_TRUE= - DRI2_FALSE='#' +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_lib_Xdmcp_XdmcpWrap=yes else - DRI2_TRUE='#' - DRI2_FALSE= + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xdmcp_XdmcpWrap=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xdmcp_XdmcpWrap" >&5 +$as_echo "$ac_cv_lib_Xdmcp_XdmcpWrap" >&6; } +if test "x$ac_cv_lib_Xdmcp_XdmcpWrap" = x""yes; then + have_xdmcpwrap="yes" +else + have_xdmcpwrap="no" +fi + +fi +if test "x$XDMCP" = xauto; then + if test "x$have_libxdmcp" = xyes; then + XDMCP=yes + else + XDMCP=no + fi +fi +if test "x$XDMAUTH" = xauto; then + if test "x$have_libxdmcp" = xyes && test "x$have_xdmcpwrap" = xyes; then + XDMAUTH=yes + else + XDMAUTH=no + fi fi + if test "x$XDMCP" = xyes; then + XDMCP_TRUE= + XDMCP_FALSE='#' +else + XDMCP_TRUE='#' + XDMCP_FALSE= +fi -if test "x$DRI" = xyes || test "x$DRI2" = xyes; then +if test "x$XDMCP" = xyes; then -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5 -$as_echo_n "checking for LIBDRM... " >&6; } +cat >>confdefs.h <<\_ACEOF +#define XDMCP 1 +_ACEOF -if test -n "$PKG_CONFIG"; then - if test -n "$LIBDRM_CFLAGS"; then - pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libdrm >= 2.3.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.3.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" fi -if test -n "$PKG_CONFIG"; then - if test -n "$LIBDRM_LIBS"; then - pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libdrm >= 2.3.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.3.0" 2>/dev/null` + + if test "x$XDMAUTH" = xyes; then + XDMAUTH_TRUE= + XDMAUTH_FALSE='#' else - pkg_failed=yes + XDMAUTH_TRUE='#' + XDMAUTH_FALSE= fi - fi -else - pkg_failed=untried + +if test "x$XDMAUTH" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HASXDMAUTH 1 +_ACEOF + + if ! test "x$XDMCP" = xyes; then + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" + fi fi + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$FONTPATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + COMPILEDDEFAULTFONTPATH="$ac_define_dir" -if test $pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdrm >= 2.3.0"` - else - LIBDRM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdrm >= 2.3.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBDRM_PKG_ERRORS" >&5 +cat >>confdefs.h <<_ACEOF +#define COMPILEDDEFAULTFONTPATH "$ac_define_dir" +_ACEOF - as_fn_error "Package requirements (libdrm >= 2.3.0) were not met: + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE -$LIBDRM_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$PCI_TXT_IDS_DIR\"" + eval ac_define_dir="\"$ac_define_dir\"" + PCI_TXT_IDS_PATH="$ac_define_dir" -Alternatively, you may set the environment variables LIBDRM_CFLAGS -and LIBDRM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. -Alternatively, you may set the environment variables LIBDRM_CFLAGS -and LIBDRM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +cat >>confdefs.h <<_ACEOF +#define PCI_TXT_IDS_PATH "$ac_define_dir" +_ACEOF -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } -else - LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS - LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE -fi + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$SERVERCONFIG\"" + eval ac_define_dir="\"$ac_define_dir\"" + SERVER_MISC_CONFIG_PATH="$ac_define_dir" -if test "x$DRI2" = xyes; then - save_CFLAGS=$CFLAGS - CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifndef __DRI_DRI2 -#error DRI2 extension not available. -#endif + +cat >>confdefs.h <<_ACEOF +#define SERVER_MISC_CONFIG_PATH "$ac_define_dir" _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - HAVE_DRI2EXTENSION=yes -else - HAVE_DRI2EXTENSION=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$save_CFLAGS - if test "x$HAVE_DRI2EXTENSION" = xyes; then -$as_echo "#define DRI2_AIGLX 1" >>confdefs.h + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE - DRI2_AIGLX=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h." >&5 -$as_echo "$as_me: DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h." >&6;} - DRI2_AIGLX=no - fi -fi - if test "x$DRI2_AIGLX" = xyes; then - DRI2_AIGLX_TRUE= - DRI2_AIGLX_FALSE='#' -else - DRI2_AIGLX_TRUE='#' - DRI2_AIGLX_FALSE= -fi + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$FONTDIR\"" + eval ac_define_dir="\"$ac_define_dir\"" + BASE_FONT_PATH="$ac_define_dir" - if test "x$XINERAMA" = xyes; then - XINERAMA_TRUE= - XINERAMA_FALSE='#' -else - XINERAMA_TRUE='#' - XINERAMA_FALSE= -fi +cat >>confdefs.h <<_ACEOF +#define BASE_FONT_PATH "$ac_define_dir" +_ACEOF -if test "x$XINERAMA" = xyes; then + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE -$as_echo "#define XINERAMA 1" >>confdefs.h + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$DRI_DRIVER_PATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + DRI_DRIVER_PATH="$ac_define_dir" -$as_echo "#define PANORAMIX 1" >>confdefs.h - REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto" -fi +cat >>confdefs.h <<_ACEOF +#define DRI_DRIVER_PATH "$ac_define_dir" +_ACEOF - if test "x$XACE" = xyes; then - XACE_TRUE= - XACE_FALSE='#' -else - XACE_TRUE='#' - XACE_FALSE= -fi + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE -if test "x$XACE" = xyes; then -$as_echo "#define XACE 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define XVENDORNAME "$VENDOR_NAME" +_ACEOF -fi - if test "x$XSELINUX" = xyes; then - XSELINUX_TRUE= - XSELINUX_FALSE='#' -else - XSELINUX_TRUE='#' - XSELINUX_FALSE= -fi +cat >>confdefs.h <<_ACEOF +#define XVENDORNAMESHORT "$VENDOR_NAME_SHORT" +_ACEOF -if test "x$XSELINUX" = xyes; then - if test "x$XACE" != xyes; then - as_fn_error "cannot build SELinux extension without X-ACE" "$LINENO" 5 - fi - for ac_header in selinux/selinux.h selinux/avc.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + +cat >>confdefs.h <<_ACEOF +#define XORG_DATE "$RELEASE_DATE" _ACEOF -else - as_fn_error "SELinux include files not found" "$LINENO" 5 -fi -done +cat >>confdefs.h <<_ACEOF +#define XORG_MAN_VERSION "$VENDOR_MAN_VERSION" +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avc_init in -lselinux" >&5 -$as_echo_n "checking for avc_init in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_avc_init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lselinux $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* 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 avc_init (); -int -main () -{ -return avc_init (); - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define BUILDERADDR "$BUILDERADDR" _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_selinux_avc_init=yes -else - ac_cv_lib_selinux_avc_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + + +if test -z "$OSNAME"; then + OSNAME="UNKNOWN" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_avc_init" >&5 -$as_echo "$ac_cv_lib_selinux_avc_init" >&6; } -if test "x$ac_cv_lib_selinux_avc_init" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSELINUX 1 + + +cat >>confdefs.h <<_ACEOF +#define OSNAME "$OSNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define OSVENDOR "$OSVENDOR" _ACEOF - LIBS="-lselinux $LIBS" - -else - as_fn_error "SELinux library not found" "$LINENO" 5 -fi - for ac_header in libaudit.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default" -if test "x$ac_cv_header_libaudit_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBAUDIT_H 1 +cat >>confdefs.h <<_ACEOF +#define BUILDERSTRING "$BUILDERSTRING" _ACEOF -else - as_fn_error "SELinux extension requires audit system headers" "$LINENO" 5 -fi -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for audit_open in -laudit" >&5 -$as_echo_n "checking for audit_open in -laudit... " >&6; } -if test "${ac_cv_lib_audit_audit_open+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-laudit $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* 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 audit_open (); -int -main () -{ -return audit_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_audit_audit_open=yes -else - ac_cv_lib_audit_audit_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_open" >&5 -$as_echo "$ac_cv_lib_audit_audit_open" >&6; } -if test "x$ac_cv_lib_audit_audit_open" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBAUDIT 1 +cat >>confdefs.h <<_ACEOF +#define VENDOR_NAME "$VENDOR_NAME" _ACEOF - LIBS="-laudit $LIBS" -else - as_fn_error "SELinux extension requires audit system library" "$LINENO" 5 -fi +cat >>confdefs.h <<_ACEOF +#define VENDOR_NAME_SHORT "$VENDOR_NAME_SHORT" +_ACEOF - ac_fn_c_check_decl "$LINENO" "avc_netlink_acquire_fd" "ac_cv_have_decl_avc_netlink_acquire_fd" "#include -" -if test "x$ac_cv_have_decl_avc_netlink_acquire_fd" = x""yes; then : -$as_echo "#define HAVE_AVC_NETLINK_ACQUIRE_FD 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define VENDOR_RELEASE $VENDOR_RELEASE +_ACEOF -fi +cat >>confdefs.h <<_ACEOF +#define VENDOR_MAN_VERSION "$VENDOR_MAN_VERSION" +_ACEOF -$as_echo "#define XSELINUX 1" >>confdefs.h - SELINUX_LIB="-lselinux -laudit" -fi - if test "x$XCSECURITY" = xyes; then - XCSECURITY_TRUE= - XCSECURITY_FALSE='#' -else - XCSECURITY_TRUE='#' - XCSECURITY_FALSE= -fi +cat >>confdefs.h <<\_ACEOF +#define NO_LIBCWRAPPER 1 +_ACEOF -if test "x$XCSECURITY" = xyes; then - if test "x$XACE" != xyes; then - as_fn_error "cannot build Security extension without X-ACE" "$LINENO" 5 - fi -$as_echo "#define XCSECURITY 1" >>confdefs.h +if test "x$DEBUGGING" = xyes; then -fi +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF - if test "x$MULTIBUFFER" = xyes; then - MULTIBUFFER_TRUE= - MULTIBUFFER_FALSE='#' +fi + if test "x$DEBUGGING" = xyes; then + DEBUG_TRUE= + DEBUG_FALSE='#' else - MULTIBUFFER_TRUE='#' - MULTIBUFFER_FALSE= + DEBUG_TRUE='#' + DEBUG_FALSE= fi -if test "x$MULTIBUFFER" = xyes; then - -$as_echo "#define MULTIBUFFER 1" >>confdefs.h - # Requires xextproto which is always required -fi +if test "x$UNITTESTS" = xauto; then - if test "x$DBE" = xyes; then - DBE_TRUE= - DBE_FALSE='#' +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GLIB" >&5 +$as_echo_n "checking for GLIB... " >&6; } + +if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\"") >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16" 2>/dev/null` else - DBE_TRUE='#' - DBE_FALSE= + pkg_failed=yes fi - -if test "x$DBE" = xyes; then - -$as_echo "#define DBE 1" >>confdefs.h - - DBE_LIB='$(top_builddir)/dbe/libdbe.la' + else + pkg_failed=untried fi - - if test "x$XF86BIGFONT" = xyes; then - XF86BIGFONT_TRUE= - XF86BIGFONT_FALSE='#' +if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\"") >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16" 2>/dev/null` else - XF86BIGFONT_TRUE='#' - XF86BIGFONT_FALSE= + pkg_failed=yes +fi + else + pkg_failed=untried fi -if test "x$XF86BIGFONT" = xyes; then -$as_echo "#define XF86BIGFONT 1" >>confdefs.h -fi +if test $pkg_failed = yes; then - if test "x$DPMSExtension" = xyes; then - DPMSExtension_TRUE= - DPMSExtension_FALSE='#' +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - DPMSExtension_TRUE='#' - DPMSExtension_FALSE= + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.16" 2>&1` + else + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.16" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB_PKG_ERRORS" >&5 -if test "x$DPMSExtension" = xyes; then - -$as_echo "#define DPMSExtension 1" >>confdefs.h - + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + HAVE_GLIB=no +elif test $pkg_failed = untried; then + HAVE_GLIB=no +else + GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS + GLIB_LIBS=$pkg_cv_GLIB_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_GLIB=yes +fi + if test "x$HAVE_GLIB" = xyes && test "x$with_gnu_ld" = xyes; then + UNITTESTS=yes + else + UNITTESTS=no + fi fi +if test "x$UNITTESTS" = xyes; then -if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then +cat >>confdefs.h <<\_ACEOF +#define UNITTESTS 1 +_ACEOF -$as_echo "#define XCALIBRATE 1" >>confdefs.h - REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GLIB" >&5 +$as_echo_n "checking for GLIB... " >&6; } + +if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\"") >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16" 2>/dev/null` else - XCALIBRATE=no + pkg_failed=yes fi - if test "x$XCALIBRATE" = xyes; then - XCALIBRATE_TRUE= - XCALIBRATE_FALSE='#' + else + pkg_failed=untried +fi +if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\"") >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16" 2>/dev/null` else - XCALIBRATE_TRUE='#' - XCALIBRATE_FALSE= + pkg_failed=yes +fi + else + pkg_failed=untried fi -$as_echo "#define RENDER 1" >>confdefs.h +if test $pkg_failed = yes; then -RENDER_LIB='$(top_builddir)/render/librender.la' -RENDER_INC='-I$(top_srcdir)/render' +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.16" 2>&1` + else + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.16" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.16) were not met: -$as_echo "#define RANDR 1" >>confdefs.h +$GLIB_PKG_ERRORS -RANDR_LIB='$(top_builddir)/randr/librandr.la' -RANDR_INC='-I$(top_srcdir)/randr' +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (glib-2.0 >= 2.16) were not met: -$as_echo "#define XFIXES 1" >>confdefs.h +$GLIB_PKG_ERRORS -FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la' -FIXES_INC='-I$(top_srcdir)/xfixes' +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; 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: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -$as_echo "#define DAMAGE 1" >>confdefs.h +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la' -DAMAGE_INC='-I$(top_srcdir)/damageext' -MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' -MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# XINPUT extension is integral part of the server -XI_LIB='$(top_builddir)/Xi/libXi.la' -XI_INC='-I$(top_srcdir)/Xi' +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - if test "x$XF86UTILS" = xyes; then - XF86UTILS_TRUE= - XF86UTILS_FALSE='#' +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else - XF86UTILS_TRUE='#' - XF86UTILS_FALSE= + GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS + GLIB_LIBS=$pkg_cv_GLIB_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + if test "x$with_gnu_ld" = xno; then + { { $as_echo "$as_me:$LINENO: error: GNU ld required to build unit tests" >&5 +$as_echo "$as_me: error: GNU ld required to build unit tests" >&2;} + { (exit 1); exit 1; }; } + fi + + +fi + if test "x$UNITTESTS" = xyes; then + UNITTESTS_TRUE= + UNITTESTS_FALSE='#' +else + UNITTESTS_TRUE='#' + UNITTESTS_FALSE= fi -$as_echo "#define SHAPE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XTEST 1 +_ACEOF +cat >>confdefs.h <<\_ACEOF +#define XSYNC 1 +_ACEOF -$as_echo "#define XKB 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XCMISC 1 +_ACEOF -$as_echo "#define XKB_IN_SERVER 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define BIGREQS 1 +_ACEOF -$as_echo "#define XKB_DFLT_DISABLED 0" >>confdefs.h -REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" -XKB_LIB='$(top_builddir)/xkb/libxkb.la' -XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' +if test "x$WDTRACE" != "xno" ; then + DIX_LIB='$(top_builddir)/dix/dix.O' + OS_LIB='$(top_builddir)/os/os.O' +else + DIX_LIB='$(top_builddir)/dix/libdix.la' + OS_LIB='$(top_builddir)/os/libos.la' +fi + +MAIN_LIB='$(top_builddir)/dix/libmain.la' + + +MI_LIB='$(top_builddir)/mi/libmi.la' +MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' +MI_INC='-I$(top_srcdir)/mi' +FB_LIB='$(top_builddir)/fb/libfb.la' +FB_INC='-I$(top_srcdir)/fb' +MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' +MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' +CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' -ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" -if test "x$ac_cv_func_strcasecmp" = x""yes; then : +# OpenSSL used for SHA1 hashing in render/glyph.c, but we don't need all of +# the OpenSSL libraries, just libcrypto +# Some systems have matching functionality in the smaller/simpler libmd +# Builders who want to force a choice can set SHA1_LIB and SHA1_CFLAGS +if test "x$SHA1_LIB" = "x" ; then + { $as_echo "$as_me:$LINENO: checking for SHA1Init in -lmd" >&5 +$as_echo_n "checking for SHA1Init in -lmd... " >&6; } +if test "${ac_cv_lib_md_SHA1Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* 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 SHA1Init (); +int +main () +{ +return SHA1Init (); + ; + 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_lib_md_SHA1Init=yes else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define NEED_STRCASECMP 1" >>confdefs.h - + ac_cv_lib_md_SHA1Init=no fi -ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" -if test "x$ac_cv_func_strncasecmp" = x""yes; then : - -else - -$as_echo "#define NEED_STRNCASECMP 1" >>confdefs.h - +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_md_SHA1Init" >&5 +$as_echo "$ac_cv_lib_md_SHA1Init" >&6; } +if test "x$ac_cv_lib_md_SHA1Init" = x""yes; then + SHA1_LIB="-lmd" -ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" -if test "x$ac_cv_func_strcasestr" = x""yes; then : - -else - -$as_echo "#define NEED_STRCASESTR 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHA1_IN_LIBMD 1 +_ACEOF fi - -if test "x$NULL_ROOT_CURSOR" = xyes; then - -$as_echo "#define NULL_ROOT_CURSOR 1" >>confdefs.h - fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XDMCP" >&5 -$as_echo_n "checking for XDMCP... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$XDMCP_CFLAGS"; then - pkg_cv_XDMCP_CFLAGS="$XDMCP_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XDMCP_CFLAGS=`$PKG_CONFIG --cflags "xdmcp" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$XDMCP_LIBS"; then - pkg_cv_XDMCP_LIBS="$XDMCP_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 +if test "x$SHA1_LIB" = "x" ; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"OPENSSL\"") >&5 + ($PKG_CONFIG --exists --print-errors "OPENSSL") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XDMCP_LIBS=`$PKG_CONFIG --libs "xdmcp" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - XDMCP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xdmcp"` - else - XDMCP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xdmcp"` - fi - # Put the nasty error message in config.log where it belongs - echo "$XDMCP_PKG_ERRORS" >&5 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_libxdmcp="no" -elif test $pkg_failed = untried; then - have_libxdmcp="no" + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + openssl else - XDMCP_CFLAGS=$pkg_cv_XDMCP_CFLAGS - XDMCP_LIBS=$pkg_cv_XDMCP_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_libxdmcp="yes" + HAVE_OPENSSL_PKC=yes fi -if test "x$have_libxdmcp" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XdmcpWrap in -lXdmcp" >&5 -$as_echo_n "checking for XdmcpWrap in -lXdmcp... " >&6; } -if test "${ac_cv_lib_Xdmcp_XdmcpWrap+set}" = set; then : + if test "x$HAVE_OPENSSL_PKC" = xyes; then + REQUIRED_LIBS="$REQUIRED_LIBS openssl" + else + { $as_echo "$as_me:$LINENO: checking for SHA1_Init in -lcrypto" >&5 +$as_echo_n "checking for SHA1_Init in -lcrypto... " >&6; } +if test "${ac_cv_lib_crypto_SHA1_Init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lXdmcp $XDMCP_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +LIBS="-lcrypto $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -17305,414 +24781,742 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char XdmcpWrap (); +char SHA1_Init (); int main () { -return XdmcpWrap (); +return SHA1_Init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xdmcp_XdmcpWrap=yes +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_lib_crypto_SHA1_Init=yes else - ac_cv_lib_Xdmcp_XdmcpWrap=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_crypto_SHA1_Init=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp_XdmcpWrap" >&5 -$as_echo "$ac_cv_lib_Xdmcp_XdmcpWrap" >&6; } -if test "x$ac_cv_lib_Xdmcp_XdmcpWrap" = x""yes; then : - have_xdmcpwrap="yes" +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_SHA1_Init" >&5 +$as_echo "$ac_cv_lib_crypto_SHA1_Init" >&6; } +if test "x$ac_cv_lib_crypto_SHA1_Init" = x""yes; then + SHA1_LIB="-lcrypto" else - have_xdmcpwrap="no" + { { $as_echo "$as_me:$LINENO: error: OpenSSL must be installed in order to build the X server." >&5 +$as_echo "$as_me: error: OpenSSL must be installed in order to build the X server." >&2;} + { (exit 1); exit 1; }; } fi + fi fi -if test "x$XDMCP" = xauto; then - if test "x$have_libxdmcp" = xyes; then - XDMCP=yes - else - XDMCP=no - fi + + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for XSERVERCFLAGS" >&5 +$as_echo_n "checking for XSERVERCFLAGS... " >&6; } + +if test -n "$XSERVERCFLAGS_CFLAGS"; then + pkg_cv_XSERVERCFLAGS_CFLAGS="$XSERVERCFLAGS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XSERVERCFLAGS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes fi -if test "x$XDMAUTH" = xauto; then - if test "x$have_libxdmcp" = xyes && test "x$have_xdmcpwrap" = xyes; then - XDMAUTH=yes - else - XDMAUTH=no - fi + else + pkg_failed=untried fi - - if test "x$XDMCP" = xyes; then - XDMCP_TRUE= - XDMCP_FALSE='#' +if test -n "$XSERVERCFLAGS_LIBS"; then + pkg_cv_XSERVERCFLAGS_LIBS="$XSERVERCFLAGS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XSERVERCFLAGS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` else - XDMCP_TRUE='#' - XDMCP_FALSE= + pkg_failed=yes +fi + else + pkg_failed=untried fi -if test "x$XDMCP" = xyes; then -$as_echo "#define XDMCP 1" >>confdefs.h - REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" - XDMCP_MODULES="xdmcp" -fi +if test $pkg_failed = yes; then - if test "x$XDMAUTH" = xyes; then - XDMAUTH_TRUE= - XDMAUTH_FALSE='#' +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - XDMAUTH_TRUE='#' - XDMAUTH_FALSE= + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1` + else + XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XSERVERCFLAGS_PKG_ERRORS" >&5 -if test "x$XDMAUTH" = xyes; then + { { $as_echo "$as_me:$LINENO: error: Package requirements ($REQUIRED_MODULES $REQUIRED_LIBS) were not met: -$as_echo "#define HASXDMAUTH 1" >>confdefs.h +$XSERVERCFLAGS_PKG_ERRORS - if ! test "x$XDMCP" = xyes; then - REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" - XDMCP_MODULES="xdmcp" - fi -fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements ($REQUIRED_MODULES $REQUIRED_LIBS) were not met: - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix - eval ac_define_dir="\"$FONTPATH\"" - eval ac_define_dir="\"$ac_define_dir\"" - COMPILEDDEFAULTFONTPATH="$ac_define_dir" +$XSERVERCFLAGS_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -cat >>confdefs.h <<_ACEOF -#define COMPILEDDEFAULTFONTPATH "$ac_define_dir" -_ACEOF +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; 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: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix - eval ac_define_dir="\"$PCI_TXT_IDS_DIR\"" - eval ac_define_dir="\"$ac_define_dir\"" - PCI_TXT_IDS_PATH="$ac_define_dir" +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + XSERVERCFLAGS_CFLAGS=$pkg_cv_XSERVERCFLAGS_CFLAGS + XSERVERCFLAGS_LIBS=$pkg_cv_XSERVERCFLAGS_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi -cat >>confdefs.h <<_ACEOF -#define PCI_TXT_IDS_PATH "$ac_define_dir" -_ACEOF +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for XSERVERLIBS" >&5 +$as_echo_n "checking for XSERVERLIBS... " >&6; } - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE +if test -n "$XSERVERLIBS_CFLAGS"; then + pkg_cv_XSERVERLIBS_CFLAGS="$XSERVERLIBS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XSERVERLIBS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XSERVERLIBS_LIBS"; then + pkg_cv_XSERVERLIBS_LIBS="$XSERVERLIBS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XSERVERLIBS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix - eval ac_define_dir="\"$SERVERCONFIG\"" - eval ac_define_dir="\"$ac_define_dir\"" - SERVER_MISC_CONFIG_PATH="$ac_define_dir" +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$REQUIRED_LIBS" 2>&1` + else + XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --print-errors "$REQUIRED_LIBS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XSERVERLIBS_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements ($REQUIRED_LIBS) were not met: -cat >>confdefs.h <<_ACEOF -#define SERVER_MISC_CONFIG_PATH "$ac_define_dir" -_ACEOF +$XSERVERLIBS_PKG_ERRORS - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements ($REQUIRED_LIBS) were not met: - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix - eval ac_define_dir="\"$FONTDIR\"" - eval ac_define_dir="\"$ac_define_dir\"" - BASE_FONT_PATH="$ac_define_dir" +$XSERVERLIBS_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -cat >>confdefs.h <<_ACEOF -#define BASE_FONT_PATH "$ac_define_dir" -_ACEOF +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; 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: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix - eval ac_define_dir="\"$DRI_DRIVER_PATH\"" - eval ac_define_dir="\"$ac_define_dir\"" - DRI_DRIVER_PATH="$ac_define_dir" +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + XSERVERLIBS_CFLAGS=$pkg_cv_XSERVERLIBS_CFLAGS + XSERVERLIBS_LIBS=$pkg_cv_XSERVERLIBS_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi -cat >>confdefs.h <<_ACEOF -#define DRI_DRIVER_PATH "$ac_define_dir" -_ACEOF +# Autotools has some unfortunate issues with library handling. In order to +# get a server to rebuild when a dependency in the tree is changed, it must +# be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be +# listed there, or some versions of autotools will break (especially if a -L +# is required to find the library). So, we keep two sets of libraries +# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which +# will go into the _DEPENDENCIES and _LDADD of the server, and +# NAMESPACE_SYS_LIBS which will go into only the _LDADD. The +# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in +# NAMESPACE_SYS_LIBS. +# +# XSERVER_LIBS is the set of in-tree libraries which all servers require. +# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers +# require. +# +XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}" +XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB" +XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB}" - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE -cat >>confdefs.h <<_ACEOF -#define XVENDORNAME "$VENDOR_NAME" -_ACEOF +UTILS_SYS_LIBS="${SYS_LIBS}" -cat >>confdefs.h <<_ACEOF -#define XVENDORNAMESHORT "$VENDOR_NAME_SHORT" -_ACEOF +# The Xorg binary needs to export symbols so that they can be used from modules +# Some platforms require extra flags to do this. gcc should set these flags +# when -rdynamic is passed to it, other compilers/linkers may need to be added +# here. -cat >>confdefs.h <<_ACEOF -#define XORG_DATE "$RELEASE_DATE" +if test "x$GCC" = xyes ; then + CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ +-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ +-Wbad-function-cast" + case `$CC -dumpversion` in + 3.4.* | 4.*) + CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" + ;; + esac +else + { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } +if test "${ac_cv_have_decl___SUNPRO_C+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. */ +$ac_includes_default +int +main () +{ +#ifndef __SUNPRO_C + (void) __SUNPRO_C; +#endif - -cat >>confdefs.h <<_ACEOF -#define XORG_MAN_VERSION "$VENDOR_MAN_VERSION" + ; + 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_have_decl___SUNPRO_C=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl___SUNPRO_C=no +fi -cat >>confdefs.h <<_ACEOF -#define BUILDERADDR "$BUILDERADDR" -_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } +if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then + SUNCC="yes" +else + SUNCC="no" +fi + + if test "x$SUNCC" = "xyes"; then + CWARNFLAGS="-v" + fi +fi -if test -z "$OSNAME"; then - OSNAME="UNKNOWN" +if test "x$GCC" = "xyes"; then + if test "x$WERROR" = "xyes"; then + CWARNFLAGS="${CWARNFLAGS} -Werror" + fi + LD_EXPORT_SYMBOLS_FLAG="-rdynamic" fi +XSERVER_CFLAGS="$CWARNFLAGS $XSERVER_CFLAGS" +case $host_os in + openbsd*) + LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" + ;; +esac -cat >>confdefs.h <<_ACEOF -#define OSNAME "$OSNAME" +{ $as_echo "$as_me:$LINENO: checking if SVR4 needs to be defined" >&5 +$as_echo_n "checking if SVR4 needs to be defined... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if defined(SVR4) || defined(__svr4__) || defined(__SVR4) + I_AM_SVR4 +#endif -cat >>confdefs.h <<_ACEOF -#define OSVENDOR "$OSVENDOR" _ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I_AM_SVR4" >/dev/null 2>&1; then -cat >>confdefs.h <<_ACEOF -#define BUILDERSTRING "$BUILDERSTRING" +cat >>confdefs.h <<\_ACEOF +#define SVR4 1 _ACEOF +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f conftest* + + +XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC" + +{ $as_echo "$as_me:$LINENO: checking whether to build Xvfb DDX" >&5 +$as_echo_n "checking whether to build Xvfb DDX... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $XVFB" >&5 +$as_echo "$XVFB" >&6; } + if test "x$XVFB" = xyes; then + XVFB_TRUE= + XVFB_FALSE='#' +else + XVFB_TRUE='#' + XVFB_FALSE= +fi +if test "x$XVFB" = xyes; then + XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" + XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS" +fi -$as_echo "#define NO_LIBCWRAPPER 1" >>confdefs.h -if test "x$DEBUGGING" = xyes; then -$as_echo "#define DEBUG 1" >>confdefs.h +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for XNESTMODULES" >&5 +$as_echo_n "checking for XNESTMODULES... " >&6; } +if test -n "$XNESTMODULES_CFLAGS"; then + pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfont xext x11 xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xfont xext x11 xau $XDMCP_MODULES") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "xfont xext x11 xau $XDMCP_MODULES" 2>/dev/null` +else + pkg_failed=yes fi - if test "x$DEBUGGING" = xyes; then - DEBUG_TRUE= - DEBUG_FALSE='#' + else + pkg_failed=untried +fi +if test -n "$XNESTMODULES_LIBS"; then + pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfont xext x11 xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xfont xext x11 xau $XDMCP_MODULES") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "xfont xext x11 xau $XDMCP_MODULES" 2>/dev/null` else - DEBUG_TRUE='#' - DEBUG_FALSE= + pkg_failed=yes +fi + else + pkg_failed=untried fi -$as_echo "#define XTEST 1" >>confdefs.h +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xfont xext x11 xau $XDMCP_MODULES" 2>&1` + else + XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xfont xext x11 xau $XDMCP_MODULES" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XNESTMODULES_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + have_xnest=no +elif test $pkg_failed = untried; then + have_xnest=no +else + XNESTMODULES_CFLAGS=$pkg_cv_XNESTMODULES_CFLAGS + XNESTMODULES_LIBS=$pkg_cv_XNESTMODULES_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + have_xnest=yes +fi +{ $as_echo "$as_me:$LINENO: checking whether to build Xnest DDX" >&5 +$as_echo_n "checking whether to build Xnest DDX... " >&6; } +if test "x$XNEST" = xauto; then + XNEST="$have_xnest" +fi +{ $as_echo "$as_me:$LINENO: result: $XNEST" >&5 +$as_echo "$XNEST" >&6; } + if test "x$XNEST" = xyes; then + XNEST_TRUE= + XNEST_FALSE='#' +else + XNEST_TRUE='#' + XNEST_FALSE= +fi -$as_echo "#define XSYNC 1" >>confdefs.h +if test "x$XNEST" = xyes; then + XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $MAIN_LIB $OS_LIB $CONFIG_LIB" + XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" -$as_echo "#define XCMISC 1" >>confdefs.h +fi -$as_echo "#define BIGREQS 1" >>confdefs.h -if test "x$WDTRACE" != "xno" ; then - DIX_LIB='$(top_builddir)/dix/dix.O' - OS_LIB='$(top_builddir)/os/os.O' -else - DIX_LIB='$(top_builddir)/dix/libdix.la' - OS_LIB='$(top_builddir)/os/libos.la' -fi -MI_LIB='$(top_builddir)/mi/libmi.la' -MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' -MI_INC='-I$(top_srcdir)/mi' -FB_LIB='$(top_builddir)/fb/libfb.la' -FB_INC='-I$(top_srcdir)/fb' -MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' -MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' -CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' +{ $as_echo "$as_me:$LINENO: checking whether to build Xorg DDX" >&5 +$as_echo_n "checking whether to build Xorg DDX... " >&6; } +if test "x$XORG" = xauto; then + XORG="yes" + case $host_os in + cygwin*) XORG="no" ;; + darwin*) XORG="no" ;; + esac +fi +{ $as_echo "$as_me:$LINENO: result: $XORG" >&5 +$as_echo "$XORG" >&6; } -# OpenSSL used for SHA1 hashing in render/glyph.c, but we don't need all of -# the OpenSSL libraries, just libcrypto -# Some systems have matching functionality in the smaller/simpler libmd -# Builders who want to force a choice can set SHA1_LIB and SHA1_CFLAGS -if test "x$SHA1_LIB" = "x" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1Init in -lmd" >&5 -$as_echo_n "checking for SHA1Init in -lmd... " >&6; } -if test "${ac_cv_lib_md_SHA1Init+set}" = set; then : +xorg_bus_linuxpci=no +xorg_bus_bsdpci=no +xorg_bus_sparc=no + +if test "x$XORG" = xyes; then + XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' + XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' + XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" + XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" + XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB" + + symbol_visibility= + have_visibility=disabled + if test x$SYMBOL_VISIBILITY != xno; then + { $as_echo "$as_me:$LINENO: checking for symbol visibility support" >&5 +$as_echo_n "checking for symbol visibility support... " >&6; } + if test x$GCC = xyes; then + VISIBILITY_CFLAGS="-fvisibility=hidden" + else + { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } +if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* 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 SHA1Init (); +$ac_includes_default int main () { -return SHA1Init (); +#ifndef __SUNPRO_C + (void) __SUNPRO_C; +#endif + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_md_SHA1Init=yes +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_have_decl___SUNPRO_C=yes else - ac_cv_lib_md_SHA1Init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_md_SHA1Init" >&5 -$as_echo "$ac_cv_lib_md_SHA1Init" >&6; } -if test "x$ac_cv_lib_md_SHA1Init" = x""yes; then : - SHA1_LIB="-lmd" - -$as_echo "#define HAVE_SHA1_IN_LIBMD 1" >>confdefs.h + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl___SUNPRO_C=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -if test "x$SHA1_LIB" = "x" ; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"OPENSSL\""; } >&5 - ($PKG_CONFIG --exists --print-errors "OPENSSL") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - openssl +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } +if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then + SUNCC="yes" else - HAVE_OPENSSL_PKC=yes + SUNCC="no" fi - if test "x$HAVE_OPENSSL_PKC" = xyes; then - REQUIRED_LIBS="$REQUIRED_LIBS openssl" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5 -$as_echo_n "checking for SHA1_Init in -lcrypto... " >&6; } -if test "${ac_cv_lib_crypto_SHA1_Init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* 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 SHA1_Init (); + if test x$SUNCC = xyes; then + VISIBILITY_CFLAGS="-xldscope=hidden" + else + have_visibility=no + fi + fi + if test x$have_visibility != xno; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $VISIBILITY_CFLAGS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + extern _X_HIDDEN int hidden_int; + extern _X_EXPORT int public_int; + extern _X_HIDDEN int hidden_int_func(void); + extern _X_EXPORT int public_int_func(void); int main () { -return SHA1_Init (); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_SHA1_Init=yes -else - ac_cv_lib_crypto_SHA1_Init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5 -$as_echo "$ac_cv_lib_crypto_SHA1_Init" >&6; } -if test "x$ac_cv_lib_crypto_SHA1_Init" = x""yes; then : - SHA1_LIB="-lcrypto" +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 + have_visibility=yes else - as_fn_error "OpenSSL must be installed in order to build the X server." "$LINENO" 5 -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi + have_visibility=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$save_CFLAGS + fi + { $as_echo "$as_me:$LINENO: result: $have_visibility" >&5 +$as_echo "$have_visibility" >&6; } + if test x$have_visibility != xno; then + symbol_visibility=$VISIBILITY_CFLAGS + XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS" + XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS" + fi + fi + + pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSERVERCFLAGS" >&5 -$as_echo_n "checking for XSERVERCFLAGS... " >&6; } +{ $as_echo "$as_me:$LINENO: checking for PCIACCESS" >&5 +$as_echo_n "checking for PCIACCESS... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XSERVERCFLAGS_CFLAGS"; then - pkg_cv_XSERVERCFLAGS_CFLAGS="$XSERVERCFLAGS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5 - ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 +if test -n "$PCIACCESS_CFLAGS"; then + pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XSERVERCFLAGS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess >= 0.8.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XSERVERCFLAGS_LIBS"; then - pkg_cv_XSERVERCFLAGS_LIBS="$XSERVERCFLAGS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5 - ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 +if test -n "$PCIACCESS_LIBS"; then + pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XSERVERCFLAGS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess >= 0.8.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -17725,554 +25529,903 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS"` + PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pciaccess >= 0.8.0" 2>&1` else - XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS"` + PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors "pciaccess >= 0.8.0" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$XSERVERCFLAGS_PKG_ERRORS" >&5 + echo "$PCIACCESS_PKG_ERRORS" >&5 - as_fn_error "Package requirements ($REQUIRED_MODULES $REQUIRED_LIBS) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (pciaccess >= 0.8.0) were not met: -$XSERVERCFLAGS_PKG_ERRORS +$PCIACCESS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS -and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables PCIACCESS_CFLAGS +and PCIACCESS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (pciaccess >= 0.8.0) were not met: + +$PCIACCESS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PCIACCESS_CFLAGS +and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS -and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables PCIACCESS_CFLAGS +and PCIACCESS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PCIACCESS_CFLAGS +and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else - XSERVERCFLAGS_CFLAGS=$pkg_cv_XSERVERCFLAGS_CFLAGS - XSERVERCFLAGS_LIBS=$pkg_cv_XSERVERCFLAGS_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS + PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi + SAVE_LIBS=$LIBS + SAVE_CFLAGS=$CFLAGS + CFLAGS=$PCIACCESS_CFLAGS + LIBS=$PCIACCESS_LIBS -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSERVERLIBS" >&5 -$as_echo_n "checking for XSERVERLIBS... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$XSERVERLIBS_CFLAGS"; then - pkg_cv_XSERVERLIBS_CFLAGS="$XSERVERLIBS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5 - ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XSERVERLIBS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_LIBS" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$XSERVERLIBS_LIBS"; then - pkg_cv_XSERVERLIBS_LIBS="$XSERVERLIBS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5 - ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XSERVERLIBS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_LIBS" 2>/dev/null` -else - pkg_failed=yes -fi - fi +for ac_func in pci_system_init_dev_mem +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif -if test $pkg_failed = yes; then +#undef $ac_func -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$REQUIRED_LIBS"` - else - XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$REQUIRED_LIBS"` - fi - # Put the nasty error message in config.log where it belongs - echo "$XSERVERLIBS_PKG_ERRORS" >&5 +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif - as_fn_error "Package requirements ($REQUIRED_LIBS) were not met: +int +main () +{ +return $ac_func (); + ; + 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 + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$XSERVERLIBS_PKG_ERRORS + eval "$as_ac_var=no" +fi -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS -and XSERVERLIBS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +fi +done -Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS -and XSERVERLIBS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +for ac_func in pci_device_enable +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - XSERVERLIBS_CFLAGS=$pkg_cv_XSERVERLIBS_CFLAGS - XSERVERLIBS_LIBS=$pkg_cv_XSERVERLIBS_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -# Autotools has some unfortunate issues with library handling. In order to -# get a server to rebuild when a dependency in the tree is changed, it must -# be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be -# listed there, or some versions of autotools will break (especially if a -L -# is required to find the library). So, we keep two sets of libraries -# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which -# will go into the _DEPENDENCIES and _LDADD of the server, and -# NAMESPACE_SYS_LIBS which will go into only the _LDADD. The -# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in -# NAMESPACE_SYS_LIBS. -# -# XSERVER_LIBS is the set of in-tree libraries which all servers require. -# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers -# require. -# -XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}" -XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB" -XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB}" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif -UTILS_SYS_LIBS="${SYS_LIBS}" +int +main () +{ +return $ac_func (); + ; + 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 + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" +fi -# The Xorg binary needs to export symbols so that they can be used from modules -# Some platforms require extra flags to do this. gcc should set these flags -# when -rdynamic is passed to it, other compilers/linkers may need to be added -# here. -if test "x$GCC" = "xyes"; then - GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" - GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" - GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing" - GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3" - if test "x$WERROR" = "xyes"; then - GCC_WARNINGS="${GCC_WARNINGS} -Werror" - fi - XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS" +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF - LD_EXPORT_SYMBOLS_FLAG="-rdynamic" fi -case $host_os in - openbsd*) - LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" - ;; -esac +done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SVR4 needs to be defined" >&5 -$as_echo_n "checking if SVR4 needs to be defined... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +for ac_func in pci_device_is_boot_vga +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+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 $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -#if defined(SVR4) || defined(__svr4__) || defined(__SVR4) - I_AM_SVR4 -#endif +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I_AM_SVR4" >/dev/null 2>&1; then : +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func -$as_echo "#define SVR4 1" >>confdefs.h +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +int +main () +{ +return $ac_func (); + ; + 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 + eval "$as_ac_var=yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f conftest* + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" +fi -XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC" +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi +done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xvfb DDX" >&5 -$as_echo_n "checking whether to build Xvfb DDX... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XVFB" >&5 -$as_echo "$XVFB" >&6; } - if test "x$XVFB" = xyes; then - XVFB_TRUE= - XVFB_FALSE='#' +for ac_func in pci_device_vgaarb_init +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - XVFB_TRUE='#' - XVFB_FALSE= -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -if test "x$XVFB" = xyes; then - XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" - XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS" +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + 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 + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi +done + LIBS=$SAVE_LIBS + CFLAGS=$SAVE_CFLAGS + XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS $SELINUX_LIB" + XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XNESTMODULES" >&5 -$as_echo_n "checking for XNESTMODULES... " >&6; } + case $host_os in + linux*) + if test "x$LNXAPM" = xyes; then + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + fi + XORG_OS="linux" + XORG_OS_SUBDIR="linux" + xorg_bus_linuxpci="yes" + linux_acpi="no" + case $host_cpu in + ia64*) + linux_ia64=yes + linux_acpi="yes" + ;; + alpha*) + linux_alpha=yes + ;; + i*86|amd64*|x86_64*) + linux_acpi="yes" + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + XORG_OS="freebsd" + XORG_OS_SUBDIR="bsd" + xorg_bus_bsdpci="yes" + ;; + netbsd*) + XORG_OS="netbsd" + XORG_OS_SUBDIR="bsd" + xorg_bus_bsdpci="yes" + ;; + openbsd*) + if test "x$ac_cv_BSD_APM" = xyes \ + -o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + fi + XORG_OS="openbsd" + XORG_OS_SUBDIR="bsd" + xorg_bus_bsdpci="yes" + ;; + solaris*) + XORG_OS="solaris" + XORG_OS_SUBDIR="solaris" + # Use the same stubs as BSD for old functions, since we now + # use libpciaccess for PCI + xorg_bus_bsdpci="yes" -if test -n "$PKG_CONFIG"; then - if test -n "$XNESTMODULES_CFLAGS"; then - pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xfont xext x11 xau \$XDMCP_MODULES\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xfont xext x11 xau $XDMCP_MODULES") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "xfont xext x11 xau $XDMCP_MODULES" 2>/dev/null` -else - pkg_failed=yes +for ac_header in sys/kd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 fi - fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$XNESTMODULES_LIBS"; then - pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xfont xext x11 xau \$XDMCP_MODULES\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xfont xext x11 xau $XDMCP_MODULES") 2>&5 + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "xfont xext x11 xau $XDMCP_MODULES" 2>/dev/null` -else - pkg_failed=yes -fi - fi + 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_header_compiler=yes else - pkg_failed=untried -fi - + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no +fi -if test $pkg_failed = yes; then +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xfont xext x11 xau $XDMCP_MODULES"` - else - XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfont xext x11 xau $XDMCP_MODULES"` - fi - # Put the nasty error message in config.log where it belongs - echo "$XNESTMODULES_PKG_ERRORS" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_xnest=no -elif test $pkg_failed = untried; then - have_xnest=no -else - XNESTMODULES_CFLAGS=$pkg_cv_XNESTMODULES_CFLAGS - XNESTMODULES_LIBS=$pkg_cv_XNESTMODULES_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_xnest=yes -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xnest DDX" >&5 -$as_echo_n "checking whether to build Xnest DDX... " >&6; } -if test "x$XNEST" = xauto; then - XNEST="$have_xnest" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XNEST" >&5 -$as_echo "$XNEST" >&6; } - if test "x$XNEST" = xyes; then - XNEST_TRUE= - XNEST_FALSE='#' -else - XNEST_TRUE='#' - XNEST_FALSE= + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -if test "x$XNEST" = xyes; then - XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $OS_LIB $CONFIG_LIB" - XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" - - +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xorg DDX" >&5 -$as_echo_n "checking whether to build Xorg DDX... " >&6; } -if test "x$XORG" = xauto; then - XORG="yes" - case $host_os in - cygwin*) XORG="no" ;; - darwin*) XORG="no" ;; - esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XORG" >&5 -$as_echo "$XORG" >&6; } - -xorg_bus_linuxpci=no -xorg_bus_bsdpci=no -xorg_bus_sparc=no +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -if test "x$XORG" = xyes; then - XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' - XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' - XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" - XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" - XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB" +fi +done -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5 -$as_echo_n "checking for PCIACCESS... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$PCIACCESS_CFLAGS"; then - pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess >= 0.8.0" 2>/dev/null` -else - pkg_failed=yes +for ac_header in sys/vt.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 fi - fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$PCIACCESS_LIBS"; then - pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess >= 0.8.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + 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_header_compiler=yes else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no + ac_header_compiler=no fi - if test $_pkg_short_errors_supported = yes; then - PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pciaccess >= 0.8.0"` - else - PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pciaccess >= 0.8.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$PCIACCESS_PKG_ERRORS" >&5 - - as_fn_error "Package requirements (pciaccess >= 0.8.0) were not met: - -$PCIACCESS_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables PCIACCESS_CFLAGS -and PCIACCESS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. -Alternatively, you may set the environment variables PCIACCESS_CFLAGS -and PCIACCESS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } -else - PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS - PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi - SAVE_LIBS=$LIBS - SAVE_CFLAGS=$CFLAGS - CFLAGS=$PCIACCESS_CFLAGS - LIBS=$PCIACCESS_LIBS - for ac_func in pci_system_init_dev_mem -do : - ac_fn_c_check_func "$LINENO" "pci_system_init_dev_mem" "ac_cv_func_pci_system_init_dev_mem" -if test "x$ac_cv_func_pci_system_init_dev_mem" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PCI_SYSTEM_INIT_DEV_MEM 1 +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi -done - for ac_func in pci_device_enable -do : - ac_fn_c_check_func "$LINENO" "pci_device_enable" "ac_cv_func_pci_device_enable" -if test "x$ac_cv_func_pci_device_enable" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PCI_DEVICE_ENABLE 1 -_ACEOF +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi -done - - LIBS=$SAVE_LIBS - CFLAGS=$SAVE_CFLAGS - XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS $SELINUX_LIB" - XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } - case $host_os in - linux*) - if test "x$LNXAPM" = xyes; then - XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" - fi - XORG_OS="linux" - XORG_OS_SUBDIR="linux" - xorg_bus_linuxpci="yes" - linux_acpi="no" - case $host_cpu in - ia64*) - linux_ia64=yes - linux_acpi="yes" - ;; - alpha*) - linux_alpha=yes - ;; - i*86|amd64*|x86_64*) - linux_acpi="yes" - ;; - *) - ;; - esac - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - XORG_OS="freebsd" - XORG_OS_SUBDIR="bsd" - xorg_bus_bsdpci="yes" - ;; - netbsd*) - XORG_OS="netbsd" - XORG_OS_SUBDIR="bsd" - xorg_bus_bsdpci="yes" - ;; - openbsd*) - if test "x$ac_cv_BSD_APM" = xyes \ - -o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then - XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" - fi - XORG_OS="openbsd" - XORG_OS_SUBDIR="bsd" - xorg_bus_bsdpci="yes" - ;; - solaris*) - XORG_OS="solaris" - XORG_OS_SUBDIR="solaris" - # Use the same stubs as BSD for old functions, since we now - # use libpciaccess for PCI - xorg_bus_bsdpci="yes" - for ac_header in sys/kd.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/kd.h" "ac_cv_header_sys_kd_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_kd_h" = x""yes; then : +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_KD_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - + solaris_vt=yes +else + solaris_vt=no fi done - # This really should be tests for specific features, but the #ifdef's - # were done as a simple version check in XFree86 4.x and haven't been - # fixed yet - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris version" >&5 + # Check for minimum supported release + { $as_echo "$as_me:$LINENO: checking Solaris version" >&5 $as_echo_n "checking Solaris version... " >&6; } OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'` if test "${OS_MINOR}" -ge 7 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris ${OS_MINOR}" >&5 + { $as_echo "$as_me:$LINENO: result: Solaris ${OS_MINOR}" >&5 $as_echo "Solaris ${OS_MINOR}" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris \`echo ${host_os}|sed -e 's/^.*solaris//\`" >&5 + { $as_echo "$as_me:$LINENO: result: Solaris \`echo ${host_os}|sed -e 's/^.*solaris//\`" >&5 $as_echo "Solaris \`echo ${host_os}|sed -e 's/^.*solaris//\`" >&6; } fi - if test "${OS_MINOR}" -ge 8 ; then + if test "${OS_MINOR}" -lt 8 ; then + { { $as_echo "$as_me:$LINENO: error: This release no longer supports Solaris versions older than Solaris 8." >&5 +$as_echo "$as_me: error: This release no longer supports Solaris versions older than Solaris 8." >&2;} + { (exit 1); exit 1; }; } + fi + { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } +if test "${ac_cv_have_decl___SUNPRO_C+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. */ +$ac_includes_default +int +main () +{ +#ifndef __SUNPRO_C + (void) __SUNPRO_C; +#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_cv_have_decl___SUNPRO_C=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define __SOL8__ 1" >>confdefs.h + ac_cv_have_decl___SUNPRO_C=no +fi - fi - ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" -if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } +if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then SUNCC="yes" else SUNCC="no" @@ -18281,8 +26434,60 @@ fi if test "x$SUNCC" = "xyes"; then solaris_asm_inline="yes" fi - ac_fn_c_check_decl "$LINENO" "_LP64" "ac_cv_have_decl__LP64" "$ac_includes_default" -if test "x$ac_cv_have_decl__LP64" = x""yes; then : + { $as_echo "$as_me:$LINENO: checking whether _LP64 is declared" >&5 +$as_echo_n "checking whether _LP64 is declared... " >&6; } +if test "${ac_cv_have_decl__LP64+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. */ +$ac_includes_default +int +main () +{ +#ifndef _LP64 + (void) _LP64; +#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_cv_have_decl__LP64=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl__LP64=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__LP64" >&5 +$as_echo "$ac_cv_have_decl__LP64" >&6; } +if test "x$ac_cv_have_decl__LP64" = x""yes; then SOLARIS_64="yes" else SOLARIS_64="no" @@ -18299,17 +26504,18 @@ fi else SOLARIS_INOUT_ARCH="ia32" fi - if test "${OS_MINOR}" -lt 8 ; then - solaris_usl_console="yes" - else - XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" - fi + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" ;; *) - as_fn_error "Unsupported Solaris platform. Only SPARC & x86 \ + { { $as_echo "$as_me:$LINENO: error: Unsupported Solaris platform. Only SPARC & x86 \ + are supported on Solaris in this release. If you are \ + interested in porting Xorg to your platform, please email \ + xorg@lists.freedesktop.org." >&5 +$as_echo "$as_me: error: Unsupported Solaris platform. Only SPARC & x86 \ are supported on Solaris in this release. If you are \ interested in porting Xorg to your platform, please email \ - xorg@lists.freedesktop.org." "$LINENO" 5 ;; + xorg@lists.freedesktop.org." >&2;} + { (exit 1); exit 1; }; } ;; esac if test x$solaris_asm_inline = xyes ; then @@ -18321,13 +26527,20 @@ fi gnu*) XORG_OS="gnu" XORG_OS_SUBDIR="hurd" + # Use the same stubs as BSD for old functions, since we now + # use libpciaccess for PCI + xorg_bus_bsdpci="yes" ;; *) XORG_OS="unknown" XORG_OS_SUBDIR="unknown" - as_fn_error "Your OS is unknown. Xorg currently only supports Linux, \ + { { $as_echo "$as_me:$LINENO: error: Your OS is unknown. Xorg currently only supports Linux, \ Free/Open/NetBSD, Solaris, and OS X. If you are interested in porting \ - Xorg to your platform, please email xorg@lists.freedesktop.org." "$LINENO" 5 + Xorg to your platform, please email xorg@lists.freedesktop.org." >&5 +$as_echo "$as_me: error: Your OS is unknown. Xorg currently only supports Linux, \ + Free/Open/NetBSD, Solaris, and OS X. If you are interested in porting \ + Xorg to your platform, please email xorg@lists.freedesktop.org." >&2;} + { (exit 1); exit 1; }; } ;; esac @@ -18343,44 +26556,40 @@ fi if test "x$DGA" = xauto; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGA" >&5 +{ $as_echo "$as_me:$LINENO: checking for DGA" >&5 $as_echo_n "checking for DGA... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DGA_CFLAGS"; then - pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 +if test -n "$DGA_CFLAGS"; then + pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto >= 2.0.99.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto >= 2.0.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "xf86dgaproto" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "xf86dgaproto >= 2.0.99.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DGA_LIBS"; then - pkg_cv_DGA_LIBS="$DGA_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 +if test -n "$DGA_LIBS"; then + pkg_cv_DGA_LIBS="$DGA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto >= 2.0.99.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto >= 2.0.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "xf86dgaproto" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "xf86dgaproto >= 2.0.99.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -18393,14 +26602,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86dgaproto"` + DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86dgaproto >= 2.0.99.1" 2>&1` else - DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86dgaproto"` + DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86dgaproto >= 2.0.99.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DGA_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } DGA=no elif test $pkg_failed = untried; then @@ -18408,53 +26617,49 @@ elif test $pkg_failed = untried; then else DGA_CFLAGS=$pkg_cv_DGA_CFLAGS DGA_LIBS=$pkg_cv_DGA_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } DGA=yes fi fi if test "x$DGA" = xyes; then - XORG_MODULES="$XORG_MODULES xf86dgaproto" + XORG_MODULES="$XORG_MODULES xf86dgaproto >= 2.0.99.1" pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGA" >&5 +{ $as_echo "$as_me:$LINENO: checking for DGA" >&5 $as_echo_n "checking for DGA... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DGA_CFLAGS"; then - pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\""; } >&5 +if test -n "$DGA_CFLAGS"; then + pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "xf86dgaproto" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DGA_LIBS"; then - pkg_cv_DGA_LIBS="$DGA_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\""; } >&5 +if test -n "$DGA_LIBS"; then + pkg_cv_DGA_LIBS="$DGA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "xf86dgaproto" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -18467,14 +26672,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86dgaproto"` + DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86dgaproto" 2>&1` else - DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86dgaproto"` + DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86dgaproto" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DGA_PKG_ERRORS" >&5 - as_fn_error "Package requirements (xf86dgaproto) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (xf86dgaproto) were not met: + +$DGA_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DGA_CFLAGS +and DGA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (xf86dgaproto) were not met: $DGA_PKG_ERRORS @@ -18484,11 +26700,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables DGA_CFLAGS and DGA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DGA_CFLAGS +and DGA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -18497,63 +26724,64 @@ and DGA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else DGA_CFLAGS=$pkg_cv_DGA_CFLAGS DGA_LIBS=$pkg_cv_DGA_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi -$as_echo "#define DGA 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define DGA 1 +_ACEOF -$as_echo "#define XFreeXDGA 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XFreeXDGA 1 +_ACEOF fi if test "x$XF86VIDMODE" = xauto; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VIDMODE" >&5 +{ $as_echo "$as_me:$LINENO: checking for XF86VIDMODE" >&5 $as_echo_n "checking for XF86VIDMODE... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XF86VIDMODE_CFLAGS"; then - pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 +if test -n "$XF86VIDMODE_CFLAGS"; then + pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto >= 2.2.99.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto >= 2.2.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "xf86vidmodeproto" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "xf86vidmodeproto >= 2.2.99.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XF86VIDMODE_LIBS"; then - pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 +if test -n "$XF86VIDMODE_LIBS"; then + pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto >= 2.2.99.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto >= 2.2.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "xf86vidmodeproto" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "xf86vidmodeproto >= 2.2.99.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -18566,14 +26794,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86vidmodeproto"` + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86vidmodeproto >= 2.2.99.1" 2>&1` else - XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86vidmodeproto"` + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86vidmodeproto >= 2.2.99.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XF86VIDMODE_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } XF86VIDMODE=no elif test $pkg_failed = untried; then @@ -18581,7 +26809,7 @@ elif test $pkg_failed = untried; then else XF86VIDMODE_CFLAGS=$pkg_cv_XF86VIDMODE_CFLAGS XF86VIDMODE_LIBS=$pkg_cv_XF86VIDMODE_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } XF86VIDMODE=yes fi @@ -18590,44 +26818,40 @@ fi XORG_MODULES="$XORG_MODULES xf86vidmodeproto" pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VIDMODE" >&5 +{ $as_echo "$as_me:$LINENO: checking for XF86VIDMODE" >&5 $as_echo_n "checking for XF86VIDMODE... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XF86VIDMODE_CFLAGS"; then - pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 +if test -n "$XF86VIDMODE_CFLAGS"; then + pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto >= 2.2.99.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto >= 2.2.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "xf86vidmodeproto" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "xf86vidmodeproto >= 2.2.99.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XF86VIDMODE_LIBS"; then - pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 +if test -n "$XF86VIDMODE_LIBS"; then + pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto >= 2.2.99.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto >= 2.2.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "xf86vidmodeproto" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "xf86vidmodeproto >= 2.2.99.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -18640,14 +26864,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86vidmodeproto"` + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86vidmodeproto >= 2.2.99.1" 2>&1` else - XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86vidmodeproto"` + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86vidmodeproto >= 2.2.99.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XF86VIDMODE_PKG_ERRORS" >&5 - as_fn_error "Package requirements (xf86vidmodeproto) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (xf86vidmodeproto >= 2.2.99.1) were not met: $XF86VIDMODE_PKG_ERRORS @@ -18657,11 +26881,33 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XF86VIDMODE_CFLAGS and XF86VIDMODE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&5 +$as_echo "$as_me: error: Package requirements (xf86vidmodeproto >= 2.2.99.1) were not met: + +$XF86VIDMODE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XF86VIDMODE_CFLAGS +and XF86VIDMODE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XF86VIDMODE_CFLAGS +and XF86VIDMODE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -18670,60 +26916,59 @@ and XF86VIDMODE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XF86VIDMODE_CFLAGS=$pkg_cv_XF86VIDMODE_CFLAGS XF86VIDMODE_LIBS=$pkg_cv_XF86VIDMODE_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi -$as_echo "#define XF86VIDMODE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XF86VIDMODE 1 +_ACEOF fi if test -n "$XORG_MODULES"; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XORG_MODULES" >&5 +{ $as_echo "$as_me:$LINENO: checking for XORG_MODULES" >&5 $as_echo_n "checking for XORG_MODULES... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XORG_MODULES_CFLAGS"; then - pkg_cv_XORG_MODULES_CFLAGS="$XORG_MODULES_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5 +if test -n "$XORG_MODULES_CFLAGS"; then + pkg_cv_XORG_MODULES_CFLAGS="$XORG_MODULES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\"") >&5 ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XORG_MODULES_CFLAGS=`$PKG_CONFIG --cflags "$XORG_MODULES" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XORG_MODULES_LIBS"; then - pkg_cv_XORG_MODULES_LIBS="$XORG_MODULES_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5 +if test -n "$XORG_MODULES_LIBS"; then + pkg_cv_XORG_MODULES_LIBS="$XORG_MODULES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\"") >&5 ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XORG_MODULES_LIBS=`$PKG_CONFIG --libs "$XORG_MODULES" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -18736,14 +26981,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$XORG_MODULES"` + XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XORG_MODULES" 2>&1` else - XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$XORG_MODULES"` + XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XORG_MODULES" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XORG_MODULES_PKG_ERRORS" >&5 - as_fn_error "Package requirements ($XORG_MODULES) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements ($XORG_MODULES) were not met: + +$XORG_MODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XORG_MODULES_CFLAGS +and XORG_MODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements ($XORG_MODULES) were not met: $XORG_MODULES_PKG_ERRORS @@ -18753,11 +27009,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XORG_MODULES_CFLAGS and XORG_MODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XORG_MODULES_CFLAGS +and XORG_MODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -18766,11 +27033,12 @@ and XORG_MODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XORG_MODULES_CFLAGS=$pkg_cv_XORG_MODULES_CFLAGS XORG_MODULES_LIBS=$pkg_cv_XORG_MODULES_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi @@ -18786,9 +27054,9 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PERL+set}" = set; then : +if test "${ac_cv_path_PERL+set}" = set; then $as_echo_n "(cached) " >&6 else case $PERL in @@ -18801,14 +27069,14 @@ 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 + 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_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" @@ -18817,16 +27085,18 @@ esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 + { $as_echo "$as_me:$LINENO: result: $PERL" >&5 $as_echo "$PERL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$PERL" = xno; then - as_fn_error "Perl is required to build the XFree86/Xorg DDX." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Perl is required to build the XFree86/Xorg DDX." >&5 +$as_echo "$as_me: error: Perl is required to build the XFree86/Xorg DDX." >&2;} + { (exit 1); exit 1; }; } fi @@ -18836,16 +27106,24 @@ fi CONFIGFILE="$sysconfdir/$XF86CONFIGFILE" LOGPREFIX="$logdir/Xorg." -$as_echo "#define XORG_SERVER 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XORG_SERVER 1 +_ACEOF -$as_echo "#define XORGSERVER 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XORGSERVER 1 +_ACEOF -$as_echo "#define XFree86Server 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XFree86Server 1 +_ACEOF -$as_echo "#define XFree86LOADER 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XFree86LOADER 1 +_ACEOF cat >>confdefs.h <<_ACEOF @@ -18853,16 +27131,19 @@ cat >>confdefs.h <<_ACEOF _ACEOF -$as_echo "#define NEED_XF86_TYPES 1" >>confdefs.h - - -$as_echo "#define NEED_XF86_PROTOTYPES 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define NEED_XF86_TYPES 1 +_ACEOF -$as_echo "#define __XSERVERNAME__ \"Xorg\"" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define NEED_XF86_PROTOTYPES 1 +_ACEOF -$as_echo "#define WITH_VGAHW 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define __XSERVERNAME__ "Xorg" +_ACEOF prefix_NONE= @@ -18955,8 +27236,17 @@ cat >>confdefs.h <<_ACEOF _ACEOF -$as_echo "#define XSERVER_LIBPCIACCESS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XSERVER_LIBPCIACCESS 1 +_ACEOF + + if test "x$VGAHW" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define WITH_VGAHW 1 +_ACEOF + fi driverdir="$moduledir/drivers" @@ -18975,8 +27265,6 @@ $as_echo "#define XSERVER_LIBPCIACCESS 1" >>confdefs.h abi_videodrv=`extract_abi VIDEODRV` abi_xinput=`extract_abi XINPUT` abi_extension=`extract_abi EXTENSION` - abi_font=`extract_abi FONT` - @@ -19038,14 +27326,6 @@ else LNXACPI_FALSE= fi - if test "x$solaris_usl_console" = xyes; then - SOLARIS_USL_CONSOLE_TRUE= - SOLARIS_USL_CONSOLE_FALSE='#' -else - SOLARIS_USL_CONSOLE_TRUE='#' - SOLARIS_USL_CONSOLE_FALSE= -fi - if test "x$solaris_asm_inline" = xyes; then SOLARIS_ASM_INLINE_TRUE= SOLARIS_ASM_INLINE_FALSE='#' @@ -19054,6 +27334,14 @@ else SOLARIS_ASM_INLINE_FALSE= fi + if test "x$solaris_vt" = xyes; then + SOLARIS_VT_TRUE= + SOLARIS_VT_FALSE='#' +else + SOLARIS_VT_TRUE='#' + SOLARIS_VT_FALSE= +fi + if test "x$DGA" = xyes; then DGA_TRUE= DGA_FALSE='#' @@ -19072,7 +27360,7 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build XWin DDX" >&5 +{ $as_echo "$as_me:$LINENO: checking whether to build XWin DDX" >&5 $as_echo_n "checking whether to build XWin DDX... " >&6; } if test "x$XWIN" = xauto; then case $host_os in @@ -19080,56 +27368,159 @@ if test "x$XWIN" = xauto; then mingw*) XWIN="yes" ;; *) XWIN="no" ;; esac - XWIN_LIBS="$FB_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $SHADOW_LIB" + XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $RANDR_LIB $RENDER_LIB $XTRAP_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $MIEXT_LAYER_LIB $LAYER_LIB $XPSTUBS_LIB $SHADOW_LIB $OS_LIB" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XWIN" >&5 +{ $as_echo "$as_me:$LINENO: result: $XWIN" >&5 $as_echo "$XWIN" >&6; } if test "x$XWIN" = xyes; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"windowswmproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "windowswmproto") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + WINDOWSWM=yes +else + WINDOWSWM=no +fi + +cat >>confdefs.h <<_ACEOF +#define XORG_VERSION_CURRENT $VENDOR_RELEASE +_ACEOF + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; 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_WINDRES+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="${ac_tool_prefix}windres" + $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 +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5 +$as_echo "$WINDRES" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; 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_WINDRES+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # 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_WINDRES="windres" + $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_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5 +$as_echo "$ac_ct_WINDRES" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" + 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 + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi + case $host_os in cygwin*) XWIN_SERVER_NAME=XWin pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XWINMODULES" >&5 +{ $as_echo "$as_me:$LINENO: checking for XWINMODULES" >&5 $as_echo_n "checking for XWINMODULES... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XWINMODULES_CFLAGS"; then - pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\""; } >&5 +if test -n "$XWINMODULES_CFLAGS"; then + pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau xfont" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XWINMODULES_LIBS"; then - pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\""; } >&5 +if test -n "$XWINMODULES_LIBS"; then + pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau xfont" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -19142,14 +27533,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xdmcp xau xfont" 2>&1` else - XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xdmcp xau xfont" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XWINMODULES_PKG_ERRORS" >&5 - as_fn_error "Package requirements (x11 xdmcp xau xfont) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (x11 xdmcp xau xfont) were not met: + +$XWINMODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (x11 xdmcp xau xfont) were not met: $XWINMODULES_PKG_ERRORS @@ -19159,11 +27561,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XWINMODULES_CFLAGS and XWINMODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -19172,64 +27585,65 @@ and XWINMODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XWINMODULES_CFLAGS=$pkg_cv_XWINMODULES_CFLAGS XWINMODULES_LIBS=$pkg_cv_XWINMODULES_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi -$as_echo "#define HAS_DEVWINDOWS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAS_DEVWINDOWS 1 +_ACEOF -$as_echo "#define ROOTLESS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define ROOTLESS 1 +_ACEOF - CFLAGS="$CFLAGS -DFD_SETSIZE=256" + CFLAGS="$CFLAGS -DFD_SETSIZE=256 -DROOTLESS_WORKAROUND" ;; mingw*) XWIN_SERVER_NAME=Xming pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XWINMODULES" >&5 +{ $as_echo "$as_me:$LINENO: checking for XWINMODULES" >&5 $as_echo_n "checking for XWINMODULES... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XWINMODULES_CFLAGS"; then - pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\""; } >&5 +if test -n "$XWINMODULES_CFLAGS"; then + pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau xfont" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XWINMODULES_LIBS"; then - pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\""; } >&5 +if test -n "$XWINMODULES_LIBS"; then + pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau xfont" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -19242,14 +27656,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xdmcp xau xfont" 2>&1` else - XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xdmcp xau xfont" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XWINMODULES_PKG_ERRORS" >&5 - as_fn_error "Package requirements (x11 xdmcp xau xfont) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (x11 xdmcp xau xfont) were not met: + +$XWINMODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (x11 xdmcp xau xfont) were not met: $XWINMODULES_PKG_ERRORS @@ -19259,11 +27684,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XWINMODULES_CFLAGS and XWINMODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -19272,52 +27708,67 @@ and XWINMODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XWINMODULES_CFLAGS=$pkg_cv_XWINMODULES_CFLAGS XWINMODULES_LIBS=$pkg_cv_XWINMODULES_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi -$as_echo "#define RELOCATE_PROJECTROOT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define RELOCATE_PROJECTROOT 1 +_ACEOF -$as_echo "#define HAS_WINSOCK 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAS_WINSOCK 1 +_ACEOF XWIN_SYS_LIBS=-lwinsock2 ;; esac - XWIN_SYS_LIBS="$XWIN_SYS_LIBS $(XWINMODULES_LIBS)" + XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS" if test "x$DEBUGGING" = xyes; then -$as_echo "#define CYGDEBUG 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define CYGDEBUG 1 +_ACEOF -$as_echo "#define CYGWINDOWING_DEBUG 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define CYGWINDOWING_DEBUG 1 +_ACEOF -$as_echo "#define CYGMULTIWINDOW_DEBUG 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define CYGMULTIWINDOW_DEBUG 1 +_ACEOF fi -$as_echo "#define DDXOSVERRORF 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define DDXOSVERRORF 1 +_ACEOF -$as_echo "#define DDXBEFORERESET 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define DDXBEFORERESET 1 +_ACEOF if test "x$XF86VIDMODE" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling XF86VidMode extension" >&5 + { $as_echo "$as_me:$LINENO: Disabling XF86VidMode extension" >&5 $as_echo "$as_me: Disabling XF86VidMode extension" >&6;} XF86VIDMODE=no fi if test "x$COMPOSITE" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling Composite extension" >&5 + { $as_echo "$as_me:$LINENO: Disabling Composite extension" >&5 $as_echo "$as_me: Disabling Composite extension" >&6;} COMPOSITE=no fi @@ -19338,7 +27789,7 @@ else XWIN_MULTIWINDOW_FALSE= fi - if test "x$XWIN" = xyes && false; then + if test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes; then XWIN_MULTIWINDOWEXTWM_TRUE= XWIN_MULTIWINDOWEXTWM_FALSE='#' else @@ -19397,23 +27848,31 @@ fi if test "x$XQUARTZ" = xyes; then -$as_echo "#define XQUARTZ 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XQUARTZ 1 +_ACEOF -$as_echo "#define ROOTLESS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define ROOTLESS 1 +_ACEOF - DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" + DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xp_init in -lXplugin" >&5 + { $as_echo "$as_me:$LINENO: checking for xp_init in -lXplugin" >&5 $as_echo_n "checking for xp_init in -lXplugin... " >&6; } -if test "${ac_cv_lib_Xplugin_xp_init+set}" = set; then : +if test "${ac_cv_lib_Xplugin_xp_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXplugin $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -19431,64 +27890,85 @@ return xp_init (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +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_lib_Xplugin_xp_init=yes else - ac_cv_lib_Xplugin_xp_init=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xplugin_xp_init=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xplugin_xp_init" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xplugin_xp_init" >&5 $as_echo "$ac_cv_lib_Xplugin_xp_init" >&6; } -if test "x$ac_cv_lib_Xplugin_xp_init" = x""yes; then : +if test "x$ac_cv_lib_Xplugin_xp_init" = x""yes; then : fi - CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA" + CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA" pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPBPROXY" >&5 +{ $as_echo "$as_me:$LINENO: checking for XPBPROXY" >&5 $as_echo_n "checking for XPBPROXY... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XPBPROXY_CFLAGS"; then - pkg_cv_XPBPROXY_CFLAGS="$XPBPROXY_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11") 2>&5 +if test -n "$XPBPROXY_CFLAGS"; then + pkg_cv_XPBPROXY_CFLAGS="$XPBPROXY_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XPBPROXY_CFLAGS=`$PKG_CONFIG --cflags "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XPBPROXY_CFLAGS=`$PKG_CONFIG --cflags "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XPBPROXY_LIBS"; then - pkg_cv_XPBPROXY_LIBS="$XPBPROXY_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11") 2>&5 +if test -n "$XPBPROXY_LIBS"; then + pkg_cv_XPBPROXY_LIBS="$XPBPROXY_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XPBPROXY_LIBS=`$PKG_CONFIG --libs "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XPBPROXY_LIBS=`$PKG_CONFIG --libs "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -19501,14 +27981,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11"` + XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11" 2>&1` else - XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11"` + XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --print-errors "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XPBPROXY_PKG_ERRORS" >&5 - as_fn_error "Package requirements (applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11) were not met: + +$XPBPROXY_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XPBPROXY_CFLAGS +and XPBPROXY_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11) were not met: $XPBPROXY_PKG_ERRORS @@ -19518,11 +28009,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XPBPROXY_CFLAGS and XPBPROXY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XPBPROXY_CFLAGS +and XPBPROXY_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -19531,18 +28033,29 @@ and XPBPROXY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XPBPROXY_CFLAGS=$pkg_cv_XPBPROXY_CFLAGS XPBPROXY_LIBS=$pkg_cv_XPBPROXY_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi + if test "x$XQUARTZ_SPARKLE" = xyes ; then + +cat >>confdefs.h <<\_ACEOF +#define XQUARTZ_SPARKLE 1 +_ACEOF + + fi + if test "x$STANDALONE_XPBPROXY" = xyes ; then -$as_echo "#define STANDALONE_XPBPROXY 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define STANDALONE_XPBPROXY 1 +_ACEOF fi fi @@ -19560,9 +28073,9 @@ OBJCFLAGS='$(CFLAGS)' depcc="$OBJC" am_compiler_list='gcc3 gcc' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_OBJC_dependencies_compiler_type+set}" = set; then : +if test "${am_cv_OBJC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -19668,7 +28181,7 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJC_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:$LINENO: result: $am_cv_OBJC_dependencies_compiler_type" >&5 $as_echo "$am_cv_OBJC_dependencies_compiler_type" >&6; } OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type @@ -19683,22 +28196,6 @@ else fi - if test "x$ac_cv_lib_Xplugin_xp_init" = xyes; then - HAVE_XPLUGIN_TRUE= - HAVE_XPLUGIN_FALSE='#' -else - HAVE_XPLUGIN_TRUE='#' - HAVE_XPLUGIN_FALSE= -fi - - if test "x$xorg_cv_AGL_framework" = xyes; then - HAVE_AGL_FRAMEWORK_TRUE= - HAVE_AGL_FRAMEWORK_FALSE='#' -else - HAVE_AGL_FRAMEWORK_TRUE='#' - HAVE_AGL_FRAMEWORK_FALSE= -fi - if test "x$XQUARTZ" = xyes; then XQUARTZ_TRUE= XQUARTZ_FALSE='#' @@ -19707,6 +28204,14 @@ else XQUARTZ_FALSE= fi + if test "x$XQUARTZ_SPARKLE" != "xno"; then + XQUARTZ_SPARKLE_TRUE= + XQUARTZ_SPARKLE_FALSE='#' +else + XQUARTZ_SPARKLE_TRUE='#' + XQUARTZ_SPARKLE_FALSE= +fi + if test "x$STANDALONE_XPBPROXY" = xyes; then STANDALONE_XPBPROXY_TRUE= STANDALONE_XPBPROXY_FALSE='#' @@ -19719,44 +28224,40 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXMODULES" >&5 +{ $as_echo "$as_me:$LINENO: checking for DMXMODULES" >&5 $as_echo_n "checking for DMXMODULES... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DMXMODULES_CFLAGS"; then - pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi dmxproto xau \$XDMCP_MODULES\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES") 2>&5 +if test -n "$DMXMODULES_CFLAGS"; then + pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DMXMODULES_LIBS"; then - pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi dmxproto xau \$XDMCP_MODULES\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES") 2>&5 +if test -n "$DMXMODULES_LIBS"; then + pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -19769,14 +28270,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES"` + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES" 2>&1` else - DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES"` + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DMXMODULES_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } have_dmx=no elif test $pkg_failed = untried; then @@ -19784,11 +28285,11 @@ elif test $pkg_failed = untried; then else DMXMODULES_CFLAGS=$pkg_cv_DMXMODULES_CFLAGS DMXMODULES_LIBS=$pkg_cv_DMXMODULES_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } have_dmx=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xdmx DDX" >&5 +{ $as_echo "$as_me:$LINENO: checking whether to build Xdmx DDX" >&5 $as_echo_n "checking whether to build Xdmx DDX... " >&6; } if test "x$DMX" = xauto; then DMX="$have_dmx" @@ -19797,7 +28298,7 @@ if test "x$DMX" = xauto; then darwin*) DMX="no" ;; esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DMX" >&5 +{ $as_echo "$as_me:$LINENO: result: $DMX" >&5 $as_echo "$DMX" >&6; } if test "x$DMX" = xyes; then DMX_TRUE= @@ -19810,8 +28311,11 @@ fi if test "x$DMX" = xyes; then if test "x$have_dmx" = xno; then - as_fn_error "Xdmx build explicitly requested, but required - modules not found." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Xdmx build explicitly requested, but required + modules not found." >&5 +$as_echo "$as_me: error: Xdmx build explicitly requested, but required + modules not found." >&2;} + { (exit 1); exit 1; }; } fi DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC" XDMX_CFLAGS="$DMXMODULES_CFLAGS" @@ -19821,154 +28325,320 @@ if test "x$DMX" = xyes; then - ac_fn_c_check_header_mongrel "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_input_h" = x""yes; then : - DMX_BUILD_USB="yes" + if test "${ac_cv_header_linux_input_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for linux/input.h" >&5 +$as_echo_n "checking for linux/input.h... " >&6; } +if test "${ac_cv_header_linux_input_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_input_h" >&5 +$as_echo "$ac_cv_header_linux_input_h" >&6; } else - DMX_BUILD_USB="no" + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking linux/input.h usability" >&5 +$as_echo_n "checking linux/input.h usability... " >&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 +_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_header_compiler=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking linux/input.h presence" >&5 +$as_echo_n "checking linux/input.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } - ac_fn_c_check_header_mongrel "$LINENO" "linux/keyboard.h" "ac_cv_header_linux_keyboard_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_keyboard_h" = x""yes; then : - DMX_BUILD_LNX="yes" +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: linux/input.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: linux/input.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/input.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: linux/input.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: linux/input.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: linux/input.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/input.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: linux/input.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/input.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: linux/input.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/input.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: linux/input.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/input.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: linux/input.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/input.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: linux/input.h: 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 +{ $as_echo "$as_me:$LINENO: checking for linux/input.h" >&5 +$as_echo_n "checking for linux/input.h... " >&6; } +if test "${ac_cv_header_linux_input_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - DMX_BUILD_LNX="no" + ac_cv_header_linux_input_h=$ac_header_preproc fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_input_h" >&5 +$as_echo "$ac_cv_header_linux_input_h" >&6; } +fi +if test "x$ac_cv_header_linux_input_h" = x""yes; then + DMX_BUILD_USB="yes" +else + DMX_BUILD_USB="no" +fi - if test "x$GLX" = xyes; then - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 -$as_echo_n "checking for GL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$GL_CFLAGS"; then - pkg_cv_GL_CFLAGS="$GL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glproto") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto" 2>/dev/null` -else - pkg_failed=yes + if test "${ac_cv_header_linux_keyboard_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for linux/keyboard.h" >&5 +$as_echo_n "checking for linux/keyboard.h... " >&6; } +if test "${ac_cv_header_linux_keyboard_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi - fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_keyboard_h" >&5 +$as_echo "$ac_cv_header_linux_keyboard_h" >&6; } else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$GL_LIBS"; then - pkg_cv_GL_LIBS="$GL_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glproto") 2>&5 + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking linux/keyboard.h usability" >&5 +$as_echo_n "checking linux/keyboard.h usability... " >&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 +_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=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto" 2>/dev/null` -else - pkg_failed=yes -fi - fi + 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_header_compiler=yes else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no + ac_header_compiler=no fi - if test $_pkg_short_errors_supported = yes; then - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glproto"` - else - GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glproto"` - fi - # Put the nasty error message in config.log where it belongs - echo "$GL_PKG_ERRORS" >&5 - as_fn_error "Package requirements (glproto) were not met: +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -$GL_PKG_ERRORS +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking linux/keyboard.h presence" >&5 +$as_echo_n "checking linux/keyboard.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + ac_header_preproc=no +fi -Alternatively, you may set the environment variables GL_CFLAGS -and GL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -Alternatively, you may set the environment variables GL_CFLAGS -and GL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: linux/keyboard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: linux/keyboard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/keyboard.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: linux/keyboard.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: linux/keyboard.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: linux/keyboard.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/keyboard.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: linux/keyboard.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/keyboard.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: linux/keyboard.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/keyboard.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: linux/keyboard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/keyboard.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: linux/keyboard.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/keyboard.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: linux/keyboard.h: 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 +{ $as_echo "$as_me:$LINENO: checking for linux/keyboard.h" >&5 +$as_echo_n "checking for linux/keyboard.h... " >&6; } +if test "${ac_cv_header_linux_keyboard_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_linux_keyboard_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_keyboard_h" >&5 +$as_echo "$ac_cv_header_linux_keyboard_h" >&6; } -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +fi +if test "x$ac_cv_header_linux_keyboard_h" = x""yes; then + DMX_BUILD_LNX="yes" else - GL_CFLAGS=$pkg_cv_GL_CFLAGS - GL_LIBS=$pkg_cv_GL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : + DMX_BUILD_LNX="no" fi - fi + + pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XDMXCONFIG_DEP" >&5 +{ $as_echo "$as_me:$LINENO: checking for XDMXCONFIG_DEP" >&5 $as_echo_n "checking for XDMXCONFIG_DEP... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XDMXCONFIG_DEP_CFLAGS"; then - pkg_cv_XDMXCONFIG_DEP_CFLAGS="$XDMXCONFIG_DEP_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\""; } >&5 +if test -n "$XDMXCONFIG_DEP_CFLAGS"; then + pkg_cv_XDMXCONFIG_DEP_CFLAGS="$XDMXCONFIG_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XDMXCONFIG_DEP_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt xpm x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XDMXCONFIG_DEP_LIBS"; then - pkg_cv_XDMXCONFIG_DEP_LIBS="$XDMXCONFIG_DEP_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\""; } >&5 +if test -n "$XDMXCONFIG_DEP_LIBS"; then + pkg_cv_XDMXCONFIG_DEP_LIBS="$XDMXCONFIG_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XDMXCONFIG_DEP_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt xpm x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -19981,14 +28651,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw7 xmu xt xpm x11"` + XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 xmu xt xpm x11" 2>&1` else - XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw7 xmu xt xpm x11"` + XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 xmu xt xpm x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XDMXCONFIG_DEP_PKG_ERRORS" >&5 - as_fn_error "Package requirements (xaw7 xmu xt xpm x11) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (xaw7 xmu xt xpm x11) were not met: + +$XDMXCONFIG_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XDMXCONFIG_DEP_CFLAGS +and XDMXCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (xaw7 xmu xt xpm x11) were not met: $XDMXCONFIG_DEP_PKG_ERRORS @@ -19998,11 +28679,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XDMXCONFIG_DEP_CFLAGS and XDMXCONFIG_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20011,11 +28693,22 @@ and XDMXCONFIG_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XDMXCONFIG_DEP_CFLAGS +and XDMXCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XDMXCONFIG_DEP_CFLAGS=$pkg_cv_XDMXCONFIG_DEP_CFLAGS XDMXCONFIG_DEP_LIBS=$pkg_cv_XDMXCONFIG_DEP_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi @@ -20023,44 +28716,40 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXEXAMPLES_DEP" >&5 +{ $as_echo "$as_me:$LINENO: checking for DMXEXAMPLES_DEP" >&5 $as_echo_n "checking for DMXEXAMPLES_DEP... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DMXEXAMPLES_DEP_CFLAGS"; then - pkg_cv_DMXEXAMPLES_DEP_CFLAGS="$DMXEXAMPLES_DEP_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dmx xext x11\""; } >&5 +if test -n "$DMXEXAMPLES_DEP_CFLAGS"; then + pkg_cv_DMXEXAMPLES_DEP_CFLAGS="$DMXEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "dmx xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DMXEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "dmx xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DMXEXAMPLES_DEP_LIBS"; then - pkg_cv_DMXEXAMPLES_DEP_LIBS="$DMXEXAMPLES_DEP_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dmx xext x11\""; } >&5 +if test -n "$DMXEXAMPLES_DEP_LIBS"; then + pkg_cv_DMXEXAMPLES_DEP_LIBS="$DMXEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "dmx xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DMXEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "dmx xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -20073,14 +28762,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx xext x11"` + DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dmx xext x11" 2>&1` else - DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx xext x11"` + DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "dmx xext x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DMXEXAMPLES_DEP_PKG_ERRORS" >&5 - as_fn_error "Package requirements (dmx xext x11) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (dmx xext x11) were not met: $DMXEXAMPLES_DEP_PKG_ERRORS @@ -20090,11 +28779,33 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&5 +$as_echo "$as_me: error: Package requirements (dmx xext x11) were not met: + +$DMXEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS +and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS +and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20103,55 +28814,52 @@ and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else DMXEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXEXAMPLES_DEP_CFLAGS DMXEXAMPLES_DEP_LIBS=$pkg_cv_DMXEXAMPLES_DEP_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXXMUEXAMPLES_DEP" >&5 +{ $as_echo "$as_me:$LINENO: checking for DMXXMUEXAMPLES_DEP" >&5 $as_echo_n "checking for DMXXMUEXAMPLES_DEP... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DMXXMUEXAMPLES_DEP_CFLAGS"; then - pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS="$DMXXMUEXAMPLES_DEP_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dmx xmu xext x11\""; } >&5 +if test -n "$DMXXMUEXAMPLES_DEP_CFLAGS"; then + pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS="$DMXXMUEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xmu xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "dmx xmu xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "dmx xmu xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DMXXMUEXAMPLES_DEP_LIBS"; then - pkg_cv_DMXXMUEXAMPLES_DEP_LIBS="$DMXXMUEXAMPLES_DEP_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dmx xmu xext x11\""; } >&5 +if test -n "$DMXXMUEXAMPLES_DEP_LIBS"; then + pkg_cv_DMXXMUEXAMPLES_DEP_LIBS="$DMXXMUEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xmu xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "dmx xmu xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DMXXMUEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "dmx xmu xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -20164,14 +28872,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx xmu xext x11"` + DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dmx xmu xext x11" 2>&1` else - DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx xmu xext x11"` + DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "dmx xmu xext x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DMXXMUEXAMPLES_DEP_PKG_ERRORS" >&5 - as_fn_error "Package requirements (dmx xmu xext x11) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (dmx xmu xext x11) were not met: + +$DMXXMUEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS +and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (dmx xmu xext x11) were not met: $DMXXMUEXAMPLES_DEP_PKG_ERRORS @@ -20181,11 +28900,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS +and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20194,55 +28924,52 @@ and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else DMXXMUEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS DMXXMUEXAMPLES_DEP_LIBS=$pkg_cv_DMXXMUEXAMPLES_DEP_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXXIEXAMPLES_DEP" >&5 +{ $as_echo "$as_me:$LINENO: checking for DMXXIEXAMPLES_DEP" >&5 $as_echo_n "checking for DMXXIEXAMPLES_DEP... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DMXXIEXAMPLES_DEP_CFLAGS"; then - pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS="$DMXXIEXAMPLES_DEP_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dmx xi xext x11\""; } >&5 +if test -n "$DMXXIEXAMPLES_DEP_CFLAGS"; then + pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS="$DMXXIEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xi xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "dmx xi xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "dmx xi xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DMXXIEXAMPLES_DEP_LIBS"; then - pkg_cv_DMXXIEXAMPLES_DEP_LIBS="$DMXXIEXAMPLES_DEP_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dmx xi xext x11\""; } >&5 +if test -n "$DMXXIEXAMPLES_DEP_LIBS"; then + pkg_cv_DMXXIEXAMPLES_DEP_LIBS="$DMXXIEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xi xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "dmx xi xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DMXXIEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "dmx xi xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -20255,14 +28982,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx xi xext x11"` + DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dmx xi xext x11" 2>&1` else - DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx xi xext x11"` + DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "dmx xi xext x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DMXXIEXAMPLES_DEP_PKG_ERRORS" >&5 - as_fn_error "Package requirements (dmx xi xext x11) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (dmx xi xext x11) were not met: + +$DMXXIEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS +and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (dmx xi xext x11) were not met: $DMXXIEXAMPLES_DEP_PKG_ERRORS @@ -20272,11 +29010,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS +and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20285,55 +29034,52 @@ and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else DMXXIEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS DMXXIEXAMPLES_DEP_LIBS=$pkg_cv_DMXXIEXAMPLES_DEP_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XTSTEXAMPLES_DEP" >&5 +{ $as_echo "$as_me:$LINENO: checking for XTSTEXAMPLES_DEP" >&5 $as_echo_n "checking for XTSTEXAMPLES_DEP... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XTSTEXAMPLES_DEP_CFLAGS"; then - pkg_cv_XTSTEXAMPLES_DEP_CFLAGS="$XTSTEXAMPLES_DEP_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xtst xext x11\""; } >&5 +if test -n "$XTSTEXAMPLES_DEP_CFLAGS"; then + pkg_cv_XTSTEXAMPLES_DEP_CFLAGS="$XTSTEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xtst xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XTSTEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "xtst xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XTSTEXAMPLES_DEP_LIBS"; then - pkg_cv_XTSTEXAMPLES_DEP_LIBS="$XTSTEXAMPLES_DEP_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xtst xext x11\""; } >&5 +if test -n "$XTSTEXAMPLES_DEP_LIBS"; then + pkg_cv_XTSTEXAMPLES_DEP_LIBS="$XTSTEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xtst xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XTSTEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "xtst xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -20346,14 +29092,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xtst xext x11"` + XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xtst xext x11" 2>&1` else - XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xtst xext x11"` + XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xtst xext x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XTSTEXAMPLES_DEP_PKG_ERRORS" >&5 - as_fn_error "Package requirements (xtst xext x11) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (xtst xext x11) were not met: + +$XTSTEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS +and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (xtst xext x11) were not met: $XTSTEXAMPLES_DEP_PKG_ERRORS @@ -20363,11 +29120,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS +and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20376,55 +29144,52 @@ and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XTSTEXAMPLES_DEP_CFLAGS=$pkg_cv_XTSTEXAMPLES_DEP_CFLAGS XTSTEXAMPLES_DEP_LIBS=$pkg_cv_XTSTEXAMPLES_DEP_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRESEXAMPLES_DEP" >&5 +{ $as_echo "$as_me:$LINENO: checking for XRESEXAMPLES_DEP" >&5 $as_echo_n "checking for XRESEXAMPLES_DEP... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XRESEXAMPLES_DEP_CFLAGS"; then - pkg_cv_XRESEXAMPLES_DEP_CFLAGS="$XRESEXAMPLES_DEP_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xres xext x11\""; } >&5 +if test -n "$XRESEXAMPLES_DEP_CFLAGS"; then + pkg_cv_XRESEXAMPLES_DEP_CFLAGS="$XRESEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xres xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xres xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XRESEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "xres xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XRESEXAMPLES_DEP_LIBS"; then - pkg_cv_XRESEXAMPLES_DEP_LIBS="$XRESEXAMPLES_DEP_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xres xext x11\""; } >&5 +if test -n "$XRESEXAMPLES_DEP_LIBS"; then + pkg_cv_XRESEXAMPLES_DEP_LIBS="$XRESEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xres xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xres xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XRESEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "xres xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -20437,14 +29202,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xres xext x11"` + XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xres xext x11" 2>&1` else - XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xres xext x11"` + XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xres xext x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XRESEXAMPLES_DEP_PKG_ERRORS" >&5 - as_fn_error "Package requirements (xres xext x11) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (xres xext x11) were not met: + +$XRESEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS +and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (xres xext x11) were not met: $XRESEXAMPLES_DEP_PKG_ERRORS @@ -20454,11 +29230,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS +and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20467,55 +29254,52 @@ and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XRESEXAMPLES_DEP_CFLAGS=$pkg_cv_XRESEXAMPLES_DEP_CFLAGS XRESEXAMPLES_DEP_LIBS=$pkg_cv_XRESEXAMPLES_DEP_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11EXAMPLES_DEP" >&5 +{ $as_echo "$as_me:$LINENO: checking for X11EXAMPLES_DEP" >&5 $as_echo_n "checking for X11EXAMPLES_DEP... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$X11EXAMPLES_DEP_CFLAGS"; then - pkg_cv_X11EXAMPLES_DEP_CFLAGS="$X11EXAMPLES_DEP_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext x11\""; } >&5 +if test -n "$X11EXAMPLES_DEP_CFLAGS"; then + pkg_cv_X11EXAMPLES_DEP_CFLAGS="$X11EXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_X11EXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$X11EXAMPLES_DEP_LIBS"; then - pkg_cv_X11EXAMPLES_DEP_LIBS="$X11EXAMPLES_DEP_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext x11\""; } >&5 +if test -n "$X11EXAMPLES_DEP_LIBS"; then + pkg_cv_X11EXAMPLES_DEP_LIBS="$X11EXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xext x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_X11EXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "xext x11" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -20528,14 +29312,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext x11"` + X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xext x11" 2>&1` else - X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext x11"` + X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xext x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$X11EXAMPLES_DEP_PKG_ERRORS" >&5 - as_fn_error "Package requirements (xext x11) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (xext x11) were not met: + +$X11EXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS +and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (xext x11) were not met: $X11EXAMPLES_DEP_PKG_ERRORS @@ -20545,11 +29340,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS +and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20558,11 +29364,12 @@ and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else X11EXAMPLES_DEP_CFLAGS=$pkg_cv_X11EXAMPLES_DEP_CFLAGS X11EXAMPLES_DEP_LIBS=$pkg_cv_X11EXAMPLES_DEP_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi @@ -20602,18 +29409,160 @@ fi if test "$KDRIVE" = yes; then -$as_echo "#define KDRIVESERVER 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define KDRIVESERVER 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define KDRIVEDDXACTIONS /**/ +_ACEOF + + + + +for ac_header in sys/vm86.h sys/io.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no +fi -$as_echo "#define KDRIVEDDXACTIONS /**/" >>confdefs.h +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } - for ac_header in sys/vm86.h sys/io.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -20629,16 +29578,157 @@ done if test "x$KDRIVEVESA" = xyes; then KDRIVEFBDEVLIB=yes -$as_echo "#define KDRIVEVESA 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define KDRIVEVESA 1 +_ACEOF fi - for ac_header in linux/fb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "linux/fb.h" "ac_cv_header_linux_fb_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_fb_h" = x""yes; then : + +for ac_header in linux/fb.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_FB_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -20652,19 +29742,25 @@ done if test "x$XFBDEV" = xyes; then KDRIVEFBDEVLIB=yes -$as_echo "#define KDRIVEFBDEV 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define KDRIVEFBDEV 1 +_ACEOF fi # tslib... - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ts_open in -lts" >&5 + { $as_echo "$as_me:$LINENO: checking for ts_open in -lts" >&5 $as_echo_n "checking for ts_open in -lts... " >&6; } -if test "${ac_cv_lib_ts_ts_open+set}" = set; then : +if test "${ac_cv_lib_ts_ts_open+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lts $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20682,18 +29778,43 @@ return ts_open (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +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_lib_ts_ts_open=yes else - ac_cv_lib_ts_ts_open=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ts_ts_open=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ts_ts_open" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ts_ts_open" >&5 $as_echo "$ac_cv_lib_ts_ts_open" >&6; } -if test "x$ac_cv_lib_ts_ts_open" = x""yes; then : +if test "x$ac_cv_lib_ts_ts_open" = x""yes; then HAVE_TSLIB="yes" fi @@ -20703,20 +29824,163 @@ fi if test "x$TSLIB" = xyes; then if ! test "x$HAVE_TSLIB" = xyes; then - as_fn_error "tslib must be installed to build the tslib input driver." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: tslib must be installed to build the tslib input driver." >&5 +$as_echo "$as_me: error: tslib must be installed to build the tslib input driver." >&2;} + { (exit 1); exit 1; }; } fi TSLIB_LIBS="-lts" -$as_echo "#define TSLIB 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define TSLIB 1 +_ACEOF + + fi + + +for ac_header in SDL/SDL.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 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_header_compiler=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi - fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } - for ac_header in SDL/SDL.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "SDL/SDL.h" "ac_cv_header_SDL_SDL_h" "$ac_includes_default" -if test "x$ac_cv_header_SDL_SDL_h" = x""yes; then : +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_SDL_SDL_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -20730,7 +29994,9 @@ done if test x"$XSDL" = xyes; then # PKG_CHECK_MODULES(XSDL_EXTRA, Xfont xau $XDMCP_MODULES) -$as_echo "#define XSDLSERVER 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define XSDLSERVER 1 +_ACEOF XSDL_LIBS="`sdl-config --libs`" XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS" @@ -20746,44 +30012,40 @@ $as_echo "#define XSDLSERVER 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEPHYR" >&5 +{ $as_echo "$as_me:$LINENO: checking for XEPHYR" >&5 $as_echo_n "checking for XEPHYR... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XEPHYR_CFLAGS"; then - pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 +if test -n "$XEPHYR_CFLAGS"; then + pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\"") >&5 ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XEPHYR_LIBS"; then - pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 +if test -n "$XEPHYR_LIBS"; then + pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\"") >&5 ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -20796,14 +30058,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$XEPHYR_REQUIRED_LIBS"` + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XEPHYR_REQUIRED_LIBS" 2>&1` else - XEPHYR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$XEPHYR_REQUIRED_LIBS"` + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XEPHYR_REQUIRED_LIBS" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XEPHYR_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } xephyr="no" elif test $pkg_failed = untried; then @@ -20811,7 +30073,7 @@ elif test $pkg_failed = untried; then else XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } xephyr="yes" fi @@ -20820,18 +30082,106 @@ fi fi # Xephyr needs nanosleep() which is in librt on Solaris - ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" -if test "x$ac_cv_func_nanosleep" = x""yes; then : + { $as_echo "$as_me:$LINENO: checking for nanosleep" >&5 +$as_echo_n "checking for nanosleep... " >&6; } +if test "${ac_cv_func_nanosleep+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 nanosleep to an innocuous variant, in case declares nanosleep. + For example, HP-UX 11i declares gettimeofday. */ +#define nanosleep innocuous_nanosleep + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char nanosleep (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef nanosleep + +/* 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 nanosleep (); +/* 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_nanosleep || defined __stub___nanosleep +choke me +#endif + +int +main () +{ +return nanosleep (); + ; + 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_nanosleep=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_nanosleep=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_nanosleep" >&5 +$as_echo "$ac_cv_func_nanosleep" >&6; } +if test "x$ac_cv_func_nanosleep" = x""yes; then + : else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 + { $as_echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5 $as_echo_n "checking for nanosleep in -lrt... " >&6; } -if test "${ac_cv_lib_rt_nanosleep+set}" = set; then : +if test "${ac_cv_lib_rt_nanosleep+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20849,18 +30199,43 @@ return nanosleep (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +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_lib_rt_nanosleep=yes else - ac_cv_lib_rt_nanosleep=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_rt_nanosleep=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_nanosleep" >&5 $as_echo "$ac_cv_lib_rt_nanosleep" >&6; } -if test "x$ac_cv_lib_rt_nanosleep" = x""yes; then : +if test "x$ac_cv_lib_rt_nanosleep" = x""yes; then XEPHYR_LIBS="$XEPHYR_LIBS -lrt" fi @@ -20870,44 +30245,40 @@ fi if test "x$TSLIB" = xyes; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TSLIB" >&5 +{ $as_echo "$as_me:$LINENO: checking for TSLIB" >&5 $as_echo_n "checking for TSLIB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$TSLIB_CFLAGS"; then - pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\""; } >&5 +if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\"") >&5 ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-1.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$TSLIB_LIBS"; then - pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\""; } >&5 +if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\"") >&5 ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-1.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -20920,14 +30291,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib-1.0"` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib-1.0" 2>&1` else - TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib-1.0"` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib-1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TSLIB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_TSLIB="no" elif test $pkg_failed = untried; then @@ -20935,15 +30306,19 @@ elif test $pkg_failed = untried; then else TSLIB_CFLAGS=$pkg_cv_TSLIB_CFLAGS TSLIB_LIBS=$pkg_cv_TSLIB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_TSLIB="yes" fi if test "x$HAVE_TSLIB" = xno; then - as_fn_error "tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" >&5 +$as_echo "$as_me: error: tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" >&2;} + { (exit 1); exit 1; }; } fi -$as_echo "#define TSLIB 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define TSLIB 1 +_ACEOF fi @@ -20956,15 +30331,15 @@ $as_echo "#define TSLIB 1" >>confdefs.h KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS" KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB" - KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' + KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la' case $host_os in *linux*) - KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la' KDRIVELINUX=yes ;; esac - KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' - KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB" + KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.la' + KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB" KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS" @@ -21046,78 +30421,11 @@ fi -$as_echo "#define __XKBDEFRULES__ \"xorg\"" >>confdefs.h - - - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix - eval ac_define_dir="\"$XKBPATH\"" - eval ac_define_dir="\"$ac_define_dir\"" - XKB_BASE_DIRECTORY="$ac_define_dir" - - -cat >>confdefs.h <<_ACEOF -#define XKB_BASE_DIRECTORY "$ac_define_dir" -_ACEOF - - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE - - - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix - eval ac_define_dir="\"$bindir\"" - eval ac_define_dir="\"$ac_define_dir\"" - XKB_BIN_DIRECTORY="$ac_define_dir" - - -cat >>confdefs.h <<_ACEOF -#define XKB_BIN_DIRECTORY "$ac_define_dir" -_ACEOF - - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE - - -# Make sure XKM_OUTPUT_DIR is an absolute path -XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` - -if [ x$XKBOUTPUT_FIRSTCHAR != x/ ] ; then - XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" -fi - -# XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed -# XKB_COMPILED_DIR (used in Makefiles) must not or install-sh gets confused - -XKBOUTPUT=`echo $XKBOUTPUT/ | sed 's|/*$|/|'` -XKB_COMPILED_DIR=`echo $XKBOUTPUT | sed 's|/*$||'` - - - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix - eval ac_define_dir="\"$XKBOUTPUT\"" - eval ac_define_dir="\"$ac_define_dir\"" - XKM_OUTPUT_DIR="$ac_define_dir" - - -cat >>confdefs.h <<_ACEOF -#define XKM_OUTPUT_DIR "$ac_define_dir" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF - - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE - - - - - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include @@ -21133,11 +30441,36 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define _GNU_SOURCE 1" >>confdefs.h fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -21209,42 +30542,136 @@ if test x$MISC_MAN_DIR = x ; then MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' fi -if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; - esac -fi -if test x$DRIVER_MAN_DIR = x ; then - DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + + + + + + + + + + + + + + + +CHANGELOG_CMD="(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)" + +distcleancheck_listfiles='find . -type f ! -name ChangeLog -print' + + + + + + # Check whether --enable-shave was given. +if test "${enable_shave+set}" = set; then + enableval=$enable_shave; +else + enable_shave=yes + +fi + + + + if test x"$enable_shave" = xyes; then + shavedir="$ac_pwd/." + + + MAKEFLAGS=-s + + AM_MAKEFLAGS='`test -z $V && echo -s`' + + + # Extract the first word of "sed", so it can be a program name with args. +set dummy sed; 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_SED+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$SED"; then + ac_cv_prog_SED="$SED" # 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_SED="sed" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_SED" && ac_cv_prog_SED="false" fi - -if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; - esac fi -if test x$ADMIN_MAN_DIR = x ; then - ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +SED=$ac_cv_prog_SED +if test -n "$SED"; then + { $as_echo "$as_me:$LINENO: result: $SED" >&5 +$as_echo "$SED" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + SHAVE_SAVED_LIBTOOL=$LIBTOOL + LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'" + SHAVE_SAVED_CC=$CC + SHAVE_SAVED_CXX=$CXX + SHAVE_SAVED_FC=$FC + SHAVE_SAVED_F77=$F77 + CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}" + CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}" + FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}" + F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}" + V=@ + else + V=1 + fi + Q='$(V:1=)' - - -ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile fb/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/damage/Makefile miext/shadow/Makefile miext/cw/Makefile miext/rootless/Makefile os/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/dixmods/extmod/Makefile hw/xfree86/doc/Makefile hw/xfree86/doc/devel/Makefile hw/xfree86/doc/man/Makefile hw/xfree86/doc/sgml/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/dummylib/Makefile hw/xfree86/exa/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/sco/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/sysv/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xaa/Makefile hw/xfree86/xf8_16bpp/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/dmx/config/Makefile hw/dmx/doc/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/vfb/Makefile hw/xnest/Makefile hw/xwin/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/doc/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/fake/Makefile hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/sdl/Makefile hw/kdrive/src/Makefile xorg-server.pc" +ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile fb/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/damage/Makefile miext/shadow/Makefile miext/cw/Makefile miext/rootless/Makefile os/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/dixmods/extmod/Makefile hw/xfree86/doc/Makefile hw/xfree86/doc/devel/Makefile hw/xfree86/doc/man/Makefile hw/xfree86/doc/sgml/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/exa/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/sco/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/sysv/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xaa/Makefile hw/xfree86/xf8_16bpp/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/dmx/config/Makefile hw/dmx/doc/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/vfb/Makefile hw/xnest/Makefile hw/xwin/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/doc/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/fake/Makefile hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/sdl/Makefile hw/kdrive/src/Makefile test/Makefile test/xi2/Makefile xorg-server.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -21273,13 +30700,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 + *_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= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; + *) $as_unset $ac_var ;; esac ;; esac done @@ -21287,8 +30714,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (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 \. + # `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" @@ -21311,11 +30738,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 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:${as_lineno-$LINENO}: updating cache $cache_file" >&5 + { $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:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 + { $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 @@ -21335,8 +30762,8 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 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. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -21352,403 +30779,714 @@ else fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $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_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $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_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $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 if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then - as_fn_error "conditional \"am__fastdepCCAS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XSERVER_DTRACE_TRUE}" && test -z "${XSERVER_DTRACE_FALSE}"; then - as_fn_error "conditional \"XSERVER_DTRACE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XSERVER_DTRACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XSERVER_DTRACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${NEED_STRLCAT_TRUE}" && test -z "${NEED_STRLCAT_FALSE}"; then - as_fn_error "conditional \"NEED_STRLCAT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"NEED_STRLCAT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"NEED_STRLCAT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${NEED_VSNPRINTF_TRUE}" && test -z "${NEED_VSNPRINTF_FALSE}"; then - as_fn_error "conditional \"NEED_VSNPRINTF\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"NEED_VSNPRINTF\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"NEED_VSNPRINTF\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${AGP_TRUE}" && test -z "${AGP_FALSE}"; then - as_fn_error "conditional \"AGP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"AGP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"AGP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${LNXAPM_TRUE}" && test -z "${LNXAPM_FALSE}"; then - as_fn_error "conditional \"LNXAPM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"LNXAPM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"LNXAPM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${FBDEVHW_TRUE}" && test -z "${FBDEVHW_FALSE}"; then - as_fn_error "conditional \"FBDEVHW\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"FBDEVHW\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"FBDEVHW\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${FREEBSD_KLDLOAD_TRUE}" && test -z "${FREEBSD_KLDLOAD_FALSE}"; then - as_fn_error "conditional \"FREEBSD_KLDLOAD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"FREEBSD_KLDLOAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"FREEBSD_KLDLOAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${BSD_APM_TRUE}" && test -z "${BSD_APM_FALSE}"; then - as_fn_error "conditional \"BSD_APM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"BSD_APM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BSD_APM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${BSD_KQUEUE_APM_TRUE}" && test -z "${BSD_KQUEUE_APM_FALSE}"; then - as_fn_error "conditional \"BSD_KQUEUE_APM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"BSD_KQUEUE_APM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BSD_KQUEUE_APM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${ALPHA_VIDEO_TRUE}" && test -z "${ALPHA_VIDEO_FALSE}"; then - as_fn_error "conditional \"ALPHA_VIDEO\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"ALPHA_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"ALPHA_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${ARM_VIDEO_TRUE}" && test -z "${ARM_VIDEO_FALSE}"; then - as_fn_error "conditional \"ARM_VIDEO\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"ARM_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"ARM_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${I386_VIDEO_TRUE}" && test -z "${I386_VIDEO_FALSE}"; then - as_fn_error "conditional \"I386_VIDEO\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"I386_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"I386_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${PPC_VIDEO_TRUE}" && test -z "${PPC_VIDEO_FALSE}"; then - as_fn_error "conditional \"PPC_VIDEO\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"PPC_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"PPC_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${SPARC64_VIDEO_TRUE}" && test -z "${SPARC64_VIDEO_FALSE}"; then - as_fn_error "conditional \"SPARC64_VIDEO\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${KDRIVE_HW_TRUE}" && test -z "${KDRIVE_HW_FALSE}"; then - as_fn_error "conditional \"KDRIVE_HW\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"SPARC64_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SPARC64_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${INSTALL_SETUID_TRUE}" && test -z "${INSTALL_SETUID_FALSE}"; then - as_fn_error "conditional \"INSTALL_SETUID\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"INSTALL_SETUID\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"INSTALL_SETUID\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${SECURE_RPC_TRUE}" && test -z "${SECURE_RPC_FALSE}"; then - as_fn_error "conditional \"SECURE_RPC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"SECURE_RPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SECURE_RPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${INT10_VM86_TRUE}" && test -z "${INT10_VM86_FALSE}"; then - as_fn_error "conditional \"INT10_VM86\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"INT10_VM86\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"INT10_VM86\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${INT10_X86EMU_TRUE}" && test -z "${INT10_X86EMU_FALSE}"; then - as_fn_error "conditional \"INT10_X86EMU\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"INT10_X86EMU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"INT10_X86EMU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${INT10_STUB_TRUE}" && test -z "${INT10_STUB_FALSE}"; then - as_fn_error "conditional \"INT10_STUB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"INT10_STUB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"INT10_STUB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${BUILDDOCS_TRUE}" && test -z "${BUILDDOCS_FALSE}"; then - as_fn_error "conditional \"BUILDDOCS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILDDOCS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BUILDDOCS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${BUILD_LINUXDOC_TRUE}" && test -z "${BUILD_LINUXDOC_FALSE}"; then - as_fn_error "conditional \"BUILD_LINUXDOC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_LINUXDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BUILD_LINUXDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${BUILD_PDFDOC_TRUE}" && test -z "${BUILD_PDFDOC_FALSE}"; then - as_fn_error "conditional \"BUILD_PDFDOC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_PDFDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BUILD_PDFDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${INSTALL_LIBXF86CONFIG_TRUE}" && test -z "${INSTALL_LIBXF86CONFIG_FALSE}"; then - as_fn_error "conditional \"INSTALL_LIBXF86CONFIG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"INSTALL_LIBXF86CONFIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"INSTALL_LIBXF86CONFIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${HAVE_DBUS_TRUE}" && test -z "${HAVE_DBUS_FALSE}"; then - as_fn_error "conditional \"HAVE_DBUS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"HAVE_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${CONFIG_DBUS_API_TRUE}" && test -z "${CONFIG_DBUS_API_FALSE}"; then - as_fn_error "conditional \"CONFIG_DBUS_API\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_DBUS_API\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"CONFIG_DBUS_API\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${CONFIG_HAL_TRUE}" && test -z "${CONFIG_HAL_FALSE}"; then - as_fn_error "conditional \"CONFIG_HAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_HAL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"CONFIG_HAL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${CONFIG_NEED_DBUS_TRUE}" && test -z "${CONFIG_NEED_DBUS_FALSE}"; then - as_fn_error "conditional \"CONFIG_NEED_DBUS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_NEED_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"CONFIG_NEED_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XV_TRUE}" && test -z "${XV_FALSE}"; then - as_fn_error "conditional \"XV\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XV\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XV\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XVMC_TRUE}" && test -z "${XVMC_FALSE}"; then - as_fn_error "conditional \"XVMC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XVMC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XVMC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XREGISTRY_TRUE}" && test -z "${XREGISTRY_FALSE}"; then - as_fn_error "conditional \"XREGISTRY\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XREGISTRY\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XREGISTRY\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${COMPOSITE_TRUE}" && test -z "${COMPOSITE_FALSE}"; then - as_fn_error "conditional \"COMPOSITE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"COMPOSITE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"COMPOSITE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${MITSHM_TRUE}" && test -z "${MITSHM_FALSE}"; then - as_fn_error "conditional \"MITSHM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"MITSHM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"MITSHM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${RECORD_TRUE}" && test -z "${RECORD_FALSE}"; then - as_fn_error "conditional \"RECORD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"RECORD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"RECORD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${SCREENSAVER_TRUE}" && test -z "${SCREENSAVER_FALSE}"; then - as_fn_error "conditional \"SCREENSAVER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"SCREENSAVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SCREENSAVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${RES_TRUE}" && test -z "${RES_FALSE}"; then - as_fn_error "conditional \"RES\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"RES\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"RES\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${GLX_TRUE}" && test -z "${GLX_FALSE}"; then - as_fn_error "conditional \"GLX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"GLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"GLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${AIGLX_TRUE}" && test -z "${AIGLX_FALSE}"; then - as_fn_error "conditional \"AIGLX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"AIGLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"AIGLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DRI_TRUE}" && test -z "${DRI_FALSE}"; then - as_fn_error "conditional \"DRI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DRI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DRI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DRI2_TRUE}" && test -z "${DRI2_FALSE}"; then - as_fn_error "conditional \"DRI2\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DRI2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DRI2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DRI2_AIGLX_TRUE}" && test -z "${DRI2_AIGLX_FALSE}"; then - as_fn_error "conditional \"DRI2_AIGLX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DRI2_AIGLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DRI2_AIGLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XINERAMA_TRUE}" && test -z "${XINERAMA_FALSE}"; then - as_fn_error "conditional \"XINERAMA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XINERAMA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XINERAMA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XACE_TRUE}" && test -z "${XACE_FALSE}"; then - as_fn_error "conditional \"XACE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XSELINUX_TRUE}" && test -z "${XSELINUX_FALSE}"; then - as_fn_error "conditional \"XSELINUX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XSELINUX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XSELINUX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XCSECURITY_TRUE}" && test -z "${XCSECURITY_FALSE}"; then - as_fn_error "conditional \"XCSECURITY\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XCSECURITY\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XCSECURITY\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${MULTIBUFFER_TRUE}" && test -z "${MULTIBUFFER_FALSE}"; then - as_fn_error "conditional \"MULTIBUFFER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"MULTIBUFFER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"MULTIBUFFER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DBE_TRUE}" && test -z "${DBE_FALSE}"; then - as_fn_error "conditional \"DBE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DBE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DBE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XF86BIGFONT_TRUE}" && test -z "${XF86BIGFONT_FALSE}"; then - as_fn_error "conditional \"XF86BIGFONT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XF86BIGFONT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XF86BIGFONT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DPMSExtension_TRUE}" && test -z "${DPMSExtension_FALSE}"; then - as_fn_error "conditional \"DPMSExtension\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DPMSExtension\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DPMSExtension\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XCALIBRATE_TRUE}" && test -z "${XCALIBRATE_FALSE}"; then - as_fn_error "conditional \"XCALIBRATE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XCALIBRATE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XCALIBRATE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XF86UTILS_TRUE}" && test -z "${XF86UTILS_FALSE}"; then - as_fn_error "conditional \"XF86UTILS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XF86UTILS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XF86UTILS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XAA_TRUE}" && test -z "${XAA_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"XAA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XAA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${VGAHW_TRUE}" && test -z "${VGAHW_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"VGAHW\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"VGAHW\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${VBE_TRUE}" && test -z "${VBE_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"VBE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"VBE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${INT10MODULE_TRUE}" && test -z "${INT10MODULE_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"INT10MODULE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"INT10MODULE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XDMCP_TRUE}" && test -z "${XDMCP_FALSE}"; then - as_fn_error "conditional \"XDMCP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XDMCP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XDMCP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XDMAUTH_TRUE}" && test -z "${XDMAUTH_FALSE}"; then - as_fn_error "conditional \"XDMAUTH\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XDMAUTH\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XDMAUTH\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then - as_fn_error "conditional \"DEBUG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${UNITTESTS_TRUE}" && test -z "${UNITTESTS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"UNITTESTS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"UNITTESTS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XVFB_TRUE}" && test -z "${XVFB_FALSE}"; then - as_fn_error "conditional \"XVFB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XVFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XVFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XNEST_TRUE}" && test -z "${XNEST_FALSE}"; then - as_fn_error "conditional \"XNEST\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XNEST\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XNEST\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XORG_TRUE}" && test -z "${XORG_FALSE}"; then - as_fn_error "conditional \"XORG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XORG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XORG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XORG_BUS_LINUXPCI_TRUE}" && test -z "${XORG_BUS_LINUXPCI_FALSE}"; then - as_fn_error "conditional \"XORG_BUS_LINUXPCI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XORG_BUS_LINUXPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XORG_BUS_LINUXPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XORG_BUS_BSDPCI_TRUE}" && test -z "${XORG_BUS_BSDPCI_FALSE}"; then - as_fn_error "conditional \"XORG_BUS_BSDPCI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XORG_BUS_BSDPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XORG_BUS_BSDPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XORG_BUS_SPARC_TRUE}" && test -z "${XORG_BUS_SPARC_FALSE}"; then - as_fn_error "conditional \"XORG_BUS_SPARC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XORG_BUS_SPARC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XORG_BUS_SPARC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${LINUX_IA64_TRUE}" && test -z "${LINUX_IA64_FALSE}"; then - as_fn_error "conditional \"LINUX_IA64\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"LINUX_IA64\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"LINUX_IA64\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${LINUX_ALPHA_TRUE}" && test -z "${LINUX_ALPHA_FALSE}"; then - as_fn_error "conditional \"LINUX_ALPHA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"LINUX_ALPHA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"LINUX_ALPHA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${LNXACPI_TRUE}" && test -z "${LNXACPI_FALSE}"; then - as_fn_error "conditional \"LNXACPI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${SOLARIS_USL_CONSOLE_TRUE}" && test -z "${SOLARIS_USL_CONSOLE_FALSE}"; then - as_fn_error "conditional \"SOLARIS_USL_CONSOLE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"LNXACPI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"LNXACPI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${SOLARIS_ASM_INLINE_TRUE}" && test -z "${SOLARIS_ASM_INLINE_FALSE}"; then - as_fn_error "conditional \"SOLARIS_ASM_INLINE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"SOLARIS_ASM_INLINE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOLARIS_ASM_INLINE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOLARIS_VT_TRUE}" && test -z "${SOLARIS_VT_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOLARIS_VT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOLARIS_VT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DGA_TRUE}" && test -z "${DGA_FALSE}"; then - as_fn_error "conditional \"DGA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DGA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DGA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XF86VIDMODE_TRUE}" && test -z "${XF86VIDMODE_FALSE}"; then - as_fn_error "conditional \"XF86VIDMODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XF86VIDMODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XF86VIDMODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XWIN_TRUE}" && test -z "${XWIN_FALSE}"; then - as_fn_error "conditional \"XWIN\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XWIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XWIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XWIN_MULTIWINDOW_TRUE}" && test -z "${XWIN_MULTIWINDOW_FALSE}"; then - as_fn_error "conditional \"XWIN_MULTIWINDOW\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XWIN_MULTIWINDOW\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XWIN_MULTIWINDOW\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XWIN_MULTIWINDOWEXTWM_TRUE}" && test -z "${XWIN_MULTIWINDOWEXTWM_FALSE}"; then - as_fn_error "conditional \"XWIN_MULTIWINDOWEXTWM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XWIN_MULTIWINDOWEXTWM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XWIN_MULTIWINDOWEXTWM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XWIN_CLIPBOARD_TRUE}" && test -z "${XWIN_CLIPBOARD_FALSE}"; then - as_fn_error "conditional \"XWIN_CLIPBOARD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XWIN_CLIPBOARD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XWIN_CLIPBOARD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XWIN_GLX_WINDOWS_TRUE}" && test -z "${XWIN_GLX_WINDOWS_FALSE}"; then - as_fn_error "conditional \"XWIN_GLX_WINDOWS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XWIN_GLX_WINDOWS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XWIN_GLX_WINDOWS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XWIN_NATIVEGDI_TRUE}" && test -z "${XWIN_NATIVEGDI_FALSE}"; then - as_fn_error "conditional \"XWIN_NATIVEGDI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XWIN_NATIVEGDI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XWIN_NATIVEGDI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XWIN_PRIMARYFB_TRUE}" && test -z "${XWIN_PRIMARYFB_FALSE}"; then - as_fn_error "conditional \"XWIN_PRIMARYFB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XWIN_PRIMARYFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XWIN_PRIMARYFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XWIN_RANDR_TRUE}" && test -z "${XWIN_RANDR_FALSE}"; then - as_fn_error "conditional \"XWIN_RANDR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XWIN_RANDR\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XWIN_RANDR\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XWIN_XV_TRUE}" && test -z "${XWIN_XV_FALSE}"; then - as_fn_error "conditional \"XWIN_XV\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XWIN_XV\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XWIN_XV\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then - as_fn_error "conditional \"am__fastdepOBJC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_XPLUGIN_TRUE}" && test -z "${HAVE_XPLUGIN_FALSE}"; then - as_fn_error "conditional \"HAVE_XPLUGIN\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_AGL_FRAMEWORK_TRUE}" && test -z "${HAVE_AGL_FRAMEWORK_FALSE}"; then - as_fn_error "conditional \"HAVE_AGL_FRAMEWORK\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepOBJC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepOBJC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XQUARTZ_TRUE}" && test -z "${XQUARTZ_FALSE}"; then - as_fn_error "conditional \"XQUARTZ\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XQUARTZ\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XQUARTZ\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XQUARTZ_SPARKLE_TRUE}" && test -z "${XQUARTZ_SPARKLE_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"XQUARTZ_SPARKLE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XQUARTZ_SPARKLE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${STANDALONE_XPBPROXY_TRUE}" && test -z "${STANDALONE_XPBPROXY_FALSE}"; then - as_fn_error "conditional \"STANDALONE_XPBPROXY\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"STANDALONE_XPBPROXY\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"STANDALONE_XPBPROXY\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DMX_TRUE}" && test -z "${DMX_FALSE}"; then - as_fn_error "conditional \"DMX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DMX_BUILD_LNX_TRUE}" && test -z "${DMX_BUILD_LNX_FALSE}"; then - as_fn_error "conditional \"DMX_BUILD_LNX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DMX_BUILD_LNX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DMX_BUILD_LNX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${DMX_BUILD_USB_TRUE}" && test -z "${DMX_BUILD_USB_FALSE}"; then - as_fn_error "conditional \"DMX_BUILD_USB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"DMX_BUILD_USB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"DMX_BUILD_USB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${KDRIVE_TRUE}" && test -z "${KDRIVE_FALSE}"; then - as_fn_error "conditional \"KDRIVE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"KDRIVE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"KDRIVE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${KDRIVELINUX_TRUE}" && test -z "${KDRIVELINUX_FALSE}"; then - as_fn_error "conditional \"KDRIVELINUX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"KDRIVELINUX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"KDRIVELINUX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${TSLIB_TRUE}" && test -z "${TSLIB_FALSE}"; then - as_fn_error "conditional \"TSLIB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"TSLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"TSLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${KDRIVEVESA_TRUE}" && test -z "${KDRIVEVESA_FALSE}"; then - as_fn_error "conditional \"KDRIVEVESA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"KDRIVEVESA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"KDRIVEVESA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${KDRIVEFBDEV_TRUE}" && test -z "${KDRIVEFBDEV_FALSE}"; then - as_fn_error "conditional \"KDRIVEFBDEV\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"KDRIVEFBDEV\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"KDRIVEFBDEV\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XSDLSERVER_TRUE}" && test -z "${XSDLSERVER_FALSE}"; then - as_fn_error "conditional \"XSDLSERVER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XSDLSERVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XSDLSERVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XEPHYR_TRUE}" && test -z "${XEPHYR_FALSE}"; then - as_fn_error "conditional \"XEPHYR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XEPHYR\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XEPHYR\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${BUILD_KDRIVEFBDEVLIB_TRUE}" && test -z "${BUILD_KDRIVEFBDEVLIB_FALSE}"; then - as_fn_error "conditional \"BUILD_KDRIVEFBDEVLIB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_KDRIVEFBDEVLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BUILD_KDRIVEFBDEVLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${XFAKESERVER_TRUE}" && test -z "${XFAKESERVER_FALSE}"; then - as_fn_error "conditional \"XFAKESERVER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: conditional \"XFAKESERVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"XFAKESERVER\" 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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -21758,18 +31496,17 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false - SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## +_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 : +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 @@ -21777,15 +31514,23 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; + 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 @@ -21793,13 +31538,7 @@ export as_nl 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 -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +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 @@ -21810,7 +31549,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in #( + case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -21833,6 +31572,13 @@ if test "${PATH_SEPARATOR+set}" != set; then } 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 @@ -21842,15 +31588,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( +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 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done IFS=$as_save_IFS ;; @@ -21862,16 +31608,12 @@ if test "x$as_myself" = x; then 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); exit 1; } fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +# 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='> ' @@ -21883,89 +31625,7 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - +# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -21979,12 +31639,8 @@ else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -22004,25 +31660,76 @@ $as_echo X/"$0" | } s/.*/./; q'` -# 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 +# 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 #((((( +case `echo -n x` in -n*) - case `echo 'xy\c'` in + case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; + *) 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 @@ -22051,56 +31758,8 @@ fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - 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_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -22119,10 +31778,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in #( + case $1 in -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -22137,19 +31796,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to +# 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 xorg-server $as_me 1.6.3.901, which was -generated by GNU Autoconf 2.64. Invocation command line was +This file was extended by xorg-server $as_me 1.6.99.900, which was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -22181,11 +31834,10 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. +\`$as_me' instantiates files from templates according to the +current configuration. -Usage: $0 [OPTION]... [TAG]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit @@ -22207,16 +31859,16 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -xorg-server config.status 1.6.3.901 -configured by $0, generated by GNU Autoconf 2.64, +xorg-server config.status 1.6.99.900 +configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2009 Free Software Foundation, Inc. +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." @@ -22259,19 +31911,20 @@ do case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - as_fn_append CONFIG_FILES " '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -22279,10 +31932,11 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; - *) as_fn_append ac_config_targets " $1" + *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac @@ -22589,6 +32243,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in + "shave") CONFIG_FILES="$CONFIG_FILES shave" ;; + "shave-libtool") CONFIG_FILES="$CONFIG_FILES shave-libtool" ;; "include/do-not-use-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/do-not-use-config.h" ;; "include/xorg-server.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xorg-server.h" ;; "include/dix-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/dix-config.h" ;; @@ -22596,6 +32252,7 @@ do "include/xkb-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xkb-config.h" ;; "include/xwin-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xwin-config.h" ;; "include/kdrive-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/kdrive-config.h" ;; + "include/version-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/version-config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -22636,7 +32293,6 @@ do "hw/xfree86/doc/sgml/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/doc/sgml/Makefile" ;; "hw/xfree86/dri/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri/Makefile" ;; "hw/xfree86/dri2/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri2/Makefile" ;; - "hw/xfree86/dummylib/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dummylib/Makefile" ;; "hw/xfree86/exa/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/exa/Makefile" ;; "hw/xfree86/fbdevhw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/fbdevhw/Makefile" ;; "hw/xfree86/i2c/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/i2c/Makefile" ;; @@ -22686,9 +32342,13 @@ do "hw/kdrive/linux/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/linux/Makefile" ;; "hw/kdrive/sdl/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/sdl/Makefile" ;; "hw/kdrive/src/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/src/Makefile" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "test/xi2/Makefile") CONFIG_FILES="$CONFIG_FILES test/xi2/Makefile" ;; "xorg-server.pc") CONFIG_FILES="$CONFIG_FILES xorg-server.pc" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) { { $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 @@ -22715,7 +32375,7 @@ $debug || trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap 'as_fn_exit 1' 1 2 13 15 + trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -22726,7 +32386,11 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || +{ + $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. @@ -22734,16 +32398,10 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi +ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -22757,18 +32415,24 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + { { $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_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + { { $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_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + { { $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 @@ -22857,7 +32521,9 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || { { $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), @@ -22898,7 +32564,9 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -22983,7 +32651,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" @@ -22996,7 +32666,9 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :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 @@ -23024,10 +32696,12 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + { { $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 - as_fn_append ac_file_inputs " '$ac_f'" + ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -23038,7 +32712,7 @@ do `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 + { $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. @@ -23051,7 +32725,9 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || { { $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 @@ -23079,7 +32755,47 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p + { 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 @@ -23136,6 +32852,7 @@ 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 @@ -23145,11 +32862,12 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/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:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $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 @@ -23159,7 +32877,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -23188,12 +32906,14 @@ 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_fn_error "could not create $ac_file" "$LINENO" 5 + || { { $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:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $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;} @@ -23203,7 +32923,9 @@ which seems to be undefined. Please make sure it is defined." >&2;} -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || { { $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; }; } ;; :H) # @@ -23214,19 +32936,25 @@ which seems to be undefined. Please make sure it is defined." >&2;} $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || { { $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; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || { { $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; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -23264,7 +32992,7 @@ $as_echo X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -23359,7 +33087,47 @@ $as_echo X"$file" | q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p + { 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 @@ -24012,12 +33780,15 @@ _LT_EOF done # for ac_tag -as_fn_exit 0 +{ (exit 0); exit 0; } _ACEOF +chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + { { $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. @@ -24038,10 +33809,10 @@ if test "$no_create" != yes; then 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 || as_fn_exit $? + $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $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/xorg-server/configure.ac b/xorg-server/configure.ac index 9bb566c99..2215d2c02 100644 --- a/xorg-server/configure.ac +++ b/xorg-server/configure.ac @@ -26,12 +26,21 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.6.3.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +AC_INIT([xorg-server], 1.6.99.900, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="(unreleased)" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2 foreign]) AM_MAINTAINER_MODE -RELEASE_DATE="2009-8-25" +AC_CONFIG_FILES([ + shave + shave-libtool +]) + +# Require xorg-macros version 1.2.0 or newer for XORG_CHANGELOG and +# XORG_CWARNFLAGS +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) dnl this gets generated by autoheader, and thus contains all the defines. we dnl don't ever actually use it, internally. @@ -50,6 +59,9 @@ dnl xwin-config.h covers the XWin DDX. AC_CONFIG_HEADERS(include/xwin-config.h) dnl kdrive-config.h covers the kdrive DDX AC_CONFIG_HEADERS(include/kdrive-config.h) +dnl version-config.h covers the version numbers so they can be bumped without +dnl forcing an entire recompile.x +AC_CONFIG_HEADERS(include/version-config.h) AC_PROG_CC AM_PROG_AS @@ -101,7 +113,7 @@ AM_CONDITIONAL(XSERVER_DTRACE, [test "x$WDTRACE" != "xno"]) AC_HEADER_DIRENT AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -210,7 +222,7 @@ AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT, 1, [Have the 'cbrt' function])) AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h]) dnl AGPGART headers -AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h], AGP=yes) +AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes) AM_CONDITIONAL(AGP, [test "x$AGP" = xyes]) dnl APM header @@ -367,7 +379,6 @@ AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes]) AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes]) DRI=no -KDRIVE_HW=no dnl it would be nice to autodetect these *CONS_SUPPORTs case $host_os in *freebsd* | *dragonfly*) @@ -394,7 +405,6 @@ case $host_os in ;; *linux*) DRI=yes - KDRIVE_HW=yes ;; *solaris*) PKG_CHECK_EXISTS(libdrm, DRI=yes, DRI=no) @@ -403,7 +413,6 @@ case $host_os in AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;; esac -AM_CONDITIONAL(KDRIVE_HW, test "x$KDRIVE_HW" = xyes) XORG_RELEASE_VERSION dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the @@ -430,6 +439,9 @@ AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debugging (default: disabled)]), [DEBUGGING=$enableval], [DEBUGGING=no]) +AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], + [Enable unit-tests (default: auto)]), + [UNITTESTS=$enableval], [UNITTESTS=auto]) AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]), [INT10="$withval"], [INT10="$DEFAULT_INT10"]) @@ -479,6 +491,26 @@ AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XK AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), [ XKBOUTPUT="$withval" ], [ XKBOUTPUT="compiled" ]) +AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES], + [Keyboard ruleset (default: base/evdev)]), + [ XKB_DFLT_RULES="$withval" ], + [ XKB_DFLT_RULES="" ]) +AC_ARG_WITH(default-xkb-model, AS_HELP_STRING([--with-default-xkb-model=MODEL], + [Keyboard model (default: pc104)]), + [ XKB_DFLT_MODEL="$withval" ], + [ XKB_DFLT_MODEL="pc104" ]) +AC_ARG_WITH(default-xkb-layout, AS_HELP_STRING([--with-default-xkb-layout=LAYOUT], + [Keyboard layout (default: us)]), + [ XKB_DFLT_LAYOUT="$withval" ], + [ XKB_DFLT_LAYOUT="us" ]) +AC_ARG_WITH(default-xkb-variant, AS_HELP_STRING([--with-default-xkb-variant=VARIANT], + [Keyboard variant (default: (none))]), + [ XKB_DFLT_VARIANT="$withval" ], + [ XKB_DFLT_VARIANT="" ]) +AC_ARG_WITH(default-xkb-options, AS_HELP_STRING([--with-default-xkb-options=OPTIONS], + [Keyboard layout options (default: (none))]), + [ XKB_DFLT_OPTIONS="$withval" ], + [ XKB_DFLT_OPTIONS="" ]) AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]), [ SERVERCONFIG="$withval" ], @@ -495,6 +527,10 @@ AC_ARG_WITH(apple-application-id,AS_HELP_STRING([--with-apple-application-id=VAL [ APPLE_APPLICATION_ID="${withval}" ], [ APPLE_APPLICATION_ID="org.x.X11" ]) AC_SUBST([APPLE_APPLICATION_ID]) +AC_ARG_ENABLE(sparkle,AS_HELP_STRING([--enable-sparkle], [Enable updating of X11.app using the Sparkle Framework (default: disabled)]), + [ XQUARTZ_SPARKLE="${enableval}" ], + [ XQUARTZ_SPARKLE="no" ]) +AC_SUBST([XQUARTZ_SPARKLE]) AC_ARG_ENABLE(builddocs, AS_HELP_STRING([--enable-builddocs], [Build docs (default: disabled)]), [BUILDDOCS=$enableval], [BUILDDOCS=no]) @@ -506,11 +542,11 @@ AC_ARG_ENABLE(install-libxf86config, AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]), [NULL_ROOT_CURSOR=$enableval], [NULL_ROOT_CURSOR=no]) +AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]), + [SYMBOL_VISIBILITY=$enableval], + [SYMBOL_VISIBILITY=auto]) dnl GLX build options -AC_ARG_WITH(mesa-source, AS_HELP_STRING([--with-mesa-source=MESA_SOURCE], [Path to Mesa source tree]), - [ MESA_SOURCE="$withval" ], - [ MESA_SOURCE="" ]) AC_ARG_WITH(dri-driver-path, AS_HELP_STRING([--with-dri-driver-path=PATH], [Path to DRI drivers (default: ${libdir}/dri)]), [ DRI_DRIVER_PATH="$withval" ], [ DRI_DRIVER_PATH="${libdir}/dri" ]) @@ -550,14 +586,18 @@ AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS exten AC_ARG_ENABLE(config-dbus, AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no]) AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto]) AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes]) +AC_ARG_ENABLE(xaa, AS_HELP_STRING([--enable-xaa], [Build XAA (default: enabled)]), [XAA=$enableval], [XAA=yes]) +AC_ARG_ENABLE(vgahw, AS_HELP_STRING([--enable-vgahw], [Build Xorg with vga access (default: enabled)]), [VGAHW=$enableval], [VGAHW=yes]) +AC_ARG_ENABLE(vbe, AS_HELP_STRING([--enable-vbe], [Build Xorg with VBE module (default: enabled)]), [VBE=$enableval], [VBE=yes]) +AC_ARG_ENABLE(int10-module, AS_HELP_STRING([--enable-int10-module], [Build Xorg with int10 module (default: enabled)]), [INT10MODULE=$enableval], [INT10MODULE=yes]) dnl DDXes. AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no]) AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) -AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) +AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: yes)]), [XNEST=$enableval], [XNEST=yes]) AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) -AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addigion to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no]) +AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no]) AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) dnl kdrive and its subsystems AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no]) @@ -668,8 +708,8 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la' XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' dnl Core modules for most extensions, et al. -REQUIRED_MODULES="[randrproto >= 1.2.99.1] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.5] [kbproto >= 1.0.3]" -REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.13.2]" +REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.0] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] resourceproto fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]" +REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]" dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas dnl CONFIG_DBUS_API is true if we want to enable the D-Bus config @@ -713,7 +753,7 @@ if test "x$CONFIG_NEED_DBUS" = xyes; then AC_DEFINE(CONFIG_NEED_DBUS, 1, [Use D-Bus for input hotplug]) fi AM_CONDITIONAL(CONFIG_NEED_DBUS, [test "x$CONFIG_NEED_DBUS" = xyes]) -CONFIG_LIB='$(top_builddir)/config/libconfig.a' +CONFIG_LIB='$(top_builddir)/config/libconfig.la' AC_MSG_CHECKING([for glibc...]) AC_PREPROC_IFELSE([ @@ -808,7 +848,7 @@ fi AM_CONDITIONAL(RECORD, [test "x$RECORD" = xyes]) if test "x$RECORD" = xyes; then AC_DEFINE(XRECORD, 1, [Support Record extension]) - REQUIRED_MODULES="$REQUIRED_MODULES recordproto" + REQUIRED_MODULES="$REQUIRED_MODULES [recordproto >= 1.13.99.1]" RECORD_LIB='$(top_builddir)/record/librecord.la' fi @@ -835,7 +875,6 @@ else GLX=no fi AM_CONDITIONAL(GLX, test "x$GLX" = xyes) -AC_SUBST([MESA_SOURCE]) if test "x$AIGLX" = xyes -a "x$GLX" = xyes -a "x$DRI" = xyes; then AC_DEFINE(AIGLX, 1, [Build AIGLX loader]) @@ -854,9 +893,8 @@ AM_CONDITIONAL(DRI, test "x$DRI" = xyes) if test "x$DRI" = xyes; then AC_DEFINE(XF86DRI, 1, [Build DRI extension]) PKG_CHECK_MODULES([DRIPROTO], [xf86driproto]) - PKG_CHECK_MODULES([GL], [glproto >= 1.4.1 dri >= 7.1.0]) + PKG_CHECK_MODULES([DRI], [glproto >= 1.4.1 dri >= 7.1.0]) AC_SUBST(DRIPROTO_CFLAGS) - AC_SUBST(GL_CFLAGS) fi PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= 2.1], @@ -952,6 +990,7 @@ fi AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes]) if test "x$XF86BIGFONT" = xyes; then AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension]) + REQUIRED_MODULES="$REQUIRED_MODULES [xf86bigfontproto >= 1.2.0]" fi AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes]) @@ -990,15 +1029,54 @@ XI_LIB='$(top_builddir)/Xi/libXi.la' XI_INC='-I$(top_srcdir)/Xi' AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) +AM_CONDITIONAL(XAA, test "x$XAA" = xyes) +AM_CONDITIONAL(VGAHW, test "x$VGAHW" = xyes) +AM_CONDITIONAL(VBE, test "x$VBE" = xyes) +AM_CONDITIONAL(INT10MODULE, test "x$INT10MODULE" = xyes) AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) -AC_DEFINE(XKB, 1, [Build XKB]) -AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server]) -AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default]) -REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" +AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data]) +AC_DEFINE_DIR(XKB_BIN_DIRECTORY, bindir, [Path to XKB bin dir]) + +dnl Make sure XKM_OUTPUT_DIR is an absolute path +XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` +if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then + XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" +fi + +dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed +dnl XKB_COMPILED_DIR (used in Makefiles) must not or install-sh gets confused + +XKBOUTPUT=`echo $XKBOUTPUT/ | sed 's|/*$|/|'` +XKB_COMPILED_DIR=`echo $XKBOUTPUT | sed 's|/*$||'` +AC_DEFINE_DIR(XKM_OUTPUT_DIR, XKBOUTPUT, [Path to XKB output dir]) +AC_SUBST(XKB_COMPILED_DIR) + +if test "x$XKB_DFLT_RULES" = x; then + case $host_os in + linux*) + dnl doesn't take AutoAddDevices into account, but whatever. + if test "x$CONFIG_HAL" = xyes; then + XKB_DFLT_RULES="evdev" + else + XKB_DFLT_RULES="base" + fi + ;; + *) + XKB_DFLT_RULES="base" + ;; + esac +fi +AC_DEFINE_UNQUOTED(XKB_DFLT_RULES, ["$XKB_DFLT_RULES"], [Default XKB ruleset]) +AC_DEFINE_UNQUOTED(XKB_DFLT_MODEL, ["$XKB_DFLT_MODEL"], [Default XKB model]) +AC_DEFINE_UNQUOTED(XKB_DFLT_LAYOUT, ["$XKB_DFLT_LAYOUT"], [Default XKB layout]) +AC_DEFINE_UNQUOTED(XKB_DFLT_VARIANT, ["$XKB_DFLT_VARIANT"], [Default XKB variant]) +AC_DEFINE_UNQUOTED(XKB_DFLT_OPTIONS, ["$XKB_DFLT_OPTIONS"], [Default XKB options]) + XKB_LIB='$(top_builddir)/xkb/libxkb.la' XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' +REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1, [Do not have 'strcasecmp'.])) @@ -1065,10 +1143,11 @@ AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name]) AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor]) AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string]) -AC_SUBST([VENDOR_NAME]) AC_SUBST([VENDOR_NAME_SHORT]) -AC_SUBST([VENDOR_RELEASE]) -AC_SUBST([VENDOR_MAN_VERSION]) +AC_DEFINE_UNQUOTED(VENDOR_NAME, ["$VENDOR_NAME"], [Vendor name]) +AC_DEFINE_UNQUOTED(VENDOR_NAME_SHORT, ["$VENDOR_NAME_SHORT"], [Vendor name]) +AC_DEFINE_UNQUOTED(VENDOR_RELEASE, [$VENDOR_RELEASE], [Vendor release]) +AC_DEFINE_UNQUOTED(VENDOR_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version]) AC_DEFINE(NO_LIBCWRAPPER, 1, [Define to 1 if modules should avoid the libcwrapper]) @@ -1077,6 +1156,25 @@ if test "x$DEBUGGING" = xyes; then fi AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) +if test "x$UNITTESTS" = xauto; then + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16], [HAVE_GLIB=yes], [HAVE_GLIB=no]) + if test "x$HAVE_GLIB" = xyes && test "x$with_gnu_ld" = xyes; then + UNITTESTS=yes + else + UNITTESTS=no + fi +fi +if test "x$UNITTESTS" = xyes; then + AC_DEFINE(UNITTESTS, 1, [Enable unit tests]) + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16]) + if test "x$with_gnu_ld" = xno; then + AC_MSG_ERROR([GNU ld required to build unit tests]) + fi + AC_SUBST([GLIB_LIBS]) + AC_SUBST([GLIB_CFLAGS]) +fi +AM_CONDITIONAL(UNITTESTS, [test "x$UNITTESTS" = xyes]) + AC_DEFINE(XTEST, 1, [Support XTest extension]) AC_DEFINE(XSYNC, 1, [Support XSync extension]) AC_DEFINE(XCMISC, 1, [Support XCMisc extension]) @@ -1089,6 +1187,10 @@ else DIX_LIB='$(top_builddir)/dix/libdix.la' OS_LIB='$(top_builddir)/os/libos.la' fi + +MAIN_LIB='$(top_builddir)/dix/libmain.la' +AC_SUBST([MAIN_LIB]) + MI_LIB='$(top_builddir)/mi/libmi.la' MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' MI_INC='-I$(top_srcdir)/mi' @@ -1150,18 +1252,14 @@ AC_SUBST([UTILS_SYS_LIBS]) # Some platforms require extra flags to do this. gcc should set these flags # when -rdynamic is passed to it, other compilers/linkers may need to be added # here. +XORG_CWARNFLAGS if test "x$GCC" = "xyes"; then - GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" - GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" - GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing" - GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3" if test "x$WERROR" = "xyes"; then - GCC_WARNINGS="${GCC_WARNINGS} -Werror" + CWARNFLAGS="${CWARNFLAGS} -Werror" fi - XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS" - LD_EXPORT_SYMBOLS_FLAG="-rdynamic" fi +XSERVER_CFLAGS="$CWARNFLAGS $XSERVER_CFLAGS" case $host_os in openbsd*) LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" @@ -1211,7 +1309,7 @@ AC_MSG_RESULT([$XNEST]) AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) if test "x$XNEST" = xyes; then - XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $OS_LIB $CONFIG_LIB" + XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $MAIN_LIB $OS_LIB $CONFIG_LIB" XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" AC_SUBST([XNEST_LIBS]) AC_SUBST([XNEST_SYS_LIBS]) @@ -1241,6 +1339,47 @@ if test "x$XORG" = xyes; then XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB" + dnl ================================================================== + dnl symbol visibility + symbol_visibility= + have_visibility=disabled + if test x$SYMBOL_VISIBILITY != xno; then + AC_MSG_CHECKING(for symbol visibility support) + if test x$GCC = xyes; then + VISIBILITY_CFLAGS="-fvisibility=hidden" + else + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + if test x$SUNCC = xyes; then + VISIBILITY_CFLAGS="-xldscope=hidden" + else + have_visibility=no + fi + fi + if test x$have_visibility != xno; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $VISIBILITY_CFLAGS" + AC_TRY_COMPILE( + [#include + extern _X_HIDDEN int hidden_int; + extern _X_EXPORT int public_int; + extern _X_HIDDEN int hidden_int_func(void); + extern _X_EXPORT int public_int_func(void);], + [], + have_visibility=yes, + have_visibility=no) + CFLAGS=$save_CFLAGS + fi + AC_MSG_RESULT([$have_visibility]) + if test x$have_visibility != xno; then + symbol_visibility=$VISIBILITY_CFLAGS + XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS" + XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS" + fi + fi + dnl added to xorg-server.pc + AC_SUBST([symbol_visibility]) + dnl =================================================================== + PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) SAVE_LIBS=$LIBS SAVE_CFLAGS=$CFLAGS @@ -1248,6 +1387,8 @@ if test "x$XORG" = xyes; then LIBS=$PCIACCESS_LIBS AC_CHECK_FUNCS([pci_system_init_dev_mem]) AC_CHECK_FUNCS([pci_device_enable]) + AC_CHECK_FUNCS([pci_device_is_boot_vga]) + AC_CHECK_FUNCS([pci_device_vgaarb_init]) LIBS=$SAVE_LIBS CFLAGS=$SAVE_CFLAGS XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS $SELINUX_LIB" @@ -1303,9 +1444,8 @@ if test "x$XORG" = xyes; then # use libpciaccess for PCI xorg_bus_bsdpci="yes" AC_CHECK_HEADERS([sys/kd.h]) - # This really should be tests for specific features, but the #ifdef's - # were done as a simple version check in XFree86 4.x and haven't been - # fixed yet + AC_CHECK_HEADERS([sys/vt.h], [solaris_vt=yes], [solaris_vt=no]) + # Check for minimum supported release AC_MSG_CHECKING([Solaris version]) OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'` if test "${OS_MINOR}" -ge 7 ; then @@ -1313,8 +1453,8 @@ if test "x$XORG" = xyes; then else AC_MSG_RESULT(Solaris `echo ${host_os}|sed -e 's/^.*solaris//`) fi - if test "${OS_MINOR}" -ge 8 ; then - AC_DEFINE(__SOL8__,1,[Solaris 8 or later]) + if test "${OS_MINOR}" -lt 8 ; then + AC_MSG_ERROR([This release no longer supports Solaris versions older than Solaris 8.]) fi AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) if test "x$SUNCC" = "xyes"; then @@ -1332,11 +1472,7 @@ if test "x$XORG" = xyes; then else SOLARIS_INOUT_ARCH="ia32" fi - if test "${OS_MINOR}" -lt 8 ; then - solaris_usl_console="yes" - else - XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" - fi + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" ;; *) AC_MSG_ERROR([Unsupported Solaris platform. Only SPARC & x86 \ @@ -1354,6 +1490,9 @@ if test "x$XORG" = xyes; then gnu*) XORG_OS="gnu" XORG_OS_SUBDIR="hurd" + # Use the same stubs as BSD for old functions, since we now + # use libpciaccess for PCI + xorg_bus_bsdpci="yes" ;; *) XORG_OS="unknown" @@ -1374,21 +1513,21 @@ if test "x$XORG" = xyes; then XORG_OS_PCI=$XORG_OS fi if test "x$DGA" = xauto; then - PKG_CHECK_MODULES(DGA, xf86dgaproto, [DGA=yes], [DGA=no]) + PKG_CHECK_MODULES(DGA, [xf86dgaproto >= 2.0.99.1], [DGA=yes], [DGA=no]) fi if test "x$DGA" = xyes; then - XORG_MODULES="$XORG_MODULES xf86dgaproto" + XORG_MODULES="$XORG_MODULES [xf86dgaproto >= 2.0.99.1]" PKG_CHECK_MODULES(DGA, xf86dgaproto) AC_DEFINE(DGA, 1, [Support DGA extension]) AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) fi if test "x$XF86VIDMODE" = xauto; then - PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto, [XF86VIDMODE=yes], [XF86VIDMODE=no]) + PKG_CHECK_MODULES(XF86VIDMODE, [xf86vidmodeproto >= 2.2.99.1], [XF86VIDMODE=yes], [XF86VIDMODE=no]) fi if test "x$XF86VIDMODE" = xyes; then XORG_MODULES="$XORG_MODULES xf86vidmodeproto" - PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto) + PKG_CHECK_MODULES(XF86VIDMODE, [xf86vidmodeproto >= 2.2.99.1]) AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension]) fi @@ -1425,7 +1564,6 @@ if test "x$XORG" = xyes; then AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs]) AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions]) AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server]) - AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module]) AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file]) AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path]) @@ -1433,6 +1571,9 @@ if test "x$XORG" = xyes; then AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location]) AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) AC_DEFINE(XSERVER_LIBPCIACCESS, 1, [Use libpciaccess for all pci manipulation]) + if test "x$VGAHW" = xyes; then + AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module]) + fi driverdir="$moduledir/drivers" AC_SUBST([moduledir]) @@ -1451,12 +1592,10 @@ if test "x$XORG" = xyes; then abi_videodrv=`extract_abi VIDEODRV` abi_xinput=`extract_abi XINPUT` abi_extension=`extract_abi EXTENSION` - abi_font=`extract_abi FONT` AC_SUBST([abi_ansic]) AC_SUBST([abi_videodrv]) AC_SUBST([abi_xinput]) AC_SUBST([abi_extension]) - AC_SUBST([abi_font]) fi AM_CONDITIONAL([XORG], [test "x$XORG" = xyes]) AM_CONDITIONAL([XORG_BUS_LINUXPCI], [test "x$xorg_bus_linuxpci" = xyes]) @@ -1465,8 +1604,8 @@ AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes]) AM_CONDITIONAL([LINUX_IA64], [test "x$linux_ia64" = xyes]) AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes]) AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes]) -AM_CONDITIONAL([SOLARIS_USL_CONSOLE], [test "x$solaris_usl_console" = xyes]) AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes]) +AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes]) AM_CONDITIONAL([DGA], [test "x$DGA" = xyes]) AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes]) @@ -1479,19 +1618,22 @@ if test "x$XWIN" = xauto; then mingw*) XWIN="yes" ;; *) XWIN="no" ;; esac - XWIN_LIBS="$FB_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $SHADOW_LIB" + XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $RANDR_LIB $RENDER_LIB $XTRAP_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $MIEXT_LAYER_LIB $LAYER_LIB $XPSTUBS_LIB $SHADOW_LIB $OS_LIB" AC_SUBST([XWIN_LIBS]) fi AC_MSG_RESULT([$XWIN]) if test "x$XWIN" = xyes; then + PKG_CHECK_EXISTS([windowswmproto], [WINDOWSWM=yes], [WINDOWSWM=no]) + AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) + AC_CHECK_TOOL(WINDRES, windres) case $host_os in cygwin*) XWIN_SERVER_NAME=XWin PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont]) AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages]) AC_DEFINE(ROOTLESS,1,[Build Rootless code]) - CFLAGS="$CFLAGS -DFD_SETSIZE=256" + CFLAGS="$CFLAGS -DFD_SETSIZE=256 -DROOTLESS_WORKAROUND" ;; mingw*) XWIN_SERVER_NAME=Xming @@ -1501,7 +1643,7 @@ if test "x$XWIN" = xyes; then XWIN_SYS_LIBS=-lwinsock2 ;; esac - XWIN_SYS_LIBS="$XWIN_SYS_LIBS $(XWINMODULES_LIBS)" + XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS" AC_SUBST(XWIN_SERVER_NAME) AC_SUBST(XWIN_SYS_LIBS) @@ -1524,7 +1666,7 @@ if test "x$XWIN" = xyes; then fi AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes]) AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes]) -AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && false]) +AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes]) AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes]) AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && false]) AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes && false]) @@ -1537,14 +1679,18 @@ if test "x$XQUARTZ" = xyes; then AC_DEFINE(XQUARTZ,1,[Have Quartz]) AC_DEFINE(ROOTLESS,1,[Build Rootless code]) - DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" + DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" AC_SUBST([DARWIN_LIBS]) AC_CHECK_LIB([Xplugin],[xp_init],[:]) - CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA" + CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA" + + PKG_CHECK_MODULES(XPBPROXY, [applewmproto >= 1.4] [applewm >= 1.4] xfixes fixesproto x11) - PKG_CHECK_MODULES(XPBPROXY, [applewmproto >= 1.1.1] [applewm >= 1.0.0] xfixes fixesproto x11) + if test "x$XQUARTZ_SPARKLE" = xyes ; then + AC_DEFINE(XQUARTZ_SPARKLE,1,[Support application updating through sparkle.]) + fi if test "x$STANDALONE_XPBPROXY" = xyes ; then AC_DEFINE(STANDALONE_XPBPROXY,1,[Build a standalone xpbproxy]) @@ -1562,14 +1708,15 @@ AC_SUBST([OBJCLINK]) AC_SUBST([OBJCFLAGS]) # internal, undocumented automake func follows :( _AM_DEPENDENCIES([OBJC]) -AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes]) -AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes]) AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes]) +AM_CONDITIONAL(XQUARTZ_SPARKLE, [test "x$XQUARTZ_SPARKLE" != "xno"]) AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes]) dnl DMX DDX -PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no]) +PKG_CHECK_MODULES([DMXMODULES], + [xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES], + [have_dmx=yes], [have_dmx=no]) AC_MSG_CHECKING([whether to build Xdmx DDX]) if test "x$DMX" = xauto; then DMX="$have_dmx" @@ -1600,9 +1747,6 @@ dnl USB sources in DMX require dnl Linux sources in DMX require AC_CHECK_HEADER([linux/keyboard.h], DMX_BUILD_LNX="yes", DMX_BUILD_LNX="no") - if test "x$GLX" = xyes; then - PKG_CHECK_MODULES([GL], [glproto]) - fi PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11]) AC_SUBST(XDMXCONFIG_DEP_CFLAGS) AC_SUBST(XDMXCONFIG_DEP_LIBS) @@ -1715,15 +1859,15 @@ if test "$KDRIVE" = yes; then KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS" KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB" - KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' + KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la' case $host_os in *linux*) - KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la' KDRIVELINUX=yes ;; esac - KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' - KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB" + KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.la' + KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB" KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS" @@ -1748,28 +1892,6 @@ AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes]) AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes]) AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) -dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers) -AC_DEFINE(__XKBDEFRULES__, "xorg", [Default XKB rules]) -AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data]) -AC_DEFINE_DIR(XKB_BIN_DIRECTORY, bindir, [Path to XKB bin dir]) - -# Make sure XKM_OUTPUT_DIR is an absolute path -XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` - -if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then - XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" -fi - -# XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed -# XKB_COMPILED_DIR (used in Makefiles) must not or install-sh gets confused - -XKBOUTPUT=`echo $XKBOUTPUT/ | sed 's|/*$|/|'` -XKB_COMPILED_DIR=`echo $XKBOUTPUT | sed 's|/*$||'` - -AC_DEFINE_DIR(XKM_OUTPUT_DIR, XKBOUTPUT, [Path to XKB output dir]) - -AC_SUBST(XKB_COMPILED_DIR) - dnl and the rest of these are generic, so they're in config.h dnl dnl though, thanks to the passing of some significant amount of time, the @@ -1801,6 +1923,9 @@ AC_SUBST([prefix]) # Man page sections - used in config utils & generating man pages XORG_MANPAGE_SECTIONS +XORG_CHANGELOG + +SHAVE_INIT([.], [enable]) AC_OUTPUT([ Makefile @@ -1841,7 +1966,6 @@ hw/xfree86/doc/man/Makefile hw/xfree86/doc/sgml/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile -hw/xfree86/dummylib/Makefile hw/xfree86/exa/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/i2c/Makefile @@ -1891,5 +2015,7 @@ hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/sdl/Makefile hw/kdrive/src/Makefile +test/Makefile +test/xi2/Makefile xorg-server.pc ]) diff --git a/xorg-server/damageext/Makefile.in b/xorg-server/damageext/Makefile.in index 53a56b7d0..34bbdc06b 100644 --- a/xorg-server/damageext/Makefile.in +++ b/xorg-server/damageext/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = damageext DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -75,6 +79,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -95,9 +100,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -126,7 +134,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -135,9 +145,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,12 +190,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -201,7 +216,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -211,6 +225,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -224,11 +239,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -264,6 +278,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -288,7 +303,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -311,6 +325,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -342,7 +357,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/damageext/damageextint.h b/xorg-server/damageext/damageextint.h index e06f28c4e..45c5ff96c 100644 --- a/xorg-server/damageext/damageextint.h +++ b/xorg-server/damageext/damageextint.h @@ -27,7 +27,6 @@ #ifndef _DAMAGEEXTINT_H_ #define _DAMAGEEXTINT_H_ -#define NEED_EVENTS #include #include #include "misc.h" @@ -59,11 +58,10 @@ typedef struct _DamageExt { } DamageExtRec, *DamageExtPtr; #define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \ - pDamageExt = SecurityLookupIDByType (client, rid, DamageExtType, mode); \ - if (!pDamageExt) { \ - client->errorValue = rid; \ - return DamageErrorBase + BadDamage; \ - } \ + int rc = dixLookupResourceByType((pointer *)&(pDamageExt), rid, \ + DamageExtType, client, mode); \ + if (rc != Success) \ + return (rc == BadValue) ? DamageErrorBase + BadDamage : rc; \ } void diff --git a/xorg-server/dbe/Makefile.in b/xorg-server/dbe/Makefile.in index bc5c556da..087974da0 100644 --- a/xorg-server/dbe/Makefile.in +++ b/xorg-server/dbe/Makefile.in @@ -39,8 +39,11 @@ subdir = dbe DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -101,6 +105,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -121,9 +126,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -152,7 +160,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -161,9 +171,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -202,12 +216,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -227,7 +242,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -237,6 +251,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -250,11 +265,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -290,6 +304,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -314,7 +329,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -337,6 +351,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -368,7 +383,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/dbe/dbe.c b/xorg-server/dbe/dbe.c index ff9df7f9f..a4f853d80 100644 --- a/xorg-server/dbe/dbe.c +++ b/xorg-server/dbe/dbe.c @@ -33,7 +33,6 @@ /* INCLUDES */ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -412,20 +411,23 @@ ProcDbeDeallocateBackBufferName(ClientPtr client) { REQUEST(xDbeDeallocateBackBufferNameReq); DbeWindowPrivPtr pDbeWindowPriv; - int i; + int rc, i; + pointer val; REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq); /* Buffer name must be valid */ - if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, - stuff->buffer, dbeWindowPrivResType, DixDestroyAccess)) || - !(SecurityLookupIDByType(client, stuff->buffer, dbeDrawableResType, - DixDestroyAccess))) - { - client->errorValue = stuff->buffer; - return(dbeErrorBase + DbeBadBuffer); - } + rc = dixLookupResourceByType((pointer *)&pDbeWindowPriv, stuff->buffer, + dbeWindowPrivResType, client, + DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? dbeErrorBase + DbeBadBuffer : rc; + + rc = dixLookupResourceByType(&val, stuff->buffer, dbeDrawableResType, + client, DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? dbeErrorBase + DbeBadBuffer : rc; /* Make sure that the id is valid for the window. * This is paranoid code since we already looked up the ID by type @@ -739,7 +741,7 @@ ProcDbeGetVisualInfo(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = length >> 2; + rep.length = bytes_to_int32(length); rep.m = count; if (client->swapped) @@ -834,19 +836,21 @@ ProcDbeGetBackBufferAttributes(ClientPtr client) REQUEST(xDbeGetBackBufferAttributesReq); xDbeGetBackBufferAttributesReply rep; DbeWindowPrivPtr pDbeWindowPriv; - int n; + int rc, n; REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); - if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, - stuff->buffer, dbeWindowPrivResType, DixGetAttrAccess))) + rc = dixLookupResourceByType((pointer *)&pDbeWindowPriv, stuff->buffer, + dbeWindowPrivResType, client, + DixGetAttrAccess); + if (rc == Success) { - rep.attributes = None; + rep.attributes = pDbeWindowPriv->pWindow->drawable.id; } else { - rep.attributes = pDbeWindowPriv->pWindow->drawable.id; + rep.attributes = None; } rep.type = X_Reply; diff --git a/xorg-server/dbe/dbestruct.h b/xorg-server/dbe/dbestruct.h index 641f209da..002ffbeb2 100644 --- a/xorg-server/dbe/dbestruct.h +++ b/xorg-server/dbe/dbestruct.h @@ -37,10 +37,24 @@ /* INCLUDES */ #define NEED_DBE_PROTOCOL -#include +#include #include "windowstr.h" #include "privates.h" +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; /* DEFINES */ @@ -74,7 +88,7 @@ /* Marker for free elements in the buffer ID array. */ #define DBE_FREE_ID_ELEMENT 0 -extern void DbeExtensionInit (void); +extern _X_EXPORT void DbeExtensionInit (void); /* TYPEDEFS */ diff --git a/xorg-server/dbe/midbe.c b/xorg-server/dbe/midbe.c index f8a3acc87..4426c9d85 100644 --- a/xorg-server/dbe/midbe.c +++ b/xorg-server/dbe/midbe.c @@ -33,8 +33,6 @@ /* INCLUDES */ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/dix/Makefile.am b/xorg-server/dix/Makefile.am index 4c2395d82..13e5dedd7 100644 --- a/xorg-server/dix/Makefile.am +++ b/xorg-server/dix/Makefile.am @@ -1,8 +1,9 @@ -noinst_LTLIBRARIES = libdix.la +noinst_LTLIBRARIES = libdix.la libmain.la -AM_CFLAGS = $(DIX_CFLAGS) \ - -DVENDOR_NAME=\""@VENDOR_NAME@"\" \ - -DVENDOR_RELEASE="@VENDOR_RELEASE@" +AM_CFLAGS = $(DIX_CFLAGS) + +libmain_la_SOURCES = \ + main.c libdix_la_SOURCES = \ atom.c \ @@ -17,6 +18,7 @@ libdix_la_SOURCES = \ enterleave.c \ enterleave.h \ events.c \ + eventconvert.c \ extension.c \ ffs.c \ gc.c \ @@ -25,7 +27,7 @@ libdix_la_SOURCES = \ glyphcurs.c \ grabs.c \ initatoms.c \ - main.c \ + inpututils.c \ pixmap.c \ privates.c \ property.c \ diff --git a/xorg-server/dix/Makefile.in b/xorg-server/dix/Makefile.in index 3d10eb3c0..caa244120 100644 --- a/xorg-server/dix/Makefile.in +++ b/xorg-server/dix/Makefile.in @@ -41,8 +41,11 @@ subdir = dix DIST_COMMON = $(dist_miscconfig_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -52,18 +55,23 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdix_la_LIBADD = am_libdix_la_OBJECTS = atom.lo colormap.lo cursor.lo deprecated.lo \ devices.lo dispatch.lo dixfonts.lo dixutils.lo enterleave.lo \ - events.lo extension.lo ffs.lo gc.lo getevents.lo globals.lo \ - glyphcurs.lo grabs.lo initatoms.lo main.lo pixmap.lo \ - privates.lo property.lo ptrveloc.lo registry.lo resource.lo \ - selection.lo swaprep.lo swapreq.lo tables.lo window.lo + events.lo eventconvert.lo extension.lo ffs.lo gc.lo \ + getevents.lo globals.lo glyphcurs.lo grabs.lo initatoms.lo \ + inpututils.lo pixmap.lo privates.lo property.lo ptrveloc.lo \ + registry.lo resource.lo selection.lo swaprep.lo swapreq.lo \ + tables.lo window.lo libdix_la_OBJECTS = $(am_libdix_la_OBJECTS) +libmain_la_LIBADD = +am_libmain_la_OBJECTS = main.lo +libmain_la_OBJECTS = $(am_libmain_la_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) dix_O_SOURCES = dix.c dix_O_OBJECTS = dix.$(OBJEXT) @@ -78,8 +86,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libdix_la_SOURCES) dix.c -DIST_SOURCES = $(libdix_la_SOURCES) dix.c +SOURCES = $(libdix_la_SOURCES) $(libmain_la_SOURCES) dix.c +DIST_SOURCES = $(libdix_la_SOURCES) $(libmain_la_SOURCES) dix.c am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -111,6 +119,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -131,9 +140,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -162,7 +174,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -171,9 +185,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -212,12 +230,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -237,7 +256,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -247,6 +265,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -260,11 +279,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -300,6 +318,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -324,7 +343,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -347,6 +365,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -378,16 +397,18 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libdix.la -AM_CFLAGS = $(DIX_CFLAGS) \ - -DVENDOR_NAME=\""@VENDOR_NAME@"\" \ - -DVENDOR_RELEASE="@VENDOR_RELEASE@" +noinst_LTLIBRARIES = libdix.la libmain.la +AM_CFLAGS = $(DIX_CFLAGS) +libmain_la_SOURCES = \ + main.c libdix_la_SOURCES = \ atom.c \ @@ -402,6 +423,7 @@ libdix_la_SOURCES = \ enterleave.c \ enterleave.h \ events.c \ + eventconvert.c \ extension.c \ ffs.c \ gc.c \ @@ -410,7 +432,7 @@ libdix_la_SOURCES = \ glyphcurs.c \ grabs.c \ initatoms.c \ - main.c \ + inpututils.c \ pixmap.c \ privates.c \ property.c \ @@ -478,6 +500,8 @@ clean-noinstLTLIBRARIES: done libdix.la: $(libdix_la_OBJECTS) $(libdix_la_DEPENDENCIES) $(LINK) $(libdix_la_OBJECTS) $(libdix_la_LIBADD) $(LIBS) +libmain.la: $(libmain_la_OBJECTS) $(libmain_la_DEPENDENCIES) + $(LINK) $(libmain_la_OBJECTS) $(libmain_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ @@ -507,6 +531,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixfonts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixutils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enterleave.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/events.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extension.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ffs.Plo@am__quote@ @@ -516,6 +541,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glyphcurs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initatoms.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpututils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privates.Plo@am__quote@ diff --git a/xorg-server/dix/atom.c b/xorg-server/dix/atom.c index c968c1e5a..f5bf8ad7e 100644 --- a/xorg-server/dix/atom.c +++ b/xorg-server/dix/atom.c @@ -64,7 +64,7 @@ typedef struct _Node { struct _Node *left, *right; Atom a; unsigned int fingerPrint; - char *string; + const char *string; } NodeRec, *NodePtr; static Atom lastAtom = None; @@ -74,8 +74,8 @@ static NodePtr *nodeTable; void FreeAtom(NodePtr patom); -_X_EXPORT Atom -MakeAtom(char *string, unsigned len, Bool makeit) +Atom +MakeAtom(const char *string, unsigned len, Bool makeit) { NodePtr * np; unsigned i; @@ -109,7 +109,7 @@ MakeAtom(char *string, unsigned len, Bool makeit) { NodePtr nd; - nd = (NodePtr) xalloc(sizeof(NodeRec)); + nd = xalloc(sizeof(NodeRec)); if (!nd) return BAD_RESOURCE; if (lastAtom < XA_LAST_PREDEFINED) @@ -118,13 +118,14 @@ MakeAtom(char *string, unsigned len, Bool makeit) } else { - nd->string = (char *) xalloc(len + 1); - if (!nd->string) { + char *newstring = xalloc(len + 1); + if (!newstring) { xfree(nd); return BAD_RESOURCE; } - strncpy(nd->string, string, (int)len); - nd->string[len] = 0; + strncpy(newstring, string, (int)len); + newstring[len] = 0; + nd->string = newstring; } if ((lastAtom + 1) >= tableLength) { NodePtr *table; @@ -151,13 +152,13 @@ MakeAtom(char *string, unsigned len, Bool makeit) return None; } -_X_EXPORT Bool +Bool ValidAtom(Atom atom) { return (atom != None) && (atom <= lastAtom); } -_X_EXPORT char * +const char * NameForAtom(Atom atom) { NodePtr node; @@ -201,7 +202,7 @@ InitAtoms(void) { FreeAllAtoms(); tableLength = InitialTableSize; - nodeTable = (NodePtr *)xalloc(InitialTableSize*sizeof(NodePtr)); + nodeTable = xalloc(InitialTableSize*sizeof(NodePtr)); if (!nodeTable) AtomError(); nodeTable[None] = (NodePtr)NULL; diff --git a/xorg-server/dix/colormap.c b/xorg-server/dix/colormap.c index 8b1bad8a3..a5a006e60 100644 --- a/xorg-server/dix/colormap.c +++ b/xorg-server/dix/colormap.c @@ -51,7 +51,6 @@ SOFTWARE. #endif #include -#define NEED_EVENTS #include #include #include @@ -253,7 +252,7 @@ typedef struct _colorResource * \param mid resource to use for this colormap * \param alloc 1 iff all entries are allocated writable */ -_X_EXPORT int +int CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, ColormapPtr *ppcmap, int alloc, int client) { @@ -275,7 +274,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, if ((class | DynamicClass) == DirectColor) sizebytes *= 3; sizebytes += sizeof(ColormapRec); - pmap = (ColormapPtr) xalloc(sizebytes); + pmap = xalloc(sizebytes); if (!pmap) return (BadAlloc); #if defined(_XSERVER64) @@ -311,7 +310,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, for (pent = &pmap->red[size - 1]; pent >= pmap->red; pent--) pent->refcnt = AllocPrivate; pmap->freeRed = 0; - ppix = (Pixel *)xalloc(size * sizeof(Pixel)); + ppix = xalloc(size * sizeof(Pixel)); if (!ppix) { xfree(pmap); @@ -357,7 +356,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, for(pent = &pmap->green[size-1]; pent >= pmap->green; pent--) pent->refcnt = AllocPrivate; pmap->freeGreen = 0; - ppix = (Pixel *) xalloc(size * sizeof(Pixel)); + ppix = xalloc(size * sizeof(Pixel)); if (!ppix) { xfree(pmap->clientPixelsRed[client]); @@ -373,7 +372,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, for(pent = &pmap->blue[size-1]; pent >= pmap->blue; pent--) pent->refcnt = AllocPrivate; pmap->freeBlue = 0; - ppix = (Pixel *) xalloc(size * sizeof(Pixel)); + ppix = xalloc(size * sizeof(Pixel)); if (!ppix) { xfree(pmap->clientPixelsGreen[client]); @@ -502,7 +501,7 @@ TellNoMap (WindowPtr pwin, Colormap *pmid) } /* Tell window that pmid got uninstalled */ -_X_EXPORT int +int TellLostMap (WindowPtr pwin, pointer value) { Colormap *pmid = (Colormap *)value; @@ -527,7 +526,7 @@ TellLostMap (WindowPtr pwin, pointer value) } /* Tell window that pmid got installed */ -_X_EXPORT int +int TellGainedMap (WindowPtr pwin, pointer value) { Colormap *pmid = (Colormap *)value; @@ -744,7 +743,7 @@ UpdateColors (ColormapPtr pmap) pVisual = pmap->pVisual; size = pVisual->ColormapEntries; - defs = (xColorItem *)xalloc(size * sizeof(xColorItem)); + defs = xalloc(size * sizeof(xColorItem)); if (!defs) return; n = 0; @@ -800,7 +799,7 @@ UpdateColors (ColormapPtr pmap) /* Get a read-only color from a ColorMap (probably slow for large maps) * Returns by changing the value in pred, pgreen, pblue and pPix */ -_X_EXPORT int +int AllocColor (ColormapPtr pmap, unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, Pixel *pPix, int client) @@ -894,9 +893,9 @@ AllocColor (ColormapPtr pmap, if (pmap->mid != pmap->pScreen->defColormap && pmap->pVisual->vid == pmap->pScreen->rootVisual) { - ColormapPtr prootmap = (ColormapPtr) - SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, - RT_COLORMAP, DixReadAccess); + ColormapPtr prootmap; + dixLookupResourceByType((pointer *)&prootmap, pmap->pScreen->defColormap, + RT_COLORMAP, clients[client], DixReadAccess); if (pmap->class == prootmap->class) FindColorInRootCmap (prootmap, prootmap->red, entries, &rgb, @@ -911,9 +910,9 @@ AllocColor (ColormapPtr pmap, if (pmap->mid != pmap->pScreen->defColormap && pmap->pVisual->vid == pmap->pScreen->rootVisual) { - ColormapPtr prootmap = (ColormapPtr) - SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, - RT_COLORMAP, DixReadAccess); + ColormapPtr prootmap; + dixLookupResourceByType((pointer *)&prootmap, pmap->pScreen->defColormap, + RT_COLORMAP, clients[client], DixReadAccess); if (pmap->class == prootmap->class) { @@ -963,7 +962,7 @@ AllocColor (ColormapPtr pmap, { colorResource *pcr; - pcr = (colorResource *) xalloc(sizeof(colorResource)); + pcr = xalloc(sizeof(colorResource)); if (!pcr) { (void)FreeColors(pmap, client, 1, pPix, (Pixel)0); @@ -985,7 +984,7 @@ AllocColor (ColormapPtr pmap, * is that this routine will never return failure. */ -_X_EXPORT void +void FakeAllocColor (ColormapPtr pmap, xColorItem *item) { Pixel pixR, pixG, pixB; @@ -1052,7 +1051,7 @@ FakeAllocColor (ColormapPtr pmap, xColorItem *item) } /* free a pixel value obtained from FakeAllocColor */ -_X_EXPORT void +void FakeFreeColor(ColormapPtr pmap, Pixel pixel) { VisualPtr pVisual; @@ -1415,7 +1414,7 @@ BlueComp (EntryPtr pent, xrgb *prgb) /* Read the color value of a cell */ -_X_EXPORT int +int QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList) { Pixel *ppix, pixel; @@ -1551,12 +1550,14 @@ FreePixels(ColormapPtr pmap, int client) int FreeClientPixels (pointer value, XID fakeid) { - ColormapPtr pmap; - colorResource *pcr = (colorResource *)value; - - pmap = (ColormapPtr) LookupIDByType(pcr->mid, RT_COLORMAP); - if (pmap) - FreePixels(pmap, pcr->client); + pointer pmap; + colorResource *pcr = value; + int rc; + + rc = dixLookupResourceByType(&pmap, pcr->mid, RT_COLORMAP, serverClient, + DixRemoveAccess); + if (rc == Success) + FreePixels((ColormapPtr)pmap, pcr->client); xfree(pcr); return Success; } @@ -1579,7 +1580,7 @@ AllocColorCells (int client, ColormapPtr pmap, int colors, int planes, oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; if (!oldcount && (CLIENT_ID(pmap->mid) != client)) { - pcr = (colorResource *) xalloc(sizeof(colorResource)); + pcr = xalloc(sizeof(colorResource)); if (!pcr) return (BadAlloc); } @@ -1654,7 +1655,7 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors, oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; if (!oldcount && (CLIENT_ID(pmap->mid) != client)) { - pcr = (colorResource *) xalloc(sizeof(colorResource)); + pcr = xalloc(sizeof(colorResource)); if (!pcr) return (BadAlloc); } @@ -1746,9 +1747,9 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont for(p = pixels; p < pixels + c; p++) *p = 0; - ppixRed = (Pixel *)xalloc(npixR * sizeof(Pixel)); - ppixGreen = (Pixel *)xalloc(npixG * sizeof(Pixel)); - ppixBlue = (Pixel *)xalloc(npixB * sizeof(Pixel)); + ppixRed = xalloc(npixR * sizeof(Pixel)); + ppixGreen = xalloc(npixG * sizeof(Pixel)); + ppixBlue = xalloc(npixB * sizeof(Pixel)); if (!ppixRed || !ppixGreen || !ppixBlue) { if (ppixBlue) xfree(ppixBlue); @@ -1853,7 +1854,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig, npix = c << r; if ((r >= 32) || (npix > pmap->freeRed) || (npix < c)) return(BadAlloc); - if(!(ppixTemp = (Pixel *)xalloc(npix * sizeof(Pixel)))) + if(!(ppixTemp = xalloc(npix * sizeof(Pixel)))) return(BadAlloc); ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask); @@ -2083,14 +2084,13 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b, npixClientNew = c << (r + g + b); npixShared = (c << r) + (c << g) + (c << b); - psharedList = (SHAREDCOLOR **)xalloc(npixShared * - sizeof(SHAREDCOLOR *)); + psharedList = xalloc(npixShared * sizeof(SHAREDCOLOR *)); if (!psharedList) return FALSE; ppshared = psharedList; for (z = npixShared; --z >= 0; ) { - if (!(ppshared[z] = (SHAREDCOLOR *)xalloc(sizeof(SHAREDCOLOR)))) + if (!(ppshared[z] = xalloc(sizeof(SHAREDCOLOR)))) { for (z++ ; z < npixShared; z++) xfree(ppshared[z]); @@ -2206,7 +2206,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b, /** FreeColors * Free colors and/or cells (probably slow for large numbers) */ -_X_EXPORT int +int FreeColors (ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask) { int rval, result, class; @@ -2400,7 +2400,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe /* Redefine color values */ -_X_EXPORT int +int StoreColors (ColormapPtr pmap, int count, xColorItem *defs) { Pixel pix; @@ -2673,8 +2673,7 @@ IsMapInstalled(Colormap map, WindowPtr pWin) Colormap *pmaps; int imap, nummaps, found; - pmaps = (Colormap *) xalloc( - pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap)); + pmaps = xalloc(pWin->drawable.pScreen->maxInstalledCmaps*sizeof(Colormap)); if(!pmaps) return(FALSE); nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps) diff --git a/xorg-server/dix/cursor.c b/xorg-server/dix/cursor.c index 0017c661d..086d008e0 100644 --- a/xorg-server/dix/cursor.c +++ b/xorg-server/dix/cursor.c @@ -110,7 +110,7 @@ FreeCursorBits(CursorBitsPtr bits) * * \param value must conform to DeleteType */ -_X_EXPORT int +int FreeCursor(pointer value, XID cid) { int nscr; @@ -345,7 +345,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, unsigned char *mskptr; n = BitmapBytePad(cm.width)*(long)cm.height; - mskptr = mskbits = (unsigned char *)xalloc(n); + mskptr = mskbits = xalloc(n); if (!mskptr) return BadAlloc; while (--n >= 0) @@ -405,7 +405,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, else { bits->refcnt = 1; - pShare = (GlyphSharePtr)xalloc(sizeof(GlyphShare)); + pShare = xalloc(sizeof(GlyphShare)); if (!pShare) { FreeCursorBits(bits); @@ -515,7 +515,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, * add the cursor to the resource table *************************************************************/ -CursorPtr +CursorPtr CreateRootCursor(char *unused1, unsigned int unused2) { CursorPtr curs; @@ -545,8 +545,9 @@ CreateRootCursor(char *unused1, unsigned int unused2) if (err != Success) return NullCursor; - cursorfont = (FontPtr)LookupIDByType(fontID, RT_FONT); - if (!cursorfont) + err = dixLookupResourceByType((pointer *)&cursorfont, fontID, RT_FONT, + serverClient, DixReadAccess); + if (err != Success) return NullCursor; if (AllocGlyphCursor(fontID, 0, fontID, 1, 0, 0, 0, ~0, ~0, ~0, &curs, serverClient, (XID)0) != Success) diff --git a/xorg-server/dix/deprecated.c b/xorg-server/dix/deprecated.c index 4e20d6082..8123886ca 100644 --- a/xorg-server/dix/deprecated.c +++ b/xorg-server/dix/deprecated.c @@ -61,7 +61,7 @@ SOFTWARE. */ /* replaced by dixLookupWindow */ -_X_EXPORT WindowPtr +WindowPtr SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode) { WindowPtr pWin; @@ -75,14 +75,14 @@ SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode) } /* replaced by dixLookupWindow */ -_X_EXPORT WindowPtr +WindowPtr LookupWindow(XID id, ClientPtr client) { return SecurityLookupWindow(id, client, DixUnknownAccess); } /* replaced by dixLookupDrawable */ -_X_EXPORT pointer +pointer SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode) { DrawablePtr pDraw; @@ -96,14 +96,14 @@ SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode) } /* replaced by dixLookupDrawable */ -_X_EXPORT pointer +pointer LookupDrawable(XID id, ClientPtr client) { return SecurityLookupDrawable(id, client, DixUnknownAccess); } /* replaced by dixLookupClient */ -_X_EXPORT ClientPtr +ClientPtr LookupClient(XID id, ClientPtr client) { ClientPtr pClient; @@ -116,7 +116,7 @@ LookupClient(XID id, ClientPtr client) } /* replaced by dixLookupResourceByType */ -_X_EXPORT pointer +pointer SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask access_mode) { @@ -130,8 +130,7 @@ SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, return (i == Success) ? retval : NULL; } -/* replaced by dixLookupResourceByClass */ -_X_EXPORT pointer +pointer SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask access_mode) { @@ -146,17 +145,21 @@ SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, } /* replaced by dixLookupResourceByType */ -_X_EXPORT pointer +pointer LookupIDByType(XID id, RESTYPE rtype) { - return SecurityLookupIDByType(NullClient, id, rtype, DixUnknownAccess); + pointer val; + dixLookupResourceByType(&val, id, rtype, NullClient, DixUnknownAccess); + return val; } /* replaced by dixLookupResourceByClass */ -_X_EXPORT pointer +pointer LookupIDByClass(XID id, RESTYPE classes) { - return SecurityLookupIDByClass(NullClient, id, classes, DixUnknownAccess); + pointer val; + dixLookupResourceByClass(&val, id, classes, NullClient, DixUnknownAccess); + return val; } /* replaced by dixLookupResourceBy{Type,Class} */ diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 3b8d544da..0be3d58ab 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -54,8 +54,6 @@ SOFTWARE. #include #include "misc.h" #include "resource.h" -#define NEED_EVENTS -#define NEED_REPLIES #include #include #include "windowstr.h" @@ -65,12 +63,7 @@ SOFTWARE. #include "dixstruct.h" #include "ptrveloc.h" #include "site.h" -#ifndef XKB_IN_SERVER -#define XKB_IN_SERVER -#endif -#ifdef XKB -#include -#endif +#include "xkbsrv.h" #include "privates.h" #include "xace.h" #include "mi.h" @@ -79,15 +72,18 @@ SOFTWARE. #include "swaprep.h" #include "dixevents.h" #include "mipointer.h" +#include "eventstr.h" #include +#include #include #include "exglobals.h" #include "exevents.h" -#include "listdev.h" /* for CopySwapXXXClass */ +#include "xiquerydevice.h" /* for SizeDeviceClasses */ #include "xiproperty.h" #include "enterleave.h" /* for EnterWindow() */ #include "xserver-properties.h" +#include "xichangehierarchy.h" /* For XISendDeviceHierarchyEvent */ /** @file * This file handles input device-related stuff. @@ -95,11 +91,13 @@ SOFTWARE. static int CoreDevicePrivateKeyIndex; DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKeyIndex; -/* Used to sture classes currently not in use by an MD */ +/* Used to store classes currently not in use by an MD */ static int UnusedClassesPrivateKeyIndex; DevPrivateKey UnusedClassesPrivateKey = &UnusedClassesPrivateKeyIndex; +static void RecalculateMasterButtons(DeviceIntPtr slave); + /** * DIX property handler. */ @@ -120,9 +118,9 @@ DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, if (!checkonly) { if ((*((CARD8*)prop->data)) && !dev->enabled) - EnableDevice(dev); + EnableDevice(dev, TRUE); else if (!(*((CARD8*)prop->data)) && dev->enabled) - DisableDevice(dev); + DisableDevice(dev, TRUE); } } @@ -142,7 +140,7 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) return BadDevice; /* Don't allow pairing for slave devices */ - if (!ptr->isMaster || !kbd->isMaster) + if (!IsMaster(ptr) || !IsMaster(kbd)) return BadDevice; if (ptr->spriteInfo->paired) @@ -170,7 +168,7 @@ NextFreePointerDevice(void) { DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) - if (dev->isMaster && + if (IsMaster(dev) && dev->spriteInfo->spriteOwner && !dev->spriteInfo->paired) return dev; @@ -193,13 +191,13 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) char devind[MAXDEVICES]; BOOL enabled; - /* Find next available id */ + /* Find next available id, 0 and 1 are reserved */ memset(devind, 0, sizeof(char)*MAXDEVICES); for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next) devind[devtmp->id]++; for (devtmp = inputInfo.off_devices; devtmp; devtmp = devtmp->next) devind[devtmp->id]++; - for (devid = 0; devid < MAXDEVICES && devind[devid]; devid++) + for (devid = 2; devid < MAXDEVICES && devind[devid]; devid++) ; if (devid >= MAXDEVICES) @@ -248,6 +246,22 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) return dev; } +static void +SendDevicePresenceEvent(int deviceid, int type) +{ + DeviceIntRec dummyDev; + devicePresenceNotify ev; + + memset(&dummyDev, 0, sizeof(DeviceIntRec)); + ev.type = DevicePresenceNotify; + ev.time = currentTime.milliseconds; + ev.devchange = type; + ev.deviceid = deviceid; + dummyDev.id = XIAllDevices; + SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, + (xEvent*)&ev, 1); +} + /** * Enable the device through the driver, add the device to the device list. * Switch device ON through the driver and push it onto the global device @@ -258,21 +272,20 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) * device. * * @param The device to be enabled. + * @param sendevent True if an XI2 event should be sent. * @return TRUE on success or FALSE otherwise. */ Bool -EnableDevice(DeviceIntPtr dev) +EnableDevice(DeviceIntPtr dev, BOOL sendevent) { DeviceIntPtr *prev; int ret; - DeviceIntRec dummyDev; DeviceIntPtr other; - devicePresenceNotify ev; - int namelen = 0; /* dummy */ int evsize = sizeof(xEvent); int listlen; EventListPtr evlist; BOOL enabled; + int flags[MAXDEVICES] = {0}; for (prev = &inputInfo.off_devices; *prev && (*prev != dev); @@ -281,7 +294,7 @@ EnableDevice(DeviceIntPtr dev) if (!dev->spriteInfo->sprite) { - if (dev->isMaster) + if (IsMaster(dev)) { /* Sprites appear on first root window, so we can hardcode it */ if (dev->spriteInfo->spriteOwner) @@ -310,7 +323,7 @@ EnableDevice(DeviceIntPtr dev) * device */ - SizeDeviceInfo(dev, &namelen, &evsize); + evsize += SizeDeviceClasses(dev); listlen = GetEventList(&evlist); OsBlockSignals(); @@ -337,13 +350,14 @@ EnableDevice(DeviceIntPtr dev) XA_INTEGER, 8, PropModeReplace, 1, &enabled, TRUE); - ev.type = DevicePresenceNotify; - ev.time = currentTime.milliseconds; - ev.devchange = DeviceEnabled; - ev.deviceid = dev->id; - dummyDev.id = MAXDEVICES; - SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, - (xEvent *) &ev, 1); + SendDevicePresenceEvent(dev->id, DeviceEnabled); + if (sendevent) + { + flags[dev->id] |= XIDeviceEnabled; + XISendDeviceHierarchyEvent(flags); + } + + RecalculateMasterButtons(dev); return TRUE; } @@ -356,15 +370,15 @@ EnableDevice(DeviceIntPtr dev) * Master keyboard devices have to be disabled before master pointer devices * otherwise things turn bad. * + * @param sendevent True if an XI2 event should be sent. * @return TRUE on success or FALSE otherwise. */ Bool -DisableDevice(DeviceIntPtr dev) +DisableDevice(DeviceIntPtr dev, BOOL sendevent) { DeviceIntPtr *prev, other; - DeviceIntRec dummyDev; - devicePresenceNotify ev; BOOL enabled; + int flags[MAXDEVICES] = {0}; for (prev = &inputInfo.devices; *prev && (*prev != dev); @@ -374,24 +388,27 @@ DisableDevice(DeviceIntPtr dev) return FALSE; /* float attached devices */ - if (dev->isMaster) + if (IsMaster(dev)) { for (other = inputInfo.devices; other; other = other->next) { if (other->u.master == dev) + { AttachDevice(NULL, other, NULL); + flags[other->id] |= XISlaveDetached; + } } } else { for (other = inputInfo.devices; other; other = other->next) { - if (other->isMaster && other->u.lastSlave == dev) + if (IsMaster(other) && other->u.lastSlave == dev) other->u.lastSlave = NULL; } } - if (dev->isMaster && dev->spriteInfo->sprite) + if (IsMaster(dev) && dev->spriteInfo->sprite) { for (other = inputInfo.devices; other; other = other->next) { @@ -406,6 +423,20 @@ DisableDevice(DeviceIntPtr dev) (void)(*dev->deviceProc)(dev, DEVICE_OFF); dev->enabled = FALSE; + + /* now that the device is disabled, we can reset the signal handler's + * last.slave */ + OsBlockSignals(); + for (other = inputInfo.devices; other; other = other->next) + { + if (other->last.slave == dev) + other->last.slave = NULL; + } + OsReleaseSignals(); + + LeaveWindow(dev); + SetFocusOut(dev); + *prev = dev->next; dev->next = inputInfo.off_devices; inputInfo.off_devices = dev; @@ -415,13 +446,14 @@ DisableDevice(DeviceIntPtr dev) XA_INTEGER, 8, PropModeReplace, 1, &enabled, TRUE); - ev.type = DevicePresenceNotify; - ev.time = currentTime.milliseconds; - ev.devchange = DeviceDisabled; - ev.deviceid = dev->id; - dummyDev.id = MAXDEVICES; - SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, - (xEvent *) &ev, 1); + SendDevicePresenceEvent(dev->id, DeviceDisabled); + if (sendevent) + { + flags[dev->id] = XIDeviceDisabled; + XISendDeviceHierarchyEvent(flags); + } + + RecalculateMasterButtons(dev); return TRUE; } @@ -433,14 +465,13 @@ DisableDevice(DeviceIntPtr dev) * Must be called before EnableDevice. * The device will NOT send events until it is enabled! * + * @param sendevent True if an XI2 event should be sent. * @return Success or an error code on failure. */ int -ActivateDevice(DeviceIntPtr dev) +ActivateDevice(DeviceIntPtr dev, BOOL sendevent) { int ret = Success; - devicePresenceNotify ev; - DeviceIntRec dummyDev; ScreenPtr pScreen = screenInfo.screens[0]; if (!dev || !dev->deviceProc) @@ -452,19 +483,16 @@ ActivateDevice(DeviceIntPtr dev) return ret; /* Initialize memory for sprites. */ - if (dev->isMaster && dev->spriteInfo->spriteOwner) + if (IsMaster(dev) && dev->spriteInfo->spriteOwner) pScreen->DeviceCursorInitialize(dev, pScreen); - ev.type = DevicePresenceNotify; - ev.time = currentTime.milliseconds; - ev.devchange = DeviceAdded; - ev.deviceid = dev->id; - - memset(&dummyDev, 0, sizeof(DeviceIntRec)); - dummyDev.id = MAXDEVICES; - SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, - (xEvent *) &ev, 1); - + SendDevicePresenceEvent(dev->id, DeviceAdded); + if (sendevent) + { + int flags[MAXDEVICES] = {0}; + flags[dev->id] = XISlaveAdded; + XISendDeviceHierarchyEvent(flags); + } return ret; } @@ -489,94 +517,70 @@ CoreKeyboardCtl(DeviceIntPtr pDev, KeybdCtrl *ctrl) /** * Device control function for the Virtual Core Keyboard. */ -static int +int CoreKeyboardProc(DeviceIntPtr pDev, int what) { - CARD8 *modMap; - KeySymsRec keySyms; -#ifdef XKB - XkbComponentNamesRec names; -#endif - ClassesPtr classes; switch (what) { case DEVICE_INIT: - if (!(classes = xcalloc(1, sizeof(ClassesRec)))) + if (!InitKeyboardDeviceStruct(pDev, NULL, CoreKeyboardBell, + CoreKeyboardCtl)) { - ErrorF("[dix] Could not allocate device classes.\n"); - return BadAlloc; - } - - keySyms.minKeyCode = 8; - keySyms.maxKeyCode = 255; - keySyms.mapWidth = 4; - keySyms.map = (KeySym *)xcalloc(sizeof(KeySym), - (keySyms.maxKeyCode - - keySyms.minKeyCode + 1) * - keySyms.mapWidth); - if (!keySyms.map) { - ErrorF("[dix] Couldn't allocate core keymap\n"); - xfree(classes); - return BadAlloc; - } - - modMap = xcalloc(1, MAP_LENGTH); - if (!modMap) { - ErrorF("[dix] Couldn't allocate core modifier map\n"); - xfree(classes); - return BadAlloc; - } - -#ifdef XKB - if (!noXkbExtension) { - bzero(&names, sizeof(names)); - XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, modMap, - CoreKeyboardBell, CoreKeyboardCtl); - } - else -#endif - { - /* FIXME Our keymap here isn't exactly useful. */ - InitKeyboardDeviceStruct((DevicePtr)pDev, &keySyms, modMap, - CoreKeyboardBell, CoreKeyboardCtl); + ErrorF("Keyboard initialization failed. This could be a missing " + "or incorrect setup of xkeyboard-config.\n"); + return BadValue; } + return Success; - xfree(keySyms.map); - xfree(modMap); - break; + case DEVICE_ON: + case DEVICE_OFF: + return Success; case DEVICE_CLOSE: - break; - - default: - break; + return Success; } - return Success; + + return BadMatch; } /** * Device control function for the Virtual Core Pointer. - * - * Aside from initialisation, it backs up the original device classes into the - * devicePrivates. This only needs to be done for master devices. */ -static int +int CorePointerProc(DeviceIntPtr pDev, int what) { - BYTE map[33]; +#define NBUTTONS 7 +#define NAXES 2 + BYTE map[NBUTTONS + 1]; int i = 0; - ClassesPtr classes; + Atom btn_labels[NBUTTONS] = {0}; + Atom axes_labels[NAXES] = {0}; switch (what) { case DEVICE_INIT: - if (!(classes = xcalloc(1, sizeof(ClassesRec)))) - return BadAlloc; - - for (i = 1; i <= 32; i++) + for (i = 1; i <= NBUTTONS; i++) map[i] = i; - InitPointerDeviceStruct((DevicePtr)pDev, map, 32, + + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); + btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); + btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); + btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); + /* don't know about the rest */ + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + + if (!InitPointerDeviceStruct((DevicePtr)pDev, map, NBUTTONS, btn_labels, (PtrCtrlProcPtr)NoopDDA, - GetMotionHistorySize(), 2); + GetMotionHistorySize(), NAXES, axes_labels)) + { + ErrorF("Could not initialize device '%s'. Out of memory.\n", + pDev->name); + return BadAlloc; /* IPDS only fails on allocs */ + } pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; pDev->last.valuators[0] = pDev->valuator->axisVal[0]; pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; @@ -591,6 +595,9 @@ CorePointerProc(DeviceIntPtr pDev, int what) } return Success; + +#undef NBUTTONS +#undef NAXES } /** @@ -604,16 +611,20 @@ CorePointerProc(DeviceIntPtr pDev, int what) void InitCoreDevices(void) { - if (AllocMasterDevice(serverClient, "Virtual core", - &inputInfo.pointer, - &inputInfo.keyboard) != Success) + if (AllocDevicePair(serverClient, "Virtual core", + &inputInfo.pointer, &inputInfo.keyboard, + CorePointerProc, CoreKeyboardProc, + TRUE) != Success) FatalError("Failed to allocate core devices"); - ActivateDevice(inputInfo.pointer); - ActivateDevice(inputInfo.keyboard); - EnableDevice(inputInfo.pointer); - EnableDevice(inputInfo.keyboard); + if (ActivateDevice(inputInfo.pointer, TRUE) != Success || + ActivateDevice(inputInfo.keyboard, TRUE) != Success) + FatalError("Failed to activate core devices."); + if (!EnableDevice(inputInfo.pointer, TRUE) || + !EnableDevice(inputInfo.keyboard, TRUE)) + FatalError("Failed to enable core devices."); + InitXTestDevices(); } /** @@ -629,14 +640,14 @@ InitCoreDevices(void) * @return Success or error code on failure. */ int -InitAndStartDevices() +InitAndStartDevices(void) { DeviceIntPtr dev, next; for (dev = inputInfo.off_devices; dev; dev = dev->next) { DebugF("(dix) initialising device %d\n", dev->id); if (!dev->inited) - ActivateDevice(dev); + ActivateDevice(dev, TRUE); } /* enable real devices */ @@ -645,7 +656,7 @@ InitAndStartDevices() DebugF("(dix) enabling device %d\n", dev->id); next = dev->next; if (dev->inited && dev->startup) - (void)EnableDevice(dev); + EnableDevice(dev, TRUE); } return Success; @@ -665,25 +676,19 @@ FreeDeviceClass(int type, pointer *class) case KeyClass: { KeyClassPtr* k = (KeyClassPtr*)class; -#ifdef XKB if ((*k)->xkbInfo) { XkbFreeInfo((*k)->xkbInfo); (*k)->xkbInfo = NULL; } -#endif - xfree((*k)->curKeySyms.map); - xfree((*k)->modifierKeyMap); xfree((*k)); break; } case ButtonClass: { ButtonClassPtr *b = (ButtonClassPtr*)class; -#ifdef XKB if ((*b)->xkb_acts) xfree((*b)->xkb_acts); -#endif xfree((*b)); break; } @@ -728,10 +733,8 @@ FreeFeedbackClass(int type, pointer *class) KbdFeedbackPtr k, knext; for (k = (*kbdfeed); k; k = knext) { knext = k->next; -#ifdef XKB if (k->xkb_sli) XkbFreeSrvLedInfo(k->xkb_sli); -#endif xfree(k); } break; @@ -789,10 +792,8 @@ FreeFeedbackClass(int type, pointer *class) for (l = (*leds); l; l = lnext) { lnext = l->next; -#ifdef XKB if (l->xkb_sli) XkbFreeSrvLedInfo(l->xkb_sli); -#endif xfree(l); } break; @@ -845,7 +846,7 @@ CloseDevice(DeviceIntPtr dev) (void)(*dev->deviceProc)(dev, DEVICE_CLOSE); /* free sprite memory */ - if (dev->isMaster && dev->spriteInfo->sprite) + if (IsMaster(dev) && dev->spriteInfo->sprite) screen->DeviceCursorCleanup(dev, screen); /* free acceleration info */ @@ -857,17 +858,14 @@ CloseDevice(DeviceIntPtr dev) classes = (ClassesPtr)&dev->key; FreeAllDeviceClasses(classes); - if (dev->isMaster) + if (IsMaster(dev)) { classes = dixLookupPrivate(&dev->devPrivates, UnusedClassesPrivateKey); FreeAllDeviceClasses(classes); } - -#ifdef XKB while (dev->xkb_interest) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); -#endif if (DevHasCursor(dev) && dev->spriteInfo->sprite) { xfree(dev->spriteInfo->sprite->spriteTrace); @@ -905,7 +903,7 @@ CloseDownDevices(void) */ for (dev = inputInfo.devices; dev; dev = dev->next) { - if (!dev->isMaster && dev->u.master) + if (!IsMaster(dev) && dev->u.master) dev->u.master = NULL; } @@ -924,9 +922,7 @@ CloseDownDevices(void) inputInfo.off_devices = NULL; inputInfo.keyboard = NULL; inputInfo.pointer = NULL; -#ifdef XKB XkbDeleteRulesDflts(); -#endif } /** @@ -934,7 +930,7 @@ CloseDownDevices(void) * resources are freed or any device is deleted. */ void -UndisplayDevices() +UndisplayDevices(void) { DeviceIntPtr dev; ScreenPtr screen = screenInfo.screens[0]; @@ -953,17 +949,18 @@ UndisplayDevices() * happen if a malloc fails during the addition of master devices. If * dev->init is FALSE it means the client never received a DeviceAdded event, * so let's not send a DeviceRemoved event either. + * + * @param sendevent True if an XI2 event should be sent. */ int -RemoveDevice(DeviceIntPtr dev) +RemoveDevice(DeviceIntPtr dev, BOOL sendevent) { DeviceIntPtr prev,tmp,next; int ret = BadMatch; - devicePresenceNotify ev; - DeviceIntRec dummyDev; ScreenPtr screen = screenInfo.screens[0]; int deviceid; int initialized; + int flags[MAXDEVICES] = {0}; DebugF("(dix) removing device %d\n", dev->id); @@ -971,11 +968,16 @@ RemoveDevice(DeviceIntPtr dev) return BadImplementation; initialized = dev->inited; - if (DevHasCursor(dev)) - screen->DisplayCursor(dev, screen, NullCursor); - deviceid = dev->id; - DisableDevice(dev); + + if (initialized) + { + if (DevHasCursor(dev)) + screen->DisplayCursor(dev, screen, NullCursor); + + DisableDevice(dev, sendevent); + flags[dev->id] = XIDeviceDisabled; + } prev = NULL; for (tmp = inputInfo.devices; tmp; (prev = tmp), (tmp = next)) { @@ -987,6 +989,7 @@ RemoveDevice(DeviceIntPtr dev) else prev->next = next; + flags[tmp->id] = IsMaster(tmp) ? XIMasterRemoved : XISlaveRemoved; CloseDevice(tmp); ret = Success; } @@ -996,6 +999,7 @@ RemoveDevice(DeviceIntPtr dev) for (tmp = inputInfo.off_devices; tmp; (prev = tmp), (tmp = next)) { next = tmp->next; if (tmp == dev) { + flags[tmp->id] = IsMaster(tmp) ? XIMasterRemoved : XISlaveRemoved; CloseDevice(tmp); if (prev == NULL) @@ -1009,13 +1013,9 @@ RemoveDevice(DeviceIntPtr dev) if (ret == Success && initialized) { inputInfo.numDevices--; - ev.type = DevicePresenceNotify; - ev.time = currentTime.milliseconds; - ev.devchange = DeviceRemoved; - ev.deviceid = deviceid; - dummyDev.id = MAXDEVICES; - SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, - (xEvent *) &ev, 1); + SendDevicePresenceEvent(deviceid, DeviceRemoved); + if (sendevent) + XISendDeviceHierarchyEvent(flags); } return ret; @@ -1049,11 +1049,11 @@ dixLookupDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode) *pDev = NULL; for (dev=inputInfo.devices; dev; dev=dev->next) { - if (dev->id == (CARD8)id) + if (dev->id == id) goto found; } for (dev=inputInfo.off_devices; dev; dev=dev->next) { - if (dev->id == (CARD8)id) + if (dev->id == id) goto found; } return BadDevice; @@ -1069,24 +1069,25 @@ void QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode) { if (inputInfo.keyboard) { - *minCode = inputInfo.keyboard->key->curKeySyms.minKeyCode; - *maxCode = inputInfo.keyboard->key->curKeySyms.maxKeyCode; + *minCode = inputInfo.keyboard->key->xkbInfo->desc->min_key_code; + *maxCode = inputInfo.keyboard->key->xkbInfo->desc->max_key_code; } } +/* Notably, this function does not expand the destination's keycode range, or + * notify clients. */ Bool SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) { int i, j; + KeySym *tmp; int rowDif = src->minKeyCode - dst->minKeyCode; /* if keysym map size changes, grow map first */ - if (src->mapWidth < dst->mapWidth) - { - for (i = src->minKeyCode; i <= src->maxKeyCode; i++) - { -#define SI(r, c) (((r-src->minKeyCode)*src->mapWidth) + (c)) -#define DI(r, c) (((r - dst->minKeyCode)*dst->mapWidth) + (c)) + if (src->mapWidth < dst->mapWidth) { + for (i = src->minKeyCode; i <= src->maxKeyCode; i++) { +#define SI(r, c) (((r - src->minKeyCode) * src->mapWidth) + (c)) +#define DI(r, c) (((r - dst->minKeyCode) * dst->mapWidth) + (c)) for (j = 0; j < src->mapWidth; j++) dst->map[DI(i, j)] = src->map[SI(i, j)]; for (j = src->mapWidth; j < dst->mapWidth; j++) @@ -1096,112 +1097,42 @@ SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) } return TRUE; } - else if (src->mapWidth > dst->mapWidth) - { - KeySym *map; - int bytes = sizeof(KeySym) * src->mapWidth * - (dst->maxKeyCode - dst->minKeyCode + 1); - map = (KeySym *)xcalloc(1, bytes); - if (!map) - return FALSE; - if (dst->map) - { - for (i = 0; i <= dst->maxKeyCode-dst->minKeyCode; i++) - memmove((char *)&map[i*src->mapWidth], - (char *)&dst->map[i*dst->mapWidth], - dst->mapWidth * sizeof(KeySym)); - xfree(dst->map); - } - dst->mapWidth = src->mapWidth; - dst->map = map; - } else if (!dst->map) - { - KeySym *map; - int bytes = sizeof(KeySym) * src->mapWidth * - (dst->maxKeyCode - dst->minKeyCode + 1); - map = (KeySym *)xcalloc(1, bytes); - if (!map) + else if (src->mapWidth > dst->mapWidth) { + i = sizeof(KeySym) * src->mapWidth * + (dst->maxKeyCode - dst->minKeyCode + 1); + tmp = xcalloc(sizeof(KeySym), i); + if (!tmp) return FALSE; - dst->map = map; + + if (dst->map) { + for (i = 0; i <= dst->maxKeyCode-dst->minKeyCode; i++) + memmove(&tmp[i * src->mapWidth], &dst->map[i * dst->mapWidth], + dst->mapWidth * sizeof(KeySym)); + xfree(dst->map); + } dst->mapWidth = src->mapWidth; + dst->map = tmp; } - memmove((char *)&dst->map[rowDif * dst->mapWidth], - (char *)src->map, - (int)(src->maxKeyCode - src->minKeyCode + 1) * - dst->mapWidth * sizeof(KeySym)); - return TRUE; -} - -static Bool -InitModMap(KeyClassPtr keyc) -{ - int i, j; - CARD8 keysPerModifier[8]; - CARD8 mask; + else if (!dst->map) { + i = sizeof(KeySym) * src->mapWidth * + (dst->maxKeyCode - dst->minKeyCode + 1); + tmp = xcalloc(sizeof(KeySym), i); + if (!tmp) + return FALSE; - keyc->maxKeysPerModifier = 0; - for (i = 0; i < 8; i++) - keysPerModifier[i] = 0; - for (i = 8; i < MAP_LENGTH; i++) - { - for (j = 0, mask = 1; j < 8; j++, mask <<= 1) - { - if (mask & keyc->modifierMap[i]) - { - if (++keysPerModifier[j] > keyc->maxKeysPerModifier) - keyc->maxKeysPerModifier = keysPerModifier[j]; - } - } - } - keyc->modifierKeyMap = xcalloc(8, keyc->maxKeysPerModifier); - if (!keyc->modifierKeyMap && keyc->maxKeysPerModifier) - return (FALSE); - for (i = 0; i < 8; i++) - keysPerModifier[i] = 0; - for (i = 8; i < MAP_LENGTH; i++) - { - for (j = 0, mask = 1; j < 8; j++, mask <<= 1) - { - if (mask & keyc->modifierMap[i]) - { - keyc->modifierKeyMap[(j*keyc->maxKeysPerModifier) + - keysPerModifier[j]] = i; - keysPerModifier[j]++; - } - } + dst->map = tmp; + dst->mapWidth = src->mapWidth; } - return TRUE; -} -_X_EXPORT Bool -InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers[]) -{ - KeyClassPtr keyc; + memmove(&dst->map[rowDif * dst->mapWidth], src->map, + (src->maxKeyCode - src->minKeyCode + 1) * + dst->mapWidth * sizeof(KeySym)); - keyc = xcalloc(1, sizeof(KeyClassRec)); - if (!keyc) - return FALSE; - keyc->curKeySyms.minKeyCode = pKeySyms->minKeyCode; - keyc->curKeySyms.maxKeyCode = pKeySyms->maxKeyCode; - if (pModifiers) - memmove((char *)keyc->modifierMap, (char *)pModifiers, MAP_LENGTH); - if (!SetKeySymsMap(&keyc->curKeySyms, pKeySyms) || !InitModMap(keyc)) - { - xfree(keyc->curKeySyms.map); - xfree(keyc->modifierKeyMap); - xfree(keyc); - return FALSE; - } - dev->key = keyc; -#ifdef XKB - dev->key->xkbInfo= NULL; - if (!noXkbExtension) XkbInitDevice(dev); -#endif return TRUE; } _X_EXPORT Bool -InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, +InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels, CARD8 *map) { ButtonClassPtr butc; @@ -1211,14 +1142,18 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, if (!butc) return FALSE; butc->numButtons = numButtons; + butc->sourceid = dev->id; for (i = 1; i <= numButtons; i++) butc->map[i] = map[i]; + for (i = numButtons + 1; i < MAP_LENGTH; i++) + butc->map[i] = i; + memcpy(butc->labels, labels, numButtons * sizeof(Atom)); dev->button = butc; return TRUE; } -_X_EXPORT Bool -InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, +Bool +InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, int numMotionEvents, int mode) { int i; @@ -1227,12 +1162,21 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, if (!dev) return FALSE; + if (numAxes >= MAX_VALUATORS) + { + LogMessage(X_WARNING, + "Device '%s' has %d axes, only using first %d.\n", + dev->name, numAxes, MAX_VALUATORS); + numAxes = MAX_VALUATORS; + } + valc = (ValuatorClassPtr)xcalloc(1, sizeof(ValuatorClassRec) + numAxes * sizeof(AxisInfo) + - numAxes * sizeof(unsigned int)); + numAxes * sizeof(double)); if (!valc) return FALSE; + valc->sourceid = dev->id; valc->motion = NULL; valc->first_motion = 0; valc->last_motion = 0; @@ -1242,19 +1186,21 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, valc->numAxes = numAxes; valc->mode = mode; valc->axes = (AxisInfoPtr)(valc + 1); - valc->axisVal = (int *)(valc->axes + numAxes); + valc->axisVal = (double *)(valc->axes + numAxes); dev->valuator = valc; AllocateMotionHistory(dev); for (i=0; iaxisVal[i]=0; } dev->last.numValuators = numAxes; - if(dev->isMaster) /* master devs do not accelerate */ + + if (IsMaster(dev) || /* do not accelerate master or xtest devices */ + IsXTestDevice(dev, NULL)) InitPointerAccelerationScheme(dev, PtrAccelNoOp); else InitPointerAccelerationScheme(dev, PtrAccelDefault); @@ -1273,7 +1219,7 @@ ValuatorAccelerationRec pointerAccelerationScheme[] = { * install an acceleration scheme. returns TRUE on success, and should not * change anything if unsuccessful. */ -_X_EXPORT Bool +Bool InitPointerAccelerationScheme(DeviceIntPtr dev, int scheme) { @@ -1286,8 +1232,8 @@ InitPointerAccelerationScheme(DeviceIntPtr dev, if(!val) return FALSE; - if(dev->isMaster && (scheme != PtrAccelNoOp)) - scheme = PtrAccelNoOp; /* no accel for master devices */ + if(IsMaster(dev) && scheme != PtrAccelNoOp) + return FALSE; for(x = 0; pointerAccelerationScheme[x].number >= 0; x++) { if(pointerAccelerationScheme[x].number == scheme){ @@ -1305,7 +1251,7 @@ InitPointerAccelerationScheme(DeviceIntPtr dev, case PtrAccelPredictable: { DeviceVelocityPtr s; - s = (DeviceVelocityPtr)xalloc(sizeof(DeviceVelocityRec)); + s = xalloc(sizeof(DeviceVelocityRec)); if(!s) return FALSE; InitVelocityData(s); @@ -1319,15 +1265,25 @@ InitPointerAccelerationScheme(DeviceIntPtr dev, val->accelScheme = pointerAccelerationScheme[i]; val->accelScheme.accelData = data; + /* post-init scheme */ + switch(scheme){ + case PtrAccelPredictable: + InitializePredictableAccelerationProperties(dev); + break; + + default: + break; + } + return TRUE; } -_X_EXPORT Bool +Bool InitAbsoluteClassDeviceStruct(DeviceIntPtr dev) { AbsoluteClassPtr abs; - abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec)); + abs = xalloc(sizeof(AbsoluteClassRec)); if (!abs) return FALSE; @@ -1348,17 +1304,19 @@ InitAbsoluteClassDeviceStruct(DeviceIntPtr dev) abs->following = 0; abs->screen = 0; + abs->sourceid = dev->id; + dev->absolute = abs; return TRUE; } -_X_EXPORT Bool +Bool InitFocusClassDeviceStruct(DeviceIntPtr dev) { FocusClassPtr focc; - focc = (FocusClassPtr)xalloc(sizeof(FocusClassRec)); + focc = xalloc(sizeof(FocusClassRec)); if (!focc) return FALSE; focc->win = PointerRootWin; @@ -1367,44 +1325,17 @@ InitFocusClassDeviceStruct(DeviceIntPtr dev) focc->trace = (WindowPtr *)NULL; focc->traceSize = 0; focc->traceGood = 0; + focc->sourceid = dev->id; dev->focus = focc; return TRUE; } -_X_EXPORT Bool -InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc, - KbdCtrlProcPtr controlProc) -{ - KbdFeedbackPtr feedc; - - feedc = (KbdFeedbackPtr)xalloc(sizeof(KbdFeedbackClassRec)); - if (!feedc) - return FALSE; - feedc->BellProc = bellProc; - feedc->CtrlProc = controlProc; -#ifdef XKB - defaultKeyboardControl.autoRepeat = TRUE; -#endif - feedc->ctrl = defaultKeyboardControl; - feedc->ctrl.id = 0; - if ((feedc->next = dev->kbdfeed) != 0) - feedc->ctrl.id = dev->kbdfeed->ctrl.id + 1; - dev->kbdfeed = feedc; -#ifdef XKB - feedc->xkb_sli= NULL; - if (!noXkbExtension) - XkbFinishDeviceInit(dev); -#endif - (*dev->kbdfeed->CtrlProc)(dev,&dev->kbdfeed->ctrl); - return TRUE; -} - _X_EXPORT Bool InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc) { PtrFeedbackPtr feedc; - feedc = (PtrFeedbackPtr)xalloc(sizeof(PtrFeedbackClassRec)); + feedc = xalloc(sizeof(PtrFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; @@ -1434,7 +1365,7 @@ static IntegerCtrl defaultIntegerControl = { DEFAULT_INT_DISPLAYED, 0}; -_X_EXPORT Bool +Bool InitStringFeedbackClassDeviceStruct ( DeviceIntPtr dev, StringCtrlProcPtr controlProc, int max_symbols, int num_symbols_supported, KeySym *symbols) @@ -1442,17 +1373,15 @@ InitStringFeedbackClassDeviceStruct ( int i; StringFeedbackPtr feedc; - feedc = (StringFeedbackPtr)xalloc(sizeof(StringFeedbackClassRec)); + feedc = xalloc(sizeof(StringFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; feedc->ctrl.num_symbols_supported = num_symbols_supported; feedc->ctrl.num_symbols_displayed = 0; feedc->ctrl.max_symbols = max_symbols; - feedc->ctrl.symbols_supported = (KeySym *) - xalloc (sizeof (KeySym) * num_symbols_supported); - feedc->ctrl.symbols_displayed = (KeySym *) - xalloc (sizeof (KeySym) * max_symbols); + feedc->ctrl.symbols_supported = xalloc (sizeof (KeySym) * num_symbols_supported); + feedc->ctrl.symbols_displayed = xalloc (sizeof (KeySym) * max_symbols); if (!feedc->ctrl.symbols_supported || !feedc->ctrl.symbols_displayed) { if (feedc->ctrl.symbols_supported) @@ -1465,7 +1394,7 @@ InitStringFeedbackClassDeviceStruct ( for (i=0; ictrl.symbols_supported+i) = *symbols++; for (i=0; ictrl.symbols_displayed+i) = (KeySym) NULL; + *(feedc->ctrl.symbols_displayed+i) = (KeySym) 0; feedc->ctrl.id = 0; if ( (feedc->next = dev->stringfeed) ) feedc->ctrl.id = dev->stringfeed->ctrl.id + 1; @@ -1474,13 +1403,13 @@ InitStringFeedbackClassDeviceStruct ( return TRUE; } -_X_EXPORT Bool +Bool InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc, BellCtrlProcPtr controlProc) { BellFeedbackPtr feedc; - feedc = (BellFeedbackPtr)xalloc(sizeof(BellFeedbackClassRec)); + feedc = xalloc(sizeof(BellFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; @@ -1494,12 +1423,12 @@ InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc, return TRUE; } -_X_EXPORT Bool +Bool InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc) { LedFeedbackPtr feedc; - feedc = (LedFeedbackPtr)xalloc(sizeof(LedFeedbackClassRec)); + feedc = xalloc(sizeof(LedFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; @@ -1507,20 +1436,18 @@ InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc) feedc->ctrl.id = 0; if ( (feedc->next = dev->leds) ) feedc->ctrl.id = dev->leds->ctrl.id + 1; -#ifdef XKB feedc->xkb_sli= NULL; -#endif dev->leds = feedc; (*controlProc)(dev, &feedc->ctrl); return TRUE; } -_X_EXPORT Bool +Bool InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr controlProc) { IntegerFeedbackPtr feedc; - feedc = (IntegerFeedbackPtr)xalloc(sizeof(IntegerFeedbackClassRec)); + feedc = xalloc(sizeof(IntegerFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; @@ -1533,70 +1460,19 @@ InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr contr return TRUE; } -_X_EXPORT Bool -InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, +Bool +InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, Atom* btn_labels, PtrCtrlProcPtr controlProc, int numMotionEvents, - int numAxes) + int numAxes, Atom *axes_labels) { DeviceIntPtr dev = (DeviceIntPtr)device; - return(InitButtonClassDeviceStruct(dev, numButtons, map) && - InitValuatorClassDeviceStruct(dev, numAxes, + return(InitButtonClassDeviceStruct(dev, numButtons, btn_labels, map) && + InitValuatorClassDeviceStruct(dev, numAxes, axes_labels, numMotionEvents, 0) && InitPtrFeedbackClassDeviceStruct(dev, controlProc)); } -_X_EXPORT Bool -InitKeyboardDeviceStruct(DevicePtr device, KeySymsPtr pKeySyms, - CARD8 pModifiers[], BellProcPtr bellProc, - KbdCtrlProcPtr controlProc) -{ - DeviceIntPtr dev = (DeviceIntPtr)device; - - return(InitKeyClassDeviceStruct(dev, pKeySyms, pModifiers) && - InitFocusClassDeviceStruct(dev) && - InitKbdFeedbackClassDeviceStruct(dev, bellProc, controlProc)); -} - -_X_EXPORT void -SendMappingNotify(DeviceIntPtr pDev, unsigned request, unsigned firstKeyCode, - unsigned count, ClientPtr client) -{ - int i; - xEvent event; - - event.u.u.type = MappingNotify; - event.u.mappingNotify.request = request; - if (request == MappingKeyboard) - { - event.u.mappingNotify.firstKeyCode = firstKeyCode; - event.u.mappingNotify.count = count; - } -#ifdef XKB - if (!noXkbExtension && - ((request == MappingKeyboard) || (request == MappingModifier))) { - XkbApplyMappingChange(pDev,request,firstKeyCode,count, client); - } -#endif - - /* 0 is the server client */ - for (i=1; iclientState == ClientStateRunning) - { -#ifdef XKB - if (!noXkbExtension && - (request == MappingKeyboard) && - (clients[i]->xkbClientFlags != 0) && - (clients[i]->mapNotifyMask&XkbKeySymsMask)) - continue; -#endif - event.u.u.sequenceNumber = clients[i]->sequence; - WriteEventsToClient(clients[i], 1, &event); - } - } -} - /* * Check if the given buffer contains elements between low (inclusive) and * high (inclusive) only. @@ -1620,131 +1496,32 @@ BadDeviceMap(BYTE *buff, int length, unsigned low, unsigned high, XID *errval) return FALSE; } -Bool -AllModifierKeysAreUp(dev, map1, per1, map2, per2) - DeviceIntPtr dev; - CARD8 *map1, *map2; - int per1, per2; -{ - int i, j, k; - CARD8 *down = dev->key->down; - - for (i = 8; --i >= 0; map2 += per2) - { - for (j = per1; --j >= 0; map1++) - { - if (*map1 && BitIsOn(down, *map1)) - { - for (k = per2; (--k >= 0) && (*map1 != map2[k]);) - ; - if (k < 0) - return FALSE; - } - } - } - return TRUE; -} - -static int -DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, - int numKeyPerModifier, xSetModifierMappingReply *rep) -{ - DeviceIntPtr pDev = NULL; - DeviceIntPtr cp = PickKeyboard(client); /* ClientPointer keyboard */ - int rc, i = 0, inputMapLen = numKeyPerModifier * 8; - - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (pDev == cp || (!pDev->isMaster && (pDev->u.master == cp) && pDev->key)) { - for (i = 0; i < inputMapLen; i++) { - /* Check that all the new modifiers fall within the advertised - * keycode range, and are okay with the DDX. */ - if (inputMap[i] && ((inputMap[i] < pDev->key->curKeySyms.minKeyCode || - inputMap[i] > pDev->key->curKeySyms.maxKeyCode) || - !LegalModifier(inputMap[i], pDev))) { - client->errorValue = inputMap[i]; - return BadValue; - } - } - - rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); - if (rc != Success) - return rc; - - /* None of the modifiers (old or new) may be down while we change - * the map. */ - if (!AllModifierKeysAreUp(pDev, pDev->key->modifierKeyMap, - pDev->key->maxKeysPerModifier, - inputMap, numKeyPerModifier) || - !AllModifierKeysAreUp(pDev, inputMap, numKeyPerModifier, - pDev->key->modifierKeyMap, - pDev->key->maxKeysPerModifier)) { - rep->success = MappingBusy; - return Success; - } - } - } - - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - - if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { - bzero(pDev->key->modifierMap, MAP_LENGTH); - - /* Annoyingly, we lack a modifierKeyMap size, so we have to just free - * and re-alloc it every time. */ - if (pDev->key->modifierKeyMap) - xfree(pDev->key->modifierKeyMap); - - if (inputMapLen) { - pDev->key->modifierKeyMap = (KeyCode *) xalloc(inputMapLen); - if (!pDev->key->modifierKeyMap) - return BadAlloc; - - memcpy(pDev->key->modifierKeyMap, inputMap, inputMapLen); - pDev->key->maxKeysPerModifier = numKeyPerModifier; - - for (i = 0; i < inputMapLen; i++) { - if (inputMap[i]) { - pDev->key->modifierMap[inputMap[i]] |= - (1 << (((unsigned int)i) / numKeyPerModifier)); - } - } - } - else { - pDev->key->modifierKeyMap = NULL; - pDev->key->maxKeysPerModifier = 0; - } - } - } - - rep->success = Success; - return Success; -} - int ProcSetModifierMapping(ClientPtr client) { xSetModifierMappingReply rep; - DeviceIntPtr dev; int rc; REQUEST(xSetModifierMappingReq); REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq); if (client->req_len != ((stuff->numKeyPerModifier << 1) + - (sizeof (xSetModifierMappingReq) >> 2))) + bytes_to_int32(sizeof(xSetModifierMappingReq)))) return BadLength; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rc = DoSetModifierMapping(client, (KeyCode *)&stuff[1], - stuff->numKeyPerModifier, &rep); - if (rc != Success) + rc = change_modmap(client, PickKeyboard(client), (KeyCode *)&stuff[1], + stuff->numKeyPerModifier); + if (rc == MappingFailed || rc == -1) + return BadValue; + if (rc != Success && rc != MappingSuccess && rc != MappingFailed && + rc != MappingBusy) return rc; - for (dev = inputInfo.devices; dev; dev = dev->next) - if (dev->key && dev->coreEvents) - SendDeviceMappingNotify(client, MappingModifier, 0, 0, dev); + rep.success = rc; + WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep); return client->noClientException; } @@ -1753,26 +1530,27 @@ int ProcGetModifierMapping(ClientPtr client) { xGetModifierMappingReply rep; - DeviceIntPtr dev = PickKeyboard(client); - KeyClassPtr keyc = dev->key; - int rc; + int ret, max_keys_per_mod = 0; + KeyCode *modkeymap = NULL; REQUEST_SIZE_MATCH(xReq); - rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess); - if (rc != Success) - return rc; + ret = generate_modkeymap(client, PickKeyboard(client), &modkeymap, + &max_keys_per_mod); + if (ret != Success) + return ret; + memset(&rep, 0, sizeof(xGetModifierMappingReply)); rep.type = X_Reply; - rep.numKeyPerModifier = keyc->maxKeysPerModifier; + rep.numKeyPerModifier = max_keys_per_mod; rep.sequenceNumber = client->sequence; /* length counts 4 byte quantities - there are 8 modifiers 1 byte big */ - rep.length = keyc->maxKeysPerModifier << 1; + rep.length = max_keys_per_mod << 1; WriteReplyToClient(client, sizeof(xGetModifierMappingReply), &rep); + (void)WriteToClient(client, max_keys_per_mod * 8, (char *) modkeymap); + + xfree(modkeymap); - /* Use the (modified by DDX) map that SetModifierMapping passed in */ - (void)WriteToClient(client, (int)(keyc->maxKeysPerModifier << 3), - (char *)keyc->modifierKeyMap); return client->noClientException; } @@ -1782,76 +1560,56 @@ ProcChangeKeyboardMapping(ClientPtr client) REQUEST(xChangeKeyboardMappingReq); unsigned len; KeySymsRec keysyms; - KeySymsPtr curKeySyms = &PickKeyboard(client)->key->curKeySyms; - DeviceIntPtr pDev = NULL; + DeviceIntPtr pDev, tmp; int rc; REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); - len = client->req_len - (sizeof(xChangeKeyboardMappingReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xChangeKeyboardMappingReq)); if (len != (stuff->keyCodes * stuff->keySymsPerKeyCode)) return BadLength; - if ((stuff->firstKeyCode < curKeySyms->minKeyCode) || - (stuff->firstKeyCode > curKeySyms->maxKeyCode)) { + pDev = PickKeyboard(client); + + if ((stuff->firstKeyCode < pDev->key->xkbInfo->desc->min_key_code) || + (stuff->firstKeyCode > pDev->key->xkbInfo->desc->max_key_code)) { client->errorValue = stuff->firstKeyCode; return BadValue; } if (((unsigned)(stuff->firstKeyCode + stuff->keyCodes - 1) > - curKeySyms->maxKeyCode) || (stuff->keySymsPerKeyCode == 0)) { + pDev->key->xkbInfo->desc->max_key_code) || + (stuff->keySymsPerKeyCode == 0)) { client->errorValue = stuff->keySymsPerKeyCode; return BadValue; } - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); - if (rc != Success) - return rc; - } - } - keysyms.minKeyCode = stuff->firstKeyCode; keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1; keysyms.mapWidth = stuff->keySymsPerKeyCode; - keysyms.map = (KeySym *)&stuff[1]; - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) - if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) - if (!SetKeySymsMap(&pDev->key->curKeySyms, &keysyms)) - return BadAlloc; - - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) - if (pDev->key && pDev->coreEvents) - SendDeviceMappingNotify(client, MappingKeyboard, - stuff->firstKeyCode, stuff->keyCodes, - pDev); + keysyms.map = (KeySym *) &stuff[1]; - return client->noClientException; -} + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); + if (rc != Success) + return rc; -static int -DoSetPointerMapping(ClientPtr client, DeviceIntPtr device, BYTE *map, int n) -{ - int rc, i = 0; + XkbApplyMappingChange(pDev, &keysyms, stuff->firstKeyCode, + stuff->keyCodes, NULL, client); - if (!device || !device->button) - return BadDevice; + for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { + if (IsMaster(tmp) || tmp->u.master != pDev) + continue; + if (!tmp->key) + continue; - rc = XaceHook(XACE_DEVICE_ACCESS, client, device, DixManageAccess); - if (rc != Success) - return rc; + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); + if (rc != Success) + continue; - for (i = 0; i < n; i++) { - if ((device->button->map[i + 1] != map[i]) && - BitIsOn(device->button->down, i + 1)) { - return MappingBusy; - } + XkbApplyMappingChange(tmp, &keysyms, stuff->firstKeyCode, + stuff->keyCodes, NULL, client); } - for (i = 0; i < n; i++) - device->button->map[i + 1] = map[i]; - - return Success; + return client->noClientException; } int @@ -1865,7 +1623,8 @@ ProcSetPointerMapping(ClientPtr client) REQUEST(xSetPointerMappingReq); REQUEST_AT_LEAST_SIZE(xSetPointerMappingReq); - if (client->req_len != (sizeof(xSetPointerMappingReq)+stuff->nElts+3) >> 2) + if (client->req_len != + bytes_to_int32(sizeof(xSetPointerMappingReq) + stuff->nElts)) return BadLength; rep.type = X_Reply; rep.length = 0; @@ -1883,30 +1642,26 @@ ProcSetPointerMapping(ClientPtr client) client->errorValue = stuff->nElts; return BadValue; } - if (BadDeviceMap(&map[0], (int)stuff->nElts, 1, 255, &client->errorValue)) - return BadValue; - /* core protocol specs don't allow for duplicate mappings. */ - for (i = 0; i < stuff->nElts; i++) - { - for (j = i + 1; j < stuff->nElts; j++) - { - if (map[i] && map[i] == map[j]) - { + /* Core protocol specs don't allow for duplicate mappings; this check + * almost certainly wants disabling through XFixes too. */ + for (i = 0; i < stuff->nElts; i++) { + for (j = i + 1; j < stuff->nElts; j++) { + if (map[i] && map[i] == map[j]) { client->errorValue = map[i]; return BadValue; } } } - ret = DoSetPointerMapping(client, ptr, map, stuff->nElts); - if (ret != Success) { + ret = ApplyPointerMapping(ptr, map, stuff->nElts, client); + if (ret == MappingBusy) rep.success = ret; - WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); - return Success; - } + else if (ret == -1) + return BadValue; + else if (ret != Success) + return ret; - SendMappingNotify(ptr, MappingPointer, 0, 0, client); WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); return Success; } @@ -1916,7 +1671,8 @@ ProcGetKeyboardMapping(ClientPtr client) { xGetKeyboardMappingReply rep; DeviceIntPtr kbd = PickKeyboard(client); - KeySymsPtr curKeySyms = &kbd->key->curKeySyms; + XkbDescPtr xkb; + KeySymsPtr syms; int rc; REQUEST(xGetKeyboardMappingReq); REQUEST_SIZE_MATCH(xGetKeyboardMappingReq); @@ -1925,29 +1681,36 @@ ProcGetKeyboardMapping(ClientPtr client) if (rc != Success) return rc; - if ((stuff->firstKeyCode < curKeySyms->minKeyCode) || - (stuff->firstKeyCode > curKeySyms->maxKeyCode)) { + xkb = kbd->key->xkbInfo->desc; + + if ((stuff->firstKeyCode < xkb->min_key_code) || + (stuff->firstKeyCode > xkb->max_key_code)) { client->errorValue = stuff->firstKeyCode; return BadValue; } - if (stuff->firstKeyCode + stuff->count > - (unsigned)(curKeySyms->maxKeyCode + 1)) { + if (stuff->firstKeyCode + stuff->count > xkb->max_key_code + 1) { client->errorValue = stuff->count; return BadValue; } + syms = XkbGetCoreMap(kbd); + if (!syms) + return BadAlloc; + + memset(&rep, 0, sizeof(xGetKeyboardMappingReply)); rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.keySymsPerKeyCode = curKeySyms->mapWidth; + rep.keySymsPerKeyCode = syms->mapWidth; /* length is a count of 4 byte quantities and KeySyms are 4 bytes */ - rep.length = (curKeySyms->mapWidth * stuff->count); + rep.length = syms->mapWidth * stuff->count; WriteReplyToClient(client, sizeof(xGetKeyboardMappingReply), &rep); client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; - WriteSwappedDataToClient( - client, - curKeySyms->mapWidth * stuff->count * sizeof(KeySym), - &curKeySyms->map[(stuff->firstKeyCode - curKeySyms->minKeyCode) * - curKeySyms->mapWidth]); + WriteSwappedDataToClient(client, + syms->mapWidth * stuff->count * sizeof(KeySym), + &syms->map[syms->mapWidth * (stuff->firstKeyCode - + syms->minKeyCode)]); + xfree(syms->map); + xfree(syms); return client->noClientException; } @@ -1969,10 +1732,11 @@ ProcGetPointerMapping(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.nElts = butc->numButtons; + rep.nElts = (butc) ? butc->numButtons : 0; rep.length = ((unsigned)rep.nElts + (4-1))/4; WriteReplyToClient(client, sizeof(xGetPointerMappingReply), &rep); - (void)WriteToClient(client, (int)rep.nElts, (char *)&butc->map[1]); + if (butc) + WriteToClient(client, (int)rep.nElts, (char *)&butc->map[1]); return Success; } @@ -1986,7 +1750,7 @@ NoteLedState(DeviceIntPtr keybd, int led, Bool on) ctrl->leds &= ~((Leds)1 << (led - 1)); } -_X_EXPORT int +int Ones(unsigned long mask) /* HACKMEM 169 */ { unsigned long y; @@ -2007,6 +1771,7 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, int key = DO_ALL; BITS32 index2; int mask = vmask, i; + XkbEventCauseRec cause; ctrl = keybd->kbdfeed->ctrl; while (vmask) { @@ -2089,21 +1854,18 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, client->errorValue = t; return BadValue; } -#ifdef XKB - if (!noXkbExtension) { - XkbEventCauseRec cause; - XkbSetCauseCoreReq(&cause,X_ChangeKeyboardControl,client); - XkbSetIndicators(keybd,((led == DO_ALL) ? ~0L : (1L<<(led-1))), - ctrl.leds, &cause); - ctrl.leds = keybd->kbdfeed->ctrl.leds; - } -#endif + + XkbSetCauseCoreReq(&cause,X_ChangeKeyboardControl,client); + XkbSetIndicators(keybd,((led == DO_ALL) ? ~0L : (1L<<(led-1))), + ctrl.leds, &cause); + ctrl.leds = keybd->kbdfeed->ctrl.leds; + break; case KBKey: key = (KeyCode)*vlist; vlist++; - if ((KeyCode)key < keybd->key->curKeySyms.minKeyCode || - (KeyCode)key > keybd->key->curKeySyms.maxKeyCode) { + if ((KeyCode)key < keybd->key->xkbInfo->desc->min_key_code || + (KeyCode)key > keybd->key->xkbInfo->desc->max_key_code) { client->errorValue = key; return BadValue; } @@ -2115,10 +1877,8 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, mask = (1 << (key & 7)); t = (CARD8)*vlist; vlist++; -#ifdef XKB - if (!noXkbExtension && key != DO_ALL) + if (key != DO_ALL) XkbDisableComputedAutoRepeats(keybd,key); -#endif if (t == AutoRepeatModeOff) { if (key == DO_ALL) ctrl.autoRepeat = FALSE; @@ -2151,27 +1911,25 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, } keybd->kbdfeed->ctrl = ctrl; -#ifdef XKB /* The XKB RepeatKeys control and core protocol global autorepeat */ /* value are linked */ - if (!noXkbExtension) - XkbSetRepeatKeys(keybd, key, keybd->kbdfeed->ctrl.autoRepeat); - else -#endif - (*keybd->kbdfeed->CtrlProc)(keybd, &keybd->kbdfeed->ctrl); + XkbSetRepeatKeys(keybd, key, keybd->kbdfeed->ctrl.autoRepeat); return Success; #undef DO_ALL } +/** + * Changes kbd control on the ClientPointer and all attached SDs. + */ int ProcChangeKeyboardControl (ClientPtr client) { XID *vlist; BITS32 vmask; int ret = Success, error = Success; - DeviceIntPtr pDev = NULL; + DeviceIntPtr pDev = NULL, keyboard; REQUEST(xChangeKeyboardControlReq); REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); @@ -2182,8 +1940,10 @@ ProcChangeKeyboardControl (ClientPtr client) if (client->req_len != (sizeof(xChangeKeyboardControlReq)>>2)+Ones(vmask)) return BadLength; + keyboard = PickKeyboard(client); + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if ((pDev->coreEvents || pDev == inputInfo.keyboard) && + if ((pDev == keyboard || (!IsMaster(keyboard) && pDev->u.master == keyboard)) && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (ret != Success) @@ -2192,7 +1952,7 @@ ProcChangeKeyboardControl (ClientPtr client) } for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if ((pDev->coreEvents || pDev == inputInfo.keyboard) && + if ((pDev == keyboard || (!IsMaster(keyboard) && pDev->u.master == keyboard)) && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { ret = DoChangeKeyboardControl(client, pDev, vlist, vmask); if (ret != Success) @@ -2234,13 +1994,18 @@ ProcGetKeyboardControl (ClientPtr client) int ProcBell(ClientPtr client) { - DeviceIntPtr keybd = PickKeyboard(client); + DeviceIntPtr dev, keybd = PickKeyboard(client); int base = keybd->kbdfeed->ctrl.bell; int newpercent; int rc; REQUEST(xBellReq); REQUEST_SIZE_MATCH(xBellReq); + if (stuff->percent < -100 || stuff->percent > 100) { + client->errorValue = stuff->percent; + return BadValue; + } + /* Seems like no keyboard actually has the BellProc set. Returning * BadDevice (previous code) will make apps crash badly. The man pages * doesn't say anything about a BadDevice being returned either. @@ -2249,32 +2014,21 @@ ProcBell(ClientPtr client) if (!keybd->kbdfeed->BellProc) return Success; - if (stuff->percent < -100 || stuff->percent > 100) { - client->errorValue = stuff->percent; - return BadValue; - } - newpercent = (base * stuff->percent) / 100; if (stuff->percent < 0) newpercent = base + newpercent; else newpercent = base - newpercent + stuff->percent; - for (keybd = inputInfo.devices; keybd; keybd = keybd->next) { - if ((keybd->coreEvents || keybd == inputInfo.keyboard) && - keybd->kbdfeed && keybd->kbdfeed->BellProc) { + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev == keybd || (!IsMaster(dev) && dev->u.master == keybd)) && + dev->kbdfeed && dev->kbdfeed->BellProc) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixBellAccess); + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixBellAccess); if (rc != Success) return rc; -#ifdef XKB - if (!noXkbExtension) - XkbHandleBell(FALSE, FALSE, keybd, newpercent, - &keybd->kbdfeed->ctrl, 0, None, NULL, client); - else -#endif - (*keybd->kbdfeed->BellProc)(newpercent, keybd, - &keybd->kbdfeed->ctrl, 0); + XkbHandleBell(FALSE, FALSE, dev, newpercent, + &dev->kbdfeed->ctrl, 0, None, NULL, client); } } @@ -2284,7 +2038,7 @@ ProcBell(ClientPtr client) int ProcChangePointerControl(ClientPtr client) { - DeviceIntPtr mouse = PickPointer(client); + DeviceIntPtr dev, mouse = PickPointer(client); PtrCtrl ctrl; /* might get BadValue part way through */ int rc; REQUEST(xChangePointerControlReq); @@ -2338,20 +2092,20 @@ ProcChangePointerControl(ClientPtr client) } } - for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { - if ((mouse->coreEvents || mouse == inputInfo.pointer) && - mouse->ptrfeed && mouse->ptrfeed->CtrlProc) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixManageAccess); + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev == mouse || (!IsMaster(dev) && dev->u.master == mouse)) && + dev->ptrfeed && dev->ptrfeed->CtrlProc) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); if (rc != Success) return rc; } } - for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { - if ((mouse->coreEvents || mouse == PickPointer(client)) && - mouse->ptrfeed && mouse->ptrfeed->CtrlProc) { - mouse->ptrfeed->ctrl = ctrl; - (*mouse->ptrfeed->CtrlProc)(mouse, &mouse->ptrfeed->ctrl); + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev == mouse || (!IsMaster(dev) && dev->u.master == mouse)) && + dev->ptrfeed && dev->ptrfeed->CtrlProc) { + dev->ptrfeed->ctrl = ctrl; + (*dev->ptrfeed->CtrlProc)(dev, &mouse->ptrfeed->ctrl); } } @@ -2449,7 +2203,7 @@ ProcGetMotionEvents(ClientPtr client) nEvents++; } } - rep.length = nEvents * (sizeof(xTimecoord) >> 2); + rep.length = nEvents * bytes_to_int32(sizeof(xTimecoord)); rep.nEvents = nEvents; WriteReplyToClient(client, sizeof(xGetMotionEventsReply), &rep); if (nEvents) @@ -2488,6 +2242,77 @@ ProcQueryKeymap(ClientPtr client) return Success; } + +/** + * Recalculate the number of buttons for the master device. The number of + * buttons on the master device is equal to the number of buttons on the + * slave device with the highest number of buttons. + */ +static void +RecalculateMasterButtons(DeviceIntPtr slave) +{ + DeviceIntPtr dev, master; + int maxbuttons = 0; + + if (!slave->button || IsMaster(slave)) + return; + + master = GetMaster(slave, MASTER_POINTER); + if (!master) + return; + + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (IsMaster(dev) || + dev->u.master != master || + !dev->button) + continue; + + maxbuttons = max(maxbuttons, dev->button->numButtons); + } + + if (master->button->numButtons != maxbuttons) + { + int i; + DeviceChangedEvent event; + + memset(&event, 0, sizeof(event)); + + master->button->numButtons = maxbuttons; + + event.header = ET_Internal; + event.type = ET_DeviceChanged; + event.time = CurrentTime; + event.deviceid = master->id; + event.flags = DEVCHANGE_POINTER_EVENT | DEVCHANGE_DEVICE_CHANGE; + event.buttons.num_buttons = maxbuttons; + memcpy(&event.buttons.names, master->button->labels, maxbuttons * + sizeof(Atom)); + + if (master->valuator) + { + event.num_valuators = master->valuator->numAxes; + for (i = 0; i < event.num_valuators; i++) + { + event.valuators[i].min = master->valuator->axes[i].min_value; + event.valuators[i].max = master->valuator->axes[i].max_value; + event.valuators[i].resolution = master->valuator->axes[i].resolution; + /* This should, eventually, be a per-axis mode */ + event.valuators[i].mode = master->valuator->mode; + event.valuators[i].name = master->valuator->axes[i].label; + } + } + + if (master->key) + { + event.keys.min_keycode = master->key->xkbInfo->desc->min_key_code; + event.keys.max_keycode = master->key->xkbInfo->desc->max_key_code; + } + + XISendDeviceChangedEvent(master, master, &event); + } +} + /** * Attach device 'dev' to device 'master'. * Client is set to the client that issued the request, or NULL if it comes @@ -2503,10 +2328,10 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) { ScreenPtr screen; DeviceIntPtr oldmaster; - if (!dev || dev->isMaster) + if (!dev || IsMaster(dev)) return BadDevice; - if (master && !master->isMaster) /* can't attach to slaves */ + if (master && !IsMaster(master)) /* can't attach to slaves */ return BadDevice; /* set from floating to floating? */ @@ -2540,12 +2365,13 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) InitializeSprite(dev, currentRoot); dev->spriteInfo->spriteOwner = FALSE; dev->spriteInfo->paired = dev; - } else { dev->spriteInfo->sprite = master->spriteInfo->sprite; dev->spriteInfo->paired = master; dev->spriteInfo->spriteOwner = FALSE; + + RecalculateMasterButtons(master); } /* If we were connected to master device before, this MD may need to @@ -2555,8 +2381,22 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) { DeviceIntPtr it; for (it = inputInfo.devices; it; it = it->next) - if (!it->isMaster && it->u.master == oldmaster) + if (!IsMaster(it) && it->u.master == oldmaster) break; + + if (!it) /* no dev is paired with old master */ + { + EventListPtr event = NULL; + + /* XXX: reset master back to defaults */ + event = InitEventList(1); + SetMinimumEventSize(event, 1, sizeof(DeviceChangedEvent)); + CreateClassesChangedEvent(event, oldmaster, oldmaster, + DEVCHANGE_POINTER_EVENT | DEVCHANGE_KEYBOARD_EVENT); + XISendDeviceChangedEvent(oldmaster, oldmaster, + (DeviceChangedEvent*)event->event); + FreeEventList(event, 1); + } } return Success; @@ -2567,10 +2407,10 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) * Returns the device paired with the parent master if the given device is a * slave device. */ -_X_EXPORT DeviceIntPtr +DeviceIntPtr GetPairedDevice(DeviceIntPtr dev) { - if (!dev->isMaster && dev->u.master) + if (!IsMaster(dev) && dev->u.master) dev = dev->u.master; return dev->spriteInfo->paired; @@ -2578,19 +2418,61 @@ GetPairedDevice(DeviceIntPtr dev) /** - * Create a new master device (== one pointer, one keyboard device). + * Returns the right master for the type of event needed. If the event is a + * keyboard event. + * This function may be called with a master device as argument. If so, the + * returned master is either the device itself or the paired master device. + * If dev is a floating slave device, NULL is returned. + * + * @type ::MASTER_KEYBOARD or ::MASTER_POINTER + */ +DeviceIntPtr +GetMaster(DeviceIntPtr dev, int which) +{ + DeviceIntPtr master; + + if (IsMaster(dev)) + master = dev; + else + master = dev->u.master; + + if (master) + { + if (which == MASTER_KEYBOARD) + { + if (master->type != MASTER_KEYBOARD) + master = GetPairedDevice(master); + } else + { + if (master->type != MASTER_POINTER) + master = GetPairedDevice(master); + } + } + + return master; +} + +/** + * Create a new device pair (== one pointer, one keyboard device). * Only allocates the devices, you will need to call ActivateDevice() and * EnableDevice() manually. + * Either a master or a slave device can be created depending on + * the value for master. */ int -AllocMasterDevice(ClientPtr client, char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd) +AllocDevicePair (ClientPtr client, char* name, + DeviceIntPtr* ptr, + DeviceIntPtr* keybd, + DeviceProc ptr_proc, + DeviceProc keybd_proc, + Bool master) { DeviceIntPtr pointer; DeviceIntPtr keyboard; ClassesPtr classes; *ptr = *keybd = NULL; - pointer = AddInputDevice(client, CorePointerProc, TRUE); + pointer = AddInputDevice(client, ptr_proc, TRUE); if (!pointer) return BadAlloc; @@ -2598,27 +2480,22 @@ AllocMasterDevice(ClientPtr client, char* name, DeviceIntPtr* ptr, DeviceIntPtr* strcpy(pointer->name, name); strcat(pointer->name, " pointer"); -#ifdef XKB pointer->public.processInputProc = ProcessOtherEvent; pointer->public.realInputProc = ProcessOtherEvent; - if (!noXkbExtension) - XkbSetExtension(pointer, ProcessPointerEvent); -#else - pointer->public.processInputProc = ProcessPointerEvent; - pointer->public.realInputProc = ProcessPointerEvent; -#endif + XkbSetExtension(pointer, ProcessPointerEvent); pointer->deviceGrab.ActivateGrab = ActivatePointerGrab; pointer->deviceGrab.DeactivateGrab = DeactivatePointerGrab; pointer->coreEvents = TRUE; pointer->spriteInfo->spriteOwner = TRUE; pointer->u.lastSlave = NULL; - pointer->isMaster = TRUE; + pointer->last.slave = NULL; + pointer->type = (master) ? MASTER_POINTER : SLAVE; - keyboard = AddInputDevice(client, CoreKeyboardProc, TRUE); + keyboard = AddInputDevice(client, keybd_proc, TRUE); if (!keyboard) { - RemoveDevice(pointer); + RemoveDevice(pointer, FALSE); return BadAlloc; } @@ -2626,22 +2503,17 @@ AllocMasterDevice(ClientPtr client, char* name, DeviceIntPtr* ptr, DeviceIntPtr* strcpy(keyboard->name, name); strcat(keyboard->name, " keyboard"); -#ifdef XKB keyboard->public.processInputProc = ProcessOtherEvent; keyboard->public.realInputProc = ProcessOtherEvent; - if (!noXkbExtension) - XkbSetExtension(keyboard, ProcessKeyboardEvent); -#else - keyboard->public.processInputProc = ProcessKeyboardEvent; - keyboard->public.realInputProc = ProcessKeyboardEvent; -#endif + XkbSetExtension(keyboard, ProcessKeyboardEvent); keyboard->deviceGrab.ActivateGrab = ActivateKeyboardGrab; keyboard->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; keyboard->coreEvents = TRUE; keyboard->spriteInfo->spriteOwner = FALSE; keyboard->u.lastSlave = NULL; - keyboard->isMaster = TRUE; + keyboard->last.slave = NULL; + keyboard->type = (master) ? MASTER_KEYBOARD : SLAVE; /* The ClassesRec stores the device classes currently not used. */ @@ -2655,3 +2527,4 @@ AllocMasterDevice(ClientPtr client, char* name, DeviceIntPtr* ptr, DeviceIntPtr* return Success; } + diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c index 7e16589da..414bd0404 100644 --- a/xorg-server/dix/dispatch.c +++ b/xorg-server/dix/dispatch.c @@ -107,6 +107,7 @@ Equipment Corporation. #ifdef HAVE_DIX_CONFIG_H #include +#include #endif #ifdef PANORAMIX_DEBUG @@ -130,19 +131,11 @@ int ProcInitialConnection(); #include "dispatch.h" #include "swaprep.h" #include "swapreq.h" -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#endif #include "privates.h" #include "xace.h" -#ifdef XKB -#ifndef XKB_IN_SERVER -#define XKB_IN_SERVER -#endif #include "inputstr.h" -#include -#endif +#include "xkbsrv.h" +#include "site.h" #ifdef XSERVER_DTRACE #include "registry.h" @@ -159,7 +152,9 @@ typedef const char *string; #define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) #define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) -extern xConnSetupPrefix connSetupPrefix; +xConnSetupPrefix connSetupPrefix; + +PaddingInfo PixmapWidthPaddingInfo[33]; static ClientPtr grabClient; #define GrabNone 0 @@ -167,9 +162,9 @@ static ClientPtr grabClient; #define GrabKickout 2 static int grabState = GrabNone; static long grabWaiters[mskcnt]; -_X_EXPORT CallbackListPtr ServerGrabCallback = NULL; +CallbackListPtr ServerGrabCallback = NULL; HWEventQueuePtr checkForInput[2]; -extern int connBlockScreenStart; +int connBlockScreenStart; static void KillAllClients(void); @@ -177,15 +172,15 @@ static int nextFreeClientID; /* always MIN free client ID */ static int nClients; /* number of authorized clients */ -_X_EXPORT CallbackListPtr ClientStateCallback; +CallbackListPtr ClientStateCallback; /* dispatchException & isItTimeToYield must be declared volatile since they * are modified by signal handlers - otherwise optimizer may assume it doesn't * need to actually check value in memory when used and may miss changes from * signal handlers. */ -_X_EXPORT volatile char dispatchException = 0; -_X_EXPORT volatile char isItTimeToYield; +volatile char dispatchException = 0; +volatile char isItTimeToYield; /* Various of the DIX function interfaces were not designed to allow * the client->errorValue to be set on BadValue and other errors. @@ -204,7 +199,7 @@ SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1) checkForInput[1] = c1; } -_X_EXPORT void +void UpdateCurrentTime(void) { TimeStamp systime; @@ -223,7 +218,7 @@ UpdateCurrentTime(void) } /* Like UpdateCurrentTime, but can't call ProcessInputEvents */ -_X_EXPORT void +void UpdateCurrentTimeIf(void) { TimeStamp systime; @@ -242,12 +237,12 @@ UpdateCurrentTimeIf(void) #define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */ #define SMART_SCHEDULE_MAX_SLICE 200 /* ms */ -Bool SmartScheduleDisable = FALSE; -long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL; -long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL; -long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE; -long SmartScheduleTime; -int SmartScheduleLatencyLimited = 0; +Bool SmartScheduleDisable = FALSE; +long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL; +long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL; +long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE; +long SmartScheduleTime; +int SmartScheduleLatencyLimited = 0; static ClientPtr SmartLastClient; static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1]; @@ -370,7 +365,7 @@ Dispatch(void) nextFreeClientID = 1; nClients = 0; - clientReady = (int *) xalloc(sizeof(int) * MaxClients); + clientReady = xalloc(sizeof(int) * MaxClients); if (!clientReady) return; @@ -437,12 +432,6 @@ Dispatch(void) } client->sequence++; -#ifdef DEBUG - if (client->requestLogIndex == MAX_REQUEST_LOG) - client->requestLogIndex = 0; - client->requestLog[client->requestLogIndex] = MAJOROP; - client->requestLogIndex++; -#endif #ifdef XSERVER_DTRACE XSERVER_REQUEST_START(LookupMajorName(MAJOROP), MAJOROP, ((xReq *)client->requestBuffer)->length, @@ -490,7 +479,167 @@ Dispatch(void) #undef MAJOROP -_X_EXPORT int +static int VendorRelease = VENDOR_RELEASE; +static char *VendorString = VENDOR_NAME; + +static const int padlength[4] = {0, 3, 2, 1}; + +void +SetVendorRelease(int release) +{ + VendorRelease = release; +} + +void +SetVendorString(char *string) +{ + VendorString = string; +} + +Bool +CreateConnectionBlock(void) +{ + xConnSetup setup; + xWindowRoot root; + xDepth depth; + xVisualType visual; + xPixmapFormat format; + unsigned long vid; + int i, j, k, + lenofblock, + sizesofar = 0; + char *pBuf; + + + memset(&setup, 0, sizeof(xConnSetup)); + /* Leave off the ridBase and ridMask, these must be sent with + connection */ + + setup.release = VendorRelease; + /* + * per-server image and bitmap parameters are defined in Xmd.h + */ + setup.imageByteOrder = screenInfo.imageByteOrder; + + setup.bitmapScanlineUnit = screenInfo.bitmapScanlineUnit; + setup.bitmapScanlinePad = screenInfo.bitmapScanlinePad; + + setup.bitmapBitOrder = screenInfo.bitmapBitOrder; + setup.motionBufferSize = NumMotionEvents(); + setup.numRoots = screenInfo.numScreens; + setup.nbytesVendor = strlen(VendorString); + setup.numFormats = screenInfo.numPixmapFormats; + setup.maxRequestSize = MAX_REQUEST_SIZE; + QueryMinMaxKeyCodes(&setup.minKeyCode, &setup.maxKeyCode); + + lenofblock = sizeof(xConnSetup) + + pad_to_int32(setup.nbytesVendor) + + (setup.numFormats * sizeof(xPixmapFormat)) + + (setup.numRoots * sizeof(xWindowRoot)); + ConnectionInfo = xalloc(lenofblock); + if (!ConnectionInfo) + return FALSE; + + memmove(ConnectionInfo, (char *)&setup, sizeof(xConnSetup)); + sizesofar = sizeof(xConnSetup); + pBuf = ConnectionInfo + sizeof(xConnSetup); + + memmove(pBuf, VendorString, (int)setup.nbytesVendor); + sizesofar += setup.nbytesVendor; + pBuf += setup.nbytesVendor; + i = padlength[setup.nbytesVendor & 3]; + sizesofar += i; + while (--i >= 0) + *pBuf++ = 0; + + memset(&format, 0, sizeof(xPixmapFormat)); + for (i=0; idrawable.id; + root.defaultColormap = pScreen->defColormap; + root.whitePixel = pScreen->whitePixel; + root.blackPixel = pScreen->blackPixel; + root.currentInputMask = 0; /* filled in when sent */ + root.pixWidth = pScreen->width; + root.pixHeight = pScreen->height; + root.mmWidth = pScreen->mmWidth; + root.mmHeight = pScreen->mmHeight; + root.minInstalledMaps = pScreen->minInstalledCmaps; + root.maxInstalledMaps = pScreen->maxInstalledCmaps; + root.rootVisualID = pScreen->rootVisual; + root.backingStore = pScreen->backingStoreSupport; + root.saveUnders = FALSE; + root.rootDepth = pScreen->rootDepth; + root.nDepths = pScreen->numDepths; + memmove(pBuf, (char *)&root, sizeof(xWindowRoot)); + sizesofar += sizeof(xWindowRoot); + pBuf += sizeof(xWindowRoot); + + pDepth = pScreen->allowedDepths; + for(j = 0; j < pScreen->numDepths; j++, pDepth++) + { + lenofblock += sizeof(xDepth) + + (pDepth->numVids * sizeof(xVisualType)); + pBuf = (char *)xrealloc(ConnectionInfo, lenofblock); + if (!pBuf) + { + xfree(ConnectionInfo); + return FALSE; + } + ConnectionInfo = pBuf; + pBuf += sizesofar; + depth.depth = pDepth->depth; + depth.nVisuals = pDepth->numVids; + memmove(pBuf, (char *)&depth, sizeof(xDepth)); + pBuf += sizeof(xDepth); + sizesofar += sizeof(xDepth); + for(k = 0; k < pDepth->numVids; k++) + { + vid = pDepth->vids[k]; + for (pVisual = pScreen->visuals; + pVisual->vid != vid; + pVisual++) + ; + visual.visualID = vid; + visual.class = pVisual->class; + visual.bitsPerRGB = pVisual->bitsPerRGBValue; + visual.colormapEntries = pVisual->ColormapEntries; + visual.redMask = pVisual->redMask; + visual.greenMask = pVisual->greenMask; + visual.blueMask = pVisual->blueMask; + memmove(pBuf, (char *)&visual, sizeof(xVisualType)); + pBuf += sizeof(xVisualType); + sizesofar += sizeof(xVisualType); + } + } + } + connSetupPrefix.success = xTrue; + connSetupPrefix.length = lenofblock/4; + connSetupPrefix.majorVersion = X_PROTOCOL; + connSetupPrefix.minorVersion = X_PROTOCOL_REVISION; + return TRUE; +} + + +int ProcBadRequest(ClientPtr client) { return (BadRequest); @@ -509,7 +658,7 @@ ProcCreateWindow(ClientPtr client) rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess); if (rc != Success) return rc; - len = client->req_len - (sizeof(xCreateWindowReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xCreateWindowReq)); if (Ones(stuff->mask) != len) return BadLength; if (!stuff->width || !stuff->height) @@ -552,7 +701,7 @@ ProcChangeWindowAttributes(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->window, client, access_mode); if (rc != Success) return rc; - len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq)); if (len != Ones(stuff->valueMask)) return BadLength; result = ChangeWindowAttributes(pWin, @@ -577,6 +726,7 @@ ProcGetWindowAttributes(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; + memset(&wa, 0, sizeof(xGetWindowAttributesReply)); GetWindowAttributes(pWin, client, &wa); WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa); return(client->noClientException); @@ -755,7 +905,7 @@ ProcConfigureWindow(ClientPtr client) DixManageAccess|DixSetAttrAccess); if (rc != Success) return rc; - len = client->req_len - (sizeof(xConfigureWindowReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq)); if (Ones((Mask)stuff->mask) != len) return BadLength; result = ConfigureWindow(pWin, (Mask)stuff->mask, (XID *) &stuff[1], @@ -838,6 +988,7 @@ ProcGetGeometry(ClientPtr client) xGetGeometryReply rep; int status; + memset(&rep, 0, sizeof(xGetGeometryReply)); if ((status = GetGeometry(client, &rep)) != Success) return status; @@ -859,6 +1010,7 @@ ProcQueryTree(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); if (rc != Success) return rc; + memset(&reply, 0, sizeof(xQueryTreeReply)); reply.type = X_Reply; reply.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id; reply.sequenceNumber = client->sequence; @@ -873,7 +1025,7 @@ ProcQueryTree(ClientPtr client) { int curChild = 0; - childIDs = (Window *) xalloc(numChildren * sizeof(Window)); + childIDs = xalloc(numChildren * sizeof(Window)); if (!childIDs) return BadAlloc; for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) @@ -881,7 +1033,7 @@ ProcQueryTree(ClientPtr client) } reply.nChildren = numChildren; - reply.length = (numChildren * sizeof(Window)) >> 2; + reply.length = bytes_to_int32(numChildren * sizeof(Window)); WriteReplyToClient(client, sizeof(xQueryTreeReply), &reply); if (numChildren) @@ -912,6 +1064,7 @@ ProcInternAtom(ClientPtr client) if (atom != BAD_RESOURCE) { xInternAtomReply reply; + memset(&reply, 0, sizeof(xInternAtomReply)); reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; @@ -926,7 +1079,7 @@ ProcInternAtom(ClientPtr client) int ProcGetAtomName(ClientPtr client) { - char *str; + const char *str; xGetAtomNameReply reply; int len; REQUEST(xResourceReq); @@ -935,8 +1088,9 @@ ProcGetAtomName(ClientPtr client) if ( (str = NameForAtom(stuff->id)) ) { len = strlen(str); + memset(&reply, 0, sizeof(xGetAtomNameReply)); reply.type = X_Reply; - reply.length = (len + 3) >> 2; + reply.length = bytes_to_int32(len); reply.sequenceNumber = client->sequence; reply.nameLength = len; WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply); @@ -1031,6 +1185,7 @@ ProcTranslateCoords(ClientPtr client) rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixGetAttrAccess); if (rc != Success) return rc; + memset(&rep, 0, sizeof(xTranslateCoordsReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -1111,12 +1266,13 @@ int ProcCloseFont(ClientPtr client) { FontPtr pFont; + int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, - DixDestroyAccess); - if ( pFont != (FontPtr)NULL) /* id was valid */ + rc = dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT, + client, DixDestroyAccess); + if (rc == Success) { FreeResource(stuff->id, RT_NONE); return(client->noClientException); @@ -1124,7 +1280,7 @@ ProcCloseFont(ClientPtr client) else { client->errorValue = stuff->id; - return (BadFont); + return (rc == BadValue) ? BadFont : rc; } } @@ -1167,14 +1323,14 @@ ProcQueryFont(ClientPtr client) rlength = sizeof(xQueryFontReply) + FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) + nprotoxcistructs * sizeof(xCharInfo); - reply = (xQueryFontReply *)xalloc(rlength); + reply = xcalloc(1, rlength); if(!reply) { return(BadAlloc); } reply->type = X_Reply; - reply->length = (rlength - sizeof(xGenericReply)) >> 2; + reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); reply->sequenceNumber = client->sequence; QueryFont( pFont, reply, nprotoxcistructs); @@ -1208,7 +1364,7 @@ ProcQueryTextExtents(ClientPtr client) if (rc != Success) return (rc == BadValue) ? BadFont: rc; - length = client->req_len - (sizeof(xQueryTextExtentsReq) >> 2); + length = client->req_len - bytes_to_int32(sizeof(xQueryTextExtentsReq)); length = length << 1; if (stuff->oddLength) { @@ -1376,7 +1532,7 @@ ProcCreateGC(ClientPtr client) if (rc != Success) return rc; - len = client->req_len - (sizeof(xCreateGCReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq)); if (len != Ones(stuff->mask)) return BadLength; pGC = (GC *)CreateGC(pDraw, stuff->mask, (XID *) &stuff[1], &error, @@ -1401,7 +1557,7 @@ ProcChangeGC(ClientPtr client) if (result != Success) return result; - len = client->req_len - (sizeof(xChangeGCReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xChangeGCReq)); if (len != Ones(stuff->mask)) return BadLength; @@ -1651,7 +1807,7 @@ ProcPolyPoint(ClientPtr client) return BadValue; } VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); - npoint = ((client->req_len << 2) - sizeof(xPolyPointReq)) >> 2; + npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq)); if (npoint) (*pGC->ops->PolyPoint)(pDraw, pGC, stuff->coordMode, npoint, (xPoint *) &stuff[1]); @@ -1674,7 +1830,7 @@ ProcPolyLine(ClientPtr client) return BadValue; } VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); - npoint = ((client->req_len << 2) - sizeof(xPolyLineReq)) >> 2; + npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq)); if (npoint > 1) (*pGC->ops->Polylines)(pDraw, pGC, stuff->coordMode, npoint, (DDXPointPtr) &stuff[1]); @@ -1762,7 +1918,7 @@ ProcFillPoly(ClientPtr client) } VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); - things = ((client->req_len << 2) - sizeof(xFillPolyReq)) >> 2; + things = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq)); if (things) (*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape, stuff->coordMode, things, @@ -1906,8 +2062,8 @@ ProcPutImage(ClientPtr client) tmpImage = (char *)&stuff[1]; lengthProto = length; - if (((((lengthProto * stuff->height) + (unsigned)3) >> 2) + - (sizeof(xPutImageReq) >> 2)) != client->req_len) + if ((bytes_to_int32(lengthProto * stuff->height) + + bytes_to_int32(sizeof(xPutImageReq))) != client->req_len) return BadLength; ReformatImage (tmpImage, lengthProto * stuff->height, @@ -1926,9 +2082,11 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, int x, int y, int width, int height, Mask planemask, xGetImageReply **im_return) { - DrawablePtr pDraw; + DrawablePtr pDraw, pBoundingDraw; int nlines, linesPerBuf, rc; - int linesDone; + int linesDone; + /* coordinates relative to the bounding drawable */ + int relx, rely; long widthBytesLine, length; Mask plane = 0; char *pBuf; @@ -1944,35 +2102,60 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, if (rc != Success) return rc; + memset(&xgi, 0, sizeof(xGetImageReply)); + + relx = x; + rely = y; + if(pDraw->type == DRAWABLE_WINDOW) { - if( /* check for being viewable */ - !((WindowPtr) pDraw)->realized || - /* check for being on screen */ - pDraw->x + x < 0 || - pDraw->x + x + width > pDraw->pScreen->width || - pDraw->y + y < 0 || - pDraw->y + y + height > pDraw->pScreen->height || - /* check for being inside of border */ - x < - wBorderWidth((WindowPtr)pDraw) || - x + width > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || - y < -wBorderWidth((WindowPtr)pDraw) || - y + height > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height - ) - return(BadMatch); - xgi.visual = wVisual (((WindowPtr) pDraw)); + WindowPtr pWin = (WindowPtr)pDraw; + + /* "If the drawable is a window, the window must be viewable ... or a + * BadMatch error results" */ + if (!pWin->viewable) + return BadMatch; + + relx += pDraw->x; + rely += pDraw->y; + + if (pDraw->pScreen->GetWindowPixmap) { + PixmapPtr pPix = (*pDraw->pScreen->GetWindowPixmap) (pWin); + + pBoundingDraw = &pPix->drawable; +#ifdef COMPOSITE + relx -= pPix->screen_x; + rely -= pPix->screen_y; +#endif + } + else + { + pBoundingDraw = (DrawablePtr)WindowTable[pDraw->pScreen->myNum]; + } + + xgi.visual = wVisual (pWin); } else { - if(x < 0 || - x+width > (int)pDraw->width || - y < 0 || - y+height > (int)pDraw->height - ) - return(BadMatch); + pBoundingDraw = pDraw; xgi.visual = None; } + /* "If the drawable is a pixmap, the given rectangle must be wholly + * contained within the pixmap, or a BadMatch error results. If the + * drawable is a window [...] it must be the case that if there were no + * inferiors or overlapping windows, the specified rectangle of the window + * would be fully visible on the screen and wholly contained within the + * outside edges of the window, or a BadMatch error results." + * + * We relax the window case slightly to mean that the rectangle must exist + * within the bounds of the window's backing pixmap. In particular, this + * means that a GetImage request may succeed or fail with BadMatch depending + * on whether any of its ancestor windows are redirected. */ + if(relx < 0 || relx + width > (int)pBoundingDraw->width || + rely < 0 || rely + height > (int)pBoundingDraw->height) + return BadMatch; + xgi.type = X_Reply; xgi.sequenceNumber = client->sequence; xgi.depth = pDraw->depth; @@ -1995,7 +2178,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, xgi.length = length; if (im_return) { - pBuf = (char *)xalloc(sz_xGetImageReply + length); + pBuf = xcalloc(1, sz_xGetImageReply + length); if (!pBuf) return (BadAlloc); if (widthBytesLine == 0) @@ -2006,7 +2189,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, *(xGetImageReply *)pBuf = xgi; pBuf += sz_xGetImageReply; } else { - xgi.length = (xgi.length + 3) >> 2; + xgi.length = bytes_to_int32(xgi.length); if (widthBytesLine == 0 || height == 0) linesPerBuf = 0; else if (widthBytesLine >= IMAGE_BUFSIZE) @@ -2033,7 +2216,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, length += widthBytesLine; } } - if(!(pBuf = (char *) xalloc(length))) + if(!(pBuf = xcalloc(1, length))) return (BadAlloc); WriteReplyToClient(client, sizeof (xGetImageReply), &xgi); } @@ -2405,8 +2588,7 @@ ProcListInstalledColormaps(ClientPtr client) if (rc != Success) goto out; - preply = (xListInstalledColormapsReply *) - xalloc(sizeof(xListInstalledColormapsReply) + + preply = xalloc(sizeof(xListInstalledColormapsReply) + pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap)); if(!preply) @@ -2550,7 +2732,7 @@ ProcAllocColorCells (ClientPtr client) } nmasks = stuff->planes; length = ((long)npixels + (long)nmasks) * sizeof(Pixel); - ppixels = (Pixel *)xalloc(length); + ppixels = xalloc(length); if(!ppixels) return(BadAlloc); pmasks = ppixels + npixels; @@ -2569,7 +2751,7 @@ ProcAllocColorCells (ClientPtr client) #endif { accr.type = X_Reply; - accr.length = length >> 2; + accr.length = bytes_to_int32(length); accr.sequenceNumber = client->sequence; accr.nPixels = npixels; accr.nMasks = nmasks; @@ -2619,7 +2801,7 @@ ProcAllocColorPlanes(ClientPtr client) acpr.sequenceNumber = client->sequence; acpr.nPixels = npixels; length = (long)npixels * sizeof(Pixel); - ppixels = (Pixel *)xalloc(length); + ppixels = xalloc(length); if(!ppixels) return(BadAlloc); if( (rc = AllocColorPlanes(client->index, pcmp, npixels, @@ -2633,7 +2815,7 @@ ProcAllocColorPlanes(ClientPtr client) else return rc; } - acpr.length = length >> 2; + acpr.length = bytes_to_int32(length); #ifdef PANORAMIX if (noPanoramiXExtension || !pcmp->pScreen->myNum) #endif @@ -2668,7 +2850,7 @@ ProcFreeColors(ClientPtr client) if(pcmp->flags & AllAllocated) return(BadAccess); - count = ((client->req_len << 2)- sizeof(xFreeColorsReq)) >> 2; + count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq)); rc = FreeColors(pcmp, client->index, count, (Pixel *)&stuff[1], (Pixel)stuff->planeMask); if (client->noClientException != Success) @@ -2771,8 +2953,8 @@ ProcQueryColors(ClientPtr client) xrgb *prgbs; xQueryColorsReply qcr; - count = ((client->req_len << 2) - sizeof(xQueryColorsReq)) >> 2; - prgbs = (xrgb *)xalloc(count * sizeof(xrgb)); + count = bytes_to_int32((client->req_len << 2) - sizeof(xQueryColorsReq)); + prgbs = xcalloc(1, count * sizeof(xrgb)); if(!prgbs && count) return(BadAlloc); if( (rc = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs)) ) @@ -2786,8 +2968,9 @@ ProcQueryColors(ClientPtr client) return rc; } } + memset(&qcr, 0, sizeof(xQueryColorsReply)); qcr.type = X_Reply; - qcr.length = (count * sizeof(xrgb)) >> 2; + qcr.length = bytes_to_int32(count * sizeof(xrgb)); qcr.sequenceNumber = client->sequence; qcr.nColors = count; WriteReplyToClient(client, sizeof(xQueryColorsReply), &qcr); @@ -3013,6 +3196,7 @@ ProcQueryBestSize (ClientPtr client) return rc; (* pScreen->QueryBestSize)(stuff->class, &stuff->width, &stuff->height, pScreen); + memset(&reply, 0, sizeof(xQueryBestSizeReply)); reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; @@ -3156,7 +3340,7 @@ ProcListHosts(ClientPtr client) reply.type = X_Reply; reply.sequenceNumber = client->sequence; reply.nHosts = nHosts; - reply.length = len >> 2; + reply.length = bytes_to_int32(len); WriteReplyToClient(client, sizeof(xListHostsReply), &reply); if (nHosts) { @@ -3289,7 +3473,7 @@ ProcGetFontPath(ClientPtr client) reply.type = X_Reply; reply.sequenceNumber = client->sequence; - reply.length = (stringLens + numpaths + 3) >> 2; + reply.length = bytes_to_int32(stringLens + numpaths); reply.nPaths = numpaths; WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply); @@ -3480,41 +3664,16 @@ KillAllClients(void) void InitClient(ClientPtr client, int i, pointer ospriv) { + memset(client, 0, sizeof(*client)); client->index = i; - client->sequence = 0; client->clientAsMask = ((Mask)i) << CLIENTOFFSET; - client->clientGone = FALSE; client->closeDownMode = i ? DestroyAll : RetainPermanent; - client->numSaved = 0; - client->saveSet = (SaveSetElt *)NULL; - client->noClientException = Success; -#ifdef DEBUG - client->requestLogIndex = 0; -#endif client->requestVector = InitialVector; client->osPrivate = ospriv; - client->swapped = FALSE; - client->big_requests = FALSE; - client->priority = 0; - client->clientState = ClientStateInitial; - client->devPrivates = NULL; -#ifdef XKB - if (!noXkbExtension) { - client->xkbClientFlags = 0; - client->mapNotifyMask = 0; - client->newKeyboardNotifyMask = 0; - client->vMinor = client->vMajor = 0; - QueryMinMaxKeyCodes(&client->minKC,&client->maxKC); - } -#endif - client->replyBytesRemaining = 0; - client->fontResFunc = NULL; - client->smart_priority = 0; + QueryMinMaxKeyCodes(&client->minKC,&client->maxKC); client->smart_start_tick = SmartScheduleTime; client->smart_stop_tick = SmartScheduleTime; client->smart_check_tick = SmartScheduleTime; - - client->clientPtr = NULL; } /************************ @@ -3533,7 +3692,7 @@ ClientPtr NextAvailableClient(pointer ospriv) i = nextFreeClientID; if (i == MAXCLIENTS) return (ClientPtr)NULL; - clients[i] = client = (ClientPtr)xalloc(sizeof(ClientRec)); + clients[i] = client = xalloc(sizeof(ClientRec)); if (!client) return (ClientPtr)NULL; InitClient(client, i, ospriv); @@ -3543,7 +3702,7 @@ ClientPtr NextAvailableClient(pointer ospriv) return (ClientPtr)NULL; } data.reqType = 1; - data.length = (sz_xReq + sz_xConnClientPrefix) >> 2; + data.length = bytes_to_int32(sz_xReq + sz_xConnClientPrefix); if (!InsertFakeRequest(client, (char *)&data, sz_xReq)) { FreeClientResources(client); @@ -3583,8 +3742,8 @@ ProcInitialConnection(ClientPtr client) SwapConnClientPrefix(prefix); } stuff->reqType = 2; - stuff->length += ((prefix->nbytesAuthProto + (unsigned)3) >> 2) + - ((prefix->nbytesAuthString + (unsigned)3) >> 2); + stuff->length += bytes_to_int32(prefix->nbytesAuthProto) + + bytes_to_int32(prefix->nbytesAuthString); if (client->swapped) { swaps(&stuff->length, whichbyte); @@ -3608,7 +3767,7 @@ SendConnSetup(ClientPtr client, char *reason) csp.success = xFalse; csp.lengthReason = strlen(reason); - csp.length = (csp.lengthReason + (unsigned)3) >> 2; + csp.length = bytes_to_int32(csp.lengthReason); csp.majorVersion = X_PROTOCOL; csp.minorVersion = X_PROTOCOL_REVISION; if (client->swapped) @@ -3699,7 +3858,7 @@ ProcEstablishConnection(ClientPtr client) prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq); auth_proto = (char *)prefix + sz_xConnClientPrefix; - auth_string = auth_proto + ((prefix->nbytesAuthProto + 3) & ~3); + auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto); if ((prefix->majorVersion != X_PROTOCOL) || (prefix->minorVersion != X_PROTOCOL_REVISION)) reason = "Protocol version mismatch"; @@ -3724,12 +3883,13 @@ ProcEstablishConnection(ClientPtr client) return(client->noClientException); } -_X_EXPORT void +void SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode, XID resId, int errorCode) { xError rep; + memset(&rep, 0, sizeof(xError)); rep.type = X_Error; rep.sequenceNumber = client->sequence; rep.errorCode = errorCode; @@ -3745,3 +3905,172 @@ MarkClientException(ClientPtr client) { client->noClientException = -1; } + +/* + * This array encodes the answer to the question "what is the log base 2 + * of the number of pixels that fit in a scanline pad unit?" + * Note that ~0 is an invalid entry (mostly for the benefit of the reader). + */ +static int answer[6][4] = { + /* pad pad pad pad*/ + /* 8 16 32 64 */ + + { 3, 4, 5 , 6 }, /* 1 bit per pixel */ + { 1, 2, 3 , 4 }, /* 4 bits per pixel */ + { 0, 1, 2 , 3 }, /* 8 bits per pixel */ + { ~0, 0, 1 , 2 }, /* 16 bits per pixel */ + { ~0, ~0, 0 , 1 }, /* 24 bits per pixel */ + { ~0, ~0, 0 , 1 } /* 32 bits per pixel */ +}; + +/* + * This array gives the answer to the question "what is the first index for + * the answer array above given the number of bits per pixel?" + * Note that ~0 is an invalid entry (mostly for the benefit of the reader). + */ +static int indexForBitsPerPixel[ 33 ] = { + ~0, 0, ~0, ~0, /* 1 bit per pixel */ + 1, ~0, ~0, ~0, /* 4 bits per pixel */ + 2, ~0, ~0, ~0, /* 8 bits per pixel */ + ~0,~0, ~0, ~0, + 3, ~0, ~0, ~0, /* 16 bits per pixel */ + ~0,~0, ~0, ~0, + 4, ~0, ~0, ~0, /* 24 bits per pixel */ + ~0,~0, ~0, ~0, + 5 /* 32 bits per pixel */ +}; + +/* + * This array gives the bytesperPixel value for cases where the number + * of bits per pixel is a multiple of 8 but not a power of 2. + */ +static int answerBytesPerPixel[ 33 ] = { + ~0, 0, ~0, ~0, /* 1 bit per pixel */ + 0, ~0, ~0, ~0, /* 4 bits per pixel */ + 0, ~0, ~0, ~0, /* 8 bits per pixel */ + ~0,~0, ~0, ~0, + 0, ~0, ~0, ~0, /* 16 bits per pixel */ + ~0,~0, ~0, ~0, + 3, ~0, ~0, ~0, /* 24 bits per pixel */ + ~0,~0, ~0, ~0, + 0 /* 32 bits per pixel */ +}; + +/* + * This array gives the answer to the question "what is the second index for + * the answer array above given the number of bits per scanline pad unit?" + * Note that ~0 is an invalid entry (mostly for the benefit of the reader). + */ +static int indexForScanlinePad[ 65 ] = { + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + 0, ~0, ~0, ~0, /* 8 bits per scanline pad unit */ + ~0, ~0, ~0, ~0, + 1, ~0, ~0, ~0, /* 16 bits per scanline pad unit */ + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + 2, ~0, ~0, ~0, /* 32 bits per scanline pad unit */ + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + 3 /* 64 bits per scanline pad unit */ +}; + +/* + grow the array of screenRecs if necessary. + call the device-supplied initialization procedure +with its screen number, a pointer to its ScreenRec, argc, and argv. + return the number of successfully installed screens. + +*/ + +int +AddScreen( + Bool (* pfnInit)( + int /*index*/, + ScreenPtr /*pScreen*/, + int /*argc*/, + char ** /*argv*/ + ), + int argc, + char **argv) +{ + + int i; + int scanlinepad, format, depth, bitsPerPixel, j, k; + ScreenPtr pScreen; + + i = screenInfo.numScreens; + if (i == MAXSCREENS) + return -1; + + pScreen = (ScreenPtr) xcalloc(1, sizeof(ScreenRec)); + if (!pScreen) + return -1; + + pScreen->devPrivates = NULL; + pScreen->myNum = i; + pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8); + pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ + pScreen->CreateScreenResources = 0; + + /* + * This loop gets run once for every Screen that gets added, + * but thats ok. If the ddx layer initializes the formats + * one at a time calling AddScreen() after each, then each + * iteration will make it a little more accurate. Worst case + * we do this loop N * numPixmapFormats where N is # of screens. + * Anyway, this must be called after InitOutput and before the + * screen init routine is called. + */ + for (format=0; formatrgf = ~0L; /* there are no scratch GCs yet*/ + WindowTable[i] = NullWindow; + screenInfo.screens[i] = pScreen; + screenInfo.numScreens++; + if (!(*pfnInit)(i, pScreen, argc, argv)) + { + dixFreePrivates(pScreen->devPrivates); + xfree(pScreen); + screenInfo.numScreens--; + return -1; + } + return i; +} diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c index 719bca469..7d7ae71de 100644 --- a/xorg-server/dix/dixfonts.c +++ b/xorg-server/dix/dixfonts.c @@ -48,7 +48,6 @@ Equipment Corporation. ******************************************************************/ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -71,10 +70,6 @@ Equipment Corporation. #include #endif -#ifdef PANORAMIX -#include "panoramiX.h" -#endif - #ifdef XF86BIGFONT #define _XF86BIGFONT_SERVER_ #include @@ -142,8 +137,9 @@ SetDefaultFont(char *defaultfontname) (unsigned) strlen(defaultfontname), defaultfontname); if (err != Success) return FALSE; - pf = (FontPtr) LookupIDByType(fid, RT_FONT); - if (pf == (FontPtr) NULL) + err = dixLookupResourceByType((pointer *)&pf, fid, RT_FONT, serverClient, + DixReadAccess); + if (err != Success) return FALSE; defaultFont = pf; return TRUE; @@ -398,7 +394,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna #ifdef FONTDEBUG char *f; - f = (char *)xalloc(lenfname + 1); + f = xalloc(lenfname + 1); memmove(f, pfontname, lenfname); f[lenfname] = '\0'; ErrorF("[dix] OpenFont: fontname is \"%s\"\n", f); @@ -435,10 +431,10 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna return Success; } } - c = (OFclosurePtr) xalloc(sizeof(OFclosureRec)); + c = xalloc(sizeof(OFclosureRec)); if (!c) return BadAlloc; - c->fontname = (char *) xalloc(lenfname); + c->fontname = xalloc(lenfname); c->origFontName = pfontname; c->origFontNameLen = lenfname; if (!c->fontname) { @@ -449,8 +445,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna * copy the current FPE list, so that if it gets changed by another client * while we're blocking, the request still appears atomic */ - c->fpe_list = (FontPathElementPtr *) - xalloc(sizeof(FontPathElementPtr) * num_fpes); + c->fpe_list = xalloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { xfree(c->fontname); xfree(c); @@ -684,7 +679,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) } if (err == FontNameAlias) { if (resolved) xfree(resolved); - resolved = (char *) xalloc(resolvedlen + 1); + resolved = xalloc(resolvedlen + 1); if (resolved) memmove(resolved, tmpname, resolvedlen + 1); } @@ -739,7 +734,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) c->haveSaved = TRUE; if (c->savedName) xfree(c->savedName); - c->savedName = (char *)xalloc(namelen + 1); + c->savedName = xalloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); c->savedNameLen = namelen; @@ -795,12 +790,13 @@ finish: for (i = 0; i < nnames; i++) stringLens += (names->length[i] <= 255) ? names->length[i] : 0; + memset(&reply, 0, sizeof(xListFontsReply)); reply.type = X_Reply; - reply.length = (stringLens + nnames + 3) >> 2; + reply.length = bytes_to_int32(stringLens + nnames); reply.nFonts = nnames; reply.sequenceNumber = client->sequence; - bufptr = bufferStart = (char *) xalloc(reply.length << 2); + bufptr = bufferStart = xalloc(reply.length << 2); if (!bufptr && reply.length) { SendErrorToClient(client, X_ListFonts, 0, 0, BadAlloc); @@ -821,7 +817,7 @@ finish: } } nnames = reply.nFonts; - reply.length = (stringLens + nnames + 3) >> 2; + reply.length = bytes_to_int32(stringLens + nnames); client->pSwapReplyFunc = ReplySwapVector[X_ListFonts]; WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply); (void) WriteToClient(client, stringLens + nnames, bufferStart); @@ -860,10 +856,9 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, if (i != Success) return i; - if (!(c = (LFclosurePtr) xalloc(sizeof *c))) + if (!(c = xalloc(sizeof *c))) return BadAlloc; - c->fpe_list = (FontPathElementPtr *) - xalloc(sizeof(FontPathElementPtr) * num_fpes); + c->fpe_list = xalloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { xfree(c); return BadAlloc; @@ -1002,7 +997,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) c->savedNumFonts = numFonts; if (c->savedName) xfree(c->savedName); - c->savedName = (char *)xalloc(namelen + 1); + c->savedName = xalloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); aliascount = 20; @@ -1051,6 +1046,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) err = AllocError; break; } + memset(reply + c->length, 0, length - c->length); c->reply = reply; c->length = length; } @@ -1061,9 +1057,9 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) namelen = strlen(name); } reply->type = X_Reply; - reply->length = (sizeof *reply - sizeof(xGenericReply) + + reply->length = bytes_to_int32(sizeof *reply - sizeof(xGenericReply) + pFontInfo->nprops * sizeof(xFontProp) + - namelen + 3) >> 2; + namelen); reply->sequenceNumber = client->sequence; reply->nameLength = namelen; reply->minBounds = pFontInfo->ink_minbounds; @@ -1101,8 +1097,8 @@ finish: bzero((char *) &finalReply, sizeof(xListFontsWithInfoReply)); finalReply.type = X_Reply; finalReply.sequenceNumber = client->sequence; - finalReply.length = (sizeof(xListFontsWithInfoReply) - - sizeof(xGenericReply)) >> 2; + finalReply.length = bytes_to_int32(sizeof(xListFontsWithInfoReply) + - sizeof(xGenericReply)); WriteSwappedDataToClient(client, length, &finalReply); bail: if (c->slept) @@ -1136,10 +1132,9 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern, if (i != Success) return i; - if (!(c = (LFWIclosurePtr) xalloc(sizeof *c))) + if (!(c = xalloc(sizeof *c))) goto badAlloc; - c->fpe_list = (FontPathElementPtr *) - xalloc(sizeof(FontPathElementPtr) * num_fpes); + c->fpe_list = xalloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { xfree(c); @@ -1207,17 +1202,18 @@ doPolyText(ClientPtr client, PTclosurePtr c) } /* Make sure our drawable hasn't disappeared while we slept. */ - if (c->slept && - c->pDraw && - c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, - RC_DRAWABLE, DixWriteAccess)) + if (c->slept && c->pDraw) { - /* Our drawable has disappeared. Treat like client died... ask - the FPE code to clean up after client and avoid further - rendering while we clean up after ourself. */ - fpe = c->pGC->font->fpe; - (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); - c->pDraw = (DrawablePtr)0; + DrawablePtr pDraw; + dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess); + if (c->pDraw != pDraw) { + /* Our drawable has disappeared. Treat like client died... ask + the FPE code to clean up after client and avoid further + rendering while we clean up after ourself. */ + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + c->pDraw = (DrawablePtr)0; + } } client_state = c->slept ? SLEEPING : NEVER_SLEPT; @@ -1239,12 +1235,11 @@ doPolyText(ClientPtr client, PTclosurePtr c) | ((Font)*(c->pElt+3)) << 8 | ((Font)*(c->pElt+2)) << 16 | ((Font)*(c->pElt+1)) << 24; - pFont = (FontPtr)SecurityLookupIDByType(client, fid, RT_FONT, - DixReadAccess); - if (!pFont) + err = dixLookupResourceByType((pointer *)&pFont, fid, RT_FONT, + client, DixReadAccess); + if (err != Success) { - client->errorValue = fid; - err = BadFont; + err = (err == BadValue) ? BadFont : err; /* restore pFont and fid for step 4 (described below) */ pFont = oldpFont; fid = oldfid; @@ -1326,7 +1321,7 @@ doPolyText(ClientPtr client, PTclosurePtr c) /* Step 1 */ /* Allocate a malloc'd closure structure to replace the local one we were passed */ - new_closure = (PTclosurePtr) xalloc(sizeof(PTclosureRec)); + new_closure = xalloc(sizeof(PTclosureRec)); if (!new_closure) { err = BadAlloc; @@ -1336,7 +1331,7 @@ doPolyText(ClientPtr client, PTclosurePtr c) c = new_closure; len = c->endReq - c->pElt; - c->data = (unsigned char *)xalloc(len); + c->data = xalloc(len); if (!c->data) { xfree(c); @@ -1492,17 +1487,18 @@ doImageText(ClientPtr client, ITclosurePtr c) } /* Make sure our drawable hasn't disappeared while we slept. */ - if (c->slept && - c->pDraw && - c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, - RC_DRAWABLE, DixWriteAccess)) + if (c->slept && c->pDraw) { - /* Our drawable has disappeared. Treat like client died... ask - the FPE code to clean up after client. */ - fpe = c->pGC->font->fpe; - (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); - err = Success; - goto bail; + DrawablePtr pDraw; + dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess); + if (c->pDraw != pDraw) { + /* Our drawable has disappeared. Treat like client died... ask + the FPE code to clean up after client. */ + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + err = Success; + goto bail; + } } lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, c->itemSize, c->data); @@ -1518,7 +1514,7 @@ doImageText(ClientPtr client, ITclosurePtr c) in doPolyText, but much simpler because the request structure is much simpler. */ - new_closure = (ITclosurePtr) xalloc(sizeof(ITclosureRec)); + new_closure = xalloc(sizeof(ITclosureRec)); if (!new_closure) { err = BadAlloc; @@ -1527,7 +1523,7 @@ doImageText(ClientPtr client, ITclosurePtr c) *new_closure = *c; c = new_closure; - data = (unsigned char *)xalloc(c->nChars * c->itemSize); + data = xalloc(c->nChars * c->itemSize); if (!data) { xfree(c); @@ -1664,7 +1660,7 @@ FreeFontPath(FontPathElementPtr *list, int n, Bool force) } FreeFPE(list[i]); } - xfree((char *) list); + xfree(list); } static FontPathElementPtr @@ -1691,8 +1687,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) unsigned char *cp = paths; FontPathElementPtr fpe = NULL, *fplist; - fplist = (FontPathElementPtr *) - xalloc(sizeof(FontPathElementPtr) * npaths); + fplist = xalloc(sizeof(FontPathElementPtr) * npaths); if (!fplist) { *bad = 0; return BadAlloc; @@ -1733,13 +1728,13 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) /* if error or can't do it, act like it's a new one */ if (!fpe) { - fpe = (FontPathElementPtr) xalloc(sizeof(FontPathElementRec)); + fpe = xalloc(sizeof(FontPathElementRec)); if (!fpe) { err = BadAlloc; goto bail; } - fpe->name = (char *) xalloc(len + 1); + fpe->name = xalloc(len + 1); if (!fpe->name) { xfree(fpe); @@ -1827,7 +1822,7 @@ SetDefaultFontPath(char *path) /* get enough for string, plus values -- use up commas */ len = strlen(path) + 1; - nump = cp = newpath = (unsigned char *) xalloc(len); + nump = cp = newpath = xalloc(len); if (!newpath) return BadAlloc; pp = (unsigned char *) path; @@ -1913,7 +1908,7 @@ InitFonts (void) } int -GetDefaultPointSize () +GetDefaultPointSize (void) { return 120; } @@ -2020,12 +2015,13 @@ FreeFonts(void) FontPtr find_old_font(XID id) { - return (FontPtr) SecurityLookupIDByType(NullClient, id, RT_NONE, - DixUnknownAccess); + pointer pFont; + dixLookupResourceByType(&pFont, id, RT_NONE, serverClient, DixReadAccess); + return (FontPtr)pFont; } Font -GetNewFontClientID() +GetNewFontClientID(void) { return FakeClientID(0); } diff --git a/xorg-server/dix/dixutils.c b/xorg-server/dix/dixutils.c index 66e5bc51b..5cede5f43 100644 --- a/xorg-server/dix/dixutils.c +++ b/xorg-server/dix/dixutils.c @@ -102,7 +102,7 @@ Author: Adobe Systems Incorporated * argument is less than, equal to or greater than the second argument. */ -_X_EXPORT int +int CompareTimeStamps(TimeStamp a, TimeStamp b) { if (a.months < b.months) @@ -121,7 +121,7 @@ CompareTimeStamps(TimeStamp a, TimeStamp b) */ #define HALFMONTH ((unsigned long) 1<<31) -_X_EXPORT TimeStamp +TimeStamp ClientTimeToServerTime(CARD32 c) { TimeStamp ts; @@ -165,7 +165,7 @@ ISOLatin1ToLower (unsigned char source) } -_X_EXPORT void +void CopyISOLatin1Lowered(unsigned char *dest, unsigned char *source, int length) { int i; @@ -203,7 +203,7 @@ CompareISOLatin1Lowered(unsigned char *s1, int s1len, * access mask values are defined in resource.h. The type mask values are * defined in pixmap.h, with zero equivalent to M_DRAWABLE. */ -_X_EXPORT int +int dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, Mask type, Mask access) { @@ -229,7 +229,7 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, return Success; } -_X_EXPORT int +int dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) { int rc; @@ -237,20 +237,15 @@ dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) return (rc == BadDrawable) ? BadWindow : rc; } -_X_EXPORT int +int dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access) { - GCPtr pTmp = (GCPtr)SecurityLookupIDByType(client, id, RT_GC, access); - if (pTmp) { - *pGC = pTmp; - return Success; - } - client->errorValue = id; - *pGC = NULL; - return BadGC; + int rc; + rc = dixLookupResourceByType((pointer *)pGC, id, RT_GC, client, access); + return (rc == BadValue) ? BadGC : rc; } -_X_EXPORT int +int dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) { pointer pRes; @@ -351,7 +346,7 @@ DeleteWindowFromAnySaveSet(WindowPtr pWin) * colormaps, if someone calls install colormap, it's easier to have a dummy * procedure to call than to check if there's a procedure */ -_X_EXPORT void +void NoopDDA(void) { } @@ -441,7 +436,7 @@ WakeupHandler(int result, pointer pReadmask) * Reentrant with BlockHandler and WakeupHandler, except wakeup won't * get called until next time */ -_X_EXPORT Bool +Bool RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, WakeupHandlerProcPtr wakeupHandler, pointer blockData) @@ -465,7 +460,7 @@ RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, return TRUE; } -_X_EXPORT void +void RemoveBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, WakeupHandlerProcPtr wakeupHandler, pointer blockData) @@ -560,14 +555,14 @@ ProcessWorkQueueZombies(void) workQueueLast = p; } -_X_EXPORT Bool +Bool QueueWorkProc ( Bool (*function)(ClientPtr /* pClient */, pointer /* closure */), ClientPtr client, pointer closure) { WorkQueuePtr q; - q = (WorkQueuePtr) xalloc (sizeof *q); + q = xalloc (sizeof *q); if (!q) return FALSE; q->function = function; @@ -596,12 +591,12 @@ typedef struct _SleepQueue { static SleepQueuePtr sleepQueue = NULL; -_X_EXPORT Bool +Bool ClientSleep (ClientPtr client, ClientSleepProcPtr function, pointer closure) { SleepQueuePtr q; - q = (SleepQueuePtr) xalloc (sizeof *q); + q = xalloc (sizeof *q); if (!q) return FALSE; @@ -627,7 +622,7 @@ ClientSignal (ClientPtr client) return FALSE; } -_X_EXPORT void +void ClientWakeup (ClientPtr client) { SleepQueuePtr q, *prev; @@ -673,7 +668,7 @@ ClientIsAsleep (ClientPtr client) static int numCallbackListsToCleanup = 0; static CallbackListPtr **listsToCleanup = NULL; -static Bool +static Bool _AddCallback( CallbackListPtr *pcbl, CallbackProcPtr callback, @@ -681,7 +676,7 @@ _AddCallback( { CallbackPtr cbr; - cbr = (CallbackPtr) xalloc(sizeof(CallbackRec)); + cbr = xalloc(sizeof(CallbackRec)); if (!cbr) return FALSE; cbr->proc = callback; @@ -824,7 +819,7 @@ CreateCallbackList(CallbackListPtr *pcbl) int i; if (!pcbl) return FALSE; - cbl = (CallbackListPtr) xalloc(sizeof(CallbackListRec)); + cbl = xalloc(sizeof(CallbackListRec)); if (!cbl) return FALSE; cbl->inCallback = 0; cbl->deleted = FALSE; @@ -850,7 +845,7 @@ CreateCallbackList(CallbackListPtr *pcbl) /* ===== Public Procedures ===== */ -_X_EXPORT Bool +Bool AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) { if (!pcbl) return FALSE; @@ -862,14 +857,14 @@ AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) return _AddCallback(pcbl, callback, data); } -_X_EXPORT Bool +Bool DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) { if (!pcbl || !*pcbl) return FALSE; return _DeleteCallback(pcbl, callback, data); } -void +void CallCallbacks(CallbackListPtr *pcbl, pointer call_data) { if (!pcbl || !*pcbl) return; @@ -883,7 +878,7 @@ DeleteCallbackList(CallbackListPtr *pcbl) _DeleteCallbackList(pcbl); } -void +void InitCallbackManager(void) { int i; diff --git a/xorg-server/dix/enterleave.c b/xorg-server/dix/enterleave.c index 8511dea6f..c08cc3100 100644 --- a/xorg-server/dix/enterleave.c +++ b/xorg-server/dix/enterleave.c @@ -29,13 +29,18 @@ #endif #include +#include +#include "inputstr.h" #include "windowstr.h" #include "scrnintstr.h" #include "exglobals.h" #include "enterleave.h" -/* @file This file describes the model for sending core enter/leave events and - * focus in/out in the case of multiple pointers/keyboard foci +/** + * @file + * This file describes the model for sending core enter/leave events and + * focus in/out in the case of multiple pointers/keyboard foci. + * * Since we can't send more than one Enter or Leave/Focus in or out event per * window to a core client without confusing it, this is a rather complicated * approach. @@ -49,7 +54,7 @@ * http://lists.freedesktop.org/archives/xorg/2008-December/041740.html * * Additional notes: - * -) The core protocol spec says that "In a LeaveNotify event, if a child of the + * - The core protocol spec says that "In a LeaveNotify event, if a child of the * event window contains the initial position of the pointer, then the child * component is set to that child. Otherwise, it is None. For an EnterNotify * event, if a child of the event window contains the final pointer position, @@ -58,7 +63,7 @@ * By inference, this means that only NotifyVirtual or NotifyNonlinearVirtual * events may have a subwindow set to other than None. * - * -) NotifyPointer events may be sent if the focus changes from window A to + * - NotifyPointer events may be sent if the focus changes from window A to * B. The assumption used in this model is that NotifyPointer events are only * sent for the pointer paired with the keyboard that is involved in the focus * events. For example, if F(W) changes because of keyboard 2, then @@ -69,7 +74,7 @@ static WindowPtr PointerWindows[MAXDEVICES]; static WindowPtr FocusWindows[MAXDEVICES]; /** - * Return TRUE if @win has a pointer within its boundaries, excluding child + * Return TRUE if 'win' has a pointer within its boundaries, excluding child * window. */ static BOOL @@ -85,7 +90,7 @@ HasPointer(WindowPtr win) } /** - * Return TRUE if at least one keyboard focus is set to @win (excluding + * Return TRUE if at least one keyboard focus is set to 'win' (excluding * descendants of win). */ static BOOL @@ -100,7 +105,7 @@ HasFocus(WindowPtr win) } /** - * Return the window the device @dev is currently on. + * Return the window the device dev is currently on. */ static WindowPtr PointerWin(DeviceIntPtr dev) @@ -109,7 +114,7 @@ PointerWin(DeviceIntPtr dev) } /** - * Search for the first window below @win that has a pointer directly within + * Search for the first window below 'win' that has a pointer directly within * it's boundaries (excluding boundaries of its own descendants). * * @return The child window that has the pointer within its boundaries or @@ -129,7 +134,7 @@ FirstPointerChild(WindowPtr win) } /** - * Search for the first window below @win that has a focus directly within + * Search for the first window below 'win' that has a focus directly within * it's boundaries (excluding boundaries of its own descendants). * * @return The child window that has the pointer within its boundaries or @@ -150,7 +155,7 @@ FirstFocusChild(WindowPtr win) } /** - * Set the presence flag for @dev to mark that it is now in @win. + * Set the presence flag for dev to mark that it is now in 'win'. */ void EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode) @@ -159,16 +164,16 @@ EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode) } /** - * Unset the presence flag for @dev to mark that it is not in @win anymore. + * Unset the presence flag for dev to mark that it is not in 'win' anymore. */ -static void -LeaveWindow(DeviceIntPtr dev, WindowPtr win, int mode) +void +LeaveWindow(DeviceIntPtr dev) { PointerWindows[dev->id] = NULL; } /** - * Set the presence flag for @dev to mark that it is now in @win. + * Set the presence flag for dev to mark that it is now in 'win'. */ void SetFocusIn(DeviceIntPtr dev, WindowPtr win) @@ -177,10 +182,10 @@ SetFocusIn(DeviceIntPtr dev, WindowPtr win) } /** - * Unset the presence flag for @dev to mark that it is not in @win anymore. + * Unset the presence flag for dev to mark that it is not in 'win' anymore. */ void -SetFocusOut(DeviceIntPtr dev, WindowPtr win) +SetFocusOut(DeviceIntPtr dev) { FocusWindows[dev->id] = NULL; } @@ -189,7 +194,11 @@ SetFocusOut(DeviceIntPtr dev, WindowPtr win) /** - * @return The window that is the first ancestor of both a and b. + * Return the common ancestor of 'a' and 'b' (if one exists). + * @param a A window with the same ancestor as b. + * @param b A window with the same ancestor as a. + * @return The window that is the first ancestor of both 'a' and 'b', or the + * NullWindow if they do not have a common ancestor. */ WindowPtr CommonAncestor( @@ -202,15 +211,14 @@ CommonAncestor( } -#if 0 /** - * Send enter notifies to all windows between @ancestor and @child (excluding + * Send enter notifies to all windows between 'ancestor' and 'child' (excluding * both). Events are sent running up the window hierarchy. This function * recurses. - * If @core is TRUE, core events are sent, otherwise XI events will be sent. */ static void DeviceEnterNotifies(DeviceIntPtr dev, + int sourceid, WindowPtr ancestor, WindowPtr child, int mode, @@ -220,14 +228,13 @@ DeviceEnterNotifies(DeviceIntPtr dev, if (ancestor == parent) return; - DeviceEnterNotifies(dev, ancestor, parent, mode, detail); - DeviceEnterLeaveEvent(dev, DeviceEnterNotify, mode, detail, parent, + DeviceEnterNotifies(dev, sourceid, ancestor, parent, mode, detail); + DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, detail, parent, child->drawable.id); } -#endif /** - * Send enter notifies to all windows between @ancestor and @child (excluding + * Send enter notifies to all windows between 'ancestor' and 'child' (excluding * both). Events are sent running down the window hierarchy. This function * recurses. */ @@ -311,13 +318,13 @@ CoreLeaveNotifies(DeviceIntPtr dev, } } -#if 0 /** - * Send leave notifies to all windows between @child and @ancestor. + * Send leave notifies to all windows between 'child' and 'ancestor'. * Events are sent running up the hierarchy. */ static void DeviceLeaveNotifies(DeviceIntPtr dev, + int sourceid, WindowPtr child, WindowPtr ancestor, int mode, @@ -329,16 +336,15 @@ DeviceLeaveNotifies(DeviceIntPtr dev, return; for (win = child->parent; win != ancestor; win = win->parent) { - DeviceEnterLeaveEvent(dev, DeviceLeaveNotify, mode, detail, win, + DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, detail, win, child->drawable.id); child = win; } } -#endif /** - * Pointer @dev moves from @A to @B and @A neither a descendant of @B nor is - * @B a descendant of @A. + * Pointer dev moves from A to B and A neither a descendant of B nor is + * B a descendant of A. */ static void CoreEnterLeaveNonLinear(DeviceIntPtr dev, @@ -422,7 +428,7 @@ CoreEnterLeaveNonLinear(DeviceIntPtr dev, } /** - * Pointer @dev moves from @A to @B and @A is a descendant of @B. + * Pointer dev moves from A to B and A is a descendant of B. */ static void CoreEnterLeaveToAncestor(DeviceIntPtr dev, @@ -480,7 +486,7 @@ CoreEnterLeaveToAncestor(DeviceIntPtr dev, /** - * Pointer @dev moves from @A to @B and @B is a descendant of @A. + * Pointer dev moves from A to B and B is a descendant of A. */ static void CoreEnterLeaveToDescendant(DeviceIntPtr dev, @@ -541,10 +547,10 @@ CoreEnterLeaveEvents(DeviceIntPtr dev, WindowPtr to, int mode) { - if (!dev->isMaster) + if (!IsMaster(dev)) return; - LeaveWindow(dev, from, mode); + LeaveWindow(dev); if (IsParent(from, to)) CoreEnterLeaveToDescendant(dev, from, to, mode); @@ -556,36 +562,35 @@ CoreEnterLeaveEvents(DeviceIntPtr dev, EnterWindow(dev, to, mode); } -#if 0 static void DeviceEnterLeaveEvents(DeviceIntPtr dev, + int sourceid, WindowPtr from, WindowPtr to, int mode) { if (IsParent(from, to)) { - DeviceEnterLeaveEvent(dev, DeviceLeaveNotify, mode, NotifyInferior, from, None); - DeviceEnterNotifies(dev, from, to, mode, NotifyVirtual); - DeviceEnterLeaveEvent(dev, DeviceEnterNotify, mode, NotifyAncestor, to, None); + DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyInferior, from, None); + DeviceEnterNotifies(dev, sourceid, from, to, mode, NotifyVirtual); + DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, NotifyAncestor, to, None); } else if (IsParent(to, from)) { - DeviceEnterLeaveEvent(dev, DeviceLeaveNotify, mode, NotifyAncestor, from, None); - DeviceLeaveNotifies(dev, from, to, mode, NotifyVirtual); - DeviceEnterLeaveEvent(dev, DeviceEnterNotify, mode, NotifyInferior, to, None); + DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyAncestor, from, None); + DeviceLeaveNotifies(dev, sourceid, from, to, mode, NotifyVirtual); + DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, NotifyInferior, to, None); } else { /* neither from nor to is descendent of the other */ WindowPtr common = CommonAncestor(to, from); /* common == NullWindow ==> different screens */ - DeviceEnterLeaveEvent(dev, DeviceLeaveNotify, mode, NotifyNonlinear, from, None); - DeviceLeaveNotifies(dev, from, common, mode, NotifyNonlinearVirtual); - DeviceEnterNotifies(dev, common, to, mode, NotifyNonlinearVirtual); - DeviceEnterLeaveEvent(dev, DeviceEnterNotify, mode, NotifyNonlinear, to, None); + DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyNonlinear, from, None); + DeviceLeaveNotifies(dev, sourceid, from, common, mode, NotifyNonlinearVirtual); + DeviceEnterNotifies(dev, sourceid, common, to, mode, NotifyNonlinearVirtual); + DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, NotifyNonlinear, to, None); } } -#endif /** * Figure out if enter/leave events are necessary and send them to the @@ -596,6 +601,7 @@ DeviceEnterLeaveEvents(DeviceIntPtr dev, */ void DoEnterLeaveEvents(DeviceIntPtr pDev, + int sourceid, WindowPtr fromWin, WindowPtr toWin, int mode) @@ -606,14 +612,13 @@ DoEnterLeaveEvents(DeviceIntPtr pDev, if (fromWin == toWin) return; - CoreEnterLeaveEvents(pDev, fromWin, toWin, mode); -#if 0 - DeviceEnterLeaveEvents(pDev, fromWin, toWin, mode); -#endif + if (mode != XINotifyPassiveGrab && mode != XINotifyPassiveUngrab) + CoreEnterLeaveEvents(pDev, fromWin, toWin, mode); + DeviceEnterLeaveEvents(pDev, sourceid, fromWin, toWin, mode); } /** - * Send focus out events to all windows between @child and @ancestor. + * Send focus out events to all windows between 'child' and 'ancestor'. * Events are sent running up the hierarchy. */ static void @@ -628,12 +633,12 @@ DeviceFocusOutEvents(DeviceIntPtr dev, if (ancestor == child) return; for (win = child->parent; win != ancestor; win = win->parent) - DeviceFocusEvent(dev, DeviceFocusOut, mode, detail, win); + DeviceFocusEvent(dev, XI_FocusOut, mode, detail, win); } /** - * Send enter notifies to all windows between @ancestor and @child (excluding + * Send enter notifies to all windows between 'ancestor' and 'child' (excluding * both). Events are sent running up the window hierarchy. This function * recurses. */ @@ -649,11 +654,11 @@ DeviceFocusInEvents(DeviceIntPtr dev, if (ancestor == parent || !parent) return; DeviceFocusInEvents(dev, ancestor, parent, mode, detail); - DeviceFocusEvent(dev, DeviceFocusIn, mode, detail, parent); + DeviceFocusEvent(dev, XI_FocusIn, mode, detail, parent); } /** - * Send FocusIn events to all windows between @ancestor and @child (excluding + * Send FocusIn events to all windows between 'ancestor' and 'child' (excluding * both). Events are sent running down the window hierarchy. This function * recurses. */ @@ -735,13 +740,13 @@ CoreFocusOutEvents(DeviceIntPtr dev, /** * Send FocusOut(NotifyPointer) events from the current pointer window (which - * is a descendant of @pwin_parent) up to (excluding) @pwin_parent. + * is a descendant of pwin_parent) up to (excluding) pwin_parent. * - * NotifyPointer events are only sent for the device paired with @dev. + * NotifyPointer events are only sent for the device paired with dev. * - * If the current pointer window is a descendat of @exclude or an ancestor of - * @exclude, no events are sent. Note: If the current pointer IS @exclude, - * events are sent! + * If the current pointer window is a descendant of 'exclude' or an ancestor of + * 'exclude', no events are sent. If the current pointer IS 'exclude', events + * are sent! */ static void CoreFocusOutNotifyPointerEvents(DeviceIntPtr dev, @@ -790,13 +795,13 @@ CoreFocusInRecurse(DeviceIntPtr dev, /** - * Send FocusIn(NotifyPointer) events from @pwin_parent down to - * including the current pointer window (which is a descendant of @pwin_parent). - * If @inclusive is TRUE, @pwin_parent will receive the event too. - * - * @pwin is the pointer window. + * Send FocusIn(NotifyPointer) events from pwin_parent down to + * including the current pointer window (which is a descendant of pwin_parent). * - * If the current pointer window is a child of @exclude, no events are sent. + * @param pwin The pointer window. + * @param exclude If the pointer window is a child of 'exclude', no events are + * sent. + * @param inclusive If TRUE, pwin_parent will receive the event too. */ static void CoreFocusInNotifyPointerEvents(DeviceIntPtr dev, @@ -820,8 +825,8 @@ CoreFocusInNotifyPointerEvents(DeviceIntPtr dev, /** - * Focus of @dev moves from @A to @B and @A neither a descendant of @B nor is - * @B a descendant of @A. + * Focus of dev moves from A to B and A neither a descendant of B nor is + * B a descendant of A. */ static void CoreFocusNonLinear(DeviceIntPtr dev, @@ -918,7 +923,7 @@ CoreFocusNonLinear(DeviceIntPtr dev, /** - * Focus of @dev moves from @A to @B and @A is a descendant of @B. + * Focus of dev moves from A to B and A is a descendant of B. */ static void CoreFocusToAncestor(DeviceIntPtr dev, @@ -979,7 +984,7 @@ CoreFocusToAncestor(DeviceIntPtr dev, } /** - * Focus of @dev moves from @A to @B and @B is a descendant of @A. + * Focus of dev moves from A to B and B is a descendant of A. */ static void CoreFocusToDescendant(DeviceIntPtr dev, @@ -1076,7 +1081,7 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, if (!HasOtherPointer(root, GetPairedDevice(dev)) && !FirstFocusChild(root)) { /* If pointer was on PointerRootWin and changes to NoneWin, and - * the pointer paired with @dev is below the current root window, + * the pointer paired with dev is below the current root window, * do a NotifyPointer run. */ if (dev->focus && dev->focus->win == PointerRootWin && B != PointerRootWin) @@ -1085,8 +1090,8 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, if (ptrwin && IsParent(root, ptrwin)) CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE); } - CoreFocusEvent(dev, FocusOut, mode, ((int)A) ? NotifyPointerRoot : NotifyDetailNone, root); - CoreFocusEvent(dev, FocusIn, mode, ((int)B) ? NotifyPointerRoot : NotifyDetailNone, root); + CoreFocusEvent(dev, FocusOut, mode, A ? NotifyPointerRoot : NotifyDetailNone, root); + CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root); if (B == PointerRootWin) CoreFocusInNotifyPointerEvents(dev, root, None, mode, TRUE); } @@ -1095,8 +1100,8 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, } /** - * Focus moves from window @A to PointerRoot or to None. - * Assumption: @A is a valid window and not PointerRoot or None. + * Focus moves from window A to PointerRoot or to None. + * Assumption: A is a valid window and not PointerRoot or None. */ static void CoreFocusToPointerRootOrNone(DeviceIntPtr dev, @@ -1136,7 +1141,7 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev, root = WindowTable[i]; if (!HasFocus(root) && !FirstFocusChild(root)) { - CoreFocusEvent(dev, FocusIn, mode, ((int)B) ? NotifyPointerRoot : NotifyDetailNone, root); + CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root); if (B == PointerRootWin) CoreFocusInNotifyPointerEvents(dev, root, None, mode, TRUE); } @@ -1144,8 +1149,8 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev, } /** - * Focus moves from PointerRoot or None to a window @to. - * Assumption: @to is a valid window and not PointerRoot or None. + * Focus moves from PointerRoot or None to a window B. + * Assumption: B is a valid window and not PointerRoot or None. */ static void CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, @@ -1168,7 +1173,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, if (!HasFocus(root) && !FirstFocusChild(root)) { /* If pointer was on PointerRootWin and changes to NoneWin, and - * the pointer paired with @dev is below the current root window, + * the pointer paired with dev is below the current root window, * do a NotifyPointer run. */ if (dev->focus && dev->focus->win == PointerRootWin && B != PointerRootWin) @@ -1177,7 +1182,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, if (ptrwin) CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE); } - CoreFocusEvent(dev, FocusOut, mode, ((int)A) ? NotifyPointerRoot : NotifyDetailNone, root); + CoreFocusEvent(dev, FocusOut, mode, A ? NotifyPointerRoot : NotifyDetailNone, root); } } @@ -1215,10 +1220,10 @@ CoreFocusEvents(DeviceIntPtr dev, WindowPtr to, int mode) { - if (!dev->isMaster) + if (!IsMaster(dev)) return; - SetFocusOut(dev, from); + SetFocusOut(dev); if (((to == NullWindow) || (to == PointerRootWin)) && ((from == NullWindow) || (from == PointerRootWin))) @@ -1237,6 +1242,9 @@ CoreFocusEvents(DeviceIntPtr dev, SetFocusIn(dev, to); } +/** + * The root window the given device is currently on. + */ #define RootWindow(dev) dev->spriteInfo->sprite->spriteTrace[0] static void @@ -1271,21 +1279,21 @@ DeviceFocusEvents(DeviceIntPtr dev, NotifyPointer); /* Notify all the roots */ for (i = 0; i < nscreens; i++) - DeviceFocusEvent(dev, FocusOut, mode, out, WindowTable[i]); + DeviceFocusEvent(dev, XI_FocusOut, mode, out, WindowTable[i]); } else { if (IsParent(from, sprite->win)) DeviceFocusOutEvents(dev, sprite->win, from, mode, NotifyPointer); - DeviceFocusEvent(dev, FocusOut, mode, NotifyNonlinear, from); + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); /* next call catches the root too, if the screen changed */ DeviceFocusOutEvents(dev, from->parent, NullWindow, mode, NotifyNonlinearVirtual); } /* Notify all the roots */ for (i = 0; i < nscreens; i++) - DeviceFocusEvent(dev, FocusIn, mode, in, WindowTable[i]); + DeviceFocusEvent(dev, XI_FocusIn, mode, in, WindowTable[i]); if (to == PointerRootWin) DeviceFocusInEvents(dev, RootWindow(dev), sprite->win, mode, NotifyPointer); } @@ -1297,10 +1305,10 @@ DeviceFocusEvents(DeviceIntPtr dev, DeviceFocusOutEvents(dev, sprite->win, RootWindow(dev), mode, NotifyPointer); for (i = 0; i < nscreens; i++) - DeviceFocusEvent(dev, FocusOut, mode, out, WindowTable[i]); + DeviceFocusEvent(dev, XI_FocusOut, mode, out, WindowTable[i]); if (to->parent != NullWindow) DeviceFocusInEvents(dev, RootWindow(dev), to, mode, NotifyNonlinearVirtual); - DeviceFocusEvent(dev, FocusIn, mode, NotifyNonlinear, to); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to); if (IsParent(to, sprite->win)) DeviceFocusInEvents(dev, to, sprite->win, mode, NotifyPointer); } @@ -1308,10 +1316,10 @@ DeviceFocusEvents(DeviceIntPtr dev, { if (IsParent(to, from)) { - DeviceFocusEvent(dev, FocusOut, mode, NotifyAncestor, from); + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from); DeviceFocusOutEvents(dev, from->parent, to, mode, NotifyVirtual); - DeviceFocusEvent(dev, FocusIn, mode, NotifyInferior, to); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to); if ((IsParent(to, sprite->win)) && (sprite->win != from) && (!IsParent(from, sprite->win)) && @@ -1327,9 +1335,9 @@ DeviceFocusEvents(DeviceIntPtr dev, (!IsParent(sprite->win, to))) DeviceFocusOutEvents(dev, sprite->win, from, mode, NotifyPointer); - DeviceFocusEvent(dev, FocusOut, mode, NotifyInferior, from); + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyInferior, from); DeviceFocusInEvents(dev, from, to, mode, NotifyVirtual); - DeviceFocusEvent(dev, FocusIn, mode, NotifyAncestor, to); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyAncestor, to); } else { @@ -1339,13 +1347,13 @@ DeviceFocusEvents(DeviceIntPtr dev, if (IsParent(from, sprite->win)) DeviceFocusOutEvents(dev, sprite->win, from, mode, NotifyPointer); - DeviceFocusEvent(dev, FocusOut, mode, NotifyNonlinear, from); + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); if (from->parent != NullWindow) DeviceFocusOutEvents(dev, from->parent, common, mode, NotifyNonlinearVirtual); if (to->parent != NullWindow) DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual); - DeviceFocusEvent(dev, FocusIn, mode, NotifyNonlinear, to); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to); if (IsParent(to, sprite->win)) DeviceFocusInEvents(dev, to, sprite->win, mode, NotifyPointer); } diff --git a/xorg-server/dix/enterleave.h b/xorg-server/dix/enterleave.h index edca38664..471f4efaa 100644 --- a/xorg-server/dix/enterleave.h +++ b/xorg-server/dix/enterleave.h @@ -33,6 +33,7 @@ extern void DoEnterLeaveEvents( DeviceIntPtr pDev, + int sourceid, WindowPtr fromWin, WindowPtr toWin, int mode @@ -64,6 +65,7 @@ extern void CoreEnterLeaveEvent(DeviceIntPtr mouse, WindowPtr pWin, Window child); extern void DeviceEnterLeaveEvent(DeviceIntPtr mouse, + int sourceid, int type, int mode, int detail, @@ -74,6 +76,7 @@ extern void EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode); +extern void LeaveWindow(DeviceIntPtr dev); extern void CoreFocusEvent(DeviceIntPtr kbd, int type, @@ -90,6 +93,5 @@ extern void DeviceFocusEvent(DeviceIntPtr kbd, extern void SetFocusIn(DeviceIntPtr kbd, WindowPtr win); -extern void SetFocusOut(DeviceIntPtr dev, - WindowPtr win); +extern void SetFocusOut(DeviceIntPtr dev); #endif /* _ENTERLEAVE_H_ */ diff --git a/xorg-server/dix/eventconvert.c b/xorg-server/dix/eventconvert.c new file mode 100644 index 000000000..21eed40e1 --- /dev/null +++ b/xorg-server/dix/eventconvert.c @@ -0,0 +1,718 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + */ + +/** + * @file eventconvert.c + * This file contains event conversion routines from InternalEvent to the + * matching protocol events. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include "dix.h" +#include "inputstr.h" +#include "misc.h" +#include "eventstr.h" +#include "exglobals.h" +#include "eventconvert.h" +#include "xiquerydevice.h" +#include "xkbsrv.h" + + +static int countValuators(DeviceEvent *ev, int *first); +static int getValuatorEvents(DeviceEvent *ev, deviceValuator *xv); +static int eventToKeyButtonPointer(DeviceEvent *ev, xEvent **xi, int *count); +static int eventToDeviceChanged(DeviceChangedEvent *ev, xEvent **dcce); +static int eventToDeviceEvent(DeviceEvent *ev, xEvent **xi); +static int eventToRawEvent(RawDeviceEvent *ev, xEvent **xi); + +/* Do not use, read comments below */ +BOOL EventIsKeyRepeat(xEvent *event); + +/** + * Hack to allow detectable autorepeat for core and XI1 events. + * The sequence number is unused until we send to the client and can be + * misused to store data. More or less, anyway. + * + * Do not use this. It may change any time without warning, eat your babies + * and piss on your cat. + */ +static void +EventSetKeyRepeatFlag(xEvent *event, BOOL on) +{ + event->u.u.sequenceNumber = on; +} + +/** + * Check if the event was marked as a repeat event before. + * NOTE: This is a nasty hack and should NOT be used by anyone else but + * TryClientEvents. + */ +BOOL +EventIsKeyRepeat(xEvent *event) +{ + return !!event->u.u.sequenceNumber; +} + +/** + * Convert the given event to the respective core event. + * + * Return values: + * Success ... core contains the matching core event. + * BadValue .. One or more values in the internal event are invalid. + * BadMatch .. The event has no core equivalent. + * + * @param[in] event The event to convert into a core event. + * @param[in] core The memory location to store the core event at. + * @return Success or the matching error code. + */ +int +EventToCore(InternalEvent *event, xEvent *core) +{ + switch(event->any.type) + { + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + { + DeviceEvent *e = (DeviceEvent*)event; + + if (e->detail.key > 0xFF) + return BadMatch; + + memset(core, 0, sizeof(xEvent)); + core->u.u.type = e->type - ET_KeyPress + KeyPress; + core->u.u.detail = e->detail.key & 0xFF; + core->u.keyButtonPointer.time = e->time; + core->u.keyButtonPointer.rootX = e->root_x; + core->u.keyButtonPointer.rootY = e->root_y; + core->u.keyButtonPointer.state = e->corestate; + EventSetKeyRepeatFlag(core, (e->type == ET_KeyPress && e->key_repeat)); + } + break; + case ET_ProximityIn: + case ET_ProximityOut: + case ET_RawKeyPress: + case ET_RawKeyRelease: + case ET_RawButtonPress: + case ET_RawButtonRelease: + case ET_RawMotion: + return BadMatch; + default: + /* XXX: */ + ErrorF("[dix] EventToCore: Not implemented yet \n"); + return BadImplementation; + } + return Success; +} + +/** + * Convert the given event to the respective XI 1.x event and store it in + * xi. xi is allocated on demand and must be freed by the caller. + * count returns the number of events in xi. If count is 1, and the type of + * xi is GenericEvent, then xi may be larger than 32 bytes. + * + * Return values: + * Success ... core contains the matching core event. + * BadValue .. One or more values in the internal event are invalid. + * BadMatch .. The event has no XI equivalent. + * + * @param[in] ev The event to convert into an XI 1 event. + * @param[out] xi Future memory location for the XI event. + * @param[out] count Number of elements in xi. + * + * @return Success or the error code. + */ +int +EventToXI(InternalEvent *ev, xEvent **xi, int *count) +{ + switch (ev->any.type) + { + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + return eventToKeyButtonPointer((DeviceEvent*)ev, xi, count); + case ET_DeviceChanged: + case ET_RawKeyPress: + case ET_RawKeyRelease: + case ET_RawButtonPress: + case ET_RawButtonRelease: + case ET_RawMotion: + *count = 0; + *xi = NULL; + return BadMatch; + default: + break; + } + + ErrorF("[dix] EventToXI: Not implemented for %d \n", ev->any.type); + return BadImplementation; +} + +/** + * Convert the given event to the respective XI 2.x event and store it in xi. + * xi is allocated on demand and must be freed by the caller. + * + * Return values: + * Success ... core contains the matching core event. + * BadValue .. One or more values in the internal event are invalid. + * BadMatch .. The event has no XI2 equivalent. + * + * @param[in] ev The event to convert into an XI2 event + * @param[out] xi Future memory location for the XI2 event. + * + * @return Success or the error code. + */ +int +EventToXI2(InternalEvent *ev, xEvent **xi) +{ + switch (ev->any.type) + { + /* Enter/FocusIn are for grabs. We don't need an actual event, since + * the real events delivered are triggered elsewhere */ + case ET_Enter: + case ET_FocusIn: + *xi = NULL; + return Success; + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + return eventToDeviceEvent((DeviceEvent*)ev, xi); + case ET_ProximityIn: + case ET_ProximityOut: + *xi = NULL; + return BadMatch; + case ET_DeviceChanged: + return eventToDeviceChanged((DeviceChangedEvent*)ev, xi); + case ET_RawKeyPress: + case ET_RawKeyRelease: + case ET_RawButtonPress: + case ET_RawButtonRelease: + case ET_RawMotion: + return eventToRawEvent((RawDeviceEvent*)ev, xi); + default: + break; + } + + ErrorF("[dix] EventToXI2: Not implemented for %d \n", ev->any.type); + return BadImplementation; +} + +static int +eventToKeyButtonPointer(DeviceEvent *ev, xEvent **xi, int *count) +{ + int num_events; + int first; /* dummy */ + deviceKeyButtonPointer *kbp; + + /* Sorry, XI 1.x protocol restrictions. */ + if (ev->detail.button > 0xFF || ev->deviceid >= 0x80) + { + *count = 0; + return Success; + } + + num_events = (countValuators(ev, &first) + 5)/6; /* valuator ev */ + num_events++; /* the actual event event */ + + *xi = xcalloc(num_events, sizeof(xEvent)); + if (!(*xi)) + { + return BadAlloc; + } + + kbp = (deviceKeyButtonPointer*)(*xi); + kbp->detail = ev->detail.button; + kbp->time = ev->time; + kbp->root = ev->root; + kbp->root_x = ev->root_x; + kbp->root_y = ev->root_y; + kbp->deviceid = ev->deviceid; + kbp->state = ev->corestate; + EventSetKeyRepeatFlag((xEvent*)kbp, + (ev->type == ET_KeyPress && ev->key_repeat)); + + if (num_events > 1) + kbp->deviceid |= MORE_EVENTS; + + switch(ev->type) + { + case ET_Motion: kbp->type = DeviceMotionNotify; break; + case ET_ButtonPress: kbp->type = DeviceButtonPress; break; + case ET_ButtonRelease: kbp->type = DeviceButtonRelease; break; + case ET_KeyPress: kbp->type = DeviceKeyPress; break; + case ET_KeyRelease: kbp->type = DeviceKeyRelease; break; + case ET_ProximityIn: kbp->type = ProximityIn; break; + case ET_ProximityOut: kbp->type = ProximityOut; break; + default: + break; + } + + if (num_events > 1) + { + getValuatorEvents(ev, (deviceValuator*)(kbp + 1)); + } + + *count = num_events; + return Success; +} + + +/** + * Set first to the first valuator in the event ev and return the number of + * valuators from first to the last set valuator. + */ +static int +countValuators(DeviceEvent *ev, int *first) +{ + int first_valuator = -1, last_valuator = -1, num_valuators = 0; + int i; + + for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++) + { + if (BitIsOn(ev->valuators.mask, i)) + { + if (first_valuator == -1) + first_valuator = i; + last_valuator = i; + } + } + + if (first_valuator != -1) + { + num_valuators = last_valuator - first_valuator + 1; + *first = first_valuator; + } + + return num_valuators; +} + +static int +getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) +{ + int i; + int state = 0; + int first_valuator, num_valuators; + + + num_valuators = countValuators(ev, &first_valuator); + if (num_valuators > 0) + { + DeviceIntPtr dev = NULL; + dixLookupDevice(&dev, ev->deviceid, serverClient, DixUseAccess); + /* State needs to be assembled BEFORE the device is updated. */ + state = (dev && dev->key) ? XkbStateFieldFromRec(&dev->key->xkbInfo->state) : 0; + state |= (dev && dev->button) ? (dev->button->state) : 0; + } + + /* FIXME: non-continuous valuator data in internal events*/ + for (i = 0; i < num_valuators; i += 6, xv++) { + xv->type = DeviceValuator; + xv->first_valuator = first_valuator + i; + xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); + xv->deviceid = ev->deviceid; + xv->device_state = state; + switch (xv->num_valuators) { + case 6: + xv->valuator5 = ev->valuators.data[i + 5]; + case 5: + xv->valuator4 = ev->valuators.data[i + 4]; + case 4: + xv->valuator3 = ev->valuators.data[i + 3]; + case 3: + xv->valuator2 = ev->valuators.data[i + 2]; + case 2: + xv->valuator1 = ev->valuators.data[i + 1]; + case 1: + xv->valuator0 = ev->valuators.data[i + 0]; + } + + if (i + 6 < num_valuators) + xv->deviceid |= MORE_EVENTS; + } + + return (num_valuators + 5) / 6; +} + + +static int +appendKeyInfo(DeviceChangedEvent *dce, xXIKeyInfo* info) +{ + uint32_t *kc; + int i; + + info->type = XIKeyClass; + info->num_keycodes = dce->keys.max_keycode - dce->keys.min_keycode + 1; + info->length = sizeof(xXIKeyInfo)/4 + info->num_keycodes; + info->sourceid = dce->sourceid; + + kc = (uint32_t*)&info[1]; + for (i = 0; i < info->num_keycodes; i++) + *kc++ = i + dce->keys.min_keycode; + + return info->length * 4; +} + +static int +appendButtonInfo(DeviceChangedEvent *dce, xXIButtonInfo *info) +{ + unsigned char *bits; + int mask_len; + + mask_len = bytes_to_int32(bits_to_bytes(dce->buttons.num_buttons)); + + info->type = XIButtonClass; + info->num_buttons = dce->buttons.num_buttons; + info->length = bytes_to_int32(sizeof(xXIButtonInfo)) + + info->num_buttons + mask_len; + info->sourceid = dce->sourceid; + + bits = (unsigned char*)&info[1]; + memset(bits, 0, mask_len * 4); + /* FIXME: is_down? */ + + bits += mask_len * 4; + memcpy(bits, dce->buttons.names, dce->buttons.num_buttons * sizeof(Atom)); + + return info->length * 4; +} + +static int +appendValuatorInfo(DeviceChangedEvent *dce, xXIValuatorInfo *info, int axisnumber) +{ + info->type = XIValuatorClass; + info->length = sizeof(xXIValuatorInfo)/4; + info->label = dce->valuators[axisnumber].name; + info->min.integral = dce->valuators[axisnumber].min; + info->min.frac = 0; + info->max.integral = dce->valuators[axisnumber].max; + info->max.frac = 0; + /* FIXME: value */ + info->value.integral = 0; + info->value.frac = 0; + info->resolution = dce->valuators[axisnumber].resolution; + info->number = axisnumber; + info->mode = dce->valuators[axisnumber].mode; /* Server doesn't have per-axis mode yet */ + info->sourceid = dce->sourceid; + + return info->length * 4; +} + +static int +eventToDeviceChanged(DeviceChangedEvent *dce, xEvent **xi) +{ + xXIDeviceChangedEvent *dcce; + int len = sizeof(xXIDeviceChangedEvent); + int nkeys; + char *ptr; + + if (dce->buttons.num_buttons) + { + len += sizeof(xXIButtonInfo); + len += dce->buttons.num_buttons * sizeof(Atom); /* button names */ + len += pad_to_int32(bits_to_bytes(dce->buttons.num_buttons)); + } + if (dce->num_valuators) + len += sizeof(xXIValuatorInfo) * dce->num_valuators; + + nkeys = (dce->keys.max_keycode > 0) ? + dce->keys.max_keycode - dce->keys.min_keycode + 1 : 0; + if (nkeys > 0) + { + len += sizeof(xXIKeyInfo); + len += sizeof(CARD32) * nkeys; /* keycodes */ + } + + dcce = xcalloc(1, len); + if (!dcce) + { + ErrorF("[Xi] BadAlloc in SendDeviceChangedEvent.\n"); + return BadAlloc; + } + + dcce->type = GenericEvent; + dcce->extension = IReqCode; + dcce->evtype = XI_DeviceChanged; + dcce->time = dce->time; + dcce->deviceid = dce->deviceid; + dcce->sourceid = dce->sourceid; + dcce->reason = (dce->flags & DEVCHANGE_DEVICE_CHANGE) ? XIDeviceChange : XISlaveSwitch; + dcce->num_classes = 0; + dcce->length = bytes_to_int32(len - sizeof(xEvent)); + + ptr = (char*)&dcce[1]; + if (dce->buttons.num_buttons) + { + dcce->num_classes++; + ptr += appendButtonInfo(dce, (xXIButtonInfo*)ptr); + } + + if (nkeys) + { + dcce->num_classes++; + ptr += appendKeyInfo(dce, (xXIKeyInfo*)ptr); + } + + if (dce->num_valuators) + { + int i; + + dcce->num_classes += dce->num_valuators; + for (i = 0; i < dce->num_valuators; i++) + ptr += appendValuatorInfo(dce, (xXIValuatorInfo*)ptr, i); + } + + *xi = (xEvent*)dcce; + + return Success; +} + +static int count_bits(unsigned char* ptr, int len) +{ + int bits = 0; + unsigned int i; + unsigned char x; + + for (i = 0; i < len; i++) + { + x = ptr[i]; + while(x > 0) + { + bits += (x & 0x1); + x >>= 1; + } + } + return bits; +} + +static int +eventToDeviceEvent(DeviceEvent *ev, xEvent **xi) +{ + int len = sizeof(xXIDeviceEvent); + xXIDeviceEvent *xde; + int i, btlen, vallen; + char *ptr; + FP3232 *axisval; + + /* FIXME: this should just send the buttons we have, not MAX_BUTTONs. Same + * with MAX_VALUATORS below */ + /* btlen is in 4 byte units */ + btlen = bytes_to_int32(bits_to_bytes(MAX_BUTTONS)); + len += btlen * 4; /* buttonmask len */ + + + vallen = count_bits(ev->valuators.mask, sizeof(ev->valuators.mask)/sizeof(ev->valuators.mask[0])); + len += vallen * 2 * sizeof(uint32_t); /* axisvalues */ + vallen = bytes_to_int32(bits_to_bytes(MAX_VALUATORS)); + len += vallen * 4; /* valuators mask */ + + *xi = xcalloc(1, len); + xde = (xXIDeviceEvent*)*xi; + xde->type = GenericEvent; + xde->extension = IReqCode; + xde->evtype = GetXI2Type((InternalEvent*)ev); + xde->time = ev->time; + xde->length = bytes_to_int32(len - sizeof(xEvent)); + xde->detail = ev->detail.button; + xde->root = ev->root; + xde->buttons_len = btlen; + xde->valuators_len = vallen; + xde->deviceid = ev->deviceid; + xde->sourceid = ev->sourceid; + xde->root_x = FP1616(ev->root_x, ev->root_x_frac); + xde->root_y = FP1616(ev->root_y, ev->root_y_frac); + + if (ev->key_repeat) + xde->flags |= XIKeyRepeat; + + xde->mods.base_mods = ev->mods.base; + xde->mods.latched_mods = ev->mods.latched; + xde->mods.locked_mods = ev->mods.locked; + xde->mods.effective_mods = ev->mods.effective; + + xde->group.base_group = ev->group.base; + xde->group.latched_group = ev->group.latched; + xde->group.locked_group = ev->group.locked; + xde->group.effective_group = ev->group.effective; + + ptr = (char*)&xde[1]; + for (i = 0; i < sizeof(ev->buttons) * 8; i++) + { + if (BitIsOn(ev->buttons, i)) + SetBit(ptr, i); + } + + ptr += xde->buttons_len * 4; + axisval = (FP3232*)(ptr + xde->valuators_len * 4); + for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++) + { + if (BitIsOn(ev->valuators.mask, i)) + { + SetBit(ptr, i); + axisval->integral = ev->valuators.data[i]; + axisval->frac = ev->valuators.data_frac[i]; + axisval++; + } + } + + return Success; +} + +static int +eventToRawEvent(RawDeviceEvent *ev, xEvent **xi) +{ + xXIRawEvent* raw; + int vallen, nvals; + int i, len = sizeof(xXIRawEvent); + char *ptr; + FP3232 *axisval; + + nvals = count_bits(ev->valuators.mask, sizeof(ev->valuators.mask)); + len += nvals * sizeof(FP3232) * 2; /* 8 byte per valuator, once + raw, once processed */ + vallen = bytes_to_int32(bits_to_bytes(MAX_VALUATORS)); + len += vallen * 4; /* valuators mask */ + + *xi = xcalloc(1, len); + raw = (xXIRawEvent*)*xi; + raw->type = GenericEvent; + raw->extension = IReqCode; + raw->evtype = GetXI2Type((InternalEvent*)ev); + raw->time = ev->time; + raw->length = bytes_to_int32(len - sizeof(xEvent)); + raw->detail = ev->detail.button; + raw->deviceid = ev->deviceid; + raw->valuators_len = vallen; + + ptr = (char*)&raw[1]; + axisval = (FP3232*)(ptr + raw->valuators_len * 4); + for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++) + { + if (BitIsOn(ev->valuators.mask, i)) + { + SetBit(ptr, i); + axisval->integral = ev->valuators.data[i]; + axisval->frac = ev->valuators.data_frac[i]; + (axisval + nvals)->integral = ev->valuators.data_raw[i]; + (axisval + nvals)->frac = ev->valuators.data_raw_frac[i]; + axisval++; + } + } + + return Success; +} + +/** + * Return the corresponding core type for the given event or 0 if no core + * equivalent exists. + */ +int +GetCoreType(InternalEvent *event) +{ + int coretype = 0; + switch(event->any.type) + { + case ET_Motion: coretype = MotionNotify; break; + case ET_ButtonPress: coretype = ButtonPress; break; + case ET_ButtonRelease: coretype = ButtonRelease; break; + case ET_KeyPress: coretype = KeyPress; break; + case ET_KeyRelease: coretype = KeyRelease; break; + default: + break; + } + return coretype; +} + +/** + * Return the corresponding XI 1.x type for the given event or 0 if no + * equivalent exists. + */ +int +GetXIType(InternalEvent *event) +{ + int xitype = 0; + switch(event->any.type) + { + case ET_Motion: xitype = DeviceMotionNotify; break; + case ET_ButtonPress: xitype = DeviceButtonPress; break; + case ET_ButtonRelease: xitype = DeviceButtonRelease; break; + case ET_KeyPress: xitype = DeviceKeyPress; break; + case ET_KeyRelease: xitype = DeviceKeyRelease; break; + case ET_ProximityIn: xitype = ProximityIn; break; + case ET_ProximityOut: xitype = ProximityOut; break; + default: + break; + } + return xitype; +} + +/** + * Return the corresponding XI 2.x type for the given event or 0 if no + * equivalent exists. + */ +int +GetXI2Type(InternalEvent *event) +{ + int xi2type = 0; + + switch(event->any.type) + { + case ET_Motion: xi2type = XI_Motion; break; + case ET_ButtonPress: xi2type = XI_ButtonPress; break; + case ET_ButtonRelease: xi2type = XI_ButtonRelease; break; + case ET_KeyPress: xi2type = XI_KeyPress; break; + case ET_KeyRelease: xi2type = XI_KeyRelease; break; + case ET_Enter: xi2type = XI_Enter; break; + case ET_Leave: xi2type = XI_Leave; break; + case ET_Hierarchy: xi2type = XI_HierarchyChanged; break; + case ET_DeviceChanged: xi2type = XI_DeviceChanged; break; + case ET_RawKeyPress: xi2type = XI_RawKeyPress; break; + case ET_RawKeyRelease: xi2type = XI_RawKeyRelease; break; + case ET_RawButtonPress: xi2type = XI_RawButtonPress; break; + case ET_RawButtonRelease: xi2type = XI_RawButtonRelease; break; + case ET_RawMotion: xi2type = XI_RawMotion; break; + case ET_FocusIn: xi2type = XI_FocusIn; break; + case ET_FocusOut: xi2type = XI_FocusOut; break; + default: + break; + } + return xi2type; +} diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index f9448ba76..90a2675c4 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -107,7 +107,7 @@ of the copyright holder. ******************************************************************/ -/** @file +/** @file events.c * This file handles event delivery and a big part of the server-side protocol * handling (the parts for input devices). */ @@ -117,11 +117,8 @@ of the copyright holder. #endif #include -#include #include "misc.h" #include "resource.h" -#define NEED_EVENTS -#define NEED_REPLIES #include #include "windowstr.h" #include "inputstr.h" @@ -135,12 +132,8 @@ of the copyright holder. #endif #include "globals.h" -#ifdef XKB #include -#include -extern Bool XkbFilterEvents(ClientPtr, int, xEvent *); -#endif - +#include "xkbsrv.h" #include "xace.h" #ifdef XSERVER_DTRACE @@ -150,7 +143,9 @@ typedef const char *string; #endif #include +#include #include +#include #include "exglobals.h" #include "exevents.h" #include "exglobals.h" @@ -164,11 +159,11 @@ typedef const char *string; #include "geext.h" #include "geint.h" +#include "eventstr.h" #include "enterleave.h" +#include "eventconvert.h" -/** - * Extension events type numbering starts at EXTENSION_EVENT_BASE. - */ +/* Extension events type numbering starts at EXTENSION_EVENT_BASE. */ #define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */ #define StructureAndSubMask ( StructureNotifyMask | SubstructureNotifyMask ) #define AllButtonsMask ( \ @@ -188,20 +183,22 @@ typedef const char *string; #define AllModifiersMask ( \ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ Mod3Mask | Mod4Mask | Mod5Mask ) -#define AllEventMasks (lastEventMask|(lastEventMask-1)) +#define LastEventMask OwnerGrabButtonMask +#define AllEventMasks (LastEventMask|(LastEventMask-1)) + + +#define CORE_EVENT(event) \ + (!((event)->u.u.type & EXTENSION_EVENT_BASE) && \ + (event)->u.u.type != GenericEvent) +#define XI2_EVENT(event) \ + (((event)->u.u.type == GenericEvent) && \ + ((xGenericEvent*)(event))->extension == IReqCode) /** * Used to indicate a implicit passive grab created by a ButtonPress event. * See DeliverEventsToWindow(). */ #define ImplicitGrabMask (1 << 7) -/* - * The following relies on the fact that the ButtonMotionMasks are equal - * to the corresponding ButtonMasks from the current modifier/button state. - */ -#define Motion_Filter(class) (PointerMotionMask | \ - (class)->state | (class)->motionMask) - #define WID(w) ((w) ? ((w)->drawable.id) : 0) @@ -210,21 +207,33 @@ typedef const char *string; #define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) -_X_EXPORT CallbackListPtr EventCallback; -_X_EXPORT CallbackListPtr DeviceEventCallback; +CallbackListPtr EventCallback; +CallbackListPtr DeviceEventCallback; #define DNPMCOUNT 8 Mask DontPropagateMasks[DNPMCOUNT]; static int DontPropagateRefCnts[DNPMCOUNT]; +static void CheckVirtualMotion( DeviceIntPtr pDev, QdEventPtr qe, WindowPtr pWin); +static void CheckPhysLimits(DeviceIntPtr pDev, + CursorPtr cursor, + Bool generateEvents, + Bool confineToScreen, + ScreenPtr pScreen); +static Bool CheckPassiveGrabsOnWindow(WindowPtr pWin, + DeviceIntPtr device, + DeviceEvent *event, + BOOL checkCore); + +/** Key repeat hack. Do not use but in TryClientEvents */ +extern BOOL EventIsKeyRepeat(xEvent *event); /** * Main input device struct. * inputInfo.pointer * is the core pointer. Referred to as "virtual core pointer", "VCP", - * "core pointer" or inputInfo.pointer. There is exactly one core pointer, - * but multiple devices may send core events. The VCP is the first master + * "core pointer" or inputInfo.pointer. The VCP is the first master * pointer device and cannot be deleted. * * inputInfo.keyboard @@ -239,45 +248,69 @@ static int DontPropagateRefCnts[DNPMCOUNT]; * * inputInfo.numDevices * Total number of devices. + * + * inputInfo.all_devices + * Virtual device used for XIAllDevices passive grabs. This device is + * not part of the inputInfo.devices list and mostly unset except for + * the deviceid. It exists because passivegrabs need a valid device + * reference. + * + * inputInfo.all_master_devices + * Virtual device used for XIAllMasterDevices passive grabs. This device + * is not part of the inputInfo.devices list and mostly unset except for + * the deviceid. It exists because passivegrabs need a valid device + * reference. */ -_X_EXPORT InputInfo inputInfo; +InputInfo inputInfo; /** * syncEvents is the global structure for queued events. + * * Devices can be frozen through GrabModeSync pointer grabs. If this is the * case, events from these devices are added to "pending" instead of being * processed normally. When the device is unfrozen, events in "pending" are * replayed and processed as if they would come from the device directly. - * - * pending ... list of queued events - * pendtail ... last event in list - * replayDev ... The device to replay events for. Only set in AllowEvents, in - * which case it is set to the device specified in the request. - * replayWin ... the window the events are supposed to be replayed on. This - * window may be set to the grab's window (but only when - * Replay{Pointer|Keyboard} is given in the XAllowEvents - * request. - * playingEvents ... flag to indicate whether we're in the process of - * replaying events. Only set in ComputeFreezes(). */ static struct { - QdEventPtr pending, *pendtail; + QdEventPtr pending, /**< list of queued events */ + *pendtail; /**< last event in list */ + /** The device to replay events for. Only set in AllowEvents(), in which + * case it is set to the device specified in the request. */ DeviceIntPtr replayDev; /* kludgy rock to put flag for */ + + /** + * The window the events are supposed to be replayed on. + * This window may be set to the grab's window (but only when + * Replay{Pointer|Keyboard} is given in the XAllowEvents() + * request. */ WindowPtr replayWin; /* ComputeFreezes */ + /** + * Flag to indicate whether we're in the process of + * replaying events. Only set in ComputeFreezes(). */ Bool playingEvents; TimeStamp time; } syncEvents; +/** + * The root window the given device is currently on. + */ #define RootWindow(dev) dev->spriteInfo->sprite->spriteTrace[0] static xEvent* swapEvent = NULL; static int swapEventLen = 0; +void +NotImplemented(xEvent *from, xEvent *to) +{ + FatalError("Not implemented"); +} + /** * Convert the given event type from an XI event to a core event. + * @param[in] The XI 1.x event type. * @return The matching core event type or 0 if there is none. */ -_X_EXPORT int +int XItoCoreType(int xitype) { int coretype = 0; @@ -296,36 +329,43 @@ XItoCoreType(int xitype) } /** - * True if device owns a cursor, false if device shares a cursor sprite with - * another device. + * @return true if the device owns a cursor, false if device shares a cursor + * sprite with another device. */ -_X_EXPORT Bool +Bool DevHasCursor(DeviceIntPtr pDev) { return pDev->spriteInfo->spriteOwner; } /* - * Return true if a device is a pointer, check is the same as used by XI to + * @return true if a device is a pointer, check is the same as used by XI to * fill the 'use' field. */ -_X_EXPORT Bool +Bool IsPointerDevice(DeviceIntPtr dev) { - return (dev->valuator && dev->button); + return (dev->type == MASTER_POINTER) || (dev->valuator && dev->button); } /* - * Return true if a device is a keyboard, check is the same as used by XI to + * @return true if a device is a keyboard, check is the same as used by XI to * fill the 'use' field. * * Some pointer devices have keys as well (e.g. multimedia keys). Try to not * count them as keyboard devices. */ -_X_EXPORT Bool +Bool IsKeyboardDevice(DeviceIntPtr dev) { - return (dev->key && dev->kbdfeed) && !IsPointerDevice(dev); + return (dev->type == MASTER_KEYBOARD) || + ((dev->key && dev->kbdfeed) && !IsPointerDevice(dev)); +} + +Bool +IsMaster(DeviceIntPtr dev) +{ + return (dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD); } static WindowPtr XYToWindow( @@ -339,15 +379,22 @@ static WindowPtr XYToWindow( */ extern int lastEvent; -static Mask lastEventMask; - extern int DeviceMotionNotify; +#define CantBeFiltered NoEventMask /** - * Event filters. One set of filters for each device, but only the first layer + * Event masks for each event type. + * + * One set of filters for each device, but only the first layer * is initialized. The rest is memcpy'd in InitEvents. + * + * Filters are used whether a given event may be delivered to a client, + * usually in the form of if (window-event-mask & filter); then deliver event. + * + * One notable filter is for PointerMotion/DevicePointerMotion events. Each + * time a button is pressed, the filter is modified to also contain the + * matching ButtonXMotion mask. */ -#define CantBeFiltered NoEventMask static Mask filters[MAXDEVICES][128] = { { NoSuchEvent, /* 0 */ @@ -387,28 +434,90 @@ static Mask filters[MAXDEVICES][128] = { CantBeFiltered /* MappingNotify */ }}; +/** + * For the given event, return the matching event filter. This filter may then + * be AND'ed with the selected event mask. + * + * For XI2 events, the returned filter is simply the byte containing the event + * mask we're interested in. E.g. for a mask of (1 << 13), this would be + * byte[1]. + * + * @param[in] dev The device the event belongs to, may be NULL. + * @param[in] event The event to get the filter for. Only the type of the + * event matters, or the extension + evtype for GenericEvents. + * @return The filter mask for the given event. + * + * @see GetEventMask + */ +Mask +GetEventFilter(DeviceIntPtr dev, xEvent *event) +{ + if (event->u.u.type != GenericEvent) + return filters[dev ? dev->id : 0][event->u.u.type]; + else if (XI2_EVENT(event)) + return (1 << (((xXIDeviceEvent*)event)->evtype % 8)); + ErrorF("[dix] Unknown device type %d. No filter\n", event->u.u.type); + return 0; +} /** - * same principle as filters, but one set of filters for each extension. - * The extension is responsible for setting the filters by calling - * SetGenericFilter(). + * Return the windows complete XI2 mask for the given XI2 event type. */ -static Mask* generic_filters[MAXEXTENSIONS]; +Mask +GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev) +{ + OtherInputMasks *inputMasks = wOtherInputMasks(win); + int filter; + int evtype; + + if (!inputMasks || !XI2_EVENT(ev)) + return 0; + + evtype = ((xGenericEvent*)ev)->evtype; + filter = GetEventFilter(dev, ev); + + return ((inputMasks->xi2mask[dev->id][evtype/8] & filter) || + inputMasks->xi2mask[XIAllDevices][evtype/8] || + (inputMasks->xi2mask[XIAllMasterDevices][evtype/8] && IsMaster(dev))); +} + +static Mask +GetEventMask(DeviceIntPtr dev, xEvent *event, InputClients* other) +{ + /* XI2 filters are only ever 8 bit, so let's return a 8 bit mask */ + if (XI2_EVENT(event)) + { + int byte = ((xGenericEvent*)event)->evtype / 8; + return (other->xi2mask[dev->id][byte] | + other->xi2mask[XIAllDevices][byte] | + (IsMaster(dev)? other->xi2mask[XIAllMasterDevices][byte] : 0)); + } else if (CORE_EVENT(event)) + return other->mask[XIAllDevices]; + else + return other->mask[dev->id]; +} + static CARD8 criticalEvents[32] = { 0x7c, 0x30, 0x40 /* key, button, expose, and configure events */ }; +static void +SyntheticMotion(DeviceIntPtr dev, int x, int y) { + int screenno = 0; + #ifdef PANORAMIX -static void PostNewCursor(DeviceIntPtr pDev); + if (!noPanoramiXExtension) + screenno = dev->spriteInfo->sprite->screen->myNum; +#endif + PostSyntheticMotion(dev, x, y, screenno, + (syncEvents.playingEvents) ? syncEvents.time.milliseconds : currentTime.milliseconds); -#define SyntheticMotion(dev, x, y) \ - PostSyntheticMotion(dev, x, y, noPanoramiXExtension ? 0 : \ - dev->spriteInfo->sprite->screen->myNum, \ - syncEvents.playingEvents ? \ - syncEvents.time.milliseconds : \ - currentTime.milliseconds); +} + +#ifdef PANORAMIX +static void PostNewCursor(DeviceIntPtr pDev); static Bool XineramaSetCursorPosition( @@ -475,49 +584,6 @@ XineramaConstrainCursor(DeviceIntPtr pDev) (* pScreen->ConstrainCursor)(pDev, pScreen, &newBox); } -static void -XineramaCheckPhysLimits( - DeviceIntPtr pDev, - CursorPtr cursor, - Bool generateEvents -){ - HotSpot new; - SpritePtr pSprite = pDev->spriteInfo->sprite; - - if (!cursor) - return; - - new = pSprite->hotPhys; - - /* I don't care what the DDX has to say about it */ - pSprite->physLimits = pSprite->hotLimits; - - /* constrain the pointer to those limits */ - if (new.x < pSprite->physLimits.x1) - new.x = pSprite->physLimits.x1; - else - if (new.x >= pSprite->physLimits.x2) - new.x = pSprite->physLimits.x2 - 1; - if (new.y < pSprite->physLimits.y1) - new.y = pSprite->physLimits.y1; - else - if (new.y >= pSprite->physLimits.y2) - new.y = pSprite->physLimits.y2 - 1; - - if (pSprite->hotShape) /* more work if the shape is a mess */ - ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); - - if((new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) - { - XineramaSetCursorPosition (pDev, new.x, new.y, generateEvents); - if (!generateEvents) - SyntheticMotion(pDev, new.x, new.y); - } - - /* Tell DDX what the limits are */ - XineramaConstrainCursor(pDev); -} - static Bool XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) @@ -529,168 +595,23 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) PanoramiXNumScreens*sizeof(WindowPtr)); } else { PanoramiXRes *win; - int i; - - win = (PanoramiXRes*)LookupIDByType(pWin->drawable.id, XRT_WINDOW); + int rc, i; - if(!win) + rc = dixLookupResourceByType((pointer *)&win, pWin->drawable.id, + XRT_WINDOW, serverClient, DixReadAccess); + if (rc != Success) return FALSE; for(i = 0; i < PanoramiXNumScreens; i++) { - pSprite->windows[i] = LookupIDByType(win->info[i].id, RT_WINDOW); - if(!pSprite->windows[i]) /* window is being unmapped */ + rc = dixLookupWindow(pSprite->windows + i, win->info[i].id, + serverClient, DixReadAccess); + if (rc != Success) /* window is being unmapped */ return FALSE; } } return TRUE; } -static void -XineramaCheckVirtualMotion( - DeviceIntPtr pDev, - QdEventPtr qe, - WindowPtr pWin) -{ - SpritePtr pSprite = pDev->spriteInfo->sprite; - - if (qe) - { - pSprite->hot.pScreen = qe->pScreen; /* should always be Screen 0 */ - pSprite->hot.x = qe->event->u.keyButtonPointer.rootX; - pSprite->hot.y = qe->event->u.keyButtonPointer.rootY; - pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->confineTo : - NullWindow; - } - if (pWin) - { - int x, y, off_x, off_y, i; - BoxRec lims; - - if(!XineramaSetWindowPntrs(pDev, pWin)) - return; - - i = PanoramiXNumScreens - 1; - - REGION_COPY(pSprite->screen, &pSprite->Reg2, - &pSprite->windows[i]->borderSize); - off_x = panoramiXdataPtr[i].x; - off_y = panoramiXdataPtr[i].y; - - while(i--) { - x = off_x - panoramiXdataPtr[i].x; - y = off_y - panoramiXdataPtr[i].y; - - if(x || y) - REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, x, y); - - REGION_UNION(pSprite->screen, &pSprite->Reg2, &pSprite->Reg2, - &pSprite->windows[i]->borderSize); - - off_x = panoramiXdataPtr[i].x; - off_y = panoramiXdataPtr[i].y; - } - - lims = *REGION_EXTENTS(pSprite->screen, &pSprite->Reg2); - - if (pSprite->hot.x < lims.x1) - pSprite->hot.x = lims.x1; - else if (pSprite->hot.x >= lims.x2) - pSprite->hot.x = lims.x2 - 1; - if (pSprite->hot.y < lims.y1) - pSprite->hot.y = lims.y1; - else if (pSprite->hot.y >= lims.y2) - pSprite->hot.y = lims.y2 - 1; - - if (REGION_NUM_RECTS(&pSprite->Reg2) > 1) - ConfineToShape(pDev, &pSprite->Reg2, - &pSprite->hot.x, &pSprite->hot.y); - - if (qe) - { - qe->pScreen = pSprite->hot.pScreen; - qe->event->u.keyButtonPointer.rootX = pSprite->hot.x; - qe->event->u.keyButtonPointer.rootY = pSprite->hot.y; - } - } -} - - -static Bool -XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) -{ - WindowPtr prevSpriteWin; - SpritePtr pSprite = pDev->spriteInfo->sprite; - - prevSpriteWin = pSprite->win; - - if (xE && !syncEvents.playingEvents) - { - /* GetPointerEvents() guarantees that pointer events have the correct - rootX/Y set already. */ - switch(xE->u.u.type) - { - case ButtonPress: - case ButtonRelease: - case MotionNotify: - break; - default: - if (xE->u.u.type == DeviceButtonPress || - xE->u.u.type == DeviceButtonRelease || - xE->u.u.type == DeviceMotionNotify) - break; - /* all other events return FALSE */ - return FALSE; - } - - /* Motion events entering DIX get translated to Screen 0 - coordinates. Replayed events have already been - translated since they've entered DIX before */ - XE_KBPTR.rootX += panoramiXdataPtr[pSprite->screen->myNum].x - - panoramiXdataPtr[0].x; - XE_KBPTR.rootY += panoramiXdataPtr[pSprite->screen->myNum].y - - panoramiXdataPtr[0].y; - pSprite->hot.x = XE_KBPTR.rootX; - pSprite->hot.y = XE_KBPTR.rootY; - if (pSprite->hot.x < pSprite->physLimits.x1) - pSprite->hot.x = pSprite->physLimits.x1; - else if (pSprite->hot.x >= pSprite->physLimits.x2) - pSprite->hot.x = pSprite->physLimits.x2 - 1; - if (pSprite->hot.y < pSprite->physLimits.y1) - pSprite->hot.y = pSprite->physLimits.y1; - else if (pSprite->hot.y >= pSprite->physLimits.y2) - pSprite->hot.y = pSprite->physLimits.y2 - 1; - - if (pSprite->hotShape) - ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); - - pSprite->hotPhys = pSprite->hot; - if ((pSprite->hotPhys.x != XE_KBPTR.rootX) || - (pSprite->hotPhys.y != XE_KBPTR.rootY)) - { - XineramaSetCursorPosition( - pDev, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); - } - XE_KBPTR.rootX = pSprite->hot.x; - XE_KBPTR.rootY = pSprite->hot.y; - } - - pSprite->win = XYToWindow(pDev, pSprite->hot.x, pSprite->hot.y); - - if (pSprite->win != prevSpriteWin) - { - if (prevSpriteWin != NullWindow) { - if (!xE) - UpdateCurrentTimeIf(); - DoEnterLeaveEvents(pDev, prevSpriteWin, pSprite->win, - NotifyNormal); - } - PostNewCursor(pDev); - return FALSE; - } - return TRUE; -} - - static void XineramaConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, @@ -698,99 +619,70 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, { SpritePtr pSprite = pDev->spriteInfo->sprite; - if (syncEvents.playingEvents) - { - XineramaCheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin); - SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y); - } - else - { - int x, y, off_x, off_y, i; - - if(!XineramaSetWindowPntrs(pDev, pWin)) - return; - - i = PanoramiXNumScreens - 1; + int x, y, off_x, off_y, i; - REGION_COPY(pSprite->screen, &pSprite->Reg1, - &pSprite->windows[i]->borderSize); - off_x = panoramiXdataPtr[i].x; - off_y = panoramiXdataPtr[i].y; + if(!XineramaSetWindowPntrs(pDev, pWin)) + return; - while(i--) { - x = off_x - panoramiXdataPtr[i].x; - y = off_y - panoramiXdataPtr[i].y; + i = PanoramiXNumScreens - 1; - if(x || y) - REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, x, y); + REGION_COPY(pSprite->screen, &pSprite->Reg1, + &pSprite->windows[i]->borderSize); + off_x = panoramiXdataPtr[i].x; + off_y = panoramiXdataPtr[i].y; - REGION_UNION(pSprite->screen, &pSprite->Reg1, &pSprite->Reg1, - &pSprite->windows[i]->borderSize); + while(i--) { + x = off_x - panoramiXdataPtr[i].x; + y = off_y - panoramiXdataPtr[i].y; - off_x = panoramiXdataPtr[i].x; - off_y = panoramiXdataPtr[i].y; - } + if(x || y) + REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, x, y); - pSprite->hotLimits = *REGION_EXTENTS(pSprite->screen, &pSprite->Reg1); + REGION_UNION(pSprite->screen, &pSprite->Reg1, &pSprite->Reg1, + &pSprite->windows[i]->borderSize); - if(REGION_NUM_RECTS(&pSprite->Reg1) > 1) - pSprite->hotShape = &pSprite->Reg1; - else - pSprite->hotShape = NullRegion; - - pSprite->confined = FALSE; - pSprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; - - XineramaCheckPhysLimits(pDev, pSprite->current, - generateEvents); + off_x = panoramiXdataPtr[i].x; + off_y = panoramiXdataPtr[i].y; } -} + pSprite->hotLimits = *REGION_EXTENTS(pSprite->screen, &pSprite->Reg1); -static void -XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) -{ - SpritePtr pSprite = pDev->spriteInfo->sprite; + if(REGION_NUM_RECTS(&pSprite->Reg1) > 1) + pSprite->hotShape = &pSprite->Reg1; + else + pSprite->hotShape = NullRegion; - if (cursor != pSprite->current) - { - if ((pSprite->current->bits->xhot != cursor->bits->xhot) || - (pSprite->current->bits->yhot != cursor->bits->yhot)) - XineramaCheckPhysLimits(pDev, cursor, FALSE); - (*pSprite->screen->DisplayCursor)(pDev, pSprite->screen, cursor); - FreeCursor(pSprite->current, (Cursor)0); - pSprite->current = cursor; - pSprite->current->refcnt++; - } -} + pSprite->confined = FALSE; + pSprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; -#else -#define SyntheticMotion(dev, x, y) \ - PostSyntheticMotion(dev, x, y, \ - 0, \ - syncEvents.playingEvents ? \ - syncEvents.time.milliseconds : \ - currentTime.milliseconds); + CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL); +} #endif /* PANORAMIX */ +/** + * Modifies the filter for the given protocol event type to the given masks. + * + * There's only two callers: UpdateDeviceState() and XI's SetMaskForExtEvent(). + * The latter initialises masks for the matching XI events, it's a once-off + * setting. + * UDS however changes the mask for MotionNotify and DeviceMotionNotify each + * time a button is pressed to include the matching ButtonXMotion mask in the + * filter. + * + * @param[in] deviceid The device to modify the filter for. + * @param[in] mask The new filter mask. + * @param[in] event Protocol event type. + */ void SetMaskForEvent(int deviceid, Mask mask, int event) { - int coretype; if (deviceid < 0 || deviceid >= MAXDEVICES) FatalError("SetMaskForEvent: bogus device id"); - if ((event < LASTEvent) || (event >= 128)) - FatalError("SetMaskForEvent: bogus event number"); filters[deviceid][event] = mask; - - /* Need to change the mask for the core events too */ - coretype = XItoCoreType(event); - if (coretype) - filters[deviceid][coretype] = mask; } -_X_EXPORT void +void SetCriticalEvent(int event) { if (event >= 128) @@ -841,8 +733,8 @@ CheckPhysLimits( DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, - Bool confineToScreen, - ScreenPtr pScreen) + Bool confineToScreen, /* unused if PanoramiX on */ + ScreenPtr pScreen) /* unused if PanoramiX on */ { HotSpot new; SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -850,14 +742,24 @@ CheckPhysLimits( if (!cursor) return; new = pSprite->hotPhys; - if (pScreen) - new.pScreen = pScreen; +#ifdef PANORAMIX + if (!noPanoramiXExtension) + /* I don't care what the DDX has to say about it */ + pSprite->physLimits = pSprite->hotLimits; else - pScreen = new.pScreen; - (*pScreen->CursorLimits) (pDev, pScreen, cursor, &pSprite->hotLimits, - &pSprite->physLimits); - pSprite->confined = confineToScreen; - (* pScreen->ConstrainCursor)(pDev, pScreen, &pSprite->physLimits); +#endif + { + if (pScreen) + new.pScreen = pScreen; + else + pScreen = new.pScreen; + (*pScreen->CursorLimits) (pDev, pScreen, cursor, &pSprite->hotLimits, + &pSprite->physLimits); + pSprite->confined = confineToScreen; + (* pScreen->ConstrainCursor)(pDev, pScreen, &pSprite->physLimits); + } + + /* constrain the pointer to those limits */ if (new.x < pSprite->physLimits.x1) new.x = pSprite->physLimits.x1; else @@ -873,13 +775,26 @@ CheckPhysLimits( if ((pScreen != pSprite->hotPhys.pScreen) || (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) { - if (pScreen != pSprite->hotPhys.pScreen) - pSprite->hotPhys = new; - (*pScreen->SetCursorPosition) - (pDev, pScreen, new.x, new.y, generateEvents); +#ifdef PANORAMIX + if (!noPanoramiXExtension) + XineramaSetCursorPosition (pDev, new.x, new.y, generateEvents); + else +#endif + { + if (pScreen != pSprite->hotPhys.pScreen) + pSprite->hotPhys = new; + (*pScreen->SetCursorPosition) + (pDev, pScreen, new.x, new.y, generateEvents); + } if (!generateEvents) - SyntheticMotion(pDev, new.x, new.y); + SyntheticMotion(pDev, new.x, new.y); } + +#ifdef PANORAMIX + /* Tell DDX what the limits are */ + if (!noPanoramiXExtension) + XineramaConstrainCursor(pDev); +#endif } static void @@ -889,29 +804,71 @@ CheckVirtualMotion( WindowPtr pWin) { SpritePtr pSprite = pDev->spriteInfo->sprite; + RegionPtr reg = NULL; + DeviceEvent *ev = NULL; -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - XineramaCheckVirtualMotion(pDev, qe, pWin); - return; - } -#endif if (qe) { - pSprite->hot.pScreen = qe->pScreen; - pSprite->hot.x = qe->event->u.keyButtonPointer.rootX; - pSprite->hot.y = qe->event->u.keyButtonPointer.rootY; - pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->confineTo : NullWindow; + ev = (DeviceEvent*)qe->event; + switch(ev->type) + { + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + pSprite->hot.pScreen = qe->pScreen; + pSprite->hot.x = ev->root_x; + pSprite->hot.y = ev->root_y; + pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->confineTo : NullWindow; + break; + default: + break; + } } if (pWin) { BoxRec lims; - if (pSprite->hot.pScreen != pWin->drawable.pScreen) - { - pSprite->hot.pScreen = pWin->drawable.pScreen; - pSprite->hot.x = pSprite->hot.y = 0; - } +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + int x, y, off_x, off_y, i; + + if(!XineramaSetWindowPntrs(pDev, pWin)) + return; + + i = PanoramiXNumScreens - 1; + + REGION_COPY(pSprite->screen, &pSprite->Reg2, + &pSprite->windows[i]->borderSize); + off_x = panoramiXdataPtr[i].x; + off_y = panoramiXdataPtr[i].y; + + while(i--) { + x = off_x - panoramiXdataPtr[i].x; + y = off_y - panoramiXdataPtr[i].y; + + if(x || y) + REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, x, y); + + REGION_UNION(pSprite->screen, &pSprite->Reg2, &pSprite->Reg2, + &pSprite->windows[i]->borderSize); + + off_x = panoramiXdataPtr[i].x; + off_y = panoramiXdataPtr[i].y; + } + } else +#endif + { + if (pSprite->hot.pScreen != pWin->drawable.pScreen) + { + pSprite->hot.pScreen = pWin->drawable.pScreen; + pSprite->hot.x = pSprite->hot.y = 0; + } + } + lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize); if (pSprite->hot.x < lims.x1) pSprite->hot.x = lims.x1; @@ -921,17 +878,34 @@ CheckVirtualMotion( pSprite->hot.y = lims.y1; else if (pSprite->hot.y >= lims.y2) pSprite->hot.y = lims.y2 - 1; - if (wBoundingShape(pWin)) - ConfineToShape(pDev, &pWin->borderSize, - &pSprite->hot.x, &pSprite->hot.y); - if (qe) + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + { + if (REGION_NUM_RECTS(&pSprite->Reg2) > 1) + reg = &pSprite->Reg2; + + } else +#endif + { + if (wBoundingShape(pWin)) + reg = &pWin->borderSize; + } + + if (reg) + ConfineToShape(pDev, reg, &pSprite->hot.x, &pSprite->hot.y); + + if (qe && ev) { qe->pScreen = pSprite->hot.pScreen; - qe->event->u.keyButtonPointer.rootX = pSprite->hot.x; - qe->event->u.keyButtonPointer.rootY = pSprite->hot.y; + ev->root_x = pSprite->hot.x; + ev->root_y = pSprite->hot.y; } } - RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; +#ifdef PANORAMIX + if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */ +#endif + RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; } static void @@ -940,13 +914,6 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo ScreenPtr pScreen = pWin->drawable.pScreen; SpritePtr pSprite = pDev->spriteInfo->sprite; -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - XineramaConfineCursorToWindow(pDev, pWin, generateEvents); - return; - } -#endif - if (syncEvents.playingEvents) { CheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin); @@ -954,6 +921,12 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo } else { +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + XineramaConfineCursorToWindow(pDev, pWin, generateEvents); + return; + } +#endif pSprite->hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize); pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize : NullRegion; @@ -962,7 +935,7 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo } } -_X_EXPORT Bool +Bool PointerConfinedToScreen(DeviceIntPtr pDev) { return pDev->spriteInfo->sprite->confined; @@ -979,13 +952,7 @@ static void ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) { SpritePtr pSprite = pDev->spriteInfo->sprite; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - XineramaChangeToCursor(pDev, cursor); - return; - } -#endif + ScreenPtr pScreen; if (cursor != pSprite->current) { @@ -993,9 +960,15 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) (pSprite->current->bits->yhot != cursor->bits->yhot)) CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined, (ScreenPtr)NULL); - (*pSprite->hotPhys.pScreen->DisplayCursor) (pDev, - pSprite->hotPhys.pScreen, - cursor); +#ifdef PANORAMIX + /* XXX: is this really necessary?? (whot) */ + if (!noPanoramiXExtension) + pScreen = pSprite->screen; + else +#endif + pScreen = pSprite->hotPhys.pScreen; + + (*pScreen->DisplayCursor)(pDev, pScreen, cursor); FreeCursor(pSprite->current, (Cursor)0); pSprite->current = cursor; pSprite->current->refcnt++; @@ -1063,7 +1036,7 @@ PostNewCursor(DeviceIntPtr pDev) * @param dev device which you want to know its current root window * @return root window where dev's sprite is located */ -_X_EXPORT WindowPtr +WindowPtr GetCurrentRootWindow(DeviceIntPtr dev) { return RootWindow(dev); @@ -1072,7 +1045,7 @@ GetCurrentRootWindow(DeviceIntPtr dev) /** * @return window underneath the cursor sprite. */ -_X_EXPORT WindowPtr +WindowPtr GetSpriteWindow(DeviceIntPtr pDev) { return pDev->spriteInfo->sprite->win; @@ -1081,7 +1054,7 @@ GetSpriteWindow(DeviceIntPtr pDev) /** * @return current sprite cursor. */ -_X_EXPORT CursorPtr +CursorPtr GetSpriteCursor(DeviceIntPtr pDev) { return pDev->spriteInfo->sprite->current; @@ -1090,7 +1063,7 @@ GetSpriteCursor(DeviceIntPtr pDev) /** * Set x/y current sprite position in screen coordinates. */ -_X_EXPORT void +void GetSpritePosition(DeviceIntPtr pDev, int *px, int *py) { SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -1099,7 +1072,7 @@ GetSpritePosition(DeviceIntPtr pDev, int *px, int *py) } #ifdef PANORAMIX -_X_EXPORT int +int XineramaGetCursorScreen(DeviceIntPtr pDev) { if(!noPanoramiXExtension) { @@ -1113,29 +1086,32 @@ XineramaGetCursorScreen(DeviceIntPtr pDev) #define TIMESLOP (5 * 60 * 1000) /* 5 minutes */ static void -MonthChangedOrBadTime(xEvent *xE) +MonthChangedOrBadTime(InternalEvent *ev) { /* If the ddx/OS is careless about not processing timestamped events from * different sources in sorted order, then it's possible for time to go * backwards when it should not. Here we ensure a decent time. */ - if ((currentTime.milliseconds - XE_KBPTR.time) > TIMESLOP) + if ((currentTime.milliseconds - ev->any.time) > TIMESLOP) currentTime.months++; else - XE_KBPTR.time = currentTime.milliseconds; + ev->any.time = currentTime.milliseconds; } -#define NoticeTime(xE) { \ - if ((xE)->u.keyButtonPointer.time < currentTime.milliseconds) \ - MonthChangedOrBadTime(xE); \ - currentTime.milliseconds = (xE)->u.keyButtonPointer.time; \ - lastDeviceEventTime = currentTime; } +static void +NoticeTime(InternalEvent *ev) +{ + if (ev->any.time < currentTime.milliseconds) + MonthChangedOrBadTime(ev); + currentTime.milliseconds = ev->any.time; + lastDeviceEventTime = currentTime; +} void -NoticeEventTime(xEvent *xE) +NoticeEventTime(InternalEvent *ev) { if (!syncEvents.playingEvents) - NoticeTime(xE); + NoticeTime(ev); } /************************************************************************** @@ -1148,23 +1124,23 @@ NoticeEventTime(xEvent *xE) * linked list for later delivery. */ void -EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) +EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) { QdEventPtr tail = *syncEvents.pendtail; QdEventPtr qe; SpritePtr pSprite = device->spriteInfo->sprite; int eventlen; + DeviceEvent *event = (DeviceEvent*)ev; + NoticeTime((InternalEvent*)event); - NoticeTime(xE); - -#ifdef XKB /* Fix for key repeating bug. */ if (device->key != NULL && device->key->xkbInfo != NULL && - (xE->u.u.type == KeyRelease || xE->u.u.type == DeviceKeyRelease)) - AccessXCancelRepeatKey(device->key->xkbInfo, xE->u.u.detail); -#endif + event->type == ET_KeyRelease) + AccessXCancelRepeatKey(device->key->xkbInfo, event->detail.key); +#if 0 + /* FIXME: I'm broken now. Please fix me. */ if (DeviceEventCallback) { DeviceEventInfoRec eventinfo; @@ -1181,59 +1157,48 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) XE_KBPTR.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; eventinfo.events = xE; - eventinfo.count = count; + eventinfo.count = nevents; CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); } - if (xE->u.u.type == DeviceMotionNotify) +#endif + if (event->type == ET_Motion) { #ifdef PANORAMIX if(!noPanoramiXExtension) { - XE_KBPTR.rootX += panoramiXdataPtr[pSprite->screen->myNum].x - + event->root_x += panoramiXdataPtr[pSprite->screen->myNum].x - panoramiXdataPtr[0].x; - XE_KBPTR.rootY += panoramiXdataPtr[pSprite->screen->myNum].y - + event->root_y += panoramiXdataPtr[pSprite->screen->myNum].y - panoramiXdataPtr[0].y; } #endif - pSprite->hotPhys.x = XE_KBPTR.rootX; - pSprite->hotPhys.y = XE_KBPTR.rootY; + pSprite->hotPhys.x = event->root_x; + pSprite->hotPhys.y = event->root_y; /* do motion compression, but not if from different devices */ if (tail && - (tail->event->u.u.type == DeviceMotionNotify) && + (tail->event->any.type == ET_Motion) && (tail->device == device) && (tail->pScreen == pSprite->hotPhys.pScreen)) { - tail->event->u.keyButtonPointer.rootX = pSprite->hotPhys.x; - tail->event->u.keyButtonPointer.rootY = pSprite->hotPhys.y; - tail->event->u.keyButtonPointer.time = XE_KBPTR.time; + DeviceEvent *tailev = (DeviceEvent*)tail->event; + tailev->root_x = pSprite->hotPhys.x; + tailev->root_y = pSprite->hotPhys.y; + tailev->time = event->time; tail->months = currentTime.months; return; } } - eventlen = count * sizeof(xEvent); - if (xE->u.u.type == GenericEvent) /* count is 1 for GenericEvents */ - eventlen += ((xGenericEvent*)xE)->length * 4; + eventlen = event->length; - qe = (QdEventPtr)xalloc(sizeof(QdEventRec) + eventlen); + qe = xalloc(sizeof(QdEventRec) + eventlen); if (!qe) return; qe->next = (QdEventPtr)NULL; qe->device = device; qe->pScreen = pSprite->hotPhys.pScreen; qe->months = currentTime.months; - qe->event = (xEvent *)(qe + 1); - qe->evcount = count; - if (xE->u.u.type == GenericEvent) - { - memcpy(qe->event, xE, eventlen); - } else - { - xEvent *qxE; - for (qxE = qe->event; --count >= 0; qxE++, xE++) - { - *qxE = *xE; - } - } + qe->event = (InternalEvent *)(qe + 1); + memcpy(qe->event, event, eventlen); if (tail) syncEvents.pendtail = &tail->next; *syncEvents.pendtail = qe; @@ -1254,7 +1219,6 @@ PlayReleasedEvents(void) QdEventPtr *prev, qe; DeviceIntPtr dev; DeviceIntPtr pDev; - static CARD32 lastKnownMillis = 0; /* Hack, see comment below */ prev = &syncEvents.pending; while ( (qe = *prev) ) @@ -1265,36 +1229,37 @@ PlayReleasedEvents(void) pDev = qe->device; if (*syncEvents.pendtail == *prev) syncEvents.pendtail = prev; - if (qe->event->u.u.type == DeviceMotionNotify) + if (qe->event->any.type == ET_Motion) CheckVirtualMotion(pDev, qe, NullWindow); syncEvents.time.months = qe->months; - /* XXX: Hack! We can't reliably get the time from GenericEvents, - since we don't know which struct it may be. So we store the time - when we know it, and re-use it when we can't get it. */ - if (qe->event->u.u.type == GenericEvent) - { - syncEvents.time.milliseconds = lastKnownMillis; - } else - { - syncEvents.time.milliseconds = qe->event->u.keyButtonPointer.time; - lastKnownMillis = syncEvents.time.milliseconds; - } + syncEvents.time.milliseconds = qe->event->any.time; #ifdef PANORAMIX /* Translate back to the sprite screen since processInputProc will translate from sprite screen to screen 0 upon reentry to the DIX layer */ - /* XXX: we can't do that for generic events */ if(!noPanoramiXExtension) { - qe->event->u.keyButtonPointer.rootX += - panoramiXdataPtr[0].x - - panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].x; - qe->event->u.keyButtonPointer.rootY += - panoramiXdataPtr[0].y - - panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].y; + DeviceEvent *ev = (DeviceEvent*)(qe->event); + switch(ev->type) + { + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + ev->root_x += panoramiXdataPtr[0].x - + panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].x; + ev->root_y += panoramiXdataPtr[0].y - + panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].y; + break; + default: + break; + } + } #endif - (*qe->device->public.processInputProc)(qe->event, qe->device, - qe->evcount); + (*qe->device->public.processInputProc)(qe->event, qe->device); xfree(qe); for (dev = inputInfo.devices; dev && dev->deviceGrab.sync.frozen; dev = dev->next) ; @@ -1334,9 +1299,6 @@ FreezeThaw(DeviceIntPtr dev, Bool frozen) * runs up the sprite tree (spriteTrace) and searches for the window to replay * the events from. If it is found, it checks for passive grabs one down from * the window or delivers the events. - * - * Since the events in the EQ are always XI events, we need to emulate core - * events here. */ static void ComputeFreezes(void) @@ -1344,8 +1306,6 @@ ComputeFreezes(void) DeviceIntPtr replayDev = syncEvents.replayDev; int i; WindowPtr w; - xEvent *xE; - int count; GrabPtr grab; DeviceIntPtr dev; @@ -1357,31 +1317,32 @@ ComputeFreezes(void) syncEvents.playingEvents = TRUE; if (replayDev) { - xE = replayDev->deviceGrab.sync.event; - count = replayDev->deviceGrab.sync.evcount; + DeviceEvent* event = replayDev->deviceGrab.sync.event; + syncEvents.replayDev = (DeviceIntPtr)NULL; - w = XYToWindow(replayDev, XE_KBPTR.rootX, XE_KBPTR.rootY); + w = XYToWindow(replayDev, event->root_x, event->root_y); for (i = 0; i < replayDev->spriteInfo->sprite->spriteTraceGood; i++) { if (syncEvents.replayWin == replayDev->spriteInfo->sprite->spriteTrace[i]) { - if (!CheckDeviceGrabs(replayDev, xE, i+1, count)) { - if (replayDev->focus && !IsPointerEvent(xE)) - DeliverFocusedEvent(replayDev, xE, w, count); + if (!CheckDeviceGrabs(replayDev, event, i+1)) { + if (replayDev->focus && !IsPointerEvent((InternalEvent*)event)) + DeliverFocusedEvent(replayDev, (InternalEvent*)event, w); else - DeliverDeviceEvents(w, xE, NullGrab, NullWindow, - replayDev, count); + DeliverDeviceEvents(w, (InternalEvent*)event, NullGrab, + NullWindow, replayDev); } goto playmore; } } /* must not still be in the same stack */ - if (replayDev->focus && !IsPointerEvent(xE)) - DeliverFocusedEvent(replayDev, xE, w, count); + if (replayDev->focus && !IsPointerEvent((InternalEvent*)event)) + DeliverFocusedEvent(replayDev, (InternalEvent*)event, w); else - DeliverDeviceEvents(w, xE, NullGrab, NullWindow, replayDev, count); + DeliverDeviceEvents(w, (InternalEvent*)event, NullGrab, + NullWindow, replayDev); } playmore: for (dev = inputInfo.devices; dev; dev = dev->next) @@ -1467,7 +1428,7 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) The correct thing to do would be to freeze all SDs attached to the paired master device. */ - if (thisDev->isMaster) + if (IsMaster(thisDev)) { dev = GetPairedDevice(thisDev); if (otherMode == GrabModeSync) @@ -1483,6 +1444,54 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) ComputeFreezes(); } +/* Only ever used if a grab is called on an attached slave device. */ +static int GrabPrivateKeyIndex; +static DevPrivateKey GrabPrivateKey = &GrabPrivateKeyIndex; + +/** + * Save the device's master device in the devPrivates. This needs to be done + * if a client directly grabs a slave device that is attached to a master. For + * the duration of the grab, the device is detached, ungrabbing re-attaches it + * though. + * + * We store the ID of the master device only in case the master disappears + * while the device has a grab. + */ +static void +DetachFromMaster(DeviceIntPtr dev) +{ + int id; + if (!dev->u.master) + return; + + id = dev->u.master->id; + + dixSetPrivate(&dev->devPrivates, GrabPrivateKey, (void *)id); + AttachDevice(NULL, dev, NULL); +} + +static void +ReattachToOldMaster(DeviceIntPtr dev) +{ + int id; + void *p; + DeviceIntPtr master = NULL; + + if (IsMaster(dev)) + return; + + + p = dixLookupPrivate(&dev->devPrivates, GrabPrivateKey); + id = (int)p; /* silence gcc warnings */ + dixLookupDevice(&master, id, serverClient, DixUseAccess); + + if (master) + { + AttachDevice(serverClient, dev, master); + dixSetPrivate(&dev->devPrivates, GrabPrivateKey, NULL); + } +} + /** * Activate a pointer grab on the given device. A pointer grab will cause all * core pointer events of this device to be delivered to the grabbing client only. @@ -1508,6 +1517,11 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, : mouse->spriteInfo->sprite->win; Bool isPassive = autoGrab & ~ImplicitGrabMask; + /* slave devices need to float for the duration of the grab. */ + if (grab->grabtype == GRABTYPE_XI2 && + !(autoGrab & ImplicitGrabMask) && !IsMaster(mouse)) + DetachFromMaster(mouse); + if (grab->confineTo) { if (grab->confineTo->drawable.pScreen @@ -1516,7 +1530,7 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, mouse->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE); } - DoEnterLeaveEvents(mouse, oldWin, grab->window, NotifyGrab); + DoEnterLeaveEvents(mouse, mouse->id, oldWin, grab->window, NotifyGrab); mouse->valuator->motionHintWindow = NullWindow; if (syncEvents.playingEvents) grabinfo->grabTime = syncEvents.time; @@ -1542,25 +1556,20 @@ DeactivatePointerGrab(DeviceIntPtr mouse) { GrabPtr grab = mouse->deviceGrab.grab; DeviceIntPtr dev; + Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab && + mouse->deviceGrab.implicitGrab); mouse->valuator->motionHintWindow = NullWindow; mouse->deviceGrab.grab = NullGrab; mouse->deviceGrab.sync.state = NOT_GRABBED; mouse->deviceGrab.fromPassiveGrab = FALSE; - /* make sure the potential XGE event mask is freed too*/ - if (grab->genericMasks) - { - xfree(grab->genericMasks); - grab->genericMasks = NULL; - } - for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->deviceGrab.sync.other == grab) dev->deviceGrab.sync.other = NullGrab; } - DoEnterLeaveEvents(mouse, grab->window, + DoEnterLeaveEvents(mouse, mouse->id, grab->window, mouse->spriteInfo->sprite->win, NotifyUngrab); if (grab->confineTo) ConfineCursorToWindow(mouse, RootWindow(mouse), FALSE, FALSE); @@ -1568,6 +1577,9 @@ DeactivatePointerGrab(DeviceIntPtr mouse) if (grab->cursor) FreeCursor(grab->cursor, (Cursor)0); + if (!wasImplicit && grab->grabtype == GRABTYPE_XI2) + ReattachToOldMaster(mouse); + ComputeFreezes(); } @@ -1582,6 +1594,12 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass GrabInfoPtr grabinfo = &keybd->deviceGrab; WindowPtr oldWin; + /* slave devices need to float for the duration of the grab. */ + if (grab->grabtype == GRABTYPE_XI2 && + !(passive & ImplicitGrabMask) && + !IsMaster(keybd)) + DetachFromMaster(keybd); + if (grabinfo->grab) oldWin = grabinfo->grab->window; else if (keybd->focus) @@ -1589,7 +1607,7 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass else oldWin = keybd->spriteInfo->sprite->win; if (oldWin == FollowKeyboardWin) - oldWin = inputInfo.keyboard->focus->win; + oldWin = keybd->focus->win; if (keybd->valuator) keybd->valuator->motionHintWindow = NullWindow; DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); @@ -1600,6 +1618,7 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass grabinfo->activeGrab = *grab; grabinfo->grab = &grabinfo->activeGrab; grabinfo->fromPassiveGrab = passive; + grabinfo->implicitGrab = passive & ImplicitGrabMask; CheckGrabForSyncs(keybd, (Bool)grab->keyboardMode, (Bool)grab->pointerMode); } @@ -1613,6 +1632,8 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) DeviceIntPtr dev; WindowPtr focusWin = keybd->focus ? keybd->focus->win : keybd->spriteInfo->sprite->win; + Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab && + keybd->deviceGrab.implicitGrab); if (focusWin == FollowKeyboardWin) focusWin = inputInfo.keyboard->focus->win; @@ -1621,11 +1642,6 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) keybd->deviceGrab.grab = NullGrab; keybd->deviceGrab.sync.state = NOT_GRABBED; keybd->deviceGrab.fromPassiveGrab = FALSE; - if (grab->genericMasks) - { - xfree(grab->genericMasks); - grab->genericMasks = NULL; - } for (dev = inputInfo.devices; dev; dev = dev->next) { @@ -1634,6 +1650,9 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) } DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); + if (!wasImplicit && grab->grabtype == GRABTYPE_XI2) + ReattachToOldMaster(keybd); + ComputeFreezes(); } @@ -1641,8 +1660,7 @@ void AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, - int newState, - Bool core) + int newState) { Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced; TimeStamp grabTime; @@ -1748,7 +1766,7 @@ AllowSome(ClientPtr client, { if (dev == thisDev) continue; - devgrabinfo = (core) ? &dev->deviceGrab : &dev->deviceGrab; + devgrabinfo = &dev->deviceGrab; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = THAWED; @@ -1784,28 +1802,28 @@ ProcAllowEvents(ClientPtr client) switch (stuff->mode) { case ReplayPointer: - AllowSome(client, time, mouse, NOT_GRABBED, True); + AllowSome(client, time, mouse, NOT_GRABBED); break; case SyncPointer: - AllowSome(client, time, mouse, FREEZE_NEXT_EVENT, True); + AllowSome(client, time, mouse, FREEZE_NEXT_EVENT); break; case AsyncPointer: - AllowSome(client, time, mouse, THAWED, True); + AllowSome(client, time, mouse, THAWED); break; case ReplayKeyboard: - AllowSome(client, time, keybd, NOT_GRABBED, True); + AllowSome(client, time, keybd, NOT_GRABBED); break; case SyncKeyboard: - AllowSome(client, time, keybd, FREEZE_NEXT_EVENT, True); + AllowSome(client, time, keybd, FREEZE_NEXT_EVENT); break; case AsyncKeyboard: - AllowSome(client, time, keybd, THAWED, True); + AllowSome(client, time, keybd, THAWED); break; case SyncBoth: - AllowSome(client, time, keybd, FREEZE_BOTH_NEXT_EVENT, True); + AllowSome(client, time, keybd, FREEZE_BOTH_NEXT_EVENT); break; case AsyncBoth: - AllowSome(client, time, keybd, THAWED_BOTH, True); + AllowSome(client, time, keybd, THAWED_BOTH); break; default: client->errorValue = stuff->mode; @@ -1868,7 +1886,7 @@ ReleaseActiveGrabs(ClientPtr client) * @return 1 if event was delivered, 0 if not or -1 if grab was not set by the * client. */ -_X_EXPORT int +int TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, int count, Mask mask, Mask filter, GrabPtr grab) { @@ -1876,70 +1894,124 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, int type; #ifdef DEBUG_EVENTS - ErrorF("[dix] Event([%d, %d], mask=0x%x), client=%d", - pEvents->u.u.type, pEvents->u.u.detail, mask, client->index); + ErrorF("[dix] Event([%d, %d], mask=0x%lx), client=%d%s", + pEvents->u.u.type, pEvents->u.u.detail, mask, + client ? client->index : -1, + (client && client->clientGone) ? " (gone)" : ""); #endif - if ((client) && (client != serverClient) && (!client->clientGone) && - ((filter == CantBeFiltered) || (mask & filter))) - { - if (grab && !SameClient(grab, client)) - return -1; /* don't send, but notify caller */ - type = pEvents->u.u.type; - if (type == MotionNotify) - { - if (mask & PointerMotionHintMask) - { - if (WID(dev->valuator->motionHintWindow) == - pEvents->u.keyButtonPointer.event) - { + + if (!client || client == serverClient || client->clientGone) { #ifdef DEBUG_EVENTS - ErrorF("[dix] \n"); - ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n"); + ErrorF(" not delivered to fake/dead client\n"); #endif - return 1; /* don't send, but pretend we did */ - } - pEvents->u.u.detail = NotifyHint; - } - else - { - pEvents->u.u.detail = NotifyNormal; - } - } - else - { - if ((type == DeviceMotionNotify) && - MaybeSendDeviceMotionNotifyHint - ((deviceKeyButtonPointer*)pEvents, mask) != 0) - return 1; - } - type &= 0177; - if (type != KeymapNotify) - { - /* all extension events must have a sequence number */ - for (i = 0; i < count; i++) - pEvents[i].u.u.sequenceNumber = client->sequence; - } + return 0; + } - if (BitIsOn(criticalEvents, type)) - { - if (client->smart_priority < SMART_MAX_PRIORITY) - client->smart_priority++; - SetCriticalOutputPending(); - } + if (filter != CantBeFiltered && !(mask & filter)) + { + #ifdef DEBUG_EVENTS + ErrorF(" filtered\n"); + #endif + return 0; + } - WriteEventsToClient(client, count, pEvents); + if (grab && !SameClient(grab, client)) + { #ifdef DEBUG_EVENTS - ErrorF("[dix] delivered\n"); + ErrorF(" not delivered due to grab\n"); #endif - return 1; + return -1; /* don't send, but notify caller */ } - else + + type = pEvents->u.u.type; + if (type == MotionNotify) { + if (mask & PointerMotionHintMask) + { + if (WID(dev->valuator->motionHintWindow) == + pEvents->u.keyButtonPointer.event) + { #ifdef DEBUG_EVENTS - ErrorF("[dix] \n"); + ErrorF("[dix] \n"); + ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n"); #endif - return 0; + return 1; /* don't send, but pretend we did */ + } + pEvents->u.u.detail = NotifyHint; + } + else + { + pEvents->u.u.detail = NotifyNormal; + } } + else if (type == DeviceMotionNotify) + { + if (MaybeSendDeviceMotionNotifyHint((deviceKeyButtonPointer*)pEvents, + mask) != 0) + return 1; + } else if (type == KeyPress) + { + if (EventIsKeyRepeat(pEvents)) + { + if (!_XkbWantsDetectableAutoRepeat(client)) + { + xEvent release = *pEvents; + release.u.u.type = KeyRelease; + release.u.u.sequenceNumber = client->sequence; + WriteEventsToClient(client, 1, &release); +#ifdef DEBUG_EVENTS + ErrorF(" (plus fake core release for repeat)"); +#endif + } else + { +#ifdef DEBUG_EVENTS + ErrorF(" (detectable autorepeat for core)"); +#endif + } + } + + } else if (type == DeviceKeyPress) + { + if (EventIsKeyRepeat(pEvents)) + { + if (!_XkbWantsDetectableAutoRepeat(client)) + { + deviceKeyButtonPointer release = *(deviceKeyButtonPointer *)pEvents; + release.type = DeviceKeyRelease; + release.sequenceNumber = client->sequence; +#ifdef DEBUG_EVENTS + ErrorF(" (plus fake xi1 release for repeat)"); +#endif + WriteEventsToClient(client, 1, (xEvent *) &release); + } + else { +#ifdef DEBUG_EVENTS + ErrorF(" (detectable autorepeat for core)"); +#endif + } + } + } + + type &= 0177; + if (type != KeymapNotify) + { + /* all extension events must have a sequence number */ + for (i = 0; i < count; i++) + pEvents[i].u.u.sequenceNumber = client->sequence; + } + + if (BitIsOn(criticalEvents, type)) + { + if (client->smart_priority < SMART_MAX_PRIORITY) + client->smart_priority++; + SetCriticalOutputPending(); + } + + WriteEventsToClient(client, count, pEvents); +#ifdef DEBUG_EVENTS + ErrorF("[dix] delivered\n"); +#endif + return 1; } /** @@ -1959,13 +2031,12 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, * @param count Number of elements in pEvents. * @param filter Mask based on event type. * @param grab Possible grab on the device that caused the event. - * @param mskidx Mask index, depending on device that caused event. * * @return Number of events delivered to various clients. */ int DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent - *pEvents, int count, Mask filter, GrabPtr grab, int mskidx) + *pEvents, int count, Mask filter, GrabPtr grab) { int deliveries = 0, nondeliveries = 0; int attempt; @@ -1975,17 +2046,16 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent this mask is the mask of the grab. */ int type = pEvents->u.u.type; - /* CantBeFiltered means only window owner gets the event */ - if ((filter == CantBeFiltered) || - (!(type & EXTENSION_EVENT_BASE) && type != GenericEvent)) + + /* Deliver to window owner */ + if ((filter == CantBeFiltered) || CORE_EVENT(pEvents)) { /* if nobody ever wants to see this event, skip some work */ if (filter != CantBeFiltered && !((wOtherEventMasks(pWin)|pWin->eventMask) & filter)) return 0; - if (!(type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(wClient(pWin), pDev, pEvents)) + if (IsInterferingGrab(wClient(pWin), pDev, pEvents)) return 0; if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count)) @@ -2003,80 +2073,51 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent nondeliveries--; } } + + /* CantBeFiltered means only window owner gets the event */ if (filter != CantBeFiltered) { - /* Handle generic events */ - if (type == GenericEvent) + if (CORE_EVENT(pEvents)) + other = (InputClients *)wOtherClients(pWin); + else if (XI2_EVENT(pEvents)) { - GenericMaskPtr gmask; - /* We don't do more than one GenericEvent at a time. */ - if (count > 1) - { - ErrorF("[dix] Do not send more than one GenericEvent at a time!\n"); + OtherInputMasks *inputMasks = wOtherInputMasks(pWin); + /* Has any client selected for the event? */ + if (!GetWindowXI2Mask(pDev, pWin, pEvents)) return 0; - } - - /* if we get here, filter should be set to the GE specific mask. - check if any client wants it */ - if (!GEDeviceMaskIsSet(pWin, pDev, GEEXT(pEvents), filter)) + other = inputMasks->inputClients; + } else { + OtherInputMasks *inputMasks = wOtherInputMasks(pWin); + /* Has any client selected for the event? */ + if (!inputMasks || + !(inputMasks->inputEvents[pDev->id] & filter)) return 0; - /* run through all clients, deliver event */ - for (gmask = GECLIENT(pWin); gmask; gmask = gmask->next) - { - if (gmask->eventMask[GEEXTIDX(pEvents)] & filter) - { - if (XaceHook(XACE_RECEIVE_ACCESS, rClient(gmask), pWin, - pEvents, count)) - /* do nothing */; - else if (TryClientEvents(rClient(gmask), pDev, - pEvents, count, - gmask->eventMask[GEEXTIDX(pEvents)], - filter, grab) > 0) - { - deliveries++; - } else - nondeliveries--; - } - } + other = inputMasks->inputClients; } - else { - /* Traditional event */ - if (type & EXTENSION_EVENT_BASE) - { - OtherInputMasks *inputMasks; - inputMasks = wOtherInputMasks(pWin); - if (!inputMasks || - !(inputMasks->inputEvents[mskidx] & filter)) - return 0; - other = inputMasks->inputClients; - } - else - other = (InputClients *)wOtherClients(pWin); - for (; other; other = other->next) + for (; other; other = other->next) + { + Mask mask; + if (IsInterferingGrab(rClient(other), pDev, pEvents)) + continue; + + mask = GetEventMask(pDev, pEvents, other); + + if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, + pEvents, count)) + /* do nothing */; + else if ( (attempt = TryClientEvents(rClient(other), pDev, + pEvents, count, + mask, filter, grab)) ) { - /* core event? check for grab interference */ - if (!(type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(rClient(other), pDev, pEvents)) - continue; - - if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, - pEvents, count)) - /* do nothing */; - else if ( (attempt = TryClientEvents(rClient(other), pDev, - pEvents, count, - other->mask[mskidx], - filter, grab)) ) + if (attempt > 0) { - if (attempt > 0) - { - deliveries++; - client = rClient(other); - deliveryMask = other->mask[mskidx]; - } else - nondeliveries--; - } + deliveries++; + client = rClient(other); + deliveryMask = mask; + } else + nondeliveries--; } } } @@ -2084,13 +2125,15 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent * Note that since core events are delivered first, an implicit grab may * be activated on a core grab, stopping the XI events. */ - if ((type == DeviceButtonPress || type == ButtonPress) + if ((type == DeviceButtonPress || type == ButtonPress || + ((XI2_EVENT(pEvents) && ((xGenericEvent*)pEvents)->evtype == XI_ButtonPress))) && deliveries && (!grab)) { GrabRec tempGrab; OtherInputMasks *inputMasks; + memset(&tempGrab, 0, sizeof(GrabRec)); tempGrab.next = NULL; tempGrab.device = pDev; tempGrab.resource = client->clientAsMask; @@ -2101,27 +2144,25 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent tempGrab.pointerMode = GrabModeAsync; tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; - tempGrab.coreGrab = (type == ButtonPress); + tempGrab.type = type; + if (type == ButtonPress) + tempGrab.grabtype = GRABTYPE_CORE; + else if (type == DeviceButtonPress) + tempGrab.grabtype = GRABTYPE_XI; + else + { + tempGrab.type = ((xGenericEvent*)pEvents)->evtype; + tempGrab.grabtype = GRABTYPE_XI2; + } - /* get the XI device mask */ + /* get the XI and XI2 device mask */ inputMasks = wOtherInputMasks(pWin); tempGrab.deviceMask = (inputMasks) ? inputMasks->inputEvents[pDev->id]: 0; - /* get the XGE event mask. */ - tempGrab.genericMasks = NULL; - if (pWin->optional && pWin->optional->geMasks) - { - GenericClientMasksPtr gemasks = pWin->optional->geMasks; - GenericMaskPtr geclient = gemasks->geClients; - while(geclient && rClient(geclient) != client) - geclient = geclient->next; - if (geclient) - { - tempGrab.genericMasks = xcalloc(1, sizeof(GenericMaskRec)); - *tempGrab.genericMasks = *geclient; - tempGrab.genericMasks->next = NULL; - } - } + if (inputMasks) + memcpy(tempGrab.xi2mask, inputMasks->xi2mask, + sizeof(tempGrab.xi2mask)); + (*pDev->deviceGrab.ActivateGrab)(pDev, &tempGrab, currentTime, TRUE | ImplicitGrabMask); } @@ -2129,11 +2170,8 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent pDev->valuator->motionHintWindow = pWin; else { - if (((type == DeviceMotionNotify) -#ifdef XKB - || (type == DeviceButtonPress) -#endif - ) && deliveries) + if ((type == DeviceMotionNotify || type == DeviceButtonPress) && + deliveries) CheckDeviceGrabAndHintWindow (pWin, type, (deviceKeyButtonPointer*) pEvents, grab, client, deliveryMask); @@ -2217,6 +2255,37 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, return 2; } +static Window FindChildForEvent(DeviceIntPtr dev, WindowPtr event) +{ + SpritePtr pSprite = dev->spriteInfo->sprite; + WindowPtr w = pSprite->spriteTrace[pSprite->spriteTraceGood-1]; + Window child; + + /* If the search ends up past the root should the child field be + set to none or should the value in the argument be passed + through. It probably doesn't matter since everyone calls + this function with child == None anyway. */ + while (w) + { + /* If the source window is same as event window, child should be + none. Don't bother going all all the way back to the root. */ + + if (w == event) + { + child = None; + break; + } + + if (w->parent == event) + { + child = w->drawable.id; + break; + } + w = w->parent; + } + return child; +} + /** * Adjust event fields to comply with the window properties. * @@ -2225,7 +2294,7 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, * @param child Child window setting for event (if applicable) * @param calcChild If True, calculate the child window. */ -static void +void FixUpEventFromWindow( DeviceIntPtr pDev, xEvent *xE, @@ -2235,59 +2304,141 @@ FixUpEventFromWindow( { SpritePtr pSprite = pDev->spriteInfo->sprite; - if (xE->u.u.type == GenericEvent) /* just a safety barrier */ - return; - if (calcChild) - { - WindowPtr w= pSprite->spriteTrace[pSprite->spriteTraceGood-1]; - /* If the search ends up past the root should the child field be - set to none or should the value in the argument be passed - through. It probably doesn't matter since everyone calls - this function with child == None anyway. */ + child = FindChildForEvent(pDev, pWin); - while (w) - { - /* If the source window is same as event window, child should be - none. Don't bother going all all the way back to the root. */ + if (XI2_EVENT(xE)) + { + xXIDeviceEvent* event = (xXIDeviceEvent*)xE; - if (w == pWin) - { - child = None; - break; - } + if (event->evtype == XI_RawKeyPress || + event->evtype == XI_RawKeyRelease || + event->evtype == XI_RawButtonPress || + event->evtype == XI_RawButtonRelease || + event->evtype == XI_RawMotion || + event->evtype == XI_DeviceChanged || + event->evtype == XI_HierarchyChanged || + event->evtype == XI_PropertyEvent) + return; - if (w->parent == pWin) - { - child = w->drawable.id; - break; - } - w = w->parent; + event->root = RootWindow(pDev)->drawable.id; + event->event = pWin->drawable.id; + if (pSprite->hot.pScreen == pWin->drawable.pScreen) + { + event->event_x = event->root_x - FP1616(pWin->drawable.x, 0); + event->event_y = event->root_y - FP1616(pWin->drawable.y, 0); + event->child = child; + } else + { + event->event_x = 0; + event->event_y = 0; + event->child = None; } - } - XE_KBPTR.root = RootWindow(pDev)->drawable.id; - XE_KBPTR.event = pWin->drawable.id; - if (pSprite->hot.pScreen == pWin->drawable.pScreen) - { - XE_KBPTR.sameScreen = xTrue; - XE_KBPTR.child = child; - XE_KBPTR.eventX = - XE_KBPTR.rootX - pWin->drawable.x; - XE_KBPTR.eventY = - XE_KBPTR.rootY - pWin->drawable.y; - } - else + + if (event->evtype == XI_Enter || event->evtype == XI_Leave || + event->evtype == XI_FocusIn || event->evtype == XI_FocusOut) + ((xXIEnterEvent*)event)->same_screen = + (pSprite->hot.pScreen == pWin->drawable.pScreen); + + } else { - XE_KBPTR.sameScreen = xFalse; - XE_KBPTR.child = None; - XE_KBPTR.eventX = 0; - XE_KBPTR.eventY = 0; + XE_KBPTR.root = RootWindow(pDev)->drawable.id; + XE_KBPTR.event = pWin->drawable.id; + if (pSprite->hot.pScreen == pWin->drawable.pScreen) + { + XE_KBPTR.sameScreen = xTrue; + XE_KBPTR.child = child; + XE_KBPTR.eventX = + XE_KBPTR.rootX - pWin->drawable.x; + XE_KBPTR.eventY = + XE_KBPTR.rootY - pWin->drawable.y; + } + else + { + XE_KBPTR.sameScreen = xFalse; + XE_KBPTR.child = None; + XE_KBPTR.eventX = 0; + XE_KBPTR.eventY = 0; + } } } /** - * Deliver events caused by input devices. Called for both core input events - * and XI events. + * Return masks for EventIsDeliverable. + * @defgroup EventIsDeliverable return flags + * @{ + */ +#define XI_MASK (1 << 0) /**< XI mask set on window */ +#define CORE_MASK (1 << 1) /**< Core mask set on window */ +#define DONT_PROPAGATE_MASK (1 << 2) /**< DontPropagate mask set on window */ +#define XI2_MASK (1 << 3) /**< XI2 mask set on window */ +/* @} */ + +/** + * Check if a given event is deliverable at all on a given window. + * + * This function only checks if any client wants it, not for a specific + * client. + * + * @param[in] dev The device this event is being sent for. + * @param[in] event The event that is to be sent. + * @param[in] win The current event window. + * + * @return Bitmask of ::XI2_MASK, ::XI_MASK, ::CORE_MASK, and + * ::DONT_PROPAGATE_MASK. + */ +static int +EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, WindowPtr win) +{ + int rc = 0; + int filter = 0; + int type; + OtherInputMasks *inputMasks = wOtherInputMasks(win); + xEvent ev; + + /* XXX: this makes me gag */ + type = GetXI2Type(event); + ev.u.u.type = GenericEvent; /* GetEventFilter only cares about type and evtype*/ + ((xGenericEvent*)&ev)->extension = IReqCode; + ((xGenericEvent*)&ev)->evtype = type; + filter = GetEventFilter(dev, &ev); + if (type && inputMasks && + ((inputMasks->xi2mask[XIAllDevices][type/8] & filter) || + ((inputMasks->xi2mask[XIAllMasterDevices][type/8] & filter) && IsMaster(dev)) || + (inputMasks->xi2mask[dev->id][type/8] & filter))) + rc |= XI2_MASK; + + type = GetXIType(event); + ev.u.u.type = type; + filter = GetEventFilter(dev, &ev); + + /* Check for XI mask */ + if (type && inputMasks && + (inputMasks->deliverableEvents[dev->id] & filter) && + (inputMasks->inputEvents[dev->id] & filter)) + rc |= XI_MASK; + + /* Check for XI DontPropagate mask */ + if (type && inputMasks && + (inputMasks->dontPropagateMask[dev->id] & filter)) + rc |= DONT_PROPAGATE_MASK; + + /* Check for core mask */ + type = GetCoreType(event); + if (type && (win->deliverableEvents & filter) && + ((wOtherEventMasks(win) | win->eventMask) & filter)) + rc |= CORE_MASK; + + /* Check for core DontPropagate mask */ + if (type && (filter & wDontPropagateMask(win))) + rc |= DONT_PROPAGATE_MASK; + + return rc; +} + +/** + * Deliver events caused by input devices. + * * For events from a non-grabbed, non-focus device, DeliverDeviceEvents is * called directly from the processInputProc. * For grabbed devices, DeliverGrabbedEvent is called first, and _may_ call @@ -2296,112 +2447,108 @@ FixUpEventFromWindow( * DeliverDeviceEvents. * * @param pWin Window to deliver event to. - * @param xE Events to deliver. + * @param event The events to deliver, not yet in wire format. * @param grab Possible grab on a device. * @param stopAt Don't recurse up to the root window. * @param dev The device that is responsible for the event. - * @param count number of events in xE. * * @see DeliverGrabbedEvent * @see DeliverFocusedEvent */ int -DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, - WindowPtr stopAt, DeviceIntPtr dev, int count) +DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab, + WindowPtr stopAt, DeviceIntPtr dev) { Window child = None; - int type = xE->u.u.type; - Mask filter = filters[dev->id][type]; + Mask filter; int deliveries = 0; - OtherInputMasks *inputMasks; - int mskidx = dev->id; xEvent core; + xEvent *xE = NULL; + int rc, mask, count = 0; - if (XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, xE, count)) - return 0; + CHECKEVENT(event); - /* handle generic events */ - /* XXX: Generic events aren't quite handled correctly yet. They should - * eventually fit in with the rest of the stuff - */ - if (type == GenericEvent) + while (pWin) { - WindowPtr win = pWin; - xGenericEvent* ge = (xGenericEvent*)xE; - - if (count > 1) - { - ErrorF("[dix] Do not send more than one GenericEvent at a time!\n"); - return 0; - } - filter = generic_filters[GEEXTIDX(xE)][ge->evtype]; - - while(win) + if ((mask = EventIsDeliverable(dev, event, pWin))) { - if (GEDeviceMaskIsSet(win, dev, GEEXT(xE), filter)) + /* XI2 events first */ + if (mask & XI2_MASK) { - if (GEExtensions[GEEXTIDX(xE)].evfill) - GEExtensions[GEEXTIDX(xE)].evfill(ge, dev, win, grab); - deliveries = DeliverEventsToWindow(dev, win, xE, count, - filter, grab, 0); - if (deliveries > 0) - return deliveries; + xEvent *xi2 = NULL; + rc = EventToXI2(event, &xi2); + if (rc == Success) + { + /* XXX: XACE */ + filter = GetEventFilter(dev, xi2); + FixUpEventFromWindow(dev, xi2, pWin, child, FALSE); + deliveries = DeliverEventsToWindow(dev, pWin, xi2, 1, + filter, grab); + xfree(xi2); + if (deliveries > 0) + goto unwind; + } else if (rc != BadMatch) + ErrorF("[dix] %s: XI2 conversion failed in DDE (%d).\n", + dev->name, rc); } - win = win->parent; - } - } - - while (pWin && type != GenericEvent) - { - if (!dev->isMaster) - { - inputMasks = wOtherInputMasks(pWin); - if (inputMasks && (filter & inputMasks->deliverableEvents[mskidx])) + /* XI events */ + if (mask & XI_MASK) { - - if (inputMasks && (inputMasks->inputEvents[mskidx] & filter)) + rc = EventToXI(event, &xE, &count); + if (rc == Success && + XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, xE, count) == Success) { + filter = GetEventFilter(dev, xE); FixUpEventFromWindow(dev, xE, pWin, child, FALSE); deliveries = DeliverEventsToWindow(dev, pWin, xE, count, - filter, grab, mskidx); + filter, grab); if (deliveries > 0) - return deliveries; - } + goto unwind; + } else if (rc != BadMatch) + ErrorF("[dix] %s: XI conversion failed in DDE (%d, %d). Skipping delivery.\n", + dev->name, event->any.type, rc); } - if ((deliveries < 0) || (pWin == stopAt) || - (inputMasks && (filter & inputMasks->dontPropagateMask[mskidx]))) - return 0; - } else - { - core = *xE; - core.u.u.type = XItoCoreType(xE->u.u.type); - - if (core.u.u.type && filter & pWin->deliverableEvents) + /* Core event */ + if ((mask & CORE_MASK) && IsMaster(dev) && dev->coreEvents) { - if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter) + rc = EventToCore(event, &core); + if (rc == Success && + XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, &core, 1) == Success) { + filter = GetEventFilter(dev, &core); FixUpEventFromWindow(dev, &core, pWin, child, FALSE); deliveries = DeliverEventsToWindow(dev, pWin, &core, 1, - filter, grab, 0); + filter, grab); if (deliveries > 0) - return deliveries; - } + goto unwind; + } else if (rc != BadMatch) + ErrorF("[dix] %s: Core conversion failed in DDE (%d, %d).\n", + dev->name, event->any.type, rc); } if ((deliveries < 0) || (pWin == stopAt) || - (filter & wDontPropagateMask(pWin))) - return 0; + (mask & DONT_PROPAGATE_MASK)) + { + deliveries = 0; + goto unwind; + } } child = pWin->drawable.id; pWin = pWin->parent; } - return 0; +unwind: + xfree(xE); + return deliveries; } +#undef XI_MASK +#undef CORE_MASK +#undef DONT_PROPAGATE_MASK + /** * Deliver event to a window and it's immediate parent. Used for most window * events (CreateNotify, ConfigureNotify, etc.). Not useful for events that @@ -2415,12 +2562,13 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, * @param count number of events in xE. * @param otherParent Used for ReparentNotify events. */ -_X_EXPORT int +int DeliverEvents(WindowPtr pWin, xEvent *xE, int count, WindowPtr otherParent) { Mask filter; int deliveries; + DeviceIntRec dummy; #ifdef PANORAMIX if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) @@ -2429,27 +2577,26 @@ DeliverEvents(WindowPtr pWin, xEvent *xE, int count, if (!count) return 0; - /* We don't know a device here. However, this should only ever be called - for a non-device event so we are safe to use 0*/ - filter = filters[0][xE->u.u.type]; + + dummy.id = XIAllDevices; + filter = GetEventFilter(&dummy, xE); if ((filter & SubstructureNotifyMask) && (xE->u.u.type != CreateNotify)) xE->u.destroyNotify.event = pWin->drawable.id; if (filter != StructureAndSubMask) - return DeliverEventsToWindow(inputInfo.pointer, pWin, xE, count, filter, NullGrab, 0); - deliveries = DeliverEventsToWindow(inputInfo.pointer, pWin, xE, count, StructureNotifyMask, - NullGrab, 0); + return DeliverEventsToWindow(&dummy, pWin, xE, count, filter, NullGrab); + deliveries = DeliverEventsToWindow(&dummy, pWin, xE, count, + StructureNotifyMask, NullGrab); if (pWin->parent) { xE->u.destroyNotify.event = pWin->parent->drawable.id; - deliveries += DeliverEventsToWindow(inputInfo.pointer, pWin->parent, xE, count, - SubstructureNotifyMask, NullGrab, - 0); + deliveries += DeliverEventsToWindow(&dummy, pWin->parent, xE, count, + SubstructureNotifyMask, NullGrab); if (xE->u.u.type == ReparentNotify) { xE->u.destroyNotify.event = otherParent->drawable.id; - deliveries += DeliverEventsToWindow(inputInfo.pointer, + deliveries += DeliverEventsToWindow(&dummy, otherParent, xE, count, SubstructureNotifyMask, - NullGrab, 0); + NullGrab); } } return deliveries; @@ -2547,6 +2694,85 @@ XYToWindow(DeviceIntPtr pDev, int x, int y) return pSprite->spriteTrace[pSprite->spriteTraceGood-1]; } +/** + * Ungrab a currently FocusIn grabbed device and grab the device on the + * given window. If the win given is the NoneWin, the device is ungrabbed if + * applicable and FALSE is returned. + * + * @returns TRUE if the device has been grabbed, or FALSE otherwise. + */ +BOOL +ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) +{ + BOOL rc = FALSE; + DeviceEvent event; + + if (dev->deviceGrab.grab && + dev->deviceGrab.fromPassiveGrab && + dev->deviceGrab.grab->type == XI_Enter) + { + if (dev->deviceGrab.grab->window == win || + IsParent(dev->deviceGrab.grab->window, win)) + return FALSE; + DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab); + (*dev->deviceGrab.DeactivateGrab)(dev); + } + + if (win == NoneWin || win == PointerRootWin) + return FALSE; + + memset(&event, 0, sizeof(DeviceEvent)); + event.header = ET_Internal; + event.type = ET_FocusIn; + event.length = sizeof(DeviceEvent); + event.time = GetTimeInMillis(); + event.deviceid = dev->id; + event.sourceid = dev->id; + event.detail.button = 0; + rc = CheckPassiveGrabsOnWindow(win, dev, &event, FALSE); + if (rc) + DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab); + return rc; +} + +/** + * Ungrab a currently Enter grabbed device and grab the device for the given + * window. + * + * @returns TRUE if the device has been grabbed, or FALSE otherwise. + */ +static BOOL +ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) +{ + BOOL rc = FALSE; + DeviceEvent event; + + if (dev->deviceGrab.grab && + dev->deviceGrab.fromPassiveGrab && + dev->deviceGrab.grab->type == XI_Enter) + { + if (dev->deviceGrab.grab->window == win || + IsParent(dev->deviceGrab.grab->window, win)) + return FALSE; + DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab); + (*dev->deviceGrab.DeactivateGrab)(dev); + } + + memset(&event, 0, sizeof(DeviceEvent)); + event.header = ET_Internal; + event.type = ET_Enter; + event.length = sizeof(DeviceEvent); + event.time = GetTimeInMillis(); + event.deviceid = dev->id; + event.sourceid = dev->id; + event.detail.button = 0; + rc = CheckPassiveGrabsOnWindow(win, dev, &event, FALSE); + if (rc) + DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab); + + return rc; +} + /** * Update the sprite coordinates based on the event. Update the cursor * position, then update the event with the new coordinates that may have been @@ -2559,51 +2785,53 @@ XYToWindow(DeviceIntPtr pDev, int x, int y) * @return TRUE if the sprite has moved or FALSE otherwise. */ Bool -CheckMotion(xEvent *xE, DeviceIntPtr pDev) +CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) { - INT16 *rootX, *rootY; - WindowPtr prevSpriteWin; + WindowPtr prevSpriteWin, newSpriteWin; SpritePtr pSprite = pDev->spriteInfo->sprite; - prevSpriteWin = pSprite->win; + CHECKEVENT(ev); -#ifdef PANORAMIX - if(!noPanoramiXExtension) - return XineramaCheckMotion(xE, pDev); -#endif + prevSpriteWin = pSprite->win; - if (xE && !syncEvents.playingEvents) + if (ev && !syncEvents.playingEvents) { /* GetPointerEvents() guarantees that pointer events have the correct rootX/Y set already. */ - switch(xE->u.u.type) + switch (ev->type) { - case ButtonPress: - case ButtonRelease: - case MotionNotify: - rootX = &XE_KBPTR.rootX; - rootY = &XE_KBPTR.rootY; + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_Motion: break; default: - if (xE->u.u.type == DeviceButtonPress || - xE->u.u.type == DeviceButtonRelease || - xE->u.u.type == DeviceMotionNotify) - { - rootX = &((deviceKeyButtonPointer*)xE)->root_x; - rootY = &((deviceKeyButtonPointer*)xE)->root_y; - break; - } /* all other events return FALSE */ return FALSE; } - if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { - pSprite->hot.pScreen = pSprite->hotPhys.pScreen; - RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; + /* Motion events entering DIX get translated to Screen 0 + coordinates. Replayed events have already been + translated since they've entered DIX before */ + ev->root_x += panoramiXdataPtr[pSprite->screen->myNum].x - + panoramiXdataPtr[0].x; + ev->root_y += panoramiXdataPtr[pSprite->screen->myNum].y - + panoramiXdataPtr[0].y; + } else +#endif + { + if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) + { + pSprite->hot.pScreen = pSprite->hotPhys.pScreen; + RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; + } } - pSprite->hot.x = *rootX; - pSprite->hot.y = *rootY; + + pSprite->hot.x = ev->root_x; + pSprite->hot.y = ev->root_y; if (pSprite->hot.x < pSprite->physLimits.x1) pSprite->hot.x = pSprite->physLimits.x1; else if (pSprite->hot.x >= pSprite->physLimits.x2) @@ -2616,36 +2844,48 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); pSprite->hotPhys = pSprite->hot; - if ((pSprite->hotPhys.x != *rootX) || - (pSprite->hotPhys.y != *rootY)) + if ((pSprite->hotPhys.x != ev->root_x) || + (pSprite->hotPhys.y != ev->root_y)) { - (*pSprite->hotPhys.pScreen->SetCursorPosition)( - pDev, pSprite->hotPhys.pScreen, - pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); +#ifdef PANORAMIX + if (!noPanoramiXExtension) + { + XineramaSetCursorPosition( + pDev, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); + } else +#endif + { + (*pSprite->hotPhys.pScreen->SetCursorPosition)( + pDev, pSprite->hotPhys.pScreen, + pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); + } } - *rootX = pSprite->hot.x; - *rootY = pSprite->hot.y; + ev->root_x = pSprite->hot.x; + ev->root_y = pSprite->hot.y; } - pSprite->win = XYToWindow(pDev, pSprite->hot.x, pSprite->hot.y); -#ifdef notyet - if (!(pSprite->win->deliverableEvents & - Motion_Filter(pDev->button)) - !syncEvents.playingEvents) - { - /* XXX Do PointerNonInterestBox here */ - } -#endif - if (pSprite->win != prevSpriteWin) + newSpriteWin = XYToWindow(pDev, pSprite->hot.x, pSprite->hot.y); + + if (newSpriteWin != prevSpriteWin) { + int sourceid; + if (!ev) { + UpdateCurrentTimeIf(); + sourceid = pDev->id; /* when from WindowsRestructured */ + } else + sourceid = ev->sourceid; + if (prevSpriteWin != NullWindow) { - if (!xE) - UpdateCurrentTimeIf(); - DoEnterLeaveEvents(pDev, prevSpriteWin, pSprite->win, - NotifyNormal); + if (!ActivateEnterGrab(pDev, prevSpriteWin, newSpriteWin)) + DoEnterLeaveEvents(pDev, sourceid, prevSpriteWin, + newSpriteWin, NotifyNormal); } - PostNewCursor(pDev); + /* set pSprite->win after ActivateEnterGrab, otherwise + sprite window == grab_window and no enter/leave events are + sent. */ + pSprite->win = newSpriteWin; + PostNewCursor(pDev); return FALSE; } return TRUE; @@ -2661,7 +2901,7 @@ WindowsRestructured(void) DeviceIntPtr pDev = inputInfo.devices; while(pDev) { - if (pDev->isMaster || !pDev->u.master) + if (IsMaster(pDev) || !pDev->u.master) CheckMotion(NULL, pDev); pDev = pDev->next; } @@ -2721,17 +2961,6 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) } #endif -/** - * Called from main() with the root window on the first screen. Used to do a - * lot more when MPX wasn't around yet. Things change. - * - * Should delete this now? -ds - */ -void -DefineInitialRootWindow(WindowPtr win) -{ -} - /** * Initialize a sprite for the given device and set it to some sane values. If * the device already has a sprite alloc'd, don't realloc but just reset to @@ -2925,7 +3154,7 @@ WindowHasNewCursor(WindowPtr pWin) PostNewCursor(pDev); } -_X_EXPORT void +void NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) { SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -3090,22 +3319,22 @@ ProcWarpPointer(ClientPtr client) WindowPtr dest = NULL; int x, y, rc; ScreenPtr newScreen; - DeviceIntPtr dev; + DeviceIntPtr dev, tmp; SpritePtr pSprite; REQUEST(xWarpPointerReq); REQUEST_SIZE_MATCH(xWarpPointerReq); - /* XXX XACE ??*/ - for (dev = inputInfo.devices; dev; dev = dev->next) { - if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { + dev = PickPointer(client); + + for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { + if ((tmp == dev) || (!IsMaster(tmp) && tmp->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixWriteAccess); if (rc != Success) return rc; } } - dev = PickPointer(client); if (dev->u.lastSlave) dev = dev->u.lastSlave; pSprite = dev->spriteInfo->sprite; @@ -3213,113 +3442,130 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) * * @param pWin The window that may be subject to a passive grab. * @param device Device that caused the event. - * @param xE List of events (multiple ones for DeviceMotionNotify) - * @param count number of elements in xE. - * @param store The event that will be stored on the device (always XI) - * @param scount number of elements in store. + * @param event The current device event. + * @param checkCore Check for core grabs too. */ static Bool CheckPassiveGrabsOnWindow( WindowPtr pWin, DeviceIntPtr device, - xEvent *xE, - int count, - xEvent *store, - int scount) + DeviceEvent *event, + BOOL checkCore) { GrabPtr grab = wPassiveGrabs(pWin); GrabRec tempGrab; GrabInfoPtr grabinfo; - xEvent *dxE; +#define CORE_MATCH 0x1 +#define XI_MATCH 0x2 +#define XI2_MATCH 0x4 + int match = 0; + + if (device->deviceGrab.grab) + return FALSE; if (!grab) return FALSE; + /* Fill out the grab details, but leave the type for later before + * comparing */ tempGrab.window = pWin; tempGrab.device = device; - tempGrab.type = xE->u.u.type; - tempGrab.detail.exact = xE->u.u.detail; + tempGrab.detail.exact = event->detail.key; tempGrab.detail.pMask = NULL; tempGrab.modifiersDetail.pMask = NULL; tempGrab.next = NULL; for (; grab; grab = grab->next) { -#ifdef XKB DeviceIntPtr gdev; XkbSrvInfoPtr xkbi = NULL; + Mask mask = 0; gdev= grab->modifierDevice; - if (grab->coreGrab) + if (grab->grabtype == GRABTYPE_CORE) { if (IsPointerDevice(device)) gdev = GetPairedDevice(device); else gdev = device; + } else if (grab->grabtype == GRABTYPE_XI2) + { + /* if the device is an attached slave device, gdev must be the + * attached master keyboard. Since the slave may have been + * reattached after the grab, the modifier device may not be the + * same. */ + if (!IsMaster(grab->device) && device->u.master) + gdev = GetMaster(device, MASTER_KEYBOARD); } + + if (gdev && gdev->key) xkbi= gdev->key->xkbInfo; -#endif tempGrab.modifierDevice = grab->modifierDevice; - if ((device == grab->modifierDevice) && - ((xE->u.u.type == KeyPress) || (xE->u.u.type == DeviceKeyPress))) - tempGrab.modifiersDetail.exact = -#ifdef XKB - (noXkbExtension) ? - ((gdev) ? gdev->key->prev_state : 0) : - ((xkbi) ? xkbi->state.grab_mods : 0); -#else - (gdev) ? gdev->key->prev_state : 0; -#endif - else - tempGrab.modifiersDetail.exact = -#ifdef XKB - (noXkbExtension) ? - ((gdev) ? gdev->key->state : 0) : - ((xkbi) ? xkbi->state.grab_mods : 0); -#else - (gdev) ? gdev->key->state : 0; -#endif - /* ignore the device for core events when comparing grabs */ - if (GrabMatchesSecond(&tempGrab, grab, (xE->u.u.type < LASTEvent)) && - (!grab->confineTo || + tempGrab.modifiersDetail.exact = xkbi ? xkbi->state.grab_mods : 0; + + /* Check for XI2 and XI grabs first */ + tempGrab.type = GetXI2Type((InternalEvent*)event); + tempGrab.grabtype = GRABTYPE_XI2; + if (GrabMatchesSecond(&tempGrab, grab, FALSE)) + match = XI2_MATCH; + + tempGrab.detail.exact = event->detail.key; + if (!match) + { + tempGrab.type = GetXIType((InternalEvent*)event); + tempGrab.grabtype = GRABTYPE_XI; + if (GrabMatchesSecond(&tempGrab, grab, FALSE)) + match = XI_MATCH; + } + + /* Check for a core grab (ignore the device when comparing) */ + if (!match && checkCore) + { + tempGrab.grabtype = GRABTYPE_CORE; + if ((tempGrab.type = GetCoreType((InternalEvent*)event)) && + (GrabMatchesSecond(&tempGrab, grab, TRUE))) + match = CORE_MATCH; + } + + if (match && (!grab->confineTo || (grab->confineTo->realized && BorderSizeNotEmpty(device, grab->confineTo)))) { -#ifdef XKB - if (!noXkbExtension) { - XE_KBPTR.state &= 0x1f00; - XE_KBPTR.state |= - tempGrab.modifiersDetail.exact&(~0x1f00); - } -#endif - grabinfo = &device->deviceGrab; - /* A passive grab may have been created for a different device - than it is assigned to at this point in time. - Update the grab's device and modifier device to reflect the - current state. - Since XGrabDeviceButton requires to specify the - modifierDevice explicitly, we don't override this choice. - */ - if (xE->u.u.type < LASTEvent) - { - grab->device = device; - grab->modifierDevice = GetPairedDevice(device); - } + int rc, count = 0; + xEvent *xE = NULL; + xEvent core; + event->corestate &= 0x1f00; + event->corestate |= tempGrab.modifiersDetail.exact & (~0x1f00); + grabinfo = &device->deviceGrab; /* In some cases a passive core grab may exist, but the client * already has a core grab on some other device. In this case we * must not get the grab, otherwise we may never ungrab the * device. */ - if (grab->coreGrab) + if (grab->grabtype == GRABTYPE_CORE) { DeviceIntPtr other; BOOL interfering = FALSE; + + /* A passive grab may have been created for a different device + than it is assigned to at this point in time. + Update the grab's device and modifier device to reflect the + current state. + Since XGrabDeviceButton requires to specify the + modifierDevice explicitly, we don't override this choice. + */ + if (tempGrab.type < GenericEvent) + { + grab->device = device; + grab->modifierDevice = GetPairedDevice(device); + } + for (other = inputInfo.devices; other; other = other->next) { GrabPtr othergrab = other->deviceGrab.grab; - if (othergrab && othergrab->coreGrab && + if (othergrab && othergrab->grabtype == GRABTYPE_CORE && SameClient(grab, rClient(othergrab)) && ((IsPointerDevice(grab->device) && IsPointerDevice(othergrab->device)) || @@ -3335,31 +3581,80 @@ CheckPassiveGrabsOnWindow( } + if (match & CORE_MATCH) + { + rc = EventToCore((InternalEvent*)event, &core); + if (rc != Success) + { + if (rc != BadMatch) + ErrorF("[dix] %s: core conversion failed in CPGFW " + "(%d, %d).\n", device->name, event->type, rc); + continue; + } + xE = &core; + count = 1; + mask = grab->eventMask; + } else if (match & XI2_MATCH) + { + rc = EventToXI2((InternalEvent*)event, &xE); + if (rc != Success) + { + if (rc != BadMatch) + ErrorF("[dix] %s: XI2 conversion failed in CPGFW " + "(%d, %d).\n", device->name, event->type, rc); + continue; + } + count = 1; + + /* FIXME: EventToXI2 returns NULL for enter events, so + * dereferencing the event is bad. Internal event types are + * aligned with core events, so the else clause is valid. + * long-term we should use internal events for enter/focus + * as well */ + if (xE) + mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8]; + else if (event->type == XI_Enter || event->type == XI_FocusIn) + mask = grab->xi2mask[device->id][event->type/8]; + } else + { + rc = EventToXI((InternalEvent*)event, &xE, &count); + if (rc != Success) + { + if (rc != BadMatch) + ErrorF("[dix] %s: XI conversion failed in CPGFW " + "(%d, %d).\n", device->name, event->type, rc); + continue; + } + mask = grab->eventMask; + } + (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); - FixUpEventFromWindow(device, xE, grab->window, None, TRUE); + if (xE) + { + FixUpEventFromWindow(device, xE, grab->window, None, TRUE); - (void) TryClientEvents(rClient(grab), device, xE, count, - filters[device->id][xE->u.u.type], - filters[device->id][xE->u.u.type], grab); + TryClientEvents(rClient(grab), device, xE, count, mask, + GetEventFilter(device, xE), grab); + } if (grabinfo->sync.state == FROZEN_NO_EVENT) { - if (grabinfo->sync.evcount < scount) - { - grabinfo->sync.event = xrealloc(grabinfo->sync.event, - scount * sizeof(xEvent)); - } - grabinfo->sync.evcount = scount; - /* we always store the XI event, never the core event */ - for (dxE = grabinfo->sync.event; --scount >= 0; dxE++, store++) - *dxE = *store; + if (!grabinfo->sync.event) + grabinfo->sync.event = xcalloc(1, sizeof(InternalEvent)); + *grabinfo->sync.event = *event; grabinfo->sync.state = FROZEN_WITH_EVENT; } + + if (match & (XI_MATCH | XI2_MATCH)) + xfree(xE); /* on core match xE == &core */ return TRUE; } } return FALSE; +#undef CORE_MATCH +#undef XI_MATCH +#undef XI2_MATCH } /** @@ -3389,33 +3684,20 @@ CheckPassiveGrabsOnWindow( */ Bool -CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, - int checkFirst, int count) +CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, int checkFirst) { int i; WindowPtr pWin = NULL; - FocusClassPtr focus = IsPointerEvent(xE) ? NULL : device->focus; - xEvent core; - BOOL sendCore = (device->isMaster && device->coreEvents); + FocusClassPtr focus = IsPointerEvent((InternalEvent*)event) ? NULL : device->focus; + BOOL sendCore = (IsMaster(device) && device->coreEvents); - if ((xE->u.u.type == DeviceButtonPress) - && (device->button->buttonsDown != 1)) - return FALSE; - - if (xE->u.u.type < EXTENSION_EVENT_BASE) - { - ErrorF("[dix] Core event passed into CheckDeviceGrabs.\n"); + if (event->type != ET_ButtonPress && + event->type != ET_KeyPress) return FALSE; - } - - if (sendCore) - { - core = *xE; - core.u.u.type = XItoCoreType(xE->u.u.type); - if(!core.u.u.type) /* probably a Proximity event, can't grab for those */ - return FALSE; - } + if (event->type == ET_ButtonPress + && (device->button->buttonsDown != 1)) + return FALSE; i = checkFirst; @@ -3424,11 +3706,8 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, for (; i < focus->traceGood; i++) { pWin = focus->trace[i]; - /* XI grabs have precendence */ if (pWin->optional && - (CheckPassiveGrabsOnWindow(pWin, device, xE, count, xE, count) - || (sendCore && CheckPassiveGrabsOnWindow(pWin, device, &core, - 1, xE, count)))) + CheckPassiveGrabsOnWindow(pWin, device, event, sendCore)) return TRUE; } @@ -3443,9 +3722,7 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, { pWin = device->spriteInfo->sprite->spriteTrace[i]; if (pWin->optional && - (CheckPassiveGrabsOnWindow(pWin, device, xE, count, xE, count) || - (sendCore && CheckPassiveGrabsOnWindow(pWin, device, &core, 1, - xE, count)))) + CheckPassiveGrabsOnWindow(pWin, device, event, sendCore)) return TRUE; } @@ -3454,21 +3731,24 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, /** * Called for keyboard events to deliver event to whatever client owns the - * focus. Event is delivered to the keyboard's focus window, the root window - * or to the window owning the input focus. + * focus. + * + * The event is delivered to the keyboard's focus window, the root window or + * to the window owning the input focus. * * @param keybd The keyboard originating the event. - * @param xE The event list. + * @param event The event, not yet in wire format. * @param window Window underneath the sprite. - * @param count number of events in xE. */ void -DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) +DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window) { - DeviceIntPtr pointer; + DeviceIntPtr ptr; WindowPtr focus = keybd->focus->win; - BOOL sendCore = (keybd->isMaster && keybd->coreEvents); + BOOL sendCore = (IsMaster(keybd) && keybd->coreEvents); xEvent core; + xEvent *xE = NULL, *xi2 = NULL; + int count, rc; int deliveries = 0; if (focus == FollowKeyboardWin) @@ -3477,40 +3757,69 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) return; if (focus == PointerRootWin) { - DeliverDeviceEvents(window, xE, NullGrab, NullWindow, keybd, count); + DeliverDeviceEvents(window, event, NullGrab, NullWindow, keybd); return; } if ((focus == window) || IsParent(focus, window)) { - if (DeliverDeviceEvents(window, xE, NullGrab, focus, keybd, count)) + if (DeliverDeviceEvents(window, event, NullGrab, focus, keybd)) return; } - pointer = GetPairedDevice(keybd); - if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count)) - return; - - if (sendCore) - { - core = *xE; - core.u.u.type = XItoCoreType(xE->u.u.type); - } /* just deliver it to the focus window */ - FixUpEventFromWindow(pointer, xE, focus, None, FALSE); - deliveries = DeliverEventsToWindow(keybd, focus, xE, count, - filters[keybd->id][xE->u.u.type], - NullGrab, keybd->id); - - if (deliveries > 0) - return; + ptr = GetPairedDevice(keybd); + + + rc = EventToXI2(event, &xi2); + if (rc == Success) + { + /* XXX: XACE */ + int filter = GetEventFilter(keybd, xi2); + FixUpEventFromWindow(ptr, xi2, focus, None, FALSE); + deliveries = DeliverEventsToWindow(keybd, focus, xi2, 1, + filter, NullGrab); + if (deliveries > 0) + goto unwind; + } else if (rc != BadMatch) + ErrorF("[dix] %s: XI2 conversion failed in DFE (%d, %d). Skipping delivery.\n", + keybd->name, event->any.type, rc); + + rc = EventToXI(event, &xE, &count); + if (rc == Success && + XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count) == Success) + { + FixUpEventFromWindow(ptr, xE, focus, None, FALSE); + deliveries = DeliverEventsToWindow(keybd, focus, xE, count, + GetEventFilter(keybd, xE), + NullGrab); + + if (deliveries > 0) + goto unwind; + } else if (rc != BadMatch) + ErrorF("[dix] %s: XI conversion failed in DFE (%d, %d). Skipping delivery.\n", + keybd->name, event->any.type, rc); - if (sendCore && core.u.u.type) + if (sendCore) { - FixUpEventFromWindow(keybd, &core, focus, None, FALSE); - deliveries = DeliverEventsToWindow(keybd, focus, &core, 1, - filters[keybd->id][xE->u.u.type], - NullGrab, 0); - } + rc = EventToCore(event, &core); + if (rc == Success && + XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, &core, 1) == Success) + { + FixUpEventFromWindow(keybd, &core, focus, None, FALSE); + deliveries = DeliverEventsToWindow(keybd, focus, &core, 1, + GetEventFilter(keybd, &core), + NullGrab); + } else if (rc != BadMatch) + ErrorF("[dix] %s: core conversion failed DFE (%d, %d). Skipping delivery.\n", + keybd->name, event->any.type, rc); + } + +unwind: + if (xE) + xfree(xE); + if (xi2) + xfree(xi2); + return; } /** @@ -3521,16 +3830,18 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) * @param deactivateGrab True if the device's grab should be deactivated. */ void -DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, - Bool deactivateGrab, int count) +DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, + Bool deactivateGrab) { GrabPtr grab; GrabInfoPtr grabinfo; int deliveries = 0; DeviceIntPtr dev; - xEvent *dxE, core; SpritePtr pSprite = thisDev->spriteInfo->sprite; BOOL sendCore = FALSE; + int rc, count = 0; + xEvent *xi = NULL; + xEvent *xi2 = NULL; grabinfo = &thisDev->deviceGrab; grab = grabinfo->grab; @@ -3543,14 +3854,9 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, * for the type of event, to see if we really want to deliver it to * the focus window. For pointer events, the answer is no. */ - if (xE->u.u.type == DeviceButtonPress || - xE->u.u.type == DeviceButtonRelease || - xE->u.u.type == DeviceMotionNotify || - xE->u.u.type == ProximityIn || - xE->u.u.type == ProximityOut) - { + if (IsPointerEvent(event)) focus = PointerRootWin; - } else if (thisDev->focus) + else if (thisDev->focus) { focus = thisDev->focus->win; if (focus == FollowKeyboardWin) @@ -3559,75 +3865,112 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, else focus = PointerRootWin; if (focus == PointerRootWin) - deliveries = DeliverDeviceEvents(pSprite->win, xE, grab, - NullWindow, thisDev, count); + deliveries = DeliverDeviceEvents(pSprite->win, event, grab, + NullWindow, thisDev); else if (focus && (focus == pSprite->win || IsParent(focus, pSprite->win))) - deliveries = DeliverDeviceEvents(pSprite->win, xE, grab, focus, - thisDev, count); + deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus, + thisDev); else if (focus) - deliveries = DeliverDeviceEvents(focus, xE, grab, focus, - thisDev, count); + deliveries = DeliverDeviceEvents(focus, event, grab, focus, + thisDev); } if (!deliveries) { + Mask mask; + + /* XXX: In theory, we could pass the internal events through to + * everything and only convert just before hitting the wire. We can't + * do that yet, so DGE is the last stop for internal events. From here + * onwards, we deal with core/XI events. + */ + + mask = grab->eventMask; + + sendCore = (IsMaster(thisDev) && thisDev->coreEvents); + /* try core event */ + if (sendCore && grab->grabtype == GRABTYPE_CORE) { - Mask mask = grab->eventMask; + xEvent core; - if (thisDev->isMaster) + rc = EventToCore(event, &core); + if (rc == Success) { - core = *xE; - core.u.u.type = XItoCoreType(xE->u.u.type); - if(core.u.u.type) { - FixUpEventFromWindow(thisDev, &core, grab->window, - None, TRUE); - if (XaceHook(XACE_SEND_ACCESS, 0, thisDev, - grab->window, &core, 1) || - XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), - grab->window, &core, 1)) - deliveries = 1; /* don't send, but pretend we did */ - else if (!IsInterferingGrab(rClient(grab), thisDev, - &core)) - { - deliveries = TryClientEvents(rClient(grab), thisDev, - &core, 1, mask, - filters[thisDev->id][core.u.u.type], - grab); - } + FixUpEventFromWindow(thisDev, &core, grab->window, + None, TRUE); + if (XaceHook(XACE_SEND_ACCESS, 0, thisDev, + grab->window, &core, 1) || + XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), + grab->window, &core, 1)) + deliveries = 1; /* don't send, but pretend we did */ + else if (!IsInterferingGrab(rClient(grab), thisDev, &core)) + { + deliveries = TryClientEvents(rClient(grab), thisDev, + &core, 1, mask, + GetEventFilter(thisDev, &core), + grab); } - } else + } else if (rc != BadMatch) + ErrorF("[dix] DeliverGrabbedEvent. Core conversion failed.\n"); + } + + if (!deliveries) + { + rc = EventToXI2(event, &xi2); + if (rc == Success) + { + int evtype = ((xGenericEvent*)xi2)->evtype; + mask = grab->xi2mask[XIAllDevices][evtype/8] | + grab->xi2mask[XIAllMasterDevices][evtype/8] | + grab->xi2mask[thisDev->id][evtype/8]; + /* try XI2 event */ + FixUpEventFromWindow(thisDev, xi2, grab->window, None, TRUE); + /* XXX: XACE */ + deliveries = TryClientEvents(rClient(grab), thisDev, xi2, 1, mask, + GetEventFilter(thisDev, xi2), grab); + } else if (rc != BadMatch) + ErrorF("[dix] %s: XI2 conversion failed in DGE (%d, %d). Skipping delivery.\n", + thisDev->name, event->any.type, rc); + } + + if (!deliveries) + { + rc = EventToXI(event, &xi, &count); + if (rc == Success) { /* try XI event */ if (grabinfo->fromPassiveGrab && - grabinfo->implicitGrab && - (xE->u.u.type & EXTENSION_EVENT_BASE)) + grabinfo->implicitGrab) mask = grab->deviceMask; - FixUpEventFromWindow(thisDev, xE, grab->window, + else + mask = grab->eventMask; + + FixUpEventFromWindow(thisDev, xi, grab->window, None, TRUE); if (XaceHook(XACE_SEND_ACCESS, 0, thisDev, - grab->window, xE, count) || + grab->window, xi, count) || XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), - grab->window, xE, count)) + grab->window, xi, count)) deliveries = 1; /* don't send, but pretend we did */ else { deliveries = TryClientEvents(rClient(grab), thisDev, - xE, count, + xi, count, mask, - filters[thisDev->id][xE->u.u.type], + GetEventFilter(thisDev, xi), grab); } - - } + } else if (rc != BadMatch) + ErrorF("[dix] %s: XI conversion failed in DGE (%d, %d). Skipping delivery.\n", + thisDev->name, event->any.type, rc); } - if (deliveries && (xE->u.u.type == MotionNotify - || xE->u.u.type == DeviceMotionNotify)) + + if (deliveries && (event->any.type == ET_Motion)) thisDev->valuator->motionHintWindow = grab->window; } - if (deliveries && !deactivateGrab && - (xE->u.u.type != MotionNotify && xE->u.u.type != DeviceMotionNotify)) + if (deliveries && !deactivateGrab && event->any.type != ET_Motion) { switch (grabinfo->sync.state) { @@ -3637,250 +3980,57 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, if (dev == thisDev) continue; FreezeThaw(dev, TRUE); - if ((grabinfo->sync.state == FREEZE_BOTH_NEXT_EVENT) && + if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) && (CLIENT_BITS(grab->resource) == - CLIENT_BITS(grab->resource))) - grabinfo->sync.state = FROZEN_NO_EVENT; + CLIENT_BITS(dev->deviceGrab.sync.other->resource))) + dev->deviceGrab.sync.state = FROZEN_NO_EVENT; else - grabinfo->sync.other = grab; + dev->deviceGrab.sync.other = grab; } /* fall through */ case FREEZE_NEXT_EVENT: grabinfo->sync.state = FROZEN_WITH_EVENT; FreezeThaw(thisDev, TRUE); - if (grabinfo->sync.evcount < count) - { - grabinfo->sync.event = xrealloc(grabinfo->sync.event, - count * sizeof(xEvent)); - } - grabinfo->sync.evcount = count; - for (dxE = grabinfo->sync.event; --count >= 0; dxE++, xE++) - *dxE = *xE; - break; - } - } -} - -/** - * Main keyboard event processing function for core keyboard events. - * Updates the events fields from the current pointer state and delivers the - * event. - * - * For key events, xE will always be a single event. - * - * @param xE Event list - * @param keybd The device that caused an event. - * @param count Number of elements in xE. - */ -void -#ifdef XKB -CoreProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count) -#else -ProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count) -#endif -{ - int key, bit; - BYTE *kptr; - CARD8 modifiers; - GrabPtr grab; - GrabInfoPtr grabinfo; - Bool deactivateGrab = FALSE; - KeyClassPtr keyc = keybd->key; - - grabinfo = &keybd->deviceGrab; - grab = grabinfo->grab; - - if (!syncEvents.playingEvents) - { - NoticeTime(xE); - if (DeviceEventCallback) - { - DeviceEventInfoRec eventinfo; - eventinfo.events = xE; - eventinfo.count = count; - CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); - } - } - /* ProcessOtherEvent already updated the keyboard's state, so we need to - * access prev_state here! */ - XE_KBPTR.state = (keyc->prev_state | GetPairedDevice(keybd)->button->state); - XE_KBPTR.rootX = keybd->spriteInfo->sprite->hot.x; - XE_KBPTR.rootY = keybd->spriteInfo->sprite->hot.y; - key = xE->u.u.detail; - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); - modifiers = keyc->modifierMap[key]; - - switch (xE->u.u.type) - { - case KeyPress: - /* We MUST NOT change the device itself here. All device state - * changes must be performed in ProcessOtherEvents. We're dealing - * with the same device struct, so if we change it in POE and - * here, we've just screwed up the state by setting it twice. - * - * Devices may not send core events but always send XI events, so - * the state must be changed in POE, not here. - */ - if (!grab && CheckDeviceGrabs(keybd, xE, 0, count)) - { - grabinfo->activatingKey = key; - return; - } - break; - case KeyRelease: - if (!(*kptr & bit)) /* guard against duplicates */ - return; - /* No device state changes, see comment for KeyPress */ - if (grabinfo->fromPassiveGrab && (key == grabinfo->activatingKey)) - deactivateGrab = TRUE; + if (!grabinfo->sync.event) + grabinfo->sync.event = xcalloc(1, sizeof(InternalEvent)); + *grabinfo->sync.event = *(DeviceEvent*)event; break; - default: - FatalError("Impossible keyboard event"); + } } - if (grab) - DeliverGrabbedEvent(xE, keybd, deactivateGrab, count); - else - DeliverFocusedEvent(keybd, xE, keybd->spriteInfo->sprite->win, count); - if (deactivateGrab) - (*grabinfo->DeactivateGrab)(keybd); - XaceHook(XACE_KEY_AVAIL, xE, keybd, count); + if (xi) + xfree(xi); + if (xi2) + xfree(xi2); } -#ifdef XKB /* This function is used to set the key pressed or key released state - this is only used when the pressing of keys does not cause the device's processInputProc to be called, as in for example Mouse Keys. */ void -FixKeyState (xEvent *xE, DeviceIntPtr keybd) +FixKeyState (DeviceEvent *event, DeviceIntPtr keybd) { int key, bit; BYTE *kptr; KeyClassPtr keyc = keybd->key; - key = xE->u.u.detail; + key = event->detail.key; kptr = &keyc->down[key >> 3]; bit = 1 << (key & 7); - if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease)|| - (xE->u.u.type==DeviceKeyPress)||(xE->u.u.type==DeviceKeyRelease)) - ) { + if (event->type == ET_KeyPress) { DebugF("FixKeyState: Key %d %s\n",key, - (((xE->u.u.type==KeyPress)||(xE->u.u.type==DeviceKeyPress))?"down":"up")); + ((event->type == ET_KeyPress) ? "down" : "up")); } - if (xE->u.u.type == KeyPress || xE->u.u.type == DeviceKeyPress) + if (event->type == ET_KeyPress) *kptr |= bit; - else if (xE->u.u.type == KeyRelease || xE->u.u.type == DeviceKeyRelease) + else if (event->type == ET_KeyRelease) *kptr &= ~bit; else FatalError("Impossible keyboard event"); } -#endif - -/** - * Main pointer event processing function for core pointer events. - * For motion events: update the sprite. - * For all other events: Update the event fields based on the current sprite - * state. - * - * For core pointer events, xE will always be a single event. - * - * @param xE Event list - * @param mouse The device that caused an event. - * @param count Number of elements in xE. - */ -void -#ifdef XKB -CoreProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) -#else -ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) -#endif -{ - GrabPtr grab = mouse->deviceGrab.grab; - Bool deactivateGrab = FALSE; - ButtonClassPtr butc = mouse->button; - SpritePtr pSprite = mouse->spriteInfo->sprite; - -#ifdef XKB - XkbSrvInfoPtr xkbi= GetPairedDevice(mouse)->key->xkbInfo; -#endif - - if (!syncEvents.playingEvents) - NoticeTime(xE) - XE_KBPTR.state = (butc->state | ( -#ifdef XKB - (noXkbExtension ? - inputInfo.keyboard->key->state : - xkbi->state.grab_mods) -#else - inputInfo.keyboard->key->state -#endif - )); - { - NoticeTime(xE); - if (DeviceEventCallback) - { - DeviceEventInfoRec eventinfo; - /* see comment in EnqueueEvents regarding the next three lines */ - if (xE->u.u.type == MotionNotify) - XE_KBPTR.root = - WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; - eventinfo.events = xE; - eventinfo.count = count; - CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); - } - } - /* We need to call CheckMotion for each event. It doesn't really give us - any benefit for relative devices, but absolute devices may not send - button events to the right position otherwise. */ - if (!CheckMotion(xE, mouse) && xE->u.u.type == MotionNotify) - return; - if (xE->u.u.type != MotionNotify) - { - int key; - - XE_KBPTR.rootX = pSprite->hot.x; - XE_KBPTR.rootY = pSprite->hot.y; - - key = xE->u.u.detail; - switch (xE->u.u.type) - { - case ButtonPress: - /* - * We rely on the fact that ButtonMotionMask is the same as - * DeviceButtonMotionMask, so setting the motionMask - * to this value ensures correctness for both XI and core events. - */ - if (xE->u.u.detail == 0) - return; - filters[mouse->id][Motion_Filter(butc)] = MotionNotify; - if (!grab) - if (CheckDeviceGrabs(mouse, xE, 0, count)) - return; - break; - case ButtonRelease: - if (xE->u.u.detail == 0) - return; - filters[mouse->id][Motion_Filter(butc)] = MotionNotify; - if (!butc->buttonsDown && mouse->deviceGrab.fromPassiveGrab) - deactivateGrab = TRUE; - break; - default: - FatalError("bogus pointer event from ddx. Type %d\n", xE->u.u.type); - } - } - - if (grab) - DeliverGrabbedEvent(xE, mouse, deactivateGrab, count); - else - DeliverDeviceEvents(pSprite->win, xE, NullGrab, NullWindow, - mouse, count); - if (deactivateGrab) - (*mouse->deviceGrab.DeactivateGrab)(mouse); -} #define AtMostOneClient \ (SubstructureRedirectMask | ResizeRedirectMask | ButtonPressMask) @@ -3895,13 +4045,12 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) * The otherEventMasks on a WindowOptional is the combination of all event * masks set by all clients on the window. * deliverableEventMask is the combination of the eventMask and the - * otherEventMask. + * otherEventMask plus the events that may be propagated to the parent. * * Traverses to siblings and parents of the window. */ void -RecalculateDeliverableEvents(pWin) - WindowPtr pWin; +RecalculateDeliverableEvents(WindowPtr pWin) { OtherClients *others; WindowPtr pChild; @@ -4030,7 +4179,7 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) check = 0; if (!pWin->optional && !MakeWindowOptional (pWin)) return BadAlloc; - others = (OtherClients *) xalloc(sizeof(OtherClients)); + others = xalloc(sizeof(OtherClients)); if (!others) return BadAlloc; others->mask = mask; @@ -4144,6 +4293,7 @@ CoreEnterLeaveEvent( mask = pWin->eventMask | wOtherEventMasks(pWin); } + memset(&event, 0, sizeof(xEvent)); event.u.u.type = type; event.u.u.detail = detail; event.u.enterLeave.time = currentTime.milliseconds; @@ -4155,18 +4305,10 @@ CoreEnterLeaveEvent( event.u.enterLeave.child = child; event.u.enterLeave.flags = event.u.keyButtonPointer.sameScreen ? ELFlagSameScreen : 0; -#ifdef XKB - if (!noXkbExtension) { - event.u.enterLeave.state = mouse->button->state & 0x1f00; - if (keybd) - event.u.enterLeave.state |= + event.u.enterLeave.state = mouse->button ? (mouse->button->state & 0x1f00) : 0; + if (keybd) + event.u.enterLeave.state |= XkbGrabStateFromRec(&keybd->key->xkbInfo->state); - } else -#endif - { - event.u.enterLeave.state = (keybd) ? keybd->key->state : 0; - event.u.enterLeave.state |= mouse->button->state; - } event.u.enterLeave.mode = mode; focus = (keybd) ? keybd->focus->win : None; if ((focus != NoneWin) && @@ -4174,21 +4316,21 @@ CoreEnterLeaveEvent( IsParent(focus, pWin))) event.u.enterLeave.flags |= ELFlagFocus; - if ((mask & filters[mouse->id][type])) + if ((mask & GetEventFilter(mouse, &event))) { if (grab) TryClientEvents(rClient(grab), mouse, &event, 1, mask, - filters[mouse->id][type], grab); + GetEventFilter(mouse, &event), grab); else DeliverEventsToWindow(mouse, pWin, &event, 1, - filters[mouse->id][type], NullGrab, 0); + GetEventFilter(mouse, &event), + NullGrab); } if ((type == EnterNotify) && (mask & KeymapStateMask)) { xKeymapEvent ke; - ClientPtr client = grab ? rClient(grab) - : clients[CLIENT_ID(pWin->drawable.id)]; + ClientPtr client = grab ? rClient(grab) : wClient(pWin); if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess)) bzero((char *)&ke.map[0], 31); else @@ -4200,8 +4342,83 @@ CoreEnterLeaveEvent( mask, KeymapStateMask, grab); else DeliverEventsToWindow(mouse, pWin, (xEvent *)&ke, 1, - KeymapStateMask, NullGrab, 0); + KeymapStateMask, NullGrab); + } +} + +void +DeviceEnterLeaveEvent( + DeviceIntPtr mouse, + int sourceid, + int type, + int mode, + int detail, + WindowPtr pWin, + Window child) +{ + GrabPtr grab = mouse->deviceGrab.grab; + xXIEnterEvent *event; + int filter; + int btlen, len, i; + DeviceIntPtr kbd; + + if ((mode == XINotifyPassiveGrab && type == XI_Leave) || + (mode == XINotifyPassiveUngrab && type == XI_Enter)) + return; + + btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0; + btlen = bytes_to_int32(btlen); + len = sizeof(xXIEnterEvent) + btlen * 4; + + event = xcalloc(1, len); + event->type = GenericEvent; + event->extension = IReqCode; + event->evtype = type; + event->length = (len - sizeof(xEvent))/4; + event->buttons_len = btlen; + event->detail = detail; + event->time = currentTime.milliseconds; + event->deviceid = mouse->id; + event->sourceid = sourceid; + event->mode = mode; + event->root_x = FP1616(mouse->spriteInfo->sprite->hot.x, 0); + event->root_y = FP1616(mouse->spriteInfo->sprite->hot.y, 0); + + for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) + if (BitIsOn(mouse->button->down, i)) + SetBit(&event[1], i); + + kbd = (IsMaster(mouse) || mouse->u.master) ? GetPairedDevice(mouse) : NULL; + if (kbd && kbd->key) + { + event->mods.base_mods = kbd->key->xkbInfo->state.base_mods; + event->mods.latched_mods = kbd->key->xkbInfo->state.latched_mods; + event->mods.locked_mods = kbd->key->xkbInfo->state.locked_mods; + + event->group.base_group = kbd->key->xkbInfo->state.base_group; + event->group.latched_group = kbd->key->xkbInfo->state.latched_group; + event->group.locked_group = kbd->key->xkbInfo->state.locked_group; + } + + FixUpEventFromWindow(mouse, (xEvent*)event, pWin, None, FALSE); + + filter = GetEventFilter(mouse, (xEvent*)event); + + if (grab) + { + Mask mask; + mask = grab->xi2mask[XIAllDevices][type/8] | + grab->xi2mask[XIAllMasterDevices][type/8] | + grab->xi2mask[mouse->id][type/8]; + TryClientEvents(rClient(grab), mouse, (xEvent*)event, 1, mask, + filter, grab); + } else { + if (!GetWindowXI2Mask(mouse, pWin, (xEvent*)event)) + return; + DeliverEventsToWindow(mouse, pWin, (xEvent*)event, 1, filter, + NullGrab); } + xfree(event); } void @@ -4209,25 +4426,27 @@ CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) { xEvent event; + memset(&event, 0, sizeof(xEvent)); event.u.focus.mode = mode; event.u.u.type = type; event.u.u.detail = detail; event.u.focus.window = pWin->drawable.id; - (void)DeliverEventsToWindow(dev, pWin, &event, 1, - filters[dev->id][type], NullGrab, 0); + + DeliverEventsToWindow(dev, pWin, &event, 1, + GetEventFilter(dev, &event), NullGrab); if ((type == FocusIn) && ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask)) { xKeymapEvent ke; - ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)]; + ClientPtr client = wClient(pWin); if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess)) bzero((char *)&ke.map[0], 31); else memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); ke.type = KeymapNotify; - (void)DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1, - KeymapStateMask, NullGrab, 0); + DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1, + KeymapStateMask, NullGrab); } } @@ -4305,9 +4524,14 @@ SetInputFocus( return Success; mode = (dev->deviceGrab.grab) ? NotifyWhileGrabbed : NotifyNormal; if (focus->win == FollowKeyboardWin) - DoFocusEvents(dev, keybd->focus->win, focusWin, mode); - else - DoFocusEvents(dev, focus->win, focusWin, mode); + { + if (!ActivateFocusInGrab(dev, keybd->focus->win, focusWin)) + DoFocusEvents(dev, keybd->focus->win, focusWin, mode); + } else + { + if (!ActivateFocusInGrab(dev, focus->win, focusWin)) + DoFocusEvents(dev, focus->win, focusWin, mode); + } focus->time = time; focus->revert = revertTo; if (focusID == FollowKeyboard) @@ -4341,8 +4565,7 @@ SetInputFocus( * Sets the input focus for the virtual core keyboard. */ int -ProcSetInputFocus(client) - ClientPtr client; +ProcSetInputFocus(ClientPtr client) { DeviceIntPtr kbd = PickKeyboard(client); REQUEST(xSetInputFocusReq); @@ -4373,6 +4596,7 @@ ProcGetInputFocus(ClientPtr client) if (rc != Success) return rc; + memset(&rep, 0, sizeof(xGetInputFocusReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -4398,40 +4622,22 @@ ProcGrabPointer(ClientPtr client) xGrabPointerReply rep; DeviceIntPtr device = PickPointer(client); GrabPtr grab; - WindowPtr pWin, confineTo; - CursorPtr cursor, oldCursor; + GrabMask mask; + WindowPtr confineTo; + CursorPtr oldCursor; REQUEST(xGrabPointerReq); TimeStamp time; - Mask access_mode = DixGrabAccess; int rc; REQUEST_SIZE_MATCH(xGrabPointerReq); UpdateCurrentTime(); - if ((stuff->pointerMode != GrabModeSync) && - (stuff->pointerMode != GrabModeAsync)) - { - client->errorValue = stuff->pointerMode; - return BadValue; - } - if ((stuff->keyboardMode != GrabModeSync) && - (stuff->keyboardMode != GrabModeAsync)) - { - client->errorValue = stuff->keyboardMode; - return BadValue; - } - if ((stuff->ownerEvents != xFalse) && (stuff->ownerEvents != xTrue)) - { - client->errorValue = stuff->ownerEvents; - return BadValue; - } + if (stuff->eventMask & ~PointerGrabMask) { client->errorValue = stuff->eventMask; return BadValue; } - rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); - if (rc != Success) - return rc; + if (stuff->confineTo == None) confineTo = NullWindow; else @@ -4441,81 +4647,34 @@ ProcGrabPointer(ClientPtr client) if (rc != Success) return rc; } - if (stuff->cursor == None) - cursor = NullCursor; - else + + memset(&rep, 0, sizeof(xGrabPointerReply)); + oldCursor = NullCursor; + grab = device->deviceGrab.grab; + + if (grab) { - rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor, RT_CURSOR, - client, DixUseAccess); - if (rc != Success) - { - client->errorValue = stuff->cursor; - return (rc == BadValue) ? BadCursor : rc; - } - access_mode |= DixForceAccess; + if (grab->confineTo && !confineTo) + ConfineCursorToWindow(device, RootWindow(device), FALSE, FALSE); + oldCursor = grab->cursor; } - if (stuff->pointerMode == GrabModeSync || - stuff->keyboardMode == GrabModeSync) - access_mode |= DixFreezeAccess; - rc = XaceHook(XACE_DEVICE_ACCESS, client, device, access_mode); + + mask.core = stuff->eventMask; + + rc = GrabDevice(client, device, stuff->pointerMode, stuff->keyboardMode, + stuff->grabWindow, stuff->ownerEvents, stuff->time, + &mask, GRABTYPE_CORE, stuff->cursor, + stuff->confineTo, &rep.status); if (rc != Success) - return rc; + return rc; + + if (oldCursor && rep.status == GrabSuccess) + FreeCursor (oldCursor, (Cursor)0); - /* at this point, some sort of reply is guaranteed. */ time = ClientTimeToServerTime(stuff->time); rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - - grab = device->deviceGrab.grab; - /* check for - 1. other client has a grab on the device already. - 2. window is viewable - 3. other client has this device as frozen "other" device - 4. times are screwed. - */ - if ((grab) && !SameClient(grab, client)) - rep.status = AlreadyGrabbed; - else if ((!pWin->realized) || - (confineTo && - !(confineTo->realized - && BorderSizeNotEmpty(device, confineTo)))) - rep.status = GrabNotViewable; - else if (device->deviceGrab.sync.frozen && - device->deviceGrab.sync.other && - !SameClient(device->deviceGrab.sync.other, client)) - rep.status = GrabFrozen; - else if ((CompareTimeStamps(time, currentTime) == LATER) || - (CompareTimeStamps(time, device->deviceGrab.grabTime) == EARLIER)) - rep.status = GrabInvalidTime; - else - { - GrabRec tempGrab; - - oldCursor = NullCursor; - if (grab) - { - if (grab->confineTo && !confineTo) - ConfineCursorToWindow(device, RootWindow(device), FALSE, FALSE); - oldCursor = grab->cursor; - } - tempGrab.next = NULL; - tempGrab.cursor = cursor; - tempGrab.resource = client->clientAsMask; - tempGrab.ownerEvents = stuff->ownerEvents; - tempGrab.eventMask = stuff->eventMask; - tempGrab.confineTo = confineTo; - tempGrab.window = pWin; - tempGrab.keyboardMode = stuff->keyboardMode; - tempGrab.pointerMode = stuff->pointerMode; - tempGrab.device = device; - tempGrab.coreGrab = True; - tempGrab.genericMasks = NULL; - (*device->deviceGrab.ActivateGrab)(device, &tempGrab, time, FALSE); - if (oldCursor) - FreeCursor (oldCursor, (Cursor)0); - rep.status = GrabSuccess; - } WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep); return Success; } @@ -4621,26 +4780,27 @@ ProcUngrabPointer(ClientPtr client) */ int GrabDevice(ClientPtr client, DeviceIntPtr dev, - unsigned this_mode, unsigned other_mode, Window grabWindow, - unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status, - Bool coreGrab) + unsigned pointer_mode, unsigned keyboard_mode, Window grabWindow, + unsigned ownerEvents, Time ctime, GrabMask *mask, + int grabtype, Cursor curs, Window confineToWin, CARD8 *status) { - WindowPtr pWin; + WindowPtr pWin, confineTo; GrabPtr grab; TimeStamp time; Mask access_mode = DixGrabAccess; int rc; GrabInfoPtr grabInfo = &dev->deviceGrab; + CursorPtr cursor; UpdateCurrentTime(); - if ((this_mode != GrabModeSync) && (this_mode != GrabModeAsync)) + if ((keyboard_mode != GrabModeSync) && (keyboard_mode != GrabModeAsync)) { - client->errorValue = this_mode; + client->errorValue = keyboard_mode; return BadValue; } - if ((other_mode != GrabModeSync) && (other_mode != GrabModeAsync)) + if ((pointer_mode != GrabModeSync) && (pointer_mode != GrabModeAsync)) { - client->errorValue = other_mode; + client->errorValue = pointer_mode; return BadValue; } if ((ownerEvents != xFalse) && (ownerEvents != xTrue)) @@ -4652,7 +4812,32 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; - if (this_mode == GrabModeSync || other_mode == GrabModeSync) + + if (confineToWin == None) + confineTo = NullWindow; + else + { + rc = dixLookupWindow(&confineTo, confineToWin, client, + DixSetAttrAccess); + if (rc != Success) + return rc; + } + + if (curs == None) + cursor = NullCursor; + else + { + rc = dixLookupResourceByType((pointer *)&cursor, curs, RT_CURSOR, + client, DixUseAccess); + if (rc != Success) + { + client->errorValue = curs; + return (rc == BadValue) ? BadCursor : rc; + } + access_mode |= DixForceAccess; + } + + if (keyboard_mode == GrabModeSync || pointer_mode == GrabModeSync) access_mode |= DixFreezeAccess; rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); if (rc != Success) @@ -4660,9 +4845,14 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, time = ClientTimeToServerTime(ctime); grab = grabInfo->grab; + if (grab && grab->grabtype != grabtype) + *status = AlreadyGrabbed; if (grab && !SameClient(grab, client)) *status = AlreadyGrabbed; - else if (!pWin->realized) + else if ((!pWin->realized) || + (confineTo && + !(confineTo->realized + && BorderSizeNotEmpty(dev, confineTo)))) *status = GrabNotViewable; else if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, grabInfo->grabTime) == EARLIER)) @@ -4681,14 +4871,18 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, tempGrab.window = pWin; tempGrab.resource = client->clientAsMask; tempGrab.ownerEvents = ownerEvents; - tempGrab.keyboardMode = this_mode; - tempGrab.pointerMode = other_mode; - tempGrab.eventMask = mask; + tempGrab.keyboardMode = keyboard_mode; + tempGrab.pointerMode = pointer_mode; + if (grabtype == GRABTYPE_CORE) + tempGrab.eventMask = mask->core; + else if (grabtype == GRABTYPE_XI) + tempGrab.eventMask = mask->xi; + else + memcpy(tempGrab.xi2mask, mask->xi2mask, sizeof(tempGrab.xi2mask)); tempGrab.device = dev; - tempGrab.cursor = NULL; - tempGrab.coreGrab = coreGrab; - tempGrab.genericMasks = NULL; - + tempGrab.cursor = cursor; + tempGrab.confineTo = confineTo; + tempGrab.grabtype = grabtype; (*grabInfo->ActivateGrab)(dev, &tempGrab, time, FALSE); *status = GrabSuccess; } @@ -4707,13 +4901,17 @@ ProcGrabKeyboard(ClientPtr client) REQUEST(xGrabKeyboardReq); int result; DeviceIntPtr keyboard = PickKeyboard(client); + GrabMask mask; REQUEST_SIZE_MATCH(xGrabKeyboardReq); - result = GrabDevice(client, keyboard, stuff->keyboardMode, - stuff->pointerMode, stuff->grabWindow, - stuff->ownerEvents, stuff->time, - KeyPressMask | KeyReleaseMask, &rep.status, TRUE); + memset(&rep, 0, sizeof(xGrabKeyboardReply)); + mask.core = KeyPressMask | KeyReleaseMask; + + result = GrabDevice(client, keyboard, stuff->pointerMode, + stuff->keyboardMode, stuff->grabWindow, stuff->ownerEvents, + stuff->time, &mask, GRABTYPE_CORE, None, None, + &rep.status); if (result != Success) return result; @@ -4745,7 +4943,7 @@ ProcUngrabKeyboard(ClientPtr client) time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && - (grab) && SameClient(grab, client) && grab->coreGrab) + (grab) && SameClient(grab, client) && grab->grabtype == GRABTYPE_CORE) (*device->deviceGrab.DeactivateGrab)(device); return Success; } @@ -4762,6 +4960,7 @@ ProcQueryPointer(ClientPtr client) xQueryPointerReply rep; WindowPtr pWin, t; DeviceIntPtr mouse = PickPointer(client); + DeviceIntPtr keyboard; SpritePtr pSprite; int rc; REQUEST(xResourceReq); @@ -4774,12 +4973,16 @@ ProcQueryPointer(ClientPtr client) if (rc != Success) return rc; + keyboard = GetPairedDevice(mouse); + pSprite = mouse->spriteInfo->sprite; if (mouse->valuator->motionHintWindow) MaybeStopHint(mouse, client); + memset(&rep, 0, sizeof(xQueryPointerReply)); rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.mask = mouse->button->state | inputInfo.keyboard->key->state; + rep.mask = mouse->button ? (mouse->button->state) : 0; + rep.mask |= XkbStateFieldFromRec(&keyboard->key->xkbInfo->state); rep.length = 0; rep.root = (RootWindow(mouse))->drawable.id; rep.rootX = pSprite->hot.x; @@ -4834,7 +5037,8 @@ InitEvents(void) inputInfo.off_devices = (DeviceIntPtr)NULL; inputInfo.keyboard = (DeviceIntPtr)NULL; inputInfo.pointer = (DeviceIntPtr)NULL; - lastEventMask = OwnerGrabButtonMask; + /* The mask for pointer motion events may have changed in the last server + * generation. See comment above definition of filters. */ filters[0][PointerMotionMask] = MotionNotify; for (i = 1; i < MAXDEVICES; i++) { @@ -4889,7 +5093,9 @@ ProcSendEvent(ClientPtr client) { WindowPtr pWin; WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ - SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; + DeviceIntPtr dev = PickPointer(client); + DeviceIntPtr keybd = GetPairedDevice(dev); + SpritePtr pSprite = dev->spriteInfo->sprite; REQUEST(xSendEventReq); REQUEST_SIZE_MATCH(xSendEventReq); @@ -4923,7 +5129,7 @@ ProcSendEvent(ClientPtr client) pWin = pSprite->win; else if (stuff->destination == InputFocus) { - WindowPtr inputFocus = inputInfo.keyboard->focus->win; + WindowPtr inputFocus = (keybd) ? keybd->focus->win : NoneWin; if (inputFocus == NoneWin) return Success; @@ -4959,8 +5165,8 @@ ProcSendEvent(ClientPtr client) if (XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, &stuff->event, 1)) return Success; - if (DeliverEventsToWindow(PickPointer(client), pWin, - &stuff->event, 1, stuff->eventMask, NullGrab, 0)) + if (DeliverEventsToWindow(dev, pWin, + &stuff->event, 1, stuff->eventMask, NullGrab)) return Success; if (pWin == effectiveFocus) return Success; @@ -4970,8 +5176,8 @@ ProcSendEvent(ClientPtr client) } } else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, &stuff->event, 1)) - (void)DeliverEventsToWindow(PickPointer(client), pWin, &stuff->event, - 1, stuff->eventMask, NullGrab, 0); + DeliverEventsToWindow(dev, pWin, &stuff->event, + 1, stuff->eventMask, NullGrab); return Success; } @@ -4991,12 +5197,12 @@ ProcUngrabKey(ClientPtr client) int rc; REQUEST_SIZE_MATCH(xUngrabKeyReq); - rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixGetAttrAccess); if (rc != Success) return rc; - if (((stuff->key > keybd->key->curKeySyms.maxKeyCode) || - (stuff->key < keybd->key->curKeySyms.minKeyCode)) + if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) || + (stuff->key < keybd->key->xkbInfo->desc->min_key_code)) && (stuff->key != AnyKey)) { client->errorValue = stuff->key; @@ -5013,8 +5219,9 @@ ProcUngrabKey(ClientPtr client) tempGrab.window = pWin; tempGrab.modifiersDetail.exact = stuff->modifiers; tempGrab.modifiersDetail.pMask = NULL; - tempGrab.modifierDevice = inputInfo.keyboard; + tempGrab.modifierDevice = GetPairedDevice(keybd); tempGrab.type = KeyPress; + tempGrab.grabtype = GRABTYPE_CORE; tempGrab.detail.exact = stuff->key; tempGrab.detail.pMask = NULL; tempGrab.next = NULL; @@ -5038,47 +5245,38 @@ ProcGrabKey(ClientPtr client) GrabPtr grab; DeviceIntPtr keybd = PickKeyboard(client); int rc; + GrabParameters param; + GrabMask mask; REQUEST_SIZE_MATCH(xGrabKeyReq); - if ((stuff->ownerEvents != xTrue) && (stuff->ownerEvents != xFalse)) - { - client->errorValue = stuff->ownerEvents; - return(BadValue); - } - if ((stuff->pointerMode != GrabModeSync) && - (stuff->pointerMode != GrabModeAsync)) - { - client->errorValue = stuff->pointerMode; - return BadValue; - } - if ((stuff->keyboardMode != GrabModeSync) && - (stuff->keyboardMode != GrabModeAsync)) - { - client->errorValue = stuff->keyboardMode; - return BadValue; - } - if (((stuff->key > keybd->key->curKeySyms.maxKeyCode) || - (stuff->key < keybd->key->curKeySyms.minKeyCode)) + + memset(¶m, 0, sizeof(param)); + param.grabtype = GRABTYPE_CORE; + param.ownerEvents = stuff->ownerEvents; + param.this_device_mode = stuff->keyboardMode; + param.other_devices_mode = stuff->pointerMode; + param.modifiers = stuff->modifiers; + + rc = CheckGrabValues(client, ¶m); + if (rc != Success) + return rc; + + if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) || + (stuff->key < keybd->key->xkbInfo->desc->min_key_code)) && (stuff->key != AnyKey)) { client->errorValue = stuff->key; return BadValue; } - if ((stuff->modifiers != AnyModifier) && - (stuff->modifiers & ~AllModifiersMask)) - { - client->errorValue = stuff->modifiers; - return BadValue; - } rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; - grab = CreateGrab(client->index, keybd, pWin, - (Mask)(KeyPressMask | KeyReleaseMask), (Bool)stuff->ownerEvents, - (Bool)stuff->keyboardMode, (Bool)stuff->pointerMode, - keybd, stuff->modifiers, KeyPress, stuff->key, - NullWindow, NullCursor); + + mask.core = (KeyPressMask | KeyReleaseMask); + + grab = CreateGrab(client->index, keybd, keybd, pWin, GRABTYPE_CORE, &mask, + ¶m, KeyPress, stuff->key, NullWindow, NullCursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); @@ -5100,6 +5298,8 @@ ProcGrabButton(ClientPtr client) GrabPtr grab; DeviceIntPtr ptr, modifierDevice; Mask access_mode = DixGrabAccess; + GrabMask mask; + GrabParameters param; int rc; REQUEST_SIZE_MATCH(xGrabButtonReq); @@ -5166,11 +5366,18 @@ ProcGrabButton(ClientPtr client) if (rc != Success) return rc; - grab = CreateGrab(client->index, ptr, pWin, - (Mask)stuff->eventMask, (Bool)stuff->ownerEvents, - (Bool) stuff->keyboardMode, (Bool)stuff->pointerMode, - modifierDevice, stuff->modifiers, ButtonPress, - stuff->button, confineTo, cursor); + memset(¶m, 0, sizeof(param)); + param.grabtype = GRABTYPE_CORE; + param.ownerEvents = stuff->ownerEvents; + param.this_device_mode = stuff->keyboardMode; + param.other_devices_mode = stuff->pointerMode; + param.modifiers = stuff->modifiers; + + mask.core = stuff->eventMask; + + grab = CreateGrab(client->index, ptr, modifierDevice, pWin, + GRABTYPE_CORE, &mask, ¶m, ButtonPress, + stuff->button, confineTo, cursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); @@ -5188,6 +5395,7 @@ ProcUngrabButton(ClientPtr client) WindowPtr pWin; GrabRec tempGrab; int rc; + DeviceIntPtr ptr; REQUEST_SIZE_MATCH(xUngrabButtonReq); if ((stuff->modifiers != AnyModifier) && @@ -5199,14 +5407,18 @@ ProcUngrabButton(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); if (rc != Success) return rc; + + ptr = PickPointer(client); + tempGrab.resource = client->clientAsMask; - tempGrab.device = PickPointer(client); + tempGrab.device = ptr; tempGrab.window = pWin; tempGrab.modifiersDetail.exact = stuff->modifiers; tempGrab.modifiersDetail.pMask = NULL; - tempGrab.modifierDevice = inputInfo.keyboard; + tempGrab.modifierDevice = GetPairedDevice(ptr); tempGrab.type = ButtonPress; tempGrab.detail.exact = stuff->button; + tempGrab.grabtype = GRABTYPE_CORE; tempGrab.detail.pMask = NULL; tempGrab.next = NULL; @@ -5299,15 +5511,17 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) to None */ #ifdef NOTDEF - || clients[CLIENT_ID(parent->drawable.id)]->clientGone + || wClient(parent)->clientGone #endif ); - DoFocusEvents(keybd, pWin, parent, focusEventMode); + if (!ActivateFocusInGrab(keybd, pWin, parent)) + DoFocusEvents(keybd, pWin, parent, focusEventMode); focus->win = parent; focus->revert = RevertToNone; break; case RevertToPointerRoot: - DoFocusEvents(keybd, pWin, PointerRootWin, focusEventMode); + if (!ActivateFocusInGrab(keybd, pWin, PointerRootWin)) + DoFocusEvents(keybd, pWin, PointerRootWin, focusEventMode); focus->win = PointerRootWin; focus->traceGood = 0; break; @@ -5340,7 +5554,7 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) * there is a grab on the window, the cursor will be re-confined into the * window. */ -_X_EXPORT void +void CheckCursorConfinement(WindowPtr pWin) { GrabPtr grab; @@ -5359,7 +5573,7 @@ CheckCursorConfinement(WindowPtr pWin) if (grab && (confineTo = grab->confineTo)) { if (!BorderSizeNotEmpty(pDev, confineTo)) - (*inputInfo.pointer->deviceGrab.DeactivateGrab)(pDev); + (*pDev->deviceGrab.DeactivateGrab)(pDev); else if ((pWin == confineTo) || IsParent(pWin, confineTo)) ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE); } @@ -5441,7 +5655,7 @@ ProcRecolorCursor(ClientPtr client) * @param count Number of events. * @param events The event list. */ -_X_EXPORT void +void WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) { #ifdef PANORAMIX @@ -5451,10 +5665,8 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) int i, eventlength = sizeof(xEvent); -#ifdef XKB - if ((!noXkbExtension)&&(!XkbFilterEvents(pClient, count, events))) - return; -#endif + /* Let XKB rewrite the state, as it depends on client preferences. */ + XkbFilterEvents(pClient, count, events); #ifdef PANORAMIX if(!noPanoramiXExtension && @@ -5545,7 +5757,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) (*EventSwapVector[eventFrom->u.u.type & 0177]) (eventFrom, eventTo); - (void)WriteToClient(pClient, eventlength, (char *)eventTo); + WriteToClient(pClient, eventlength, (char *)eventTo); } } else @@ -5553,13 +5765,12 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) /* only one GenericEvent, remember? that means either count is 1 and * eventlength is arbitrary or eventlength is 32 and count doesn't * matter. And we're all set. Woohoo. */ - (void)WriteToClient(pClient, count * eventlength, (char *) events); + WriteToClient(pClient, count * eventlength, (char *) events); } } /* - * Set the client pointer for the given client. Second parameter setter could - * be used in the future to determine access rights. Unused for now. + * Set the client pointer for the given client. * * A client can have exactly one ClientPointer. Each time a * request/reply/event is processed and the choice of devices is ambiguous @@ -5567,21 +5778,25 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) * PickPointer()). * If a keyboard is needed, the first keyboard paired with the CP is used. */ -_X_EXPORT Bool -SetClientPointer(ClientPtr client, ClientPtr setter, DeviceIntPtr device) +int +SetClientPointer(ClientPtr client, DeviceIntPtr device) { - if (!device->isMaster) + int rc = XaceHook(XACE_DEVICE_ACCESS, client, device, DixUseAccess); + if (rc != Success) + return rc; + + if (!IsMaster(device)) { ErrorF("[dix] Need master device for ClientPointer. This is a bug.\n"); - return FALSE; + return BadDevice; } else if (!device->spriteInfo->spriteOwner) { ErrorF("[dix] Device %d does not have a sprite. " "Cannot be ClientPointer\n", device->id); - return FALSE; + return BadDevice; } client->clientPtr = device; - return TRUE; + return Success; } /* PickPointer will pick an appropriate pointer for the given client. @@ -5591,7 +5806,7 @@ SetClientPointer(ClientPtr client, ClientPtr setter, DeviceIntPtr device) * 2) A device set as ClientPointer for the given client. * 3) The first master device. */ -_X_EXPORT DeviceIntPtr +DeviceIntPtr PickPointer(ClientPtr client) { DeviceIntPtr it = inputInfo.devices; @@ -5601,10 +5816,9 @@ PickPointer(ClientPtr client) for(it = inputInfo.devices; it; it = it->next) { GrabPtr grab = it->deviceGrab.grab; - if (grab && grab->coreGrab && SameClient(grab, client)) + if (grab && grab->grabtype == GRABTYPE_CORE && SameClient(grab, client)) { - if (!IsPointerDevice(it)) - it = GetPairedDevice(it); + it = GetMaster(it, MASTER_POINTER); return it; /* Always return a core grabbed device */ } } @@ -5614,7 +5828,7 @@ PickPointer(ClientPtr client) DeviceIntPtr it = inputInfo.devices; while (it) { - if (it->isMaster && it->spriteInfo->spriteOwner) + if (IsMaster(it) && it->spriteInfo->spriteOwner) { client->clientPtr = it; break; @@ -5629,11 +5843,11 @@ PickPointer(ClientPtr client) * searching the list of devices for the keyboard device that is paired with * the client's pointer. */ -_X_EXPORT DeviceIntPtr +DeviceIntPtr PickKeyboard(ClientPtr client) { DeviceIntPtr ptr = PickPointer(client); - DeviceIntPtr kbd = ptr->spriteInfo->paired; + DeviceIntPtr kbd = GetMaster(ptr, MASTER_KEYBOARD); if (!kbd) { @@ -5657,9 +5871,6 @@ IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) { DeviceIntPtr it = inputInfo.devices; - if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) - return FALSE; - switch(event->u.u.type) { case KeyPress: @@ -5674,6 +5885,9 @@ IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) return FALSE; } + if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) + return FALSE; + while(it) { if (it != dev) @@ -5692,86 +5906,3 @@ IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) return FALSE; } -/** - * Set the filters for a extension. - * The filters array needs to contain the Masks that are applicable for each - * event type for the given extension. - * e.g. if generic event type 2 should be let through for windows with - * MyExampleMask set, make sure that filters[2] == MyExampleMask. - */ -_X_EXPORT void -SetGenericFilter(int extension, Mask* filters) -{ - generic_filters[extension & 0x7f] = filters; -} - - -/** - * Grab a device for XI events and XGE events. - * grabmode is used to ungrab a device. - */ -_X_EXPORT int -ExtGrabDevice(ClientPtr client, - DeviceIntPtr dev, - int device_mode, - WindowPtr grabWindow, - WindowPtr confineTo, - TimeStamp ctime, - Bool ownerEvents, - CursorPtr cursor, - Mask xi_mask, - GenericMaskPtr ge_masks) -{ - GrabInfoPtr grabinfo; - GrabRec newGrab; - - UpdateCurrentTime(); - - grabinfo = &dev->deviceGrab; - - if (grabinfo->grab && !SameClient(grabinfo->grab, client)) - return AlreadyGrabbed; - - if (!grabWindow->realized) - return GrabNotViewable; - - if ((CompareTimeStamps(ctime, currentTime) == LATER) || - (CompareTimeStamps(ctime, grabinfo->grabTime) == EARLIER)) - return GrabInvalidTime; - - if (grabinfo->sync.frozen && grabinfo->sync.other && - !SameClient(grabinfo->sync.other, client)) - return GrabFrozen; - - memset(&newGrab, 0, sizeof(GrabRec)); - newGrab.window = grabWindow; - newGrab.resource = client->clientAsMask; - newGrab.ownerEvents = ownerEvents; - newGrab.device = dev; - newGrab.cursor = cursor; - newGrab.confineTo = confineTo; - newGrab.eventMask = xi_mask; - newGrab.genericMasks = NULL; - newGrab.next = NULL; - - if (ge_masks) - { - newGrab.genericMasks = xcalloc(1, sizeof(GenericMaskRec)); - *newGrab.genericMasks = *ge_masks; - newGrab.genericMasks->next = NULL; - } - - if (IsPointerDevice(dev)) - { - newGrab.keyboardMode = GrabModeAsync; - newGrab.pointerMode = device_mode; - } else - { - newGrab.keyboardMode = device_mode; - newGrab.pointerMode = GrabModeAsync; - } - - (*grabinfo->ActivateGrab)(dev, &newGrab, ctime, FALSE); - return GrabSuccess; -} - diff --git a/xorg-server/dix/extension.c b/xorg-server/dix/extension.c index 3070f4da1..fb83af148 100644 --- a/xorg-server/dix/extension.c +++ b/xorg-server/dix/extension.c @@ -50,8 +50,6 @@ SOFTWARE. #endif #include -#define NEED_EVENTS -#define NEED_REPLIES #include #include "misc.h" #include "dixstruct.h" @@ -72,7 +70,7 @@ int lastEvent = EXTENSION_EVENT_BASE; static int lastError = FirstExtensionError; static unsigned int NumExtensions = 0; -_X_EXPORT ExtensionEntry * +ExtensionEntry * AddExtension(char *name, int NumEvents, int NumErrors, int (*MainProc)(ClientPtr c1), int (*SwappedMainProc)(ClientPtr c2), @@ -88,10 +86,10 @@ AddExtension(char *name, int NumEvents, int NumErrors, (unsigned)(lastError + NumErrors > LAST_ERROR)) return((ExtensionEntry *) NULL); - ext = (ExtensionEntry *) xalloc(sizeof(ExtensionEntry)); + ext = xalloc(sizeof(ExtensionEntry)); if (!ext) - return((ExtensionEntry *) NULL); - ext->name = (char *)xalloc(strlen(name) + 1); + return(NULL); + ext->name = xalloc(strlen(name) + 1); ext->num_aliases = 0; ext->aliases = (char **)NULL; ext->devPrivates = NULL; @@ -146,7 +144,7 @@ AddExtension(char *name, int NumEvents, int NumErrors, return(ext); } -_X_EXPORT Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) +Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) { char *name; char **aliases; @@ -158,7 +156,7 @@ _X_EXPORT Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) if (!aliases) return FALSE; ext->aliases = aliases; - name = (char *)xalloc(strlen(alias) + 1); + name = xalloc(strlen(alias) + 1); if (!name) return FALSE; strcpy(name, alias); @@ -192,7 +190,7 @@ FindExtension(char *extname, int len) * CheckExtension returns the extensions[] entry for the requested * extension name. Maybe this could just return a Bool instead? */ -_X_EXPORT ExtensionEntry * +ExtensionEntry * CheckExtension(const char *extname) { int n; @@ -218,13 +216,13 @@ GetExtensionEntry(int major) return extensions[major]; } -_X_EXPORT unsigned short +unsigned short StandardMinorOpcode(ClientPtr client) { return ((xReq *)client->requestBuffer)->data; } -_X_EXPORT unsigned short +unsigned short MinorOpcodeOfRequest(ClientPtr client) { unsigned char major; @@ -269,7 +267,8 @@ ProcQueryExtension(ClientPtr client) REQUEST(xQueryExtensionReq); REQUEST_FIXED_SIZE(xQueryExtensionReq, stuff->nbytes); - + + memset(&reply, 0, sizeof(xQueryExtensionReply)); reply.type = X_Reply; reply.length = 0; reply.major_opcode = 0; @@ -303,6 +302,7 @@ ProcListExtensions(ClientPtr client) REQUEST_SIZE_MATCH(xReq); + memset(&reply, 0, sizeof(xListExtensionsReply)); reply.type = X_Reply; reply.nExtensions = 0; reply.length = 0; @@ -324,8 +324,8 @@ ProcListExtensions(ClientPtr client) for (j = extensions[i]->num_aliases; --j >= 0;) total_length += strlen(extensions[i]->aliases[j]) + 1; } - reply.length = (total_length + 3) >> 2; - buffer = bufptr = (char *)xalloc(total_length); + reply.length = bytes_to_int32(total_length); + buffer = bufptr = xalloc(total_length); if (!buffer) return(BadAlloc); for (i=0; ifuncs->ValidateGC) (pGC, pGC->stateChanges, pDraw); @@ -145,7 +145,7 @@ ValidateGC(DrawablePtr pDraw, GC *pGC) #define NEXT_PTR(_type, _var) { \ assert(pUnion); _var = (_type)pUnion->ptr; pUnion++; } -_X_EXPORT int +int dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion) { BITS32 index2; @@ -470,7 +470,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr { unsigned char *dash; - dash = (unsigned char *)xalloc(2 * sizeof(unsigned char)); + dash = xalloc(2 * sizeof(unsigned char)); if (dash) { if (pGC->dash != DefaultDash) @@ -527,7 +527,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr /* Publically defined entry to ChangeGC. Just calls dixChangeGC and tells * it that all of the entries are constants or IDs */ -_X_EXPORT int +int ChangeGC(GC *pGC, BITS32 mask, XID *pval) { return (dixChangeGC(NullClient, pGC, mask, pval, NULL)); @@ -553,7 +553,7 @@ NOTE: all values sent over the protocol for ChangeGC requests are 32 bits long */ -_X_EXPORT int +int DoChangeGC(GC *pGC, BITS32 mask, XID *pval, int fPointer) { if (fPointer) @@ -573,13 +573,13 @@ BUG: should check for failure to create default tile */ -_X_EXPORT GCPtr +GCPtr CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, XID gcid, ClientPtr client) { GCPtr pGC; - pGC = (GCPtr)xalloc(sizeof(GC)); + pGC = xalloc(sizeof(GC)); if (!pGC) { *pStatus = BadAlloc; @@ -602,6 +602,8 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, pGC->fillStyle = FillSolid; pGC->fillRule = EvenOddRule; pGC->arcMode = ArcPieSlice; + pGC->tile.pixel = 0; + pGC->tile.pixmap = NullPixmap; if (mask & GCForeground) { /* @@ -609,12 +611,10 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, * and snags the Foreground value to create a pseudo default-tile */ pGC->tileIsPixel = FALSE; - pGC->tile.pixmap = NullPixmap; } else { pGC->tileIsPixel = TRUE; - pGC->tile.pixel = 0; } pGC->patOrg.x = 0; @@ -706,7 +706,7 @@ CreateDefaultTile (GCPtr pGC) return TRUE; } -_X_EXPORT int +int CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask) { BITS32 index2; @@ -829,8 +829,7 @@ CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask) unsigned char *dash; unsigned int i; - dash = (unsigned char *)xalloc(pgcSrc->numInDashList * - sizeof(unsigned char)); + dash = xalloc(pgcSrc->numInDashList * sizeof(unsigned char)); if (dash) { if (pgcDst->dash != DefaultDash) @@ -870,7 +869,7 @@ CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask) * * \param value must conform to DeleteType */ -_X_EXPORT int +int FreeGC(pointer value, XID gid) { GCPtr pGC = (GCPtr)value; @@ -904,12 +903,12 @@ is what fills the default tile. (maybe this comment should go with CreateGC() or ChangeGC().) */ -_X_EXPORT GCPtr +GCPtr CreateScratchGC(ScreenPtr pScreen, unsigned depth) { GCPtr pGC; - pGC = (GCPtr)xalloc(sizeof(GC)); + pGC = xalloc(sizeof(GC)); if (!pGC) return (GCPtr)NULL; @@ -933,6 +932,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth) pGC->font->refcnt++; pGC->tileIsPixel = TRUE; pGC->tile.pixel = 0; + pGC->tile.pixmap = NullPixmap; pGC->stipple = NullPixmap; pGC->patOrg.x = 0; pGC->patOrg.y = 0; @@ -1069,9 +1069,9 @@ SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash) } if (ndash & 1) - p = (unsigned char *)xalloc(2 * ndash * sizeof(unsigned char)); + p = xalloc(2 * ndash * sizeof(unsigned char)); else - p = (unsigned char *)xalloc(ndash * sizeof(unsigned char)); + p = xalloc(ndash * sizeof(unsigned char)); if (!p) return BadAlloc; @@ -1105,7 +1105,7 @@ SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash) return Success; } -_X_EXPORT int +int VerifyRectOrder(int nrects, xRectangle *prects, int ordering) { xRectangle *prectP, *prectN; @@ -1166,7 +1166,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects, if (newct < 0) return(BadMatch); size = nrects * sizeof(xRectangle); - prectsNew = (xRectangle *) xalloc(size); + prectsNew = xalloc(size); if (!prectsNew && size) return BadAlloc; @@ -1192,7 +1192,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects, if we can't, create one out of whole cloth (The Velveteen GC -- if you use it often enough it will become real.) */ -_X_EXPORT GCPtr +GCPtr GetScratchGC(unsigned depth, ScreenPtr pScreen) { int i; @@ -1241,7 +1241,7 @@ GetScratchGC(unsigned depth, ScreenPtr pScreen) mark it as available. if not, free it for real */ -_X_EXPORT void +void FreeScratchGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c index 9747b35a6..2912c1e85 100644 --- a/xorg-server/dix/getevents.c +++ b/xorg-server/dix/getevents.c @@ -1,6 +1,7 @@ /* * Copyright © 2006 Nokia Corporation * Copyright © 2006-2007 Daniel Stone + * Copyright © 2008 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,7 +22,8 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Daniel Stone + * Authors: Daniel Stone + * Peter Hutterer */ #ifdef HAVE_DIX_CONFIG_H @@ -30,8 +32,6 @@ #include #include -#define NEED_EVENTS -#define NEED_REPLIES #include #include "misc.h" @@ -43,11 +43,11 @@ #include "globals.h" #include "dixevents.h" #include "mipointer.h" +#include "eventstr.h" +#include "eventconvert.h" -#ifdef XKB #include -#include -#endif +#include "xkbsrv.h" #ifdef PANORAMIX #include "panoramiX.h" @@ -60,6 +60,7 @@ #include "exevents.h" #include "exglobals.h" #include "extnsionst.h" +#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */ /* Number of motion history events to store. */ #define MOTION_HISTORY_SIZE 256 @@ -71,7 +72,7 @@ EventListPtr InputEventList = NULL; int InputEventListLen = 0; -_X_EXPORT int +int GetEventList(EventListPtr* list) { *list = InputEventList; @@ -81,28 +82,41 @@ GetEventList(EventListPtr* list) /** * Pick some arbitrary size for Xi motion history. */ -_X_EXPORT int +int GetMotionHistorySize(void) { return MOTION_HISTORY_SIZE; } -static void -set_key_down(DeviceIntPtr pDev, int key_code) +void +set_key_down(DeviceIntPtr pDev, int key_code, int type) { - pDev->key->postdown[key_code >> 3] |= (1 << (key_code & 7)); + if (type == KEY_PROCESSED) + pDev->key->down[key_code >> 3] |= (1 << (key_code & 7)); + else + pDev->key->postdown[key_code >> 3] |= (1 << (key_code & 7)); } -static void -set_key_up(DeviceIntPtr pDev, int key_code) +void +set_key_up(DeviceIntPtr pDev, int key_code, int type) { - pDev->key->postdown[key_code >> 3] &= ~(1 << (key_code & 7)); + if (type == KEY_PROCESSED) + pDev->key->down[key_code >> 3] &= ~(1 << (key_code & 7)); + else + pDev->key->postdown[key_code >> 3] &= ~(1 << (key_code & 7)); } -static Bool -key_is_down(DeviceIntPtr pDev, int key_code) +Bool +key_is_down(DeviceIntPtr pDev, int key_code, int type) { - return !!(pDev->key->postdown[key_code >> 3] & (1 << (key_code & 7))); + int ret = 0; + + if (type & KEY_PROCESSED) + ret |= !!(pDev->key->down[key_code >> 3] & (1 << (key_code & 7))); + else if (type & KEY_POSTED) + ret |= !!(pDev->key->postdown[key_code >> 3] & (1 << (key_code & 7))); + + return ret; } static Bool @@ -112,14 +126,118 @@ key_autorepeats(DeviceIntPtr pDev, int key_code) (1 << (key_code & 7))); } +static void +init_event(DeviceIntPtr dev, DeviceEvent* event, Time ms) +{ + memset(event, 0, sizeof(DeviceEvent)); + event->header = ET_Internal; + event->length = sizeof(DeviceEvent); + event->time = ms; + event->deviceid = dev->id; + event->sourceid = dev->id; +} + +static void +init_raw(DeviceIntPtr dev, RawDeviceEvent *event, Time ms, int type, int detail) +{ + memset(event, 0, sizeof(RawDeviceEvent)); + event->header = ET_Internal; + event->length = sizeof(RawDeviceEvent); + event->type = ET_RawKeyPress - ET_KeyPress + type; + event->time = ms; + event->deviceid = dev->id; + event->sourceid = dev->id; + event->detail.button = detail; +} + +static void +set_raw_valuators(RawDeviceEvent *event, int first, int num, int *valuators, int32_t* data) +{ + int i; + for (i = first; i < first + num; i++) + SetBit(event->valuators.mask, i); + + memcpy(&data[first], valuators, num * sizeof(uint32_t)); +} + + +static void +set_valuators(DeviceIntPtr dev, DeviceEvent* event, int first_valuator, + int num_valuators, int *valuators) +{ + int i; + + for (i = first_valuator; i < first_valuator + num_valuators; i++) + { + SetBit(event->valuators.mask, i); + if (dev->valuator->mode == Absolute) + SetBit(event->valuators.mode, i); + event->valuators.data_frac[i] = + dev->last.remainder[i] * (1 << 16) * (1 << 16); + } + + memcpy(&event->valuators.data[first_valuator], + valuators, num_valuators * sizeof(uint32_t)); + +} + +void +CreateClassesChangedEvent(EventList* event, + DeviceIntPtr master, + DeviceIntPtr slave, + int type) +{ + int i; + DeviceChangedEvent *dce; + CARD32 ms = GetTimeInMillis(); + + dce = (DeviceChangedEvent*)event->event; + memset(dce, 0, sizeof(DeviceChangedEvent)); + dce->deviceid = slave->id; + dce->masterid = master->id; + dce->header = ET_Internal; + dce->length = sizeof(DeviceChangedEvent); + dce->type = ET_DeviceChanged; + dce->time = ms; + dce->flags = type; + dce->flags |= DEVCHANGE_SLAVE_SWITCH; + dce->sourceid = slave->id; + + if (slave->button) + { + dce->buttons.num_buttons = slave->button->numButtons; + for (i = 0; i < dce->buttons.num_buttons; i++) + dce->buttons.names[i] = slave->button->labels[i]; + } + if (slave->valuator) + { + dce->num_valuators = slave->valuator->numAxes; + for (i = 0; i < dce->num_valuators; i++) + { + dce->valuators[i].min = slave->valuator->axes[i].min_value; + dce->valuators[i].max = slave->valuator->axes[i].max_value; + dce->valuators[i].resolution = slave->valuator->axes[i].resolution; + /* This should, eventually, be a per-axis mode */ + dce->valuators[i].mode = slave->valuator->mode; + dce->valuators[i].name = slave->valuator->axes[i].label; + } + } + if (slave->key) + { + dce->keys.min_keycode = slave->key->xkbInfo->desc->min_key_code; + dce->keys.max_keycode = slave->key->xkbInfo->desc->max_key_code; + } +} + /** * Rescale the coord between the two axis ranges. */ static int -rescaleValuatorAxis(int coord, AxisInfoPtr from, AxisInfoPtr to, +rescaleValuatorAxis(int coord, float remainder, float *remainder_return, AxisInfoPtr from, AxisInfoPtr to, int defmax) { - int fmin = 0, tmin = 0, fmax = defmax, tmax = defmax; + int fmin = 0, tmin = 0, fmax = defmax, tmax = defmax, coord_return; + float value; if(from && from->min_value < from->max_value) { fmin = from->min_value; @@ -130,14 +248,23 @@ rescaleValuatorAxis(int coord, AxisInfoPtr from, AxisInfoPtr to, tmax = to->max_value; } - if(fmin == tmin && fmax == tmax) + if(fmin == tmin && fmax == tmax) { + if (remainder_return) + *remainder_return = remainder; return coord; + } - if(fmax == fmin) /* avoid division by 0 */ + if(fmax == fmin) { /* avoid division by 0 */ + if (remainder_return) + *remainder_return = 0.0; return 0; + } - return roundf(((float)(coord - fmin)) * (tmax - tmin) / - (fmax - fmin)) + tmin; + value = (coord + remainder - fmin) * (tmax - tmin) / (fmax - fmin) + tmin; + coord_return = lroundf(value); + if (remainder_return) + *remainder_return = value - coord_return; + return coord_return; } /** @@ -165,21 +292,25 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) /* scale back to device coordinates */ if(pDev->valuator->numAxes > 0) - pDev->last.valuators[0] = rescaleValuatorAxis(pDev->last.valuators[0], NULL, pDev->valuator->axes + 0, scr->width); + pDev->last.valuators[0] = rescaleValuatorAxis(pDev->last.valuators[0], pDev->last.remainder[0], + &pDev->last.remainder[0], NULL, pDev->valuator->axes + 0, scr->width); if(pDev->valuator->numAxes > 1) - pDev->last.valuators[1] = rescaleValuatorAxis(pDev->last.valuators[1], NULL, pDev->valuator->axes + 1, scr->height); + pDev->last.valuators[1] = rescaleValuatorAxis(pDev->last.valuators[1], pDev->last.remainder[1], + &pDev->last.remainder[0], NULL, pDev->valuator->axes + 1, scr->height); /* calculate the other axis as well based on info from the old * slave-device. If the old slave had less axes than this one, * last.valuators is reset to 0. */ - if ((lastSlave = master->u.lastSlave) && lastSlave->valuator) { + if ((lastSlave = master->last.slave) && lastSlave->valuator) { for (i = 2; i < pDev->valuator->numAxes; i++) { if (i >= lastSlave->valuator->numAxes) pDev->last.valuators[i] = 0; else pDev->last.valuators[i] = rescaleValuatorAxis(pDev->last.valuators[i], + pDev->last.remainder[i], + &pDev->last.remainder[i], lastSlave->valuator->axes + i, pDev->valuator->axes + i, 0); } @@ -190,7 +321,7 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) /** * Allocate the motion history buffer. */ -_X_EXPORT void +void AllocateMotionHistory(DeviceIntPtr pDev) { int size; @@ -204,7 +335,7 @@ AllocateMotionHistory(DeviceIntPtr pDev) * potential valuators, plus the respective range of the valuators. * 3 * INT32 for (min_val, max_val, curr_val)) */ - if (pDev->isMaster) + if (IsMaster(pDev)) size = sizeof(INT32) * 3 * MAX_VALUATORS; else size = sizeof(INT32) * pDev->valuator->numAxes; @@ -226,7 +357,7 @@ AllocateMotionHistory(DeviceIntPtr pDev) * * If core is set, we only generate x/y, in INT16, scaled to screen coords. */ -_X_EXPORT int +int GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, unsigned long stop, ScreenPtr pScreen, BOOL core) { @@ -248,7 +379,7 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, if (core && !pScreen) return 0; - if (pDev->isMaster) + if (IsMaster(pDev)) size = (sizeof(INT32) * 3 * MAX_VALUATORS) + sizeof(Time); else size = (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); @@ -286,7 +417,7 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, /* scale to screen coords */ to = &core_axis; to->max_value = pScreen->width; - coord = rescaleValuatorAxis(coord, &from, to, pScreen->width); + coord = rescaleValuatorAxis(coord, 0.0, NULL, &from, to, pScreen->width); memcpy(corebuf, &coord, sizeof(INT16)); corebuf++; @@ -297,10 +428,10 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, memcpy(&coord, icbuf++, sizeof(INT32)); to->max_value = pScreen->height; - coord = rescaleValuatorAxis(coord, &from, to, pScreen->height); + coord = rescaleValuatorAxis(coord, 0.0, NULL, &from, to, pScreen->height); memcpy(corebuf, &coord, sizeof(INT16)); - } else if (pDev->isMaster) + } else if (IsMaster(pDev)) { memcpy(obuff, ibuff, sizeof(Time)); /* copy timestamp */ @@ -332,7 +463,7 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, dflt = 0; /* scale from stored range into current range */ - coord = rescaleValuatorAxis(coord, &from, to, 0); + coord = rescaleValuatorAxis(coord, 0.0, NULL, &from, to, 0); memcpy(ocbuf, &coord, sizeof(INT32)); ocbuf++; } @@ -376,7 +507,7 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, return; v = pDev->valuator; - if (pDev->isMaster) + if (IsMaster(pDev)) { buff += ((sizeof(INT32) * 3 * MAX_VALUATORS) + sizeof(CARD32)) * v->last_motion; @@ -428,23 +559,15 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, * Returns the maximum number of events GetKeyboardEvents, * GetKeyboardValuatorEvents, and GetPointerEvents will ever return. * - * Should be used in DIX as: - * xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - * * This MUST be absolutely constant, from init until exit. */ -_X_EXPORT int +int GetMaximumEventsNum(void) { - /* One base event -- device, plus valuator events. - * Multiply by two if we're doing non-XKB key repeats. */ - int ret = 1 + MAX_VALUATOR_EVENTS; - -#ifdef XKB - if (noXkbExtension) -#endif - ret *= 2; - - return ret; + /* One raw event + * One device event + * One possible device changed event + */ + return 3; } @@ -458,6 +581,9 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val) AxisInfoPtr axis = pDev->valuator->axes + axisNum; /* InitValuatoraAxisStruct ensures that (min < max). */ + if (axisNum >= pDev->valuator->numAxes) + return; + /* If a value range is defined, clip. If not, do nothing */ if (axis->max_value <= axis->min_value) return; @@ -475,52 +601,12 @@ static void clipValuators(DeviceIntPtr pDev, int first_valuator, int num_valuators, int *valuators) { - AxisInfoPtr axes = pDev->valuator->axes + first_valuator; int i; - for (i = 0; i < num_valuators; i++, axes++) + for (i = 0; i < num_valuators; i++) clipAxis(pDev, i + first_valuator, &(valuators[i])); } - -/** - * Fills events with valuator events for pDev, as given by the other - * parameters. - */ -static EventList * -getValuatorEvents(EventList *events, DeviceIntPtr pDev, - int first_valuator, int num_valuators, int *valuators) { - deviceValuator *xv; - int i; - - for (i = 0; i < num_valuators; i += 6, events++) { - xv = (deviceValuator*)events->event; - xv->type = DeviceValuator; - xv->first_valuator = first_valuator + i; - xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); - xv->deviceid = pDev->id; - switch (num_valuators - i) { - case 6: - xv->valuator5 = valuators[i + 5]; - case 5: - xv->valuator4 = valuators[i + 4]; - case 4: - xv->valuator3 = valuators[i + 3]; - case 3: - xv->valuator2 = valuators[i + 2]; - case 2: - xv->valuator1 = valuators[i + 1]; - case 1: - xv->valuator0 = valuators[i + 0]; - } - - if (i + 6 < num_valuators) - xv->deviceid |= MORE_EVENTS; - } - - return events; -} - /** * Create the DCCE event (does not update the master's device state yet, this * is done in the event processing). @@ -528,19 +614,26 @@ getValuatorEvents(EventList *events, DeviceIntPtr pDev, * * @param events Pointer to a pre-allocated event list. * @param dev The slave device that generated an event. + * @param type Either DEVCHANGE_POINTER_EVENT and/or DEVCHANGE_KEYBOARD_EVENT * @param num_events The current number of events, returns the number of * events if a DCCE was generated. * @return The updated @events pointer. */ static EventListPtr -updateFromMaster(EventListPtr events, DeviceIntPtr dev, int *num_events) +updateFromMaster(EventListPtr events, DeviceIntPtr dev, int type, int *num_events) { - DeviceIntPtr master = dev->u.master; - if (master && master->u.lastSlave != dev) + DeviceIntPtr master; + + master = GetMaster(dev, (type & DEVCHANGE_POINTER_EVENT) ? MASTER_POINTER : MASTER_KEYBOARD); + + if (master && master->last.slave != dev) { + CreateClassesChangedEvent(events, master, dev, type); updateSlaveDeviceCoords(master, dev); - master->u.lastSlave = dev; + master->last.slave = dev; master->last.numValuators = dev->last.numValuators; + (*num_events)++; + events++; } return events; } @@ -656,48 +749,69 @@ accelPointer(DeviceIntPtr dev, int first, int num, int *valuators, CARD32 ms) * @param dev The device to be moved. * @param x Pointer to current x-axis value, may be modified. * @param y Pointer to current y-axis value, may be modified. + * @param x_frac Fractional part of current x-axis value, may be modified. + * @param y_frac Fractional part of current y-axis value, may be modified. * @param scr Screen the device's sprite is currently on. * @param screenx Screen x coordinate the sprite is on after the update. * @param screeny Screen y coordinate the sprite is on after the update. + * @param screenx_frac Fractional part of screen x coordinate, as above. + * @param screeny_frac Fractional part of screen y coordinate, as above. */ static void -positionSprite(DeviceIntPtr dev, int *x, int *y, - ScreenPtr scr, int *screenx, int *screeny) +positionSprite(DeviceIntPtr dev, int *x, int *y, float x_frac, float y_frac, + ScreenPtr scr, int *screenx, int *screeny, float *screenx_frac, float *screeny_frac) { + int old_screenx, old_screeny; + /* scale x&y to screen */ - *screenx = rescaleValuatorAxis(*x, dev->valuator->axes + 0, NULL, scr->width); - *screeny = rescaleValuatorAxis(*y, dev->valuator->axes + 1, NULL, scr->height); - dev->last.valuators[0] = *screenx; - dev->last.valuators[1] = *screeny; + if (dev->valuator->numAxes > 0) { + *screenx = rescaleValuatorAxis(*x, x_frac, screenx_frac, + dev->valuator->axes + 0, NULL, scr->width); + } else { + *screenx = dev->last.valuators[0]; + *screenx_frac = dev->last.remainder[0]; + } + if (dev->valuator->numAxes > 1) { + *screeny = rescaleValuatorAxis(*y, y_frac, screeny_frac, + dev->valuator->axes + 1, NULL, scr->height); + } else { + *screeny = dev->last.valuators[1]; + *screeny_frac = dev->last.remainder[1]; + } + + old_screenx = *screenx; + old_screeny = *screeny; /* This takes care of crossing screens for us, as well as clipping * to the current screen. */ - miPointerSetPosition(dev, &dev->last.valuators[0], &dev->last.valuators[1]); + miPointerSetPosition(dev, screenx, screeny); if (dev->u.master) { - dev->u.master->last.valuators[0] = dev->last.valuators[0]; - dev->u.master->last.valuators[1] = dev->last.valuators[1]; + dev->u.master->last.valuators[0] = *screenx; + dev->u.master->last.valuators[1] = *screeny; + dev->u.master->last.remainder[0] = *screenx_frac; + dev->u.master->last.remainder[1] = *screeny_frac; } /* Crossed screen? Scale back to device coordiantes */ - if(*screenx != dev->last.valuators[0]) + if(*screenx != old_screenx) { scr = miPointerGetScreen(dev); - *x = rescaleValuatorAxis(dev->last.valuators[0], NULL, + *x = rescaleValuatorAxis(*screenx, *screenx_frac, &x_frac, NULL, dev->valuator->axes + 0, scr->width); - *screenx = dev->last.valuators[0]; } - if(*screeny != dev->last.valuators[1]) + if(*screeny != old_screeny) { scr = miPointerGetScreen(dev); - *screeny = dev->last.valuators[1]; - *y = rescaleValuatorAxis(dev->last.valuators[1], NULL, + *y = rescaleValuatorAxis(*screeny, *screeny_frac, &y_frac, NULL, dev->valuator->axes + 1, scr->height); } /* dropy x/y (device coordinates) back into valuators for next event */ dev->last.valuators[0] = *x; dev->last.valuators[1] = *y; + dev->last.remainder[0] = x_frac; + dev->last.remainder[1] = y_frac; } /** @@ -713,32 +827,17 @@ updateHistory(DeviceIntPtr dev, int first, int num, CARD32 ms) { updateMotionHistory(dev, ms, first, num, &dev->last.valuators[first]); if (dev->u.master) - updateMotionHistory(dev->u.master, ms, first, num, - &dev->last.valuators[first]); -} - -/** - * Calculate how many DeviceValuator events are needed given a number of - * valuators. - * @param num_valuators Number of valuators to attach to event. - * @return the number of DeviceValuator events needed. - */ -static int -countValuatorEvents(int num_valuators) -{ - if (num_valuators) { - if (((num_valuators - 1) / 6) + 1 > MAX_VALUATOR_EVENTS) - num_valuators = MAX_VALUATOR_EVENTS * 6; - return ((num_valuators - 1)/ 6) + 1; - } else - return 0; + { + DeviceIntPtr master = GetMaster(dev, MASTER_POINTER); + updateMotionHistory(master, ms, first, num, &dev->last.valuators[first]); + } } /** * Convenience wrapper around GetKeyboardValuatorEvents, that takes no * valuators. */ -_X_EXPORT int +int GetKeyboardEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code) { return GetKeyboardValuatorEvents(events, pDev, type, key_code, 0, 0, NULL); } @@ -764,98 +863,73 @@ GetKeyboardEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code) * key press will trigger a matching KeyRelease, as well as the * KeyPresses. */ -_X_EXPORT int +int GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code, int first_valuator, int num_valuators, int *valuators) { - int numEvents = 0; + int num_events = 0; CARD32 ms = 0; - KeySym *map; - KeySym sym; - deviceKeyButtonPointer *kbp = NULL; + DeviceEvent *event; + RawDeviceEvent *raw; + + /* refuse events from disabled devices */ + if (!pDev->enabled) + return 0; if (!events ||!pDev->key || !pDev->focus || !pDev->kbdfeed || (type != KeyPress && type != KeyRelease) || (key_code < 8 || key_code > 255)) return 0; - numEvents = 1; - - map = pDev->key->curKeySyms.map; - sym = map[(key_code - pDev->key->curKeySyms.minKeyCode) - * pDev->key->curKeySyms.mapWidth]; - - events = updateFromMaster(events, pDev, &numEvents); + num_events = 1; - numEvents += countValuatorEvents(num_valuators); + events = updateFromMaster(events, pDev, DEVCHANGE_KEYBOARD_EVENT, &num_events); -#ifdef XKB - if (noXkbExtension) -#endif - { - switch (sym) { - case XK_Num_Lock: - case XK_Caps_Lock: - case XK_Scroll_Lock: - case XK_Shift_Lock: - if (type == KeyRelease) - return 0; - else if (type == KeyPress && key_is_down(pDev, key_code)) - type = KeyRelease; - } - } - - /* Handle core repeating, via press/release/press/release. - * FIXME: In theory, if you're repeating with two keyboards in non-XKB, - * you could get unbalanced events here. */ - if (type == KeyPress && key_is_down(pDev, key_code)) { + /* Handle core repeating, via press/release/press/release. */ + if (type == KeyPress && key_is_down(pDev, key_code, KEY_POSTED)) { /* If autorepeating is disabled either globally or just for that key, * or we have a modifier, don't generate a repeat event. */ if (!pDev->kbdfeed->ctrl.autoRepeat || !key_autorepeats(pDev, key_code) || - pDev->key->modifierMap[key_code]) + pDev->key->xkbInfo->desc->map->modmap[key_code]) return 0; - -#ifdef XKB - if (noXkbExtension) -#endif - { - int numReleaseEvents; - - numReleaseEvents = GetKeyboardValuatorEvents(events, pDev, - KeyRelease, key_code, - first_valuator, - num_valuators, - valuators); - numEvents += numReleaseEvents; - events += numReleaseEvents; - } } ms = GetTimeInMillis(); - kbp = (deviceKeyButtonPointer *) events->event; - kbp->time = ms; - kbp->deviceid = pDev->id; - kbp->detail = key_code; + raw = (RawDeviceEvent*)events->event; + events++; + num_events++; + + init_raw(pDev, raw, ms, type, key_code); + set_raw_valuators(raw, first_valuator, num_valuators, valuators, + raw->valuators.data_raw); + + if (num_valuators) + clipValuators(pDev, first_valuator, num_valuators, valuators); + + set_raw_valuators(raw, first_valuator, num_valuators, valuators, + raw->valuators.data); + + event = (DeviceEvent*) events->event; + init_event(pDev, event, ms); + event->detail.key = key_code; + if (type == KeyPress) { - kbp->type = DeviceKeyPress; - set_key_down(pDev, key_code); + event->type = ET_KeyPress; + set_key_down(pDev, key_code, KEY_POSTED); } else if (type == KeyRelease) { - kbp->type = DeviceKeyRelease; - set_key_up(pDev, key_code); + event->type = ET_KeyRelease; + set_key_up(pDev, key_code, KEY_POSTED); } - events++; - if (num_valuators) { - kbp->deviceid |= MORE_EVENTS; + if (num_valuators) clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, first_valuator, - num_valuators, valuators); - } - return numEvents; + set_valuators(pDev, event, first_valuator, num_valuators, valuators); + + return num_events; } /** @@ -877,8 +951,8 @@ InitEventList(int num_events) for (i = 0; i < num_events; i++) { - events[i].evlen = sizeof(xEvent); - events[i].event = xcalloc(1, sizeof(xEvent)); + events[i].evlen = sizeof(InternalEvent); + events[i].event = xcalloc(1, sizeof(InternalEvent)); if (!events[i].event) { /* rollback */ @@ -896,7 +970,7 @@ InitEventList(int num_events) /** * Allocs min_size memory for each event in the list. */ -_X_EXPORT void +void SetMinimumEventSize(EventListPtr list, int num_events, int min_size) { if (!list) @@ -923,7 +997,7 @@ SetMinimumEventSize(EventListPtr list, int num_events, int min_size) * @param list The list to be freed. * @param num_events Number of elements in list. */ -_X_EXPORT void +void FreeEventList(EventListPtr list, int num_events) { if (!list) @@ -952,53 +1026,75 @@ FreeEventList(EventListPtr list, int num_events) * * master->last.valuators[x] for x > 2 is undefined. */ -_X_EXPORT int +int GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, int flags, int first_valuator, int num_valuators, int *valuators) { int num_events = 1; CARD32 ms; - deviceKeyButtonPointer *kbp = NULL; - int x, y, /* switches between device and screen coords */ + DeviceEvent *event; + RawDeviceEvent *raw; + int x = 0, y = 0, /* device coords */ cx, cy; /* only screen coordinates */ + float x_frac = 0.0, y_frac = 0.0, cx_frac, cy_frac; ScreenPtr scr = miPointerGetScreen(pDev); + /* refuse events from disabled devices */ + if (!pDev->enabled) + return 0; + ms = GetTimeInMillis(); /* before pointer update to help precision */ if (!scr || !pDev->valuator || first_valuator < 0 || ((num_valuators + first_valuator) > pDev->valuator->numAxes) || (type != MotionNotify && type != ButtonPress && type != ButtonRelease) || (type != MotionNotify && !pDev->button) || + ((type == ButtonPress || type == ButtonRelease) && !buttons) || (type == MotionNotify && num_valuators <= 0)) return 0; - num_events += countValuatorEvents(num_valuators); + events = updateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); + + raw = (RawDeviceEvent*)events->event; + events++; + num_events++; - events = updateFromMaster(events, pDev, &num_events); + init_raw(pDev, raw, ms, type, buttons); + set_raw_valuators(raw, first_valuator, num_valuators, valuators, + raw->valuators.data_raw); if (flags & POINTER_ABSOLUTE) { if (flags & POINTER_SCREEN) /* valuators are in screen coords */ { - valuators[0] = rescaleValuatorAxis(valuators[0], NULL, - pDev->valuator->axes + 0, - scr->width); - valuators[1] = rescaleValuatorAxis(valuators[1], NULL, - pDev->valuator->axes + 1, - scr->height); + if (num_valuators >= 1 && first_valuator == 0) + valuators[0] = rescaleValuatorAxis(valuators[0], 0.0, &x_frac, NULL, + pDev->valuator->axes + 0, + scr->width); + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + valuators[1 - first_valuator] = rescaleValuatorAxis(valuators[1 - first_valuator], 0.0, &y_frac, NULL, + pDev->valuator->axes + 1, + scr->height); } moveAbsolute(pDev, &x, &y, first_valuator, num_valuators, valuators); } else { - if (flags & POINTER_ACCELERATE) + if (flags & POINTER_ACCELERATE) { accelPointer(pDev, first_valuator, num_valuators, valuators, ms); + /* The pointer acceleration code modifies the fractional part + * in-place, so we need to extract this information first */ + x_frac = pDev->last.remainder[0]; + y_frac = pDev->last.remainder[1]; + } moveRelative(pDev, &x, &y, first_valuator, num_valuators, valuators); } - positionSprite(pDev, &x, &y, scr, &cx, &cy); - updateHistory(pDev, first_valuator, num_valuators, ms); + set_raw_valuators(raw, first_valuator, num_valuators, valuators, + raw->valuators.data); + positionSprite(pDev, &x, &y, x_frac, y_frac, scr, &cx, &cy, &cx_frac, &cy_frac); + updateHistory(pDev, first_valuator, num_valuators, ms); /* Update the valuators with the true value sent to the client*/ if (num_valuators >= 1 && first_valuator == 0) @@ -1006,32 +1102,34 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) valuators[1 - first_valuator] = y; - kbp = (deviceKeyButtonPointer *) events->event; - kbp->time = ms; - kbp->deviceid = pDev->id; + if (num_valuators) + clipValuators(pDev, first_valuator, num_valuators, valuators); + + event = (DeviceEvent*) events->event; + init_event(pDev, event, ms); if (type == MotionNotify) { - kbp->type = DeviceMotionNotify; + event->type = ET_Motion; + event->detail.button = 0; } else { - if (type == ButtonPress) - kbp->type = DeviceButtonPress; - else if (type == ButtonRelease) - kbp->type = DeviceButtonRelease; - kbp->detail = buttons; + if (type == ButtonPress) { + event->type = ET_ButtonPress; + pDev->button->postdown[buttons >> 3] |= (1 << (buttons & 7)); + } + else if (type == ButtonRelease) { + event->type = ET_ButtonRelease; + pDev->button->postdown[buttons >> 3] &= ~(1 << (buttons & 7)); + } + event->detail.button = buttons; } - kbp->root_x = cx; /* root_x/y always in screen coords */ - kbp->root_y = cy; + event->root_x = cx; /* root_x/y always in screen coords */ + event->root_y = cy; + event->root_x_frac = cx_frac; + event->root_y_frac = cy_frac; - events++; - if (num_valuators) { - kbp->deviceid |= MORE_EVENTS; - if (flags & POINTER_ABSOLUTE) - clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, first_valuator, - num_valuators, valuators); - } + set_valuators(pDev, event, first_valuator, num_valuators, valuators); return num_events; } @@ -1044,13 +1142,16 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, * The DDX is responsible for allocating the event structure in the first * place via GetMaximumEventsNum(), and for freeing it. */ -_X_EXPORT int +int GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, int first_valuator, int num_valuators, int *valuators) { int num_events = 1; - deviceKeyButtonPointer *kbp; - DeviceIntPtr master; + DeviceEvent *event; + + /* refuse events from disabled devices */ + if (!pDev->enabled) + return 0; /* Sanity checks. */ if (type != ProximityIn && type != ProximityOut) @@ -1061,38 +1162,21 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, if ((pDev->valuator->mode & 1) == Relative) num_valuators = 0; - if (num_valuators) { - if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) - num_valuators = MAX_VALUATOR_EVENTS * 6; - num_events += ((num_valuators - 1) / 6) + 1; - } - /* You fail. */ if (first_valuator < 0 || (num_valuators + first_valuator) > pDev->valuator->numAxes) return 0; - master = pDev->u.master; - if (master && master->u.lastSlave != pDev) - { - updateSlaveDeviceCoords(master, pDev); - master->u.lastSlave = pDev; - master->last.numValuators = pDev->last.numValuators; - } + events = updateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); - kbp = (deviceKeyButtonPointer *) events->event; - kbp->type = type; - kbp->deviceid = pDev->id; - kbp->detail = 0; - kbp->time = GetTimeInMillis(); + event = (DeviceEvent *) events->event; + init_event(pDev, event, GetTimeInMillis()); + event->type = (type == ProximityIn) ? ET_ProximityIn : ET_ProximityOut; - if (num_valuators) { - kbp->deviceid |= MORE_EVENTS; - events++; + if (num_valuators) clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, first_valuator, - num_valuators, valuators); - } + + set_valuators(pDev, event, first_valuator, num_valuators, valuators); return num_events; } @@ -1110,7 +1194,7 @@ PostSyntheticMotion(DeviceIntPtr pDev, int screen, unsigned long time) { - xEvent xE; + DeviceEvent ev; #ifdef PANORAMIX /* Translate back to the sprite screen since processInputProc @@ -1122,11 +1206,13 @@ PostSyntheticMotion(DeviceIntPtr pDev, } #endif - memset(&xE, 0, sizeof(xEvent)); - xE.u.u.type = MotionNotify; - xE.u.keyButtonPointer.rootX = x; - xE.u.keyButtonPointer.rootY = y; - xE.u.keyButtonPointer.time = time; + memset(&ev, 0, sizeof(DeviceEvent)); + init_event(pDev, &ev, time); + ev.root_x = x; + ev.root_y = y; + ev.type = ET_Motion; + ev.time = time; - (*pDev->public.processInputProc)(&xE, pDev, 1); + /* FIXME: MD/SD considerations? */ + (*pDev->public.processInputProc)((InternalEvent*)&ev, pDev); } diff --git a/xorg-server/dix/globals.c b/xorg-server/dix/globals.c index 973dc43c3..c24a94fbe 100644 --- a/xorg-server/dix/globals.c +++ b/xorg-server/dix/globals.c @@ -61,7 +61,7 @@ SOFTWARE. #include "dixstruct.h" #include "os.h" -_X_EXPORT ScreenInfo screenInfo; +ScreenInfo screenInfo; KeybdCtrl defaultKeyboardControl = { DEFAULT_KEYBOARD_CLICK, DEFAULT_BELL, @@ -78,47 +78,30 @@ PtrCtrl defaultPointerControl = { DEFAULT_PTR_THRESHOLD, 0}; -_X_EXPORT ClientPtr clients[MAXCLIENTS]; -_X_EXPORT ClientPtr serverClient; -_X_EXPORT int currentMaxClients; /* current size of clients array */ -_X_EXPORT long maxBigRequestSize = MAX_BIG_REQUEST_SIZE; +ClientPtr clients[MAXCLIENTS]; +ClientPtr serverClient; +int currentMaxClients; /* current size of clients array */ +long maxBigRequestSize = MAX_BIG_REQUEST_SIZE; -_X_EXPORT WindowPtr WindowTable[MAXSCREENS]; +WindowPtr WindowTable[MAXSCREENS]; -_X_EXPORT unsigned long globalSerialNumber = 0; -_X_EXPORT unsigned long serverGeneration = 0; +unsigned long globalSerialNumber = 0; +unsigned long serverGeneration = 0; /* these next four are initialized in main.c */ -_X_EXPORT CARD32 ScreenSaverTime; +CARD32 ScreenSaverTime; CARD32 ScreenSaverInterval; -_X_EXPORT int ScreenSaverBlanking; +int ScreenSaverBlanking; int ScreenSaverAllowExposures; #ifdef DPMSExtension -# ifndef DEFAULT_STANDBY_TIME -# define DEFAULT_STANDBY_TIME DEFAULT_SCREEN_SAVER_TIME * 2 -# endif -# ifndef DEFAULT_SUSPEND_TIME -# define DEFAULT_SUSPEND_TIME DEFAULT_SCREEN_SAVER_TIME * 3 -# endif -# ifndef DEFAULT_OFF_TIME -# define DEFAULT_OFF_TIME DEFAULT_SCREEN_SAVER_TIME * 4 -# endif -# ifndef DEFAULT_DPMS_ENABLED -# define DEFAULT_DPMS_ENABLED TRUE -# endif -CARD32 defaultDPMSStandbyTime = DEFAULT_STANDBY_TIME; -CARD32 defaultDPMSSuspendTime = DEFAULT_SUSPEND_TIME; -CARD32 defaultDPMSOffTime = DEFAULT_OFF_TIME; -_X_EXPORT CARD16 DPMSPowerLevel = 0; -Bool defaultDPMSEnabled = DEFAULT_DPMS_ENABLED; -_X_EXPORT Bool DPMSEnabledSwitch = FALSE; /* these denote the DPMS command */ -_X_EXPORT Bool DPMSDisabledSwitch = FALSE; /* lind switch states */ -_X_EXPORT Bool DPMSCapableFlag = FALSE; -_X_EXPORT CARD32 DPMSStandbyTime; -_X_EXPORT CARD32 DPMSSuspendTime; -_X_EXPORT CARD32 DPMSOffTime; -_X_EXPORT Bool DPMSEnabled; +CARD16 DPMSPowerLevel = 0; +Bool DPMSDisabledSwitch = FALSE; +Bool DPMSCapableFlag = FALSE; +CARD32 DPMSStandbyTime; +CARD32 DPMSSuspendTime; +CARD32 DPMSOffTime; +Bool DPMSEnabled; #endif CARD32 defaultScreenSaverTime = DEFAULT_SCREEN_SAVER_TIME; @@ -144,13 +127,13 @@ Bool whiteRoot = FALSE; int cursorScreenDevPriv[MAXSCREENS]; -_X_EXPORT TimeStamp currentTime; -_X_EXPORT TimeStamp lastDeviceEventTime; +TimeStamp currentTime; +TimeStamp lastDeviceEventTime; -_X_EXPORT int defaultColorVisualClass = -1; -_X_EXPORT int monitorResolution = 0; +int defaultColorVisualClass = -1; +int monitorResolution = 0; -_X_EXPORT char *display; +char *display; char *ConnectionInfo; CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; diff --git a/xorg-server/dix/grabs.c b/xorg-server/dix/grabs.c index b372d8f1b..4a351d647 100644 --- a/xorg-server/dix/grabs.c +++ b/xorg-server/dix/grabs.c @@ -52,13 +52,14 @@ SOFTWARE. #include #include "misc.h" -#define NEED_EVENTS #include +#include #include "windowstr.h" #include "inputstr.h" #include "cursorstr.h" #include "dixgrabs.h" #include "xace.h" +#include "exevents.h" #define BITMASK(i) (((Mask)1) << ((i) & 31)) #define MASKIDX(i) ((i) >> 5) @@ -71,11 +72,11 @@ GrabPtr CreateGrab( int client, DeviceIntPtr device, - WindowPtr window, - Mask eventMask, - Bool ownerEvents, Bool keyboardMode, Bool pointerMode, DeviceIntPtr modDevice, - unsigned short modifiers, + WindowPtr window, + GrabType grabtype, + GrabMask *mask, + GrabParameters *param, int type, KeyCode keybut, /* key or button */ WindowPtr confineTo, @@ -83,30 +84,30 @@ CreateGrab( { GrabPtr grab; - grab = (GrabPtr)xalloc(sizeof(GrabRec)); + grab = xcalloc(1, sizeof(GrabRec)); if (!grab) return (GrabPtr)NULL; grab->resource = FakeClientID(client); grab->device = device; - grab->coreGrab = (type < LASTEvent); grab->window = window; - grab->eventMask = eventMask; + grab->eventMask = mask->core; /* same for XI */ grab->deviceMask = 0; - grab->ownerEvents = ownerEvents; - grab->keyboardMode = keyboardMode; - grab->pointerMode = pointerMode; - grab->modifiersDetail.exact = modifiers; + grab->ownerEvents = param->ownerEvents; + grab->keyboardMode = param->this_device_mode; + grab->pointerMode = param->other_devices_mode; + grab->modifiersDetail.exact = param->modifiers; grab->modifiersDetail.pMask = NULL; grab->modifierDevice = modDevice; - grab->coreMods = ((modDevice == inputInfo.keyboard) || - (modDevice == inputInfo.pointer)); grab->type = type; + grab->grabtype = grabtype; grab->detail.exact = keybut; grab->detail.pMask = NULL; grab->confineTo = confineTo; grab->cursor = cursor; - grab->genericMasks = NULL; grab->next = NULL; + + if (grabtype == GRABTYPE_XI2) + memcpy(grab->xi2mask, mask->xi2mask, sizeof(mask->xi2mask)); if (cursor) cursor->refcnt++; return grab; @@ -154,12 +155,12 @@ DeletePassiveGrab(pointer value, XID id) } static Mask * -DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail) +DeleteDetailFromMask(Mask *pDetailMask, unsigned int detail) { Mask *mask; int i; - mask = (Mask *)xalloc(sizeof(Mask) * MasksPerDetailMask); + mask = xalloc(sizeof(Mask) * MasksPerDetailMask); if (mask) { if (pDetailMask) @@ -177,7 +178,7 @@ static Bool IsInGrabMask( DetailRec firstDetail, DetailRec secondDetail, - unsigned short exception) + unsigned int exception) { if (firstDetail.exact == exception) { @@ -197,9 +198,9 @@ IsInGrabMask( static Bool IdenticalExactDetails( - unsigned short firstExact, - unsigned short secondExact, - unsigned short exception) + unsigned int firstExact, + unsigned int secondExact, + unsigned int exception) { if ((firstExact == exception) || (secondExact == exception)) return FALSE; @@ -214,7 +215,7 @@ static Bool DetailSupersedesSecond( DetailRec firstDetail, DetailRec secondDetail, - unsigned short exception) + unsigned int exception) { if (IsInGrabMask(firstDetail, secondDetail, exception)) return TRUE; @@ -229,13 +230,16 @@ DetailSupersedesSecond( static Bool GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) { + unsigned int any_modifier = (pFirstGrab->grabtype == GRABTYPE_XI2) ? + (unsigned int)XIAnyModifier : + (unsigned int)AnyModifier; if (!DetailSupersedesSecond(pFirstGrab->modifiersDetail, pSecondGrab->modifiersDetail, - (unsigned short)AnyModifier)) + any_modifier)) return FALSE; if (DetailSupersedesSecond(pFirstGrab->detail, - pSecondGrab->detail, (unsigned short)AnyKey)) + pSecondGrab->detail, (unsigned int)AnyKey)) return TRUE; return FALSE; @@ -257,7 +261,32 @@ GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) Bool GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice) { - if (!ignoreDevice && + unsigned int any_modifier = (pFirstGrab->grabtype == GRABTYPE_XI2) ? + (unsigned int)XIAnyModifier : + (unsigned int)AnyModifier; + + if (pFirstGrab->grabtype != pSecondGrab->grabtype) + return FALSE; + + if (pFirstGrab->grabtype == GRABTYPE_XI2) + { + if (pFirstGrab->device == inputInfo.all_devices || + pSecondGrab->device == inputInfo.all_devices) + { + /* do nothing */ + } else if (pFirstGrab->device == inputInfo.all_master_devices) + { + if (pSecondGrab->device != inputInfo.all_master_devices && + !IsMaster(pSecondGrab->device)) + return FALSE; + } else if (pSecondGrab->device == inputInfo.all_master_devices) + { + if (pFirstGrab->device != inputInfo.all_master_devices && + !IsMaster(pFirstGrab->device)) + return FALSE; + } else if (pSecondGrab->device != pFirstGrab->device) + return FALSE; + } else if (!ignoreDevice && ((pFirstGrab->device != pSecondGrab->device) || (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice))) return FALSE; @@ -270,19 +299,19 @@ GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice) return TRUE; if (DetailSupersedesSecond(pSecondGrab->detail, pFirstGrab->detail, - (unsigned short)AnyKey) + (unsigned int)AnyKey) && DetailSupersedesSecond(pFirstGrab->modifiersDetail, pSecondGrab->modifiersDetail, - (unsigned short)AnyModifier)) + any_modifier)) return TRUE; if (DetailSupersedesSecond(pFirstGrab->detail, pSecondGrab->detail, - (unsigned short)AnyKey) + (unsigned int)AnyKey) && DetailSupersedesSecond(pSecondGrab->modifiersDetail, pFirstGrab->modifiersDetail, - (unsigned short)AnyModifier)) + any_modifier)) return TRUE; return FALSE; @@ -291,6 +320,13 @@ GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice) static Bool GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab) { + unsigned int any_modifier = (pFirstGrab->grabtype == GRABTYPE_XI2) ? + (unsigned int)XIAnyModifier : + (unsigned int)AnyModifier; + + if (pFirstGrab->grabtype != pSecondGrab->grabtype) + return FALSE; + if (pFirstGrab->device != pSecondGrab->device || (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) || (pFirstGrab->type != pSecondGrab->type)) @@ -298,18 +334,19 @@ GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab) if (!(DetailSupersedesSecond(pFirstGrab->detail, pSecondGrab->detail, - (unsigned short)AnyKey) && + (unsigned int)AnyKey) && DetailSupersedesSecond(pSecondGrab->detail, pFirstGrab->detail, - (unsigned short)AnyKey))) + (unsigned int)AnyKey))) return FALSE; + if (!(DetailSupersedesSecond(pFirstGrab->modifiersDetail, pSecondGrab->modifiersDetail, - (unsigned short)AnyModifier) && + any_modifier) && DetailSupersedesSecond(pSecondGrab->modifiersDetail, pFirstGrab->modifiersDetail, - (unsigned short)AnyModifier))) + any_modifier))) return FALSE; return TRUE; @@ -384,6 +421,8 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) Mask ***updates, **details; int i, ndels, nadds, nups; Bool ok; + unsigned int any_modifier; + unsigned int any_key; #define UPDATE(mask,exact) \ if (!(details[nups] = DeleteDetailFromMask(mask, exact))) \ @@ -396,10 +435,10 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) i++; if (!i) return TRUE; - deletes = (GrabPtr *)xalloc(i * sizeof(GrabPtr)); - adds = (GrabPtr *)xalloc(i * sizeof(GrabPtr)); - updates = (Mask ***)xalloc(i * sizeof(Mask **)); - details = (Mask **)xalloc(i * sizeof(Mask *)); + deletes = xalloc(i * sizeof(GrabPtr)); + adds = xalloc(i * sizeof(GrabPtr)); + updates = xalloc(i * sizeof(Mask **)); + details = xalloc(i * sizeof(Mask *)); if (!deletes || !adds || !updates || !details) { if (details) xfree(details); @@ -408,6 +447,11 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) if (deletes) xfree(deletes); return FALSE; } + + any_modifier = (pMinuendGrab->grabtype == GRABTYPE_XI2) ? + (unsigned int)XIAnyModifier : (unsigned int)AnyModifier; + any_key = (pMinuendGrab->grabtype == GRABTYPE_XI2) ? + (unsigned int)XIAnyKeycode : (unsigned int)AnyKey; ndels = nadds = nups = 0; ok = TRUE; for (grab = wPassiveGrabs(pMinuendGrab->window); @@ -415,37 +459,43 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) grab = grab->next) { if ((CLIENT_BITS(grab->resource) != CLIENT_BITS(pMinuendGrab->resource)) || - !GrabMatchesSecond(grab, pMinuendGrab, (grab->coreGrab))) + !GrabMatchesSecond(grab, pMinuendGrab, + (grab->grabtype == GRABTYPE_CORE))) continue; if (GrabSupersedesSecond(pMinuendGrab, grab)) { deletes[ndels++] = grab; } - else if ((grab->detail.exact == AnyKey) - && (grab->modifiersDetail.exact != AnyModifier)) + else if ((grab->detail.exact == any_key) + && (grab->modifiersDetail.exact != any_modifier)) { UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); } - else if ((grab->modifiersDetail.exact == AnyModifier) - && (grab->detail.exact != AnyKey)) + else if ((grab->modifiersDetail.exact == any_modifier) + && (grab->detail.exact != any_key)) { UPDATE(grab->modifiersDetail.pMask, pMinuendGrab->modifiersDetail.exact); } - else if ((pMinuendGrab->detail.exact != AnyKey) - && (pMinuendGrab->modifiersDetail.exact != AnyModifier)) + else if ((pMinuendGrab->detail.exact != any_key) + && (pMinuendGrab->modifiersDetail.exact != any_modifier)) { GrabPtr pNewGrab; + GrabParameters param; UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); + memset(¶m, 0, sizeof(param)); + param.ownerEvents = grab->ownerEvents; + param.this_device_mode = grab->keyboardMode; + param.other_devices_mode = grab->pointerMode; + param.modifiers = any_modifier; + pNewGrab = CreateGrab(CLIENT_ID(grab->resource), grab->device, - grab->window, (Mask)grab->eventMask, - (Bool)grab->ownerEvents, - (Bool)grab->keyboardMode, - (Bool)grab->pointerMode, - grab->modifierDevice, - AnyModifier, (int)grab->type, + grab->modifierDevice, grab->window, + grab->grabtype, + (GrabMask*)&grab->eventMask, + ¶m, (int)grab->type, pMinuendGrab->detail.exact, grab->confineTo, grab->cursor); if (!pNewGrab) @@ -466,7 +516,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) else adds[nadds++] = pNewGrab; } - else if (pMinuendGrab->detail.exact == AnyKey) + else if (pMinuendGrab->detail.exact == any_key) { UPDATE(grab->modifiersDetail.pMask, pMinuendGrab->modifiersDetail.exact); diff --git a/xorg-server/dix/inpututils.c b/xorg-server/dix/inpututils.c new file mode 100644 index 000000000..4848c1bc2 --- /dev/null +++ b/xorg-server/dix/inpututils.c @@ -0,0 +1,334 @@ +/* + * Copyright © 2008 Daniel Stone + * + * 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. + * + * Author: Daniel Stone + */ + +#ifdef HAVE_DIX_CONFIG_H +#include "dix-config.h" +#endif + +#include "exevents.h" +#include "exglobals.h" +#include "misc.h" +#include "input.h" +#include "inputstr.h" +#include "xace.h" +#include "xkbsrv.h" +#include "xkbstr.h" + +/* Check if a button map change is okay with the device. + * Returns -1 for BadValue, as it collides with MappingBusy. */ +static int +check_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, CARD32 *errval_out, + ClientPtr client) +{ + int i, ret; + + if (!dev || !dev->button) + { + client->errorValue = (dev) ? dev->id : 0; + return BadDevice; + } + + ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); + if (ret != Success) + { + client->errorValue = dev->id; + return ret; + } + + for (i = 0; i < len; i++) { + if (dev->button->map[i + 1] != map[i] && dev->button->down[i + 1]) + return MappingBusy; + } + + return Success; +} + +static void +do_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client) +{ + int i; + xEvent core_mn; + deviceMappingNotify xi_mn; + + /* The map in ButtonClassRec refers to button numbers, whereas the + * protocol is zero-indexed. Sigh. */ + memcpy(&(dev->button->map[1]), map, len); + + core_mn.u.u.type = MappingNotify; + core_mn.u.mappingNotify.request = MappingPointer; + + /* 0 is the server client. */ + for (i = 1; i < currentMaxClients; i++) { + /* Don't send irrelevant events to naïve clients. */ + if (!clients[i] || clients[i]->clientState != ClientStateRunning) + continue; + + if (!XIShouldNotify(clients[i], dev)) + continue; + + core_mn.u.u.sequenceNumber = clients[i]->sequence; + WriteEventsToClient(clients[i], 1, &core_mn); + } + + xi_mn.type = DeviceMappingNotify; + xi_mn.request = MappingPointer; + xi_mn.deviceid = dev->id; + xi_mn.time = GetTimeInMillis(); + + SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) &xi_mn, 1); +} + +/* + * Does what it says on the box, both for core and Xi. + * + * Faithfully reports any errors encountered while trying to apply the map + * to the requested device, faithfully ignores any errors encountered while + * trying to apply the map to its master/slaves. + */ +int +ApplyPointerMapping(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client) +{ + int ret; + + /* If we can't perform the change on the requested device, bail out. */ + ret = check_butmap_change(dev, map, len, &client->errorValue, client); + if (ret != Success) + return ret; + do_butmap_change(dev, map, len, client); + + return Success; +} + +/* Check if a modifier map change is okay with the device. + * Returns -1 for BadValue, as it collides with MappingBusy; this particular + * caveat can be removed with LegalModifier, as we have no other reason to + * set MappingFailed. Sigh. */ +static int +check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap) +{ + int ret, i; + XkbDescPtr xkb; + + ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); + if (ret != Success) + return ret; + + if (!dev->key) + return BadMatch; + xkb = dev->key->xkbInfo->desc; + + for (i = 0; i < MAP_LENGTH; i++) { + if (!modmap[i]) + continue; + + /* Check that all the new modifiers fall within the advertised + * keycode range. */ + if (i < xkb->min_key_code || i > xkb->max_key_code) { + client->errorValue = i; + return -1; + } + + /* Make sure the mapping is okay with the DDX. */ + if (!LegalModifier(i, dev)) { + client->errorValue = i; + return MappingFailed; + } + + /* None of the new modifiers may be down while we change the + * map. */ + if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) { + client->errorValue = i; + return MappingBusy; + } + } + + /* None of the old modifiers may be down while we change the map, + * either. */ + for (i = xkb->min_key_code; i < xkb->max_key_code; i++) { + if (!xkb->map->modmap[i]) + continue; + if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) { + client->errorValue = i; + return MappingBusy; + } + } + + return Success; +} + +static int +check_modmap_change_slave(ClientPtr client, DeviceIntPtr master, + DeviceIntPtr slave, CARD8 *modmap) +{ + XkbDescPtr master_xkb, slave_xkb; + int i, j; + + if (!slave->key || !master->key) + return 0; + + master_xkb = master->key->xkbInfo->desc; + slave_xkb = slave->key->xkbInfo->desc; + + /* Ignore devices with a clearly different keymap. */ + if (slave_xkb->min_key_code != master_xkb->min_key_code || + slave_xkb->max_key_code != master_xkb->max_key_code) + return 0; + + for (i = 0; i < MAP_LENGTH; i++) { + if (!modmap[i]) + continue; + + /* If we have different symbols for any modifier on an + * extended keyboard, ignore the whole remap request. */ + for (j = 0; + j < XkbKeyNumSyms(slave_xkb, i) && + j < XkbKeyNumSyms(master_xkb, i); + j++) + if (XkbKeySymsPtr(slave_xkb, i)[j] != XkbKeySymsPtr(master_xkb, i)[j]) + return 0; + } + + if (check_modmap_change(client, slave, modmap) != Success) + return 0; + + return 1; +} + +/* Actually change the modifier map, and send notifications. Cannot fail. */ +static void +do_modmap_change(ClientPtr client, DeviceIntPtr dev, CARD8 *modmap) +{ + XkbApplyMappingChange(dev, NULL, 0, 0, modmap, serverClient); +} + +/* Rebuild modmap (key -> mod) from map (mod -> key). */ +static int build_modmap_from_modkeymap(CARD8 *modmap, KeyCode *modkeymap, + int max_keys_per_mod) +{ + int i, len = max_keys_per_mod * 8; + + memset(modmap, 0, MAP_LENGTH); + + for (i = 0; i < len; i++) { + if (!modkeymap[i]) + continue; + + if (modkeymap[i] >= MAP_LENGTH) + return BadValue; + + if (modmap[modkeymap[i]]) + return BadValue; + + modmap[modkeymap[i]] = 1 << (i / max_keys_per_mod); + } + + return Success; +} + +int +change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap, + int max_keys_per_mod) +{ + int ret; + CARD8 modmap[MAP_LENGTH]; + DeviceIntPtr tmp; + + ret = build_modmap_from_modkeymap(modmap, modkeymap, max_keys_per_mod); + if (ret != Success) + return ret; + + /* If we can't perform the change on the requested device, bail out. */ + ret = check_modmap_change(client, dev, modmap); + if (ret != Success) + return ret; + do_modmap_change(client, dev, modmap); + + /* Change any attached masters/slaves. */ + if (IsMaster(dev)) { + for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { + if (!IsMaster(tmp) && tmp->u.master == dev) + if (check_modmap_change_slave(client, dev, tmp, modmap)) + do_modmap_change(client, tmp, modmap); + } + } + else if (dev->u.master && dev->u.master->u.lastSlave == dev) { + /* If this fails, expect the results to be weird. */ + if (check_modmap_change(client, dev->u.master, modmap)) + do_modmap_change(client, dev->u.master, modmap); + } + + return Success; +} + +int generate_modkeymap(ClientPtr client, DeviceIntPtr dev, + KeyCode **modkeymap_out, int *max_keys_per_mod_out) +{ + CARD8 keys_per_mod[8]; + int max_keys_per_mod; + KeyCode *modkeymap; + int i, j, ret; + + ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess); + if (ret != Success) + return ret; + + if (!dev->key) + return BadMatch; + + /* Count the number of keys per modifier to determine how wide we + * should make the map. */ + max_keys_per_mod = 0; + for (i = 0; i < 8; i++) + keys_per_mod[i] = 0; + for (i = 8; i < MAP_LENGTH; i++) { + for (j = 0; j < 8; j++) { + if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) { + if (++keys_per_mod[j] > max_keys_per_mod) + max_keys_per_mod = keys_per_mod[j]; + } + } + } + + modkeymap = xcalloc(max_keys_per_mod * 8, sizeof(KeyCode)); + if (!modkeymap) + return BadAlloc; + + for (i = 0; i < 8; i++) + keys_per_mod[i] = 0; + + for (i = 8; i < MAP_LENGTH; i++) { + for (j = 0; j < 8; j++) { + if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) { + modkeymap[(j * max_keys_per_mod) + keys_per_mod[j]] = i; + keys_per_mod[j]++; + } + } + } + + *max_keys_per_mod_out = max_keys_per_mod; + *modkeymap_out = modkeymap; + + return Success; +} diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c index 0527621e7..f96245a4b 100644 --- a/xorg-server/dix/main.c +++ b/xorg-server/dix/main.c @@ -74,14 +74,15 @@ Equipment Corporation. ******************************************************************/ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include +#include #endif #include #include /* for unistd.h */ #include +#include #include "scrnintstr.h" #include "misc.h" #include "os.h" @@ -111,127 +112,13 @@ Equipment Corporation. #endif #ifdef DPMSExtension -#define DPMS_SERVER -#include +#include #include "dpmsproc.h" #endif extern void Dispatch(void); -xConnSetupPrefix connSetupPrefix; - -extern FontPtr defaultFont; - extern void InitProcVectors(void); -extern Bool CreateGCperDepthArray(void); - -#ifndef PANORAMIX -static -#endif -Bool CreateConnectionBlock(void); - -_X_EXPORT PaddingInfo PixmapWidthPaddingInfo[33]; - -int connBlockScreenStart; - -_X_EXPORT void -NotImplemented(xEvent *from, xEvent *to) -{ - FatalError("Not implemented"); -} - -/* - * Dummy entry for ReplySwapVector[] - */ - -void -ReplyNotSwappd( - ClientPtr pClient , - int size , - void * pbuf - ) -{ - FatalError("Not implemented"); -} - -/* - * This array encodes the answer to the question "what is the log base 2 - * of the number of pixels that fit in a scanline pad unit?" - * Note that ~0 is an invalid entry (mostly for the benefit of the reader). - */ -static int answer[6][4] = { - /* pad pad pad pad*/ - /* 8 16 32 64 */ - - { 3, 4, 5 , 6 }, /* 1 bit per pixel */ - { 1, 2, 3 , 4 }, /* 4 bits per pixel */ - { 0, 1, 2 , 3 }, /* 8 bits per pixel */ - { ~0, 0, 1 , 2 }, /* 16 bits per pixel */ - { ~0, ~0, 0 , 1 }, /* 24 bits per pixel */ - { ~0, ~0, 0 , 1 } /* 32 bits per pixel */ -}; - -/* - * This array gives the answer to the question "what is the first index for - * the answer array above given the number of bits per pixel?" - * Note that ~0 is an invalid entry (mostly for the benefit of the reader). - */ -static int indexForBitsPerPixel[ 33 ] = { - ~0, 0, ~0, ~0, /* 1 bit per pixel */ - 1, ~0, ~0, ~0, /* 4 bits per pixel */ - 2, ~0, ~0, ~0, /* 8 bits per pixel */ - ~0,~0, ~0, ~0, - 3, ~0, ~0, ~0, /* 16 bits per pixel */ - ~0,~0, ~0, ~0, - 4, ~0, ~0, ~0, /* 24 bits per pixel */ - ~0,~0, ~0, ~0, - 5 /* 32 bits per pixel */ -}; - -/* - * This array gives the bytesperPixel value for cases where the number - * of bits per pixel is a multiple of 8 but not a power of 2. - */ -static int answerBytesPerPixel[ 33 ] = { - ~0, 0, ~0, ~0, /* 1 bit per pixel */ - 0, ~0, ~0, ~0, /* 4 bits per pixel */ - 0, ~0, ~0, ~0, /* 8 bits per pixel */ - ~0,~0, ~0, ~0, - 0, ~0, ~0, ~0, /* 16 bits per pixel */ - ~0,~0, ~0, ~0, - 3, ~0, ~0, ~0, /* 24 bits per pixel */ - ~0,~0, ~0, ~0, - 0 /* 32 bits per pixel */ -}; - -/* - * This array gives the answer to the question "what is the second index for - * the answer array above given the number of bits per scanline pad unit?" - * Note that ~0 is an invalid entry (mostly for the benefit of the reader). - */ -static int indexForScanlinePad[ 65 ] = { - ~0, ~0, ~0, ~0, - ~0, ~0, ~0, ~0, - 0, ~0, ~0, ~0, /* 8 bits per scanline pad unit */ - ~0, ~0, ~0, ~0, - 1, ~0, ~0, ~0, /* 16 bits per scanline pad unit */ - ~0, ~0, ~0, ~0, - ~0, ~0, ~0, ~0, - ~0, ~0, ~0, ~0, - 2, ~0, ~0, ~0, /* 32 bits per scanline pad unit */ - ~0, ~0, ~0, ~0, - ~0, ~0, ~0, ~0, - ~0, ~0, ~0, ~0, - ~0, ~0, ~0, ~0, - ~0, ~0, ~0, ~0, - ~0, ~0, ~0, ~0, - ~0, ~0, ~0, ~0, - 3 /* 64 bits per scanline pad unit */ -}; - -#ifndef MIN -#define MIN(a,b) (((a) < (b)) ? (a) : (b)) -#endif #ifdef XQUARTZ #include @@ -252,6 +139,8 @@ int main(int argc, char *argv[], char *envp[]) InitRegions(); + pixman_disable_out_of_bounds_workaround(); + CheckUserParameters(argc, argv, envp); CheckUserAuthorization(); @@ -270,10 +159,10 @@ int main(int argc, char *argv[], char *envp[]) ScreenSaverBlanking = defaultScreenSaverBlanking; ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; #ifdef DPMSExtension - DPMSStandbyTime = defaultDPMSStandbyTime; - DPMSSuspendTime = defaultDPMSSuspendTime; - DPMSOffTime = defaultDPMSOffTime; - DPMSEnabled = defaultDPMSEnabled; + DPMSStandbyTime = DEFAULT_SCREEN_SAVER_TIME; + DPMSSuspendTime = DEFAULT_SCREEN_SAVER_TIME; + DPMSOffTime = DEFAULT_SCREEN_SAVER_TIME; + DPMSEnabled = TRUE; DPMSPowerLevel = 0; #endif InitBlockAndWakeupHandlers(); @@ -286,7 +175,7 @@ int main(int argc, char *argv[], char *envp[]) InitProcVectors(); for (i=1; i= 0) - *pBuf++ = 0; - - for (i=0; idrawable.id; - root.defaultColormap = pScreen->defColormap; - root.whitePixel = pScreen->whitePixel; - root.blackPixel = pScreen->blackPixel; - root.currentInputMask = 0; /* filled in when sent */ - root.pixWidth = pScreen->width; - root.pixHeight = pScreen->height; - root.mmWidth = pScreen->mmWidth; - root.mmHeight = pScreen->mmHeight; - root.minInstalledMaps = pScreen->minInstalledCmaps; - root.maxInstalledMaps = pScreen->maxInstalledCmaps; - root.rootVisualID = pScreen->rootVisual; - root.backingStore = pScreen->backingStoreSupport; - root.saveUnders = FALSE; - root.rootDepth = pScreen->rootDepth; - root.nDepths = pScreen->numDepths; - memmove(pBuf, (char *)&root, sizeof(xWindowRoot)); - sizesofar += sizeof(xWindowRoot); - pBuf += sizeof(xWindowRoot); - - pDepth = pScreen->allowedDepths; - for(j = 0; j < pScreen->numDepths; j++, pDepth++) - { - lenofblock += sizeof(xDepth) + - (pDepth->numVids * sizeof(xVisualType)); - pBuf = (char *)xrealloc(ConnectionInfo, lenofblock); - if (!pBuf) - { - xfree(ConnectionInfo); - return FALSE; - } - ConnectionInfo = pBuf; - pBuf += sizesofar; - depth.depth = pDepth->depth; - depth.nVisuals = pDepth->numVids; - memmove(pBuf, (char *)&depth, sizeof(xDepth)); - pBuf += sizeof(xDepth); - sizesofar += sizeof(xDepth); - for(k = 0; k < pDepth->numVids; k++) - { - vid = pDepth->vids[k]; - for (pVisual = pScreen->visuals; - pVisual->vid != vid; - pVisual++) - ; - visual.visualID = vid; - visual.class = pVisual->class; - visual.bitsPerRGB = pVisual->bitsPerRGBValue; - visual.colormapEntries = pVisual->ColormapEntries; - visual.redMask = pVisual->redMask; - visual.greenMask = pVisual->greenMask; - visual.blueMask = pVisual->blueMask; - memmove(pBuf, (char *)&visual, sizeof(xVisualType)); - pBuf += sizeof(xVisualType); - sizesofar += sizeof(xVisualType); - } - } - } - connSetupPrefix.success = xTrue; - connSetupPrefix.length = lenofblock/4; - connSetupPrefix.majorVersion = X_PROTOCOL; - connSetupPrefix.minorVersion = X_PROTOCOL_REVISION; - return TRUE; -} - -/* - grow the array of screenRecs if necessary. - call the device-supplied initialization procedure -with its screen number, a pointer to its ScreenRec, argc, and argv. - return the number of successfully installed screens. - -*/ - -int -AddScreen( - Bool (* pfnInit)( - int /*index*/, - ScreenPtr /*pScreen*/, - int /*argc*/, - char ** /*argv*/ - ), - int argc, - char **argv) -{ - - int i; - int scanlinepad, format, depth, bitsPerPixel, j, k; - ScreenPtr pScreen; - - i = screenInfo.numScreens; - if (i == MAXSCREENS) - return -1; - - pScreen = (ScreenPtr) xcalloc(1, sizeof(ScreenRec)); - if (!pScreen) - return -1; - - pScreen->devPrivates = NULL; - pScreen->myNum = i; - pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8); - pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ - pScreen->CreateScreenResources = 0; - - /* - * This loop gets run once for every Screen that gets added, - * but thats ok. If the ddx layer initializes the formats - * one at a time calling AddScreen() after each, then each - * iteration will make it a little more accurate. Worst case - * we do this loop N * numPixmapFormats where N is # of screens. - * Anyway, this must be called after InitOutput and before the - * screen init routine is called. - */ - for (format=0; formatrgf = ~0L; /* there are no scratch GCs yet*/ - WindowTable[i] = NullWindow; - screenInfo.screens[i] = pScreen; - screenInfo.numScreens++; - if (!(*pfnInit)(i, pScreen, argc, argv)) - { - dixFreePrivates(pScreen->devPrivates); - xfree(pScreen); - screenInfo.numScreens--; - return -1; - } - return i; -} diff --git a/xorg-server/dix/pixmap.c b/xorg-server/dix/pixmap.c index 82e388cf3..10ec02a78 100644 --- a/xorg-server/dix/pixmap.c +++ b/xorg-server/dix/pixmap.c @@ -49,7 +49,7 @@ from The Open Group. /* callable by ddx */ -_X_EXPORT PixmapPtr +PixmapPtr GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth, int bitsPerPixel, int devKind, pointer pPixData) { @@ -72,7 +72,7 @@ GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth, /* callable by ddx */ -_X_EXPORT void +void FreeScratchPixmapHeader(PixmapPtr pPixmap) { if (pPixmap) @@ -105,7 +105,7 @@ FreeScratchPixmapsForScreen(int scrnum) /* callable by ddx */ -_X_EXPORT PixmapPtr +PixmapPtr AllocatePixmap(ScreenPtr pScreen, int pixDataSize) { PixmapPtr pPixmap; @@ -113,7 +113,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize) if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize) return NullPixmap; - pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize); + pPixmap = xalloc(pScreen->totalPixmapSize + pixDataSize); if (!pPixmap) return NullPixmap; diff --git a/xorg-server/dix/privates.c b/xorg-server/dix/privates.c index ca03317bf..3a2deb85c 100644 --- a/xorg-server/dix/privates.c +++ b/xorg-server/dix/privates.c @@ -84,7 +84,7 @@ privateExists(PrivateRec **privates, const DevPrivateKey key) /* * Request pre-allocated space. */ -_X_EXPORT int +int dixRequestPrivate(const DevPrivateKey key, unsigned size) { PrivateDescRec *item = findItem(key); @@ -98,7 +98,7 @@ dixRequestPrivate(const DevPrivateKey key, unsigned size) /* * Allocate a private and attach it to an existing object. */ -_X_EXPORT pointer * +pointer * dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key) { PrivateDescRec *item = findItem(key); @@ -154,7 +154,7 @@ dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key) /* * Look up a private pointer. */ -_X_EXPORT pointer +pointer dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) { pointer *ptr; @@ -169,7 +169,7 @@ dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) /* * Look up the address of a private pointer. */ -_X_EXPORT pointer * +pointer * dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) { if (privateExists(privates, key)) @@ -181,7 +181,7 @@ dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) /* * Set a private pointer. */ -_X_EXPORT int +int dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) { top: @@ -198,7 +198,7 @@ dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) /* * Called to free privates at object deletion time. */ -_X_EXPORT void +void dixFreePrivates(PrivateRec *privates) { int i; @@ -223,7 +223,7 @@ dixFreePrivates(PrivateRec *privates) /* * Callback registration */ -_X_EXPORT int +int dixRegisterPrivateInitFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer data) { @@ -234,7 +234,7 @@ dixRegisterPrivateInitFunc(const DevPrivateKey key, return AddCallback(&item->initfuncs, callback, data); } -_X_EXPORT int +int dixRegisterPrivateDeleteFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer data) { @@ -265,7 +265,7 @@ static int offsetsSize = 0; /* * Specify where the devPrivates field is located in a structure type */ -_X_EXPORT int +int dixRegisterPrivateOffset(RESTYPE type, int offset) { type = type & TypeMask; @@ -287,7 +287,7 @@ dixRegisterPrivateOffset(RESTYPE type, int offset) return TRUE; } -_X_EXPORT int +int dixLookupPrivateOffset(RESTYPE type) { type = type & TypeMask; @@ -312,7 +312,7 @@ dixResetPrivates(void) if (offsets) xfree(offsets); offsetsSize = sizeof(offsetDefaults); - offsets = (int *)xalloc(offsetsSize); + offsets = xalloc(offsetsSize); offsetsSize /= sizeof(int); if (!offsets) return FALSE; diff --git a/xorg-server/dix/property.c b/xorg-server/dix/property.c index 7149f7c8c..9ec5dc6ae 100644 --- a/xorg-server/dix/property.c +++ b/xorg-server/dix/property.c @@ -50,8 +50,6 @@ SOFTWARE. #endif #include -#define NEED_REPLIES -#define NEED_EVENTS #include #include "windowstr.h" #include "propertyst.h" @@ -90,7 +88,7 @@ PrintPropertys(WindowPtr pWin) } #endif -_X_EXPORT int +int dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName, ClientPtr client, Mask access_mode) { @@ -113,6 +111,7 @@ deliverPropertyNotifyEvent(WindowPtr pWin, int state, Atom atom) { xEvent event; + memset(&event, 0, sizeof(xEvent)); event.u.u.type = PropertyNotify; event.u.property.window = pWin->drawable.id; event.u.property.state = state; @@ -138,8 +137,8 @@ ProcRotateProperties(ClientPtr client) return rc; atoms = (Atom *) & stuff[1]; - props = (PropertyPtr *)xalloc(stuff->nAtoms * sizeof(PropertyPtr)); - saved = (PropertyPtr)xalloc(stuff->nAtoms * sizeof(PropertyRec)); + props = xalloc(stuff->nAtoms * sizeof(PropertyPtr)); + saved = xalloc(stuff->nAtoms * sizeof(PropertyRec)); if (!props || !saved) { rc = BadAlloc; goto out; @@ -219,7 +218,7 @@ ProcChangeProperty(ClientPtr client) return BadValue; } len = stuff->nUnits; - if (len > ((0xffffffff - sizeof(xChangePropertyReq)) >> 2)) + if (len > bytes_to_int32(0xffffffff - sizeof(xChangePropertyReq))) return BadLength; sizeInBytes = format>>3; totalSize = len * sizeInBytes; @@ -248,14 +247,15 @@ ProcChangeProperty(ClientPtr client) return client->noClientException; } -_X_EXPORT int +int dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, Atom type, int format, int mode, unsigned long len, pointer value, Bool sendevent) { PropertyPtr pProp; + PropertyRec savedProp; int sizeInBytes, totalSize, rc; - pointer data; + unsigned char *data; Mask access_mode; sizeInBytes = format>>3; @@ -269,21 +269,20 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, { if (!pWin->optional && !MakeWindowOptional (pWin)) return(BadAlloc); - pProp = (PropertyPtr)xalloc(sizeof(PropertyRec)); + pProp = xalloc(sizeof(PropertyRec)); if (!pProp) return(BadAlloc); - data = (pointer)xalloc(totalSize); + data = xalloc(totalSize); if (!data && len) { xfree(pProp); return(BadAlloc); } + memcpy(data, value, totalSize); pProp->propertyName = property; pProp->type = type; pProp->format = format; pProp->data = data; - if (len) - memmove((char *)data, (char *)value, totalSize); pProp->size = len; pProp->devPrivates = NULL; rc = XaceHookPropertyAccess(pClient, pWin, &pProp, @@ -308,17 +307,17 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, return(BadMatch); if ((pProp->type != type) && (mode != PropModeReplace)) return(BadMatch); + + /* save the old values for later */ + savedProp = *pProp; + if (mode == PropModeReplace) { - if (totalSize != pProp->size * (pProp->format >> 3)) - { - data = (pointer)xrealloc(pProp->data, totalSize); - if (!data && len) - return(BadAlloc); - pProp->data = data; - } - if (len) - memmove((char *)pProp->data, (char *)value, totalSize); + data = xalloc(totalSize); + if (!data && len) + return(BadAlloc); + memcpy(data, value, totalSize); + pProp->data = data; pProp->size = len; pProp->type = type; pProp->format = format; @@ -329,28 +328,40 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, } else if (mode == PropModeAppend) { - data = (pointer)xrealloc(pProp->data, - sizeInBytes * (len + pProp->size)); + data = xalloc((pProp->size + len) * sizeInBytes); if (!data) return(BadAlloc); + memcpy(data, pProp->data, pProp->size * sizeInBytes); + memcpy(data + pProp->size * sizeInBytes, value, totalSize); pProp->data = data; - memmove(&((char *)data)[pProp->size * sizeInBytes], - (char *)value, - totalSize); pProp->size += len; } else if (mode == PropModePrepend) { - data = (pointer)xalloc(sizeInBytes * (len + pProp->size)); + data = xalloc(sizeInBytes * (len + pProp->size)); if (!data) return(BadAlloc); - memmove(&((char *)data)[totalSize], (char *)pProp->data, - (int)(pProp->size * sizeInBytes)); - memmove((char *)data, (char *)value, totalSize); - xfree(pProp->data); + memcpy(data + totalSize, pProp->data, pProp->size * sizeInBytes); + memcpy(data, value, totalSize); pProp->data = data; pProp->size += len; } + + /* Allow security modules to check the new content */ + access_mode |= DixPostAccess; + rc = XaceHookPropertyAccess(pClient, pWin, &pProp, access_mode); + if (rc == Success) + { + if (savedProp.data != pProp->data) + xfree(savedProp.data); + } + else + { + if (savedProp.data != pProp->data) + xfree(pProp->data); + *pProp = savedProp; + return rc; + } } else return rc; @@ -361,7 +372,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, return(Success); } -_X_EXPORT int +int ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, int mode, unsigned long len, pointer value, Bool sendevent) @@ -463,7 +474,7 @@ ProcGetProperty(ClientPtr client) } rc = dixLookupWindow(&pWin, stuff->window, client, win_mode); if (rc != Success) - return rc; + return (rc == BadMatch) ? BadWindow : rc; if (!ValidAtom(stuff->property)) { @@ -481,6 +492,7 @@ ProcGetProperty(ClientPtr client) return(BadAtom); } + memset(&reply, 0, sizeof(xGetPropertyReply)); reply.type = X_Reply; reply.sequenceNumber = client->sequence; @@ -525,7 +537,7 @@ ProcGetProperty(ClientPtr client) reply.bytesAfter = n - (ind + len); reply.format = pProp->format; - reply.length = (len + 3) >> 2; + reply.length = bytes_to_int32(len); reply.nItems = len / (pProp->format / 8 ); reply.propertyType = pProp->type; @@ -583,7 +595,7 @@ ProcListProperties(ClientPtr client) for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) numProps++; - if (numProps && !(pAtoms = (Atom *)xalloc(numProps * sizeof(Atom)))) + if (numProps && !(pAtoms = xalloc(numProps * sizeof(Atom)))) return BadAlloc; numProps = 0; @@ -599,7 +611,7 @@ ProcListProperties(ClientPtr client) xlpr.type = X_Reply; xlpr.nProperties = numProps; - xlpr.length = (numProps * sizeof(Atom)) >> 2; + xlpr.length = bytes_to_int32(numProps * sizeof(Atom)); xlpr.sequenceNumber = client->sequence; WriteReplyToClient(client, sizeof(xGenericReply), &xlpr); if (numProps) diff --git a/xorg-server/dix/protocol.txt b/xorg-server/dix/protocol.txt index 364f13e31..8e152edaa 100644 --- a/xorg-server/dix/protocol.txt +++ b/xorg-server/dix/protocol.txt @@ -116,6 +116,14 @@ R004 DPMS:Enable R005 DPMS:Disable R006 DPMS:ForceLevel R007 DPMS:Info +R000 DRI2:QueryVersion +R001 DRI2:Connect +R002 DRI2:Authenticate +R003 DRI2:CreateDrawable +R004 DRI2:DestroyDrawable +R005 DRI2:GetBuffers +R006 DRI2:CopyRegion +R007 DRI2:GetBuffersWithFormat R000 Extended-Visual-Information:QueryVersion R001 Extended-Visual-Information:GetVisualInfo R000 FontCache:QueryVersion @@ -590,6 +598,7 @@ V031 X11:SelectionNotify V032 X11:ColormapNotify V033 X11:ClientMessage V034 X11:MappingNotify +V035 X11:GenericEvent E000 X11:Success E001 X11:BadRequest E002 X11:BadValue @@ -948,6 +957,27 @@ R036 XInputExtension:ListDeviceProperties R037 XInputExtension:ChangeDeviceProperty R038 XInputExtension:DeleteDeviceProperty R039 XInputExtension:GetDeviceProperty +R040 XInputExtension:QueryPointer +R041 XInputExtension:WarpPointer +R042 XInputExtension:ChangeCursor +R043 XInputExtension:ChangeHierarchy +R044 XInputExtension:SetClientPointer +R045 XInputExtension:GetClientPointer +R046 XInputExtension:SelectEvents +R047 XInputExtension:QueryVersion +R048 XInputExtension:QueryDevice +R049 XInputExtension:SetFocus +R050 XInputExtension:GetFocus +R051 XInputExtension:GrabDevice +R052 XInputExtension:UngrabDevice +R053 XInputExtension:AllowEvents +R054 XInputExtension:PassiveGrabDevice +R055 XInputExtension:PassiveUngrabDevice +R056 XInputExtension:ListProperties +R057 XInputExtension:ChangeProperty +R058 XInputExtension:DeleteProperty +R059 XInputExtension:GetProperty +R060 XInputExtension:GetSelectedEvents V000 XInputExtension:DeviceValuator V001 XInputExtension:DeviceKeyPress V002 XInputExtension:DeviceKeyRelease diff --git a/xorg-server/dix/ptrveloc.c b/xorg-server/dix/ptrveloc.c index e9d4e882f..37c8e5178 100644 --- a/xorg-server/dix/ptrveloc.c +++ b/xorg-server/dix/ptrveloc.c @@ -1,6 +1,6 @@ /* * - * Copyright © 2006-2008 Simon Thum simon dot thum at gmx dot de + * Copyright © 2006-2009 Simon Thum simon dot thum at gmx dot de * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -28,14 +28,15 @@ #include #include -#include -#include -#include +#include +#include + +#include /***************************************************************************** * Predictable pointer acceleration * - * 2006-2008 by Simon Thum (simon [dot] thum [at] gmx de) + * 2006-2009 by Simon Thum (simon [dot] thum [at] gmx de) * * Serves 3 complementary functions: * 1) provide a sophisticated ballistic velocity estimate to improve @@ -52,31 +53,20 @@ * which returns an acceleration * for a given velocity * - * The profile can be selected by the user (potentially at runtime). - * the classic profile is intended to cleanly perform old-style + * The profile can be selected by the user at runtime. + * The classic profile is intended to cleanly perform old-style * function selection (threshold =/!= 0) * ****************************************************************************/ /* fwds */ -static inline void -FeedFilterStage(FilterStagePtr s, float value, int tdiff); -extern void -InitFilterStage(FilterStagePtr s, float rdecay, int lutsize); -void -CleanupFilterChain(DeviceVelocityPtr s); int -SetAccelerationProfile(DeviceVelocityPtr s, int profile_num); -void -InitFilterChain(DeviceVelocityPtr s, float rdecay, float degression, - int stages, int lutsize); -void -CleanupFilterChain(DeviceVelocityPtr s); +SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num); static float -SimpleSmoothProfile(DeviceVelocityPtr pVel, float velocity, +SimpleSmoothProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, float velocity, float threshold, float acc); - - +static PointerAccelerationProfileFunc +GetAccelerationProfile(DeviceVelocityPtr vel, int profile_num); /*#define PTRACCEL_DEBUGGING*/ @@ -87,36 +77,41 @@ SimpleSmoothProfile(DeviceVelocityPtr pVel, float velocity, #endif /******************************** - * Init/Uninit etc + * Init/Uninit *******************************/ +/* some int which is not a profile number */ +#define PROFILE_UNINITIALIZE (-100) + /** * Init struct so it should match the average case */ void -InitVelocityData(DeviceVelocityPtr s) +InitVelocityData(DeviceVelocityPtr vel) { - memset(s, 0, sizeof(DeviceVelocityRec)); - - s->corr_mul = 10.0; /* dots per 10 milisecond should be usable */ - s->const_acceleration = 1.0; /* no acceleration/deceleration */ - s->reset_time = 300; - s->use_softening = 1; - s->min_acceleration = 1.0; /* don't decelerate */ - s->coupling = 0.25; - s->average_accel = TRUE; - SetAccelerationProfile(s, AccelProfileClassic); - InitFilterChain(s, (float)1.0/20.0, 1, 1, 40); + memset(vel, 0, sizeof(DeviceVelocityRec)); + + vel->corr_mul = 10.0; /* dots per 10 milisecond should be usable */ + vel->const_acceleration = 1.0; /* no acceleration/deceleration */ + vel->reset_time = 300; + vel->use_softening = 1; + vel->min_acceleration = 1.0; /* don't decelerate */ + vel->max_rel_diff = 0.2; + vel->max_diff = 1.0; + vel->initial_range = 2; + vel->average_accel = TRUE; + SetAccelerationProfile(vel, AccelProfileClassic); + InitTrackers(vel, 16); } /** * Clean up */ -static void -FreeVelocityData(DeviceVelocityPtr s){ - CleanupFilterChain(s); - SetAccelerationProfile(s, -1); +void +FreeVelocityData(DeviceVelocityPtr vel){ + xfree(vel->tracker); + SetAccelerationProfile(vel, PROFILE_UNINITIALIZE); } @@ -124,302 +119,461 @@ FreeVelocityData(DeviceVelocityPtr s){ * dix uninit helper, called through scheme */ void -AccelerationDefaultCleanup(DeviceIntPtr pDev) +AccelerationDefaultCleanup(DeviceIntPtr dev) { /*sanity check*/ - if( pDev->valuator->accelScheme.AccelSchemeProc == acceleratePointerPredictable - && pDev->valuator->accelScheme.accelData != NULL){ - pDev->valuator->accelScheme.AccelSchemeProc = NULL; - FreeVelocityData(pDev->valuator->accelScheme.accelData); - xfree(pDev->valuator->accelScheme.accelData); - pDev->valuator->accelScheme.accelData = NULL; + if( dev->valuator->accelScheme.AccelSchemeProc == acceleratePointerPredictable + && dev->valuator->accelScheme.accelData != NULL){ + dev->valuator->accelScheme.AccelSchemeProc = NULL; + FreeVelocityData(dev->valuator->accelScheme.accelData); + xfree(dev->valuator->accelScheme.accelData); + dev->valuator->accelScheme.accelData = NULL; } } -/********************* - * Filtering logic - ********************/ + +/************************* + * Input property support + ************************/ /** -Initialize a filter chain. -Expected result is a series of filters, each progressively more integrating. - -This allows for two strategies: Either you have one filter which is reasonable -and is being coupled to account for fast-changing input, or you have 'one for -every situation'. You might want to have tighter coupling then, e.g. 0.1. -In the filter stats, you can see if a reasonable filter useage emerges. -*/ -void -InitFilterChain(DeviceVelocityPtr s, float rdecay, float progression, int stages, int lutsize) + * choose profile + */ +static int +AccelSetProfileProperty(DeviceIntPtr dev, Atom atom, + XIPropertyValuePtr val, BOOL checkOnly) { - int fn; - if((stages > 1 && progression < 1.0f) || 0 == progression){ - ErrorF("(dix ptracc) invalid filter chain progression specified\n"); - return; - } - /* Block here to support runtime filter adjustment */ - OsBlockSignals(); - for(fn = 0; fn < MAX_VELOCITY_FILTERS; fn++){ - if(fn < stages){ - InitFilterStage(&s->filters[fn], rdecay, lutsize); - }else{ - InitFilterStage(&s->filters[fn], 0, 0); - } - rdecay /= progression; - } - /* release again. Should the input loop be threaded, we also need - * memory release here (in principle). - */ - OsReleaseSignals(); + DeviceVelocityPtr vel; + int profile, *ptr = &profile; + int rc; + int nelem = 1; + + if (atom != XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER)) + return Success; + + vel = GetDevicePredictableAccelData(dev); + if (!vel) + return BadValue; + rc = XIPropToInt(val, &nelem, &ptr); + + if(checkOnly) + { + if (rc) + return rc; + + if (GetAccelerationProfile(vel, profile) == NULL) + return BadValue; + } else + SetAccelerationProfile(vel, profile); + + return Success; } +static void +AccelInitProfileProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) +{ + int profile = vel->statistics.profile_number; + Atom prop_profile_number = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); -void -CleanupFilterChain(DeviceVelocityPtr s) + XIChangeDeviceProperty(dev, prop_profile_number, XA_INTEGER, 32, + PropModeReplace, 1, &profile, FALSE); + XISetDevicePropertyDeletable(dev, prop_profile_number, FALSE); + XIRegisterPropertyHandler(dev, AccelSetProfileProperty, NULL, NULL); +} + +/** + * constant deceleration + */ +static int +AccelSetDecelProperty(DeviceIntPtr dev, Atom atom, + XIPropertyValuePtr val, BOOL checkOnly) { - int fn; + DeviceVelocityPtr vel; + float v, *ptr = &v; + int rc; + int nelem = 1; + + if (atom != XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION)) + return Success; + + vel = GetDevicePredictableAccelData(dev); + if (!vel) + return BadValue; + rc = XIPropToFloat(val, &nelem, &ptr); + + if(checkOnly) + { + if (rc) + return rc; + return (v >= 1.0f) ? Success : BadValue; + } + + if(v >= 1.0f) + vel->const_acceleration = 1/v; - for(fn = 0; fn < MAX_VELOCITY_FILTERS; fn++) - InitFilterStage(&s->filters[fn], 0, 0); + return Success; } -static inline void -StuffFilterChain(DeviceVelocityPtr s, float value) +static void +AccelInitDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) { - int fn; + float fval = 1.0/vel->const_acceleration; + Atom prop_const_decel = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION); + XIChangeDeviceProperty(dev, prop_const_decel, + XIGetKnownProperty(XATOM_FLOAT), 32, + PropModeReplace, 1, &fval, FALSE); + XISetDevicePropertyDeletable(dev, prop_const_decel, FALSE); + XIRegisterPropertyHandler(dev, AccelSetDecelProperty, NULL, NULL); +} - for(fn = 0; fn < MAX_VELOCITY_FILTERS; fn++){ - if(s->filters[fn].rdecay != 0) - s->filters[fn].current = value; - else break; + +/** + * adaptive deceleration + */ +static int +AccelSetAdaptDecelProperty(DeviceIntPtr dev, Atom atom, + XIPropertyValuePtr val, BOOL checkOnly) +{ + DeviceVelocityPtr veloc; + float v, *ptr = &v; + int rc; + int nelem = 1; + + if (atom != XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION)) + return Success; + + veloc = GetDevicePredictableAccelData(dev); + if (!veloc) + return BadValue; + rc = XIPropToFloat(val, &nelem, &ptr); + + if(checkOnly) + { + if (rc) + return rc; + return (v >= 1.0f) ? Success : BadValue; } + + if(v >= 1.0f) + veloc->min_acceleration = 1/v; + + return Success; +} + +static void +AccelInitAdaptDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) +{ + float fval = 1.0/vel->min_acceleration; + Atom prop_adapt_decel = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION); + + XIChangeDeviceProperty(dev, prop_adapt_decel, XIGetKnownProperty(XATOM_FLOAT), 32, + PropModeReplace, 1, &fval, FALSE); + XISetDevicePropertyDeletable(dev, prop_adapt_decel, FALSE); + XIRegisterPropertyHandler(dev, AccelSetAdaptDecelProperty, NULL, NULL); } /** - * Adjust weighting decay and lut for a stage - * The weight fn is designed so its integral 0->inf is unity, so we end - * up with a stable (basically IIR) filter. It always draws - * towards its more current input values, which have more weight the older - * the last input value is. + * velocity scaling */ -void -InitFilterStage(FilterStagePtr s, float rdecay, int lutsize) +static int +AccelSetScaleProperty(DeviceIntPtr dev, Atom atom, + XIPropertyValuePtr val, BOOL checkOnly) { - int x; - float *newlut; - float *oldlut; - - s->fading_lut_size = 0; /* prevent access */ - - if(lutsize > 0){ - newlut = xalloc (sizeof(float)* lutsize); - if(!newlut) - return; - for(x = 0; x < lutsize; x++) - newlut[x] = pow(0.5, ((float)x) * rdecay); - }else{ - newlut = NULL; + DeviceVelocityPtr vel; + float v, *ptr = &v; + int rc; + int nelem = 1; + + if (atom != XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING)) + return Success; + + vel = GetDevicePredictableAccelData(dev); + if (!vel) + return BadValue; + rc = XIPropToFloat(val, &nelem, &ptr); + + if (checkOnly) + { + if (rc) + return rc; + + return (v > 0) ? Success : BadValue; } - oldlut = s->fading_lut; - s->fading_lut = newlut; - s->rdecay = rdecay; - s->fading_lut_size = lutsize; - s->current = 0; - if(oldlut != NULL) - xfree(oldlut); + + if(v > 0) + vel->corr_mul = v; + + return Success; } +static void +AccelInitScaleProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) +{ + float fval = vel->corr_mul; + Atom prop_velo_scale = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING); + + XIChangeDeviceProperty(dev, prop_velo_scale, XIGetKnownProperty(XATOM_FLOAT), 32, + PropModeReplace, 1, &fval, FALSE); + XISetDevicePropertyDeletable(dev, prop_velo_scale, FALSE); + XIRegisterPropertyHandler(dev, AccelSetScaleProperty, NULL, NULL); +} -static inline void -FeedFilterChain(DeviceVelocityPtr s, float value, int tdiff) +BOOL +InitializePredictableAccelerationProperties(DeviceIntPtr dev) { - int fn; + DeviceVelocityPtr vel = GetDevicePredictableAccelData(dev); - for(fn = 0; fn < MAX_VELOCITY_FILTERS; fn++){ - if(s->filters[fn].rdecay != 0) - FeedFilterStage(&s->filters[fn], value, tdiff); - else break; - } + if(!vel) + return FALSE; + + AccelInitProfileProperty(dev, vel); + AccelInitDecelProperty(dev, vel); + AccelInitAdaptDecelProperty(dev, vel); + AccelInitScaleProperty(dev, vel); + return TRUE; } +/********************* + * Tracking logic + ********************/ -static inline void -FeedFilterStage(FilterStagePtr s, float value, int tdiff){ - float fade; - if(tdiff < s->fading_lut_size) - fade = s->fading_lut[tdiff]; - else - fade = pow(0.5, ((float)tdiff) * s->rdecay); - s->current *= fade; /* fade out old velocity */ - s->current += value * (1.0f - fade); /* and add up current */ +void +InitTrackers(DeviceVelocityPtr vel, int ntracker) +{ + if(ntracker < 1){ + ErrorF("(dix ptracc) invalid number of trackers\n"); + return; + } + xfree(vel->tracker); + vel->tracker = (MotionTrackerPtr)xalloc(ntracker * sizeof(MotionTracker)); + memset(vel->tracker, 0, ntracker * sizeof(MotionTracker)); + vel->num_tracker = ntracker; } /** - * Select the most filtered matching result. Also, the first - * mismatching filter may be set to value (coupling). + * return a bit field of possible directions. + * 0 = N, 2 = E, 4 = S, 6 = W, in-between is as you guess. + * There's no reason against widening to more precise directions (<45 degrees), + * should it not perform well. All this is needed for is sort out non-linear + * motion, so precision isn't paramount. However, one should not flag direction + * too narrow, since it would then cut the linear segment to zero size way too + * often. */ -static inline float -QueryFilterChain( - DeviceVelocityPtr s, - float value) -{ - int fn, rfn = 0, cfn = -1; - float cur, result = value; - - /* try to retrieve most integrated result 'within range' - * Assumption: filter are in order least to most integrating */ - for(fn = 0; fn < MAX_VELOCITY_FILTERS; fn++){ - if(0.0f == s->filters[fn].rdecay) - break; - cur = s->filters[fn].current; +static int +DoGetDirection(int dx, int dy){ + float r; + int i1, i2; + /* on insignificant mickeys, flag 135 degrees */ + if(abs(dx) < 2 && abs(dy < 2)){ + /* first check diagonal cases */ + if(dx > 0 && dy > 0) + return 4+8+16; + if(dx > 0 && dy < 0) + return 1+2+4; + if(dx < 0 && dy < 0) + return 1+128+64; + if(dx < 0 && dy > 0) + return 16+32+64; + /* check axis-aligned directions */ + if(dx > 0) + return 2+4+8; /*E*/ + if(dx < 0) + return 128+64+32; /*W*/ + if(dy > 0) + return 32+16+8; /*S*/ + if(dy < 0) + return 128+1+2; /*N*/ + return 255; /* shouldn't happen */ + } + /* else, compute angle and set appropriate flags */ +#ifdef _ISOC99_SOURCE + r = atan2f(dy, dx); +#else + r = atan2(dy, dx); +#endif + /* find direction. We avoid r to become negative, + * since C has no well-defined modulo for such cases. */ + r = (r+(M_PI*2.5))/(M_PI/4); + /* this intends to flag 2 directions (90 degrees), + * except on very well-aligned mickeys. */ + i1 = (int)(r+0.1) % 8; + i2 = (int)(r+0.9) % 8; + if(i1 < 0 || i1 > 7 || i2 < 0 || i2 > 7) + return 255; /* shouldn't happen */ + return 1 << i1 | 1 << i2; +} - if (fabs(value - cur) <= (s->coupling * (value + cur))){ - result = cur; - rfn = fn + 1; /*remember result determining filter */ - } else if(cfn == -1){ - cfn = fn; /* remember first mismatching filter */ +#define DIRECTION_CACHE_RANGE 5 +#define DIRECTION_CACHE_SIZE (DIRECTION_CACHE_RANGE*2+1) + +/* cache DoGetDirection(). */ +static int +GetDirection(int dx, int dy){ + static int cache[DIRECTION_CACHE_SIZE][DIRECTION_CACHE_SIZE]; + int i; + if (abs(dx) <= DIRECTION_CACHE_RANGE && + abs(dy) <= DIRECTION_CACHE_RANGE) { + /* cacheable */ + i = cache[DIRECTION_CACHE_RANGE+dx][DIRECTION_CACHE_RANGE+dy]; + if(i != 0){ + return i; + }else{ + i = DoGetDirection(dx, dy); + cache[DIRECTION_CACHE_RANGE+dx][DIRECTION_CACHE_RANGE+dy] = i; + return i; } + }else{ + /* non-cacheable */ + return DoGetDirection(dx, dy); } +} - s->statistics.filter_usecount[rfn]++; - DebugAccelF("(dix ptracc) result from stage %i, input %.2f, output %.2f\n", - rfn, value, result); +#undef DIRECTION_CACHE_RANGE +#undef DIRECTION_CACHE_SIZE - /* override first mismatching current (coupling) so the filter - * catches up quickly. */ - if(cfn != -1) - s->filters[cfn].current = result; - return result; -} +/* convert offset (age) to array index */ +#define TRACKER_INDEX(s, d) (((s)->num_tracker + (s)->cur_tracker - (d)) % (s)->num_tracker) -/******************************** - * velocity computation - *******************************/ +static inline void +FeedTrackers(DeviceVelocityPtr vel, int dx, int dy, int cur_t) +{ + int n; + for(n = 0; n < vel->num_tracker; n++){ + vel->tracker[n].dx += dx; + vel->tracker[n].dy += dy; + } + n = (vel->cur_tracker + 1) % vel->num_tracker; + vel->tracker[n].dx = 0; + vel->tracker[n].dy = 0; + vel->tracker[n].time = cur_t; + vel->tracker[n].dir = GetDirection(dx, dy); + DebugAccelF("(dix prtacc) motion [dx: %i dy: %i dir:%i diff: %i]\n", + dx, dy, vel->tracker[n].dir, + cur_t - vel->tracker[vel->cur_tracker].time); + vel->cur_tracker = n; +} /** - * return the axis if mickey is insignificant and axis-aligned, - * -1 otherwise - * 1 for x-axis - * 2 for y-axis + * calc velocity for given tracker, with + * velocity scaling. + * This assumes linear motion. */ -static inline short -GetAxis(int dx, int dy){ - if(dx == 0 || dy == 0){ - if(dx == 1 || dx == -1) - return 1; - if(dy == 1 || dy == -1) - return 2; - return -1; - }else{ - return -1; +static float +CalcTracker(DeviceVelocityPtr vel, int offset, int cur_t){ + int index = TRACKER_INDEX(vel, offset); + float dist = sqrt( vel->tracker[index].dx * vel->tracker[index].dx + + vel->tracker[index].dy * vel->tracker[index].dy); + int dtime = cur_t - vel->tracker[index].time; + if(dtime > 0) + return (dist / dtime); + else + return 0;/* synonymous for NaN, since we're not C99 */ +} + +/* find the most plausible velocity. That is, the most distant + * (in time) tracker which isn't too old, beyond a linear partition, + * or simply too much off initial velocity. + * + * May return 0. + */ +static float +QueryTrackers(DeviceVelocityPtr vel, int cur_t){ + int n, offset, dir = 255, i = -1, age_ms; + /* initial velocity: a low-offset, valid velocity */ + float iveloc = 0, res = 0, tmp, vdiff; + float vfac = vel->corr_mul * vel->const_acceleration; /* premultiply */ + /* loop from current to older data */ + for(offset = 1; offset < vel->num_tracker; offset++){ + n = TRACKER_INDEX(vel, offset); + + age_ms = cur_t - vel->tracker[n].time; + + /* bail out if data is too old and protect from overrun */ + if (age_ms >= vel->reset_time || age_ms < 0) { + DebugAccelF("(dix prtacc) query: tracker too old\n"); + break; + } + + /* + * this heuristic avoids using the linear-motion velocity formula + * in CalcTracker() on motion that isn't exactly linear. So to get + * even more precision we could subdivide as a final step, so possible + * non-linearities are accounted for. + */ + dir &= vel->tracker[n].dir; + if(dir == 0){ + DebugAccelF("(dix prtacc) query: no longer linear\n"); + /* instead of breaking it we might also inspect the partition after, + * but actual improvement with this is probably rare. */ + break; + } + + tmp = CalcTracker(vel, offset, cur_t) * vfac; + + if ((iveloc == 0 || offset <= vel->initial_range) && tmp != 0) { + /* set initial velocity and result */ + res = iveloc = tmp; + i = offset; + } else if (iveloc != 0 && tmp != 0) { + vdiff = fabs(iveloc - tmp); + if (vdiff <= vel->max_diff || + vdiff/(iveloc + tmp) < vel->max_rel_diff) { + /* we're in range with the initial velocity, + * so this result is likely better + * (it contains more information). */ + res = tmp; + i = offset; + }else{ + /* we're not in range, quit - it won't get better. */ + DebugAccelF("(dix prtacc) query: tracker too different:" + " old %2.2f initial %2.2f diff: %2.2f\n", + tmp, iveloc, vdiff); + break; + } + } + } + if(offset == vel->num_tracker){ + DebugAccelF("(dix prtacc) query: last tracker in effect\n"); + i = vel->num_tracker-1; } + if(i>=0){ + n = TRACKER_INDEX(vel, i); + DebugAccelF("(dix prtacc) result: offset %i [dx: %i dy: %i diff: %i]\n", + i, + vel->tracker[n].dx, + vel->tracker[n].dy, + cur_t - vel->tracker[n].time); + } + return res; } +#undef TRACKER_INDEX /** - * Perform velocity approximation + * Perform velocity approximation based on 2D 'mickeys' (mouse motion delta). * return true if non-visible state reset is suggested */ -static short -ProcessVelocityData( - DeviceVelocityPtr s, +short +ProcessVelocityData2D( + DeviceVelocityPtr vel, int dx, int dy, int time) { - float cvelocity; - - int diff = time - s->lrm_time; - int cur_ax, last_ax; - short reset = (diff >= s->reset_time); - - /* remember last round's result */ - s->last_velocity = s->velocity; - cur_ax = GetAxis(dx, dy); - last_ax = GetAxis(s->last_dx, s->last_dy); - - if(cur_ax != last_ax && cur_ax != -1 && last_ax != -1 && !reset){ - /* correct for the error induced when diagonal movements are - reported as alternating axis mickeys */ - dx += s->last_dx; - dy += s->last_dy; - diff += s->last_diff; - s->last_diff = time - s->lrm_time; /* prevent repeating add-up */ - DebugAccelF("(dix ptracc) axial correction\n"); - }else{ - s->last_diff = diff; - } + float velocity; - /* - * cvelocity is not a real velocity yet, more a motion delta. constant - * acceleration is multiplied here to make the velocity an on-screen - * velocity (pix/t as opposed to [insert unit]/t). This is intended to - * make multiple devices with widely varying ConstantDecelerations respond - * similar to acceleration controls. - */ - cvelocity = (float)sqrt(dx*dx + dy*dy) * s->const_acceleration; - - s->lrm_time = time; - - if (s->reset_time < 0 || diff < 0) { /* reset disabled or timer overrun? */ - /* simply set velocity from current movement, no reset. */ - s->velocity = cvelocity; - return FALSE; - } + vel->last_velocity = vel->velocity; - if (diff == 0) - diff = 1; /* prevent div-by-zero, though it shouldn't happen anyway*/ + FeedTrackers(vel, dx, dy, time); - /* translate velocity to dots/ms (somewhat intractable in integers, - so we multiply by some per-device adjustable factor) */ - cvelocity = cvelocity * s->corr_mul / (float)diff; + velocity = QueryTrackers(vel, time); - /* short-circuit: when nv-reset the rest can be skipped */ - if(reset == TRUE){ - /* - * we don't really have a velocity here, since diff includes inactive - * time. This is dealt with in ComputeAcceleration. - */ - StuffFilterChain(s, cvelocity); - s->velocity = s->last_velocity = cvelocity; - s->last_reset = TRUE; - DebugAccelF("(dix ptracc) non-visible state reset\n"); - return TRUE; - } - - if(s->last_reset == TRUE){ - /* - * when here, we're probably processing the second mickey of a starting - * stroke. This happens to be the first time we can reasonably pretend - * that cvelocity is an actual velocity. Thus, to opt precision, we - * stuff that into the filter chain. - */ - s->last_reset = FALSE; - DebugAccelF("(dix ptracc) after-reset vel:%.3f\n", cvelocity); - StuffFilterChain(s, cvelocity); - s->velocity = cvelocity; - return FALSE; - } - - /* feed into filter chain */ - FeedFilterChain(s, cvelocity, diff); - - /* perform coupling and decide final value */ - s->velocity = QueryFilterChain(s, cvelocity); - - DebugAccelF("(dix ptracc) guess: vel=%.3f diff=%d %i|%i|%i|%i|%i|%i|%i|%i|%i\n", - s->velocity, diff, - s->statistics.filter_usecount[0], s->statistics.filter_usecount[1], - s->statistics.filter_usecount[2], s->statistics.filter_usecount[3], - s->statistics.filter_usecount[4], s->statistics.filter_usecount[5], - s->statistics.filter_usecount[6], s->statistics.filter_usecount[7], - s->statistics.filter_usecount[8]); - return FALSE; + vel->velocity = velocity; + return velocity == 0; } - /** * this flattens significant ( > 1) mickeys a little bit for more steady * constant-velocity response @@ -440,41 +594,42 @@ ApplySimpleSoftening(int od, int d) static void ApplySofteningAndConstantDeceleration( - DeviceVelocityPtr s, + DeviceVelocityPtr vel, int dx, int dy, float* fdx, float* fdy, short do_soften) { - if (do_soften && s->use_softening) { - *fdx = ApplySimpleSoftening(s->last_dx, dx); - *fdy = ApplySimpleSoftening(s->last_dy, dy); + if (do_soften && vel->use_softening) { + *fdx = ApplySimpleSoftening(vel->last_dx, dx); + *fdy = ApplySimpleSoftening(vel->last_dy, dy); } else { *fdx = dx; *fdy = dy; } - *fdx *= s->const_acceleration; - *fdy *= s->const_acceleration; + *fdx *= vel->const_acceleration; + *fdy *= vel->const_acceleration; } /* * compute the acceleration for given velocity and enforce min_acceleartion */ -static float +float BasicComputeAcceleration( - DeviceVelocityPtr pVel, + DeviceIntPtr dev, + DeviceVelocityPtr vel, float velocity, float threshold, float acc){ float result; - result = pVel->Profile(pVel, velocity, threshold, acc); + result = vel->Profile(dev, vel, velocity, threshold, acc); /* enforce min_acceleration */ - if (result < pVel->min_acceleration) - result = pVel->min_acceleration; + if (result < vel->min_acceleration) + result = vel->min_acceleration; return result; } @@ -483,17 +638,16 @@ BasicComputeAcceleration( */ static float ComputeAcceleration( + DeviceIntPtr dev, DeviceVelocityPtr vel, float threshold, float acc){ float res; - if(vel->last_reset){ + if(vel->velocity <= 0){ DebugAccelF("(dix ptracc) profile skipped\n"); /* - * This is intended to override the first estimate of a stroke, - * which is too low (see ProcessVelocityData). 1 should make sure - * the mickey is seen on screen. + * If we have no idea about device velocity, don't pretend it. */ return 1; } @@ -503,9 +657,11 @@ ComputeAcceleration( * current and previous velocity. * Though being the more natural choice, it causes a minor delay * in comparison, so it can be disabled. */ - res = BasicComputeAcceleration(vel, vel->velocity, threshold, acc); - res += BasicComputeAcceleration(vel, vel->last_velocity, threshold, acc); - res += 4.0f * BasicComputeAcceleration(vel, + res = BasicComputeAcceleration( + dev, vel, vel->velocity, threshold, acc); + res += BasicComputeAcceleration( + dev, vel, vel->last_velocity, threshold, acc); + res += 4.0f * BasicComputeAcceleration(dev, vel, (vel->last_velocity + vel->velocity) / 2, threshold, acc); res /= 6.0f; @@ -513,7 +669,8 @@ ComputeAcceleration( vel->velocity, vel->last_velocity, res); return res; }else{ - res = BasicComputeAcceleration(vel, vel->velocity, threshold, acc); + res = BasicComputeAcceleration(dev, vel, + vel->velocity, threshold, acc); DebugAccelF("(dix ptracc) profile sample [%.2f] is %.3f\n", vel->velocity, res); return res; @@ -530,7 +687,8 @@ ComputeAcceleration( */ static float PolynomialAccelerationProfile( - DeviceVelocityPtr pVel, + DeviceIntPtr dev, + DeviceVelocityPtr vel, float velocity, float ignored, float acc) @@ -545,18 +703,21 @@ PolynomialAccelerationProfile( */ static float ClassicProfile( - DeviceVelocityPtr pVel, + DeviceIntPtr dev, + DeviceVelocityPtr vel, float velocity, float threshold, float acc) { - if (threshold) { - return SimpleSmoothProfile (pVel, + if (threshold > 0) { + return SimpleSmoothProfile (dev, + vel, velocity, threshold, acc); } else { - return PolynomialAccelerationProfile (pVel, + return PolynomialAccelerationProfile (dev, + vel, velocity, 0, acc); @@ -574,7 +735,8 @@ ClassicProfile( */ static float PowerProfile( - DeviceVelocityPtr pVel, + DeviceIntPtr dev, + DeviceVelocityPtr vel, float velocity, float threshold, float acc) @@ -584,9 +746,9 @@ PowerProfile( acc = (acc-1.0) * 0.1f + 1.0; /* without this, acc of 2 is unuseable */ if (velocity <= threshold) - return pVel->min_acceleration; + return vel->min_acceleration; vel_dist = velocity - threshold; - return (pow(acc, vel_dist)) * pVel->min_acceleration; + return (pow(acc, vel_dist)) * vel->min_acceleration; } @@ -611,7 +773,8 @@ CalcPenumbralGradient(float x){ */ static float SimpleSmoothProfile( - DeviceVelocityPtr pVel, + DeviceIntPtr dev, + DeviceVelocityPtr vel, float velocity, float threshold, float acc) @@ -636,7 +799,8 @@ SimpleSmoothProfile( */ static float SmoothLinearProfile( - DeviceVelocityPtr pVel, + DeviceIntPtr dev, + DeviceVelocityPtr vel, float velocity, float threshold, float acc) @@ -659,14 +823,15 @@ SmoothLinearProfile( res = nv * 2.0f / M_PI /* steepness of gradient at 0.5 */ + 1.0f; /* gradient crosses 2|1 */ } - res += pVel->min_acceleration; + res += vel->min_acceleration; return res; } static float LinearProfile( - DeviceVelocityPtr pVel, + DeviceIntPtr dev, + DeviceVelocityPtr vel, float velocity, float threshold, float acc) @@ -675,60 +840,73 @@ LinearProfile( } -/** - * Set the profile by number. - * Intended to make profiles exchangeable at runtime. - * If you created a profile, give it a number here and in the header to - * make it selectable. In case some profile-specific init is needed, here - * would be a good place, since FreeVelocityData() also calls this with -1. - * returns FALSE (0) if profile number is unavailable. - */ -_X_EXPORT int -SetAccelerationProfile( - DeviceVelocityPtr s, +static float +NoProfile( + DeviceIntPtr dev, + DeviceVelocityPtr vel, + float velocity, + float threshold, + float acc) +{ + return 1.0f; +} + +static PointerAccelerationProfileFunc +GetAccelerationProfile( + DeviceVelocityPtr vel, int profile_num) { - PointerAccelerationProfileFunc profile; switch(profile_num){ - case -1: - profile = NULL; /* Special case to uninit properly */ - break; case AccelProfileClassic: - profile = ClassicProfile; - break; + return ClassicProfile; case AccelProfileDeviceSpecific: - if(NULL == s->deviceSpecificProfile) - return FALSE; - profile = s->deviceSpecificProfile; - break; + return vel->deviceSpecificProfile; case AccelProfilePolynomial: - profile = PolynomialAccelerationProfile; - break; + return PolynomialAccelerationProfile; case AccelProfileSmoothLinear: - profile = SmoothLinearProfile; - break; + return SmoothLinearProfile; case AccelProfileSimple: - profile = SimpleSmoothProfile; - break; + return SimpleSmoothProfile; case AccelProfilePower: - profile = PowerProfile; - break; + return PowerProfile; case AccelProfileLinear: - profile = LinearProfile; - break; - case AccelProfileReserved: - /* reserved for future use, e.g. a user-defined profile */ + return LinearProfile; + case AccelProfileNone: + return NoProfile; default: - return FALSE; + return NULL; } - if(s->profile_private != NULL){ +} + +/** + * Set the profile by number. + * Intended to make profiles exchangeable at runtime. + * If you created a profile, give it a number here and in the header to + * make it selectable. In case some profile-specific init is needed, here + * would be a good place, since FreeVelocityData() also calls this with + * PROFILE_UNINITIALIZE. + * + * returns FALSE if profile number is unavailable, TRUE otherwise. + */ +int +SetAccelerationProfile( + DeviceVelocityPtr vel, + int profile_num) +{ + PointerAccelerationProfileFunc profile; + profile = GetAccelerationProfile(vel, profile_num); + + if(profile == NULL && profile_num != PROFILE_UNINITIALIZE) + return FALSE; + + if(vel->profile_private != NULL){ /* Here one could free old profile-private data */ - xfree(s->profile_private); - s->profile_private = NULL; + xfree(vel->profile_private); + vel->profile_private = NULL; } /* Here one could init profile-private data */ - s->Profile = profile; - s->statistics.profile_number = profile_num; + vel->Profile = profile; + vel->statistics.profile_number = profile_num; return TRUE; } @@ -746,34 +924,34 @@ SetAccelerationProfile( * it should do init/uninit in the driver (ie. with DEVICE_INIT and friends). * Users may override or choose it. */ -_X_EXPORT void +void SetDeviceSpecificAccelerationProfile( - DeviceVelocityPtr s, + DeviceVelocityPtr vel, PointerAccelerationProfileFunc profile) { - if(s) - s->deviceSpecificProfile = profile; + if(vel) + vel->deviceSpecificProfile = profile; } /** * Use this function to obtain a DeviceVelocityPtr for a device. Will return NULL if * the predictable acceleration scheme is not in effect. */ -_X_EXPORT DeviceVelocityPtr +DeviceVelocityPtr GetDevicePredictableAccelData( - DeviceIntPtr pDev) + DeviceIntPtr dev) { /*sanity check*/ - if(!pDev){ + if(!dev){ ErrorF("[dix] accel: DeviceIntPtr was NULL"); return NULL; } - if( pDev->valuator && - pDev->valuator->accelScheme.AccelSchemeProc == + if( dev->valuator && + dev->valuator->accelScheme.AccelSchemeProc == acceleratePointerPredictable && - pDev->valuator->accelScheme.accelData != NULL){ + dev->valuator->accelScheme.accelData != NULL){ - return (DeviceVelocityPtr)pDev->valuator->accelScheme.accelData; + return (DeviceVelocityPtr)dev->valuator->accelScheme.accelData; } return NULL; } @@ -789,7 +967,7 @@ GetDevicePredictableAccelData( */ void acceleratePointerPredictable( - DeviceIntPtr pDev, + DeviceIntPtr dev, int first_valuator, int num_valuators, int *valuators, @@ -799,12 +977,18 @@ acceleratePointerPredictable( int dx = 0, dy = 0; int *px = NULL, *py = NULL; DeviceVelocityPtr velocitydata = - (DeviceVelocityPtr) pDev->valuator->accelScheme.accelData; - float fdx, fdy; /* no need to init */ + (DeviceVelocityPtr) dev->valuator->accelScheme.accelData; + float fdx, fdy, tmp; /* no need to init */ + Bool soften = TRUE; if (!num_valuators || !valuators || !velocitydata) return; + if (velocitydata->statistics.profile_number == AccelProfileNone && + velocitydata->const_acceleration == 1.0f) { + return; /*we're inactive anyway, so skip the whole thing.*/ + } + if (first_valuator == 0) { dx = valuators[0]; px = &valuators[0]; @@ -815,40 +999,41 @@ acceleratePointerPredictable( } if (dx || dy){ - /* reset nonvisible state? */ - if (ProcessVelocityData(velocitydata, dx , dy, evtime)) { - /* set to center of pixel. makes sense as long as there are no - * means of passing on sub-pixel values. - */ - pDev->last.remainder[0] = pDev->last.remainder[1] = 0.5f; - /* prevent softening (somewhat quirky solution, - as it depends on the algorithm) */ - velocitydata->last_dx = dx; - velocitydata->last_dy = dy; + /* reset non-visible state? */ + if (ProcessVelocityData2D(velocitydata, dx , dy, evtime)) { + soften = FALSE; } - if (pDev->ptrfeed && pDev->ptrfeed->ctrl.num) { + if (dev->ptrfeed && dev->ptrfeed->ctrl.num) { /* invoke acceleration profile to determine acceleration */ - mult = ComputeAcceleration (velocitydata, - pDev->ptrfeed->ctrl.threshold, - (float)pDev->ptrfeed->ctrl.num / - (float)pDev->ptrfeed->ctrl.den); + mult = ComputeAcceleration (dev, velocitydata, + dev->ptrfeed->ctrl.threshold, + (float)dev->ptrfeed->ctrl.num / + (float)dev->ptrfeed->ctrl.den); if(mult != 1.0 || velocitydata->const_acceleration != 1.0) { ApplySofteningAndConstantDeceleration( velocitydata, - dx, dy, - &fdx, &fdy, - mult > 1.0); + dx, dy, + &fdx, &fdy, + (mult > 1.0) && soften); + if (dx) { - pDev->last.remainder[0] = mult * fdx + pDev->last.remainder[0]; - *px = (int)pDev->last.remainder[0]; - pDev->last.remainder[0] = pDev->last.remainder[0] - (float)*px; + tmp = mult * fdx + dev->last.remainder[0]; + /* Since it may not be apparent: lrintf() does not offer + * strong statements about rounding; however because we + * process each axis conditionally, there's no danger + * of a toggling remainder. Its lack of guarantees likely + * makes it faster on the average target. */ + *px = lrintf(tmp); + dev->last.remainder[0] = tmp - (float)*px; } if (dy) { - pDev->last.remainder[1] = mult * fdy + pDev->last.remainder[1]; - *py = (int)pDev->last.remainder[1]; - pDev->last.remainder[1] = pDev->last.remainder[1] - (float)*py; + tmp = mult * fdy + dev->last.remainder[1]; + *py = lrintf(tmp); + dev->last.remainder[1] = tmp - (float)*py; } + DebugAccelF("pos (%i | %i) remainders x: %.3f y: %.3f delta x:%.3f y:%.3f\n", + *px, *py, dev->last.remainder[0], dev->last.remainder[1], fdx, fdy); } } } @@ -865,7 +1050,7 @@ acceleratePointerPredictable( */ void acceleratePointerLightweight( - DeviceIntPtr pDev, + DeviceIntPtr dev, int first_valuator, int num_valuators, int *valuators, @@ -890,48 +1075,48 @@ acceleratePointerLightweight( if (!dx && !dy) return; - if (pDev->ptrfeed && pDev->ptrfeed->ctrl.num) { + if (dev->ptrfeed && dev->ptrfeed->ctrl.num) { /* modeled from xf86Events.c */ - if (pDev->ptrfeed->ctrl.threshold) { - if ((abs(dx) + abs(dy)) >= pDev->ptrfeed->ctrl.threshold) { - pDev->last.remainder[0] = ((float)dx * - (float)(pDev->ptrfeed->ctrl.num)) / - (float)(pDev->ptrfeed->ctrl.den) + - pDev->last.remainder[0]; + if (dev->ptrfeed->ctrl.threshold) { + if ((abs(dx) + abs(dy)) >= dev->ptrfeed->ctrl.threshold) { + dev->last.remainder[0] = ((float)dx * + (float)(dev->ptrfeed->ctrl.num)) / + (float)(dev->ptrfeed->ctrl.den) + + dev->last.remainder[0]; if (px) { - *px = (int)pDev->last.remainder[0]; - pDev->last.remainder[0] = pDev->last.remainder[0] - + *px = (int)dev->last.remainder[0]; + dev->last.remainder[0] = dev->last.remainder[0] - (float)(*px); } - pDev->last.remainder[1] = ((float)dy * - (float)(pDev->ptrfeed->ctrl.num)) / - (float)(pDev->ptrfeed->ctrl.den) + - pDev->last.remainder[1]; + dev->last.remainder[1] = ((float)dy * + (float)(dev->ptrfeed->ctrl.num)) / + (float)(dev->ptrfeed->ctrl.den) + + dev->last.remainder[1]; if (py) { - *py = (int)pDev->last.remainder[1]; - pDev->last.remainder[1] = pDev->last.remainder[1] - + *py = (int)dev->last.remainder[1]; + dev->last.remainder[1] = dev->last.remainder[1] - (float)(*py); } } } else { mult = pow((float)dx * (float)dx + (float)dy * (float)dy, - ((float)(pDev->ptrfeed->ctrl.num) / - (float)(pDev->ptrfeed->ctrl.den) - 1.0) / + ((float)(dev->ptrfeed->ctrl.num) / + (float)(dev->ptrfeed->ctrl.den) - 1.0) / 2.0) / 2.0; if (dx) { - pDev->last.remainder[0] = mult * (float)dx + - pDev->last.remainder[0]; - *px = (int)pDev->last.remainder[0]; - pDev->last.remainder[0] = pDev->last.remainder[0] - + dev->last.remainder[0] = mult * (float)dx + + dev->last.remainder[0]; + *px = (int)dev->last.remainder[0]; + dev->last.remainder[0] = dev->last.remainder[0] - (float)(*px); } if (dy) { - pDev->last.remainder[1] = mult * (float)dy + - pDev->last.remainder[1]; - *py = (int)pDev->last.remainder[1]; - pDev->last.remainder[1] = pDev->last.remainder[1] - + dev->last.remainder[1] = mult * (float)dy + + dev->last.remainder[1]; + *py = (int)dev->last.remainder[1]; + dev->last.remainder[1] = dev->last.remainder[1] - (float)(*py); } } diff --git a/xorg-server/dix/registry.c b/xorg-server/dix/registry.c index a519cff6b..ec853b37f 100644 --- a/xorg-server/dix/registry.c +++ b/xorg-server/dix/registry.c @@ -1,6 +1,6 @@ /************************************************************ -Author: Eamon Walsh +Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that diff --git a/xorg-server/dix/resource.c b/xorg-server/dix/resource.c index 7b133cae4..d3641df8d 100644 --- a/xorg-server/dix/resource.c +++ b/xorg-server/dix/resource.c @@ -124,7 +124,6 @@ Equipment Corporation. * resource "owned" by the client. */ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -186,13 +185,13 @@ typedef struct _ClientResource { XID expectID; } ClientResourceRec; -_X_EXPORT RESTYPE lastResourceType; +RESTYPE lastResourceType; static RESTYPE lastResourceClass; -_X_EXPORT RESTYPE TypeMask; +RESTYPE TypeMask; static DeleteType *DeleteFuncs = (DeleteType *)NULL; -_X_EXPORT CallbackListPtr ResourceStateCallback; +CallbackListPtr ResourceStateCallback; static _X_INLINE void CallResourceStateCallback(ResourceState state, ResourceRec *res) @@ -203,7 +202,7 @@ CallResourceStateCallback(ResourceState state, ResourceRec *res) } } -_X_EXPORT RESTYPE +RESTYPE CreateNewResourceType(DeleteType deleteFunc) { RESTYPE next = lastResourceType + 1; @@ -224,7 +223,7 @@ CreateNewResourceType(DeleteType deleteFunc) return next; } -_X_EXPORT RESTYPE +RESTYPE CreateNewResourceClass(void) { RESTYPE next = lastResourceClass >> 1; @@ -256,8 +255,7 @@ InitClientResources(ClientPtr client) TypeMask = RC_LASTPREDEF - 1; if (DeleteFuncs) xfree(DeleteFuncs); - DeleteFuncs = (DeleteType *)xalloc((lastResourceType + 1) * - sizeof(DeleteType)); + DeleteFuncs = xalloc((lastResourceType + 1) * sizeof(DeleteType)); if (!DeleteFuncs) return FALSE; DeleteFuncs[RT_NONE & TypeMask] = (DeleteType)NoopDDA; @@ -272,7 +270,7 @@ InitClientResources(ClientPtr client) DeleteFuncs[RT_PASSIVEGRAB & TypeMask] = DeletePassiveGrab; } clientTable[i = client->index].resources = - (ResourcePtr *)xalloc(INITBUCKETS*sizeof(ResourcePtr)); + xalloc(INITBUCKETS*sizeof(ResourcePtr)); if (!clientTable[i].resources) return FALSE; clientTable[i].buckets = INITBUCKETS; @@ -394,13 +392,16 @@ unsigned int GetXIDList(ClientPtr pClient, unsigned count, XID *pids) { unsigned int found = 0; - XID id = pClient->clientAsMask; + XID rc, id = pClient->clientAsMask; XID maxid; + pointer val; maxid = id | RESOURCE_ID_MASK; while ( (found < count) && (id <= maxid) ) { - if (!LookupIDByClass(id, RC_ANY)) + rc = dixLookupResourceByClass(&val, id, RC_ANY, serverClient, + DixGetAttrAccess); + if (rc == BadValue) { pids[found++] = id; } @@ -417,7 +418,7 @@ GetXIDList(ClientPtr pClient, unsigned count, XID *pids) * over-running another client. */ -_X_EXPORT XID +XID FakeClientID(int client) { XID id, maxid; @@ -438,7 +439,7 @@ FakeClientID(int client) return id; } -_X_EXPORT Bool +Bool AddResource(XID id, RESTYPE type, pointer value) { int client; @@ -460,7 +461,7 @@ AddResource(XID id, RESTYPE type, pointer value) (rrec->hashsize < MAXHASHSIZE)) RebuildTable(client); head = &rrec->resources[Hash(client, id)]; - res = (ResourcePtr)xalloc(sizeof(ResourceRec)); + res = xalloc(sizeof(ResourceRec)); if (!res) { (*DeleteFuncs[type & TypeMask])(value, id); @@ -492,10 +493,10 @@ RebuildTable(int client) */ j = 2 * clientTable[client].buckets; - tails = (ResourcePtr **)xalloc(j * sizeof(ResourcePtr *)); + tails = xalloc(j * sizeof(ResourcePtr *)); if (!tails) return; - resources = (ResourcePtr *)xalloc(j * sizeof(ResourcePtr)); + resources = xalloc(j * sizeof(ResourcePtr)); if (!resources) { xfree(tails); @@ -527,7 +528,7 @@ RebuildTable(int client) clientTable[client].resources = resources; } -_X_EXPORT void +void FreeResource(XID id, RESTYPE skipDeleteFuncType) { int cid; @@ -570,7 +571,7 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) } -_X_EXPORT void +void FreeResourceByType(XID id, RESTYPE type, Bool skipFree) { int cid; @@ -610,7 +611,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) * data */ -_X_EXPORT Bool +Bool ChangeResourceValue (XID id, RESTYPE rtype, pointer value) { int cid; @@ -636,7 +637,7 @@ ChangeResourceValue (XID id, RESTYPE rtype, pointer value) * add and delete an equal number of resources! */ -_X_EXPORT void +void FindClientResourcesByType( ClientPtr client, RESTYPE type, @@ -668,7 +669,7 @@ FindClientResourcesByType( } } -_X_EXPORT void +void FindAllClientResources( ClientPtr client, FindAllRes func, @@ -706,7 +707,8 @@ LookupClientResourceComplex( pointer cdata ){ ResourcePtr *resources; - ResourcePtr this; + ResourcePtr this, next; + pointer value; int i; if (!client) @@ -714,10 +716,13 @@ LookupClientResourceComplex( resources = clientTable[client->index].resources; for (i = 0; i < clientTable[client->index].buckets; i++) { - for (this = resources[i]; this; this = this->next) { + for (this = resources[i]; this; this = next) { + next = this->next; if (!type || this->type == type) { - if((*func)(this->value, this->id, cdata)) - return this->value; + /* workaround func freeing the type as DRI1 does */ + value = this->value; + if((*func)(value, this->id, cdata)) + return value; } } } @@ -825,9 +830,11 @@ FreeAllResources(void) } } -_X_EXPORT Bool +Bool LegalNewID(XID id, ClientPtr client) { + pointer val; + int rc; #ifdef PANORAMIX XID minid, maxid; @@ -840,12 +847,19 @@ LegalNewID(XID id, ClientPtr client) return TRUE; } #endif /* PANORAMIX */ - return ((client->clientAsMask == (id & ~RESOURCE_ID_MASK)) && - ((clientTable[client->index].expectID <= id) || - !LookupIDByClass(id, RC_ANY))); + if (client->clientAsMask == (id & ~RESOURCE_ID_MASK)) + { + if (clientTable[client->index].expectID <= id) + return TRUE; + + rc = dixLookupResourceByClass(&val, id, RC_ANY, serverClient, + DixGetAttrAccess); + return (rc == BadValue); + } + return FALSE; } -_X_EXPORT int +int dixLookupResourceByType(pointer *result, XID id, RESTYPE rtype, ClientPtr client, Mask mode) { @@ -876,7 +890,7 @@ dixLookupResourceByType(pointer *result, XID id, RESTYPE rtype, return Success; } -_X_EXPORT int +int dixLookupResourceByClass(pointer *result, XID id, RESTYPE rclass, ClientPtr client, Mask mode) { diff --git a/xorg-server/dix/selection.c b/xorg-server/dix/selection.c index c5427e004..d72f381ca 100644 --- a/xorg-server/dix/selection.c +++ b/xorg-server/dix/selection.c @@ -65,10 +65,10 @@ SOFTWARE. * *****************************************************************/ -_X_EXPORT Selection *CurrentSelections; +Selection *CurrentSelections; CallbackListPtr SelectionCallback; -_X_EXPORT int +int dixLookupSelection(Selection **result, Atom selectionName, ClientPtr client, Mask access_mode) { @@ -243,6 +243,7 @@ ProcGetSelectionOwner(ClientPtr client) return BadAtom; } + memset(&reply, 0, sizeof(xGetSelectionOwnerReply)); reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; @@ -284,6 +285,7 @@ ProcConvertSelection(ClientPtr client) rc = dixLookupSelection(&pSel, stuff->selection, client, DixReadAccess); + memset(&event, 0, sizeof(xEvent)); if (rc != Success && rc != BadMatch) return rc; else if (rc == Success && pSel->window != None) { diff --git a/xorg-server/dix/swaprep.c b/xorg-server/dix/swaprep.c index 91469e17b..12c6dbd26 100644 --- a/xorg-server/dix/swaprep.c +++ b/xorg-server/dix/swaprep.c @@ -51,8 +51,6 @@ SOFTWARE. #endif #include -#define NEED_REPLIES -#define NEED_EVENTS #include #include "misc.h" #include "dixstruct.h" @@ -72,7 +70,7 @@ static void SwapFont(xQueryFontReply *pr, Bool hasGlyphs); * * \param size size in bytes */ -_X_EXPORT void +void Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf) { int i; @@ -92,7 +90,7 @@ Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf) * * \param size size in bytes */ -_X_EXPORT void +void CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf) { int bufsize = size; @@ -101,7 +99,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf) CARD32 tmpbuf[1]; /* Allocate as big a buffer as we can... */ - while (!(pbufT = (CARD32 *) xalloc(bufsize))) + while (!(pbufT = xalloc(bufsize))) { bufsize >>= 1; if (bufsize == 4) @@ -133,7 +131,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf) } if (pbufT != tmpbuf) - xfree ((char *) pbufT); + xfree (pbufT); } /** @@ -149,7 +147,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf) short tmpbuf[2]; /* Allocate as big a buffer as we can... */ - while (!(pbufT = (short *) xalloc(bufsize))) + while (!(pbufT = xalloc(bufsize))) { bufsize >>= 1; if (bufsize == 4) @@ -181,7 +179,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf) } if (pbufT != tmpbuf) - xfree ((char *) pbufT); + xfree (pbufT); } @@ -526,10 +524,7 @@ SListInstalledColormapsReply(ClientPtr pClient, int size, } void -SAllocColorReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xAllocColorReply *pRep; +SAllocColorReply(ClientPtr pClient, int size, xAllocColorReply *pRep) { char n; @@ -736,7 +731,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf) int len = host->length; char n; swaps (&host->length, n); - bufT += sizeof (xHostEntry) + (((len + 3) >> 2) << 2); + bufT += sizeof (xHostEntry) + pad_to_int32(len); } (void)WriteToClient (pClient, size, buf); } @@ -1211,7 +1206,7 @@ SwapVisual(xVisualType *pVis, xVisualType *pVisT) cpswapl(pVis->blueMask, pVisT->blueMask); } -_X_EXPORT void +void SwapConnSetupInfo( char *pInfo, char *pInfoT @@ -1227,7 +1222,7 @@ SwapConnSetupInfo( pInfoT += sizeof(xConnSetup); /* Copy the vendor string */ - i = (pConnSetup->nbytesVendor + 3) & ~3; + i = pad_to_int32(pConnSetup->nbytesVendor); memcpy(pInfoT, pInfo, i); pInfo += i; pInfoT += i; @@ -1267,7 +1262,7 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo) { char *pInfoTBase; - pInfoTBase = (char *) xalloc(size); + pInfoTBase = xalloc(size); if (!pInfoTBase) { pClient->noClientException = -1; @@ -1278,7 +1273,7 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo) xfree(pInfoTBase); } -_X_EXPORT void +void SwapConnSetupPrefix(xConnSetupPrefix *pcspFrom, xConnSetupPrefix *pcspTo) { pcspTo->success = pcspFrom->success; @@ -1296,3 +1291,18 @@ WriteSConnSetupPrefix(ClientPtr pClient, xConnSetupPrefix *pcsp) SwapConnSetupPrefix(pcsp, &cspT); (void)WriteToClient(pClient, sizeof(cspT), (char *) &cspT); } + +/* + * Dummy entry for ReplySwapVector[] + */ + +void +ReplyNotSwappd( + ClientPtr pClient , + int size , + void * pbuf + ) +{ + FatalError("Not implemented"); +} + diff --git a/xorg-server/dix/swapreq.c b/xorg-server/dix/swapreq.c index ad60d17da..5d7d71c8f 100644 --- a/xorg-server/dix/swapreq.c +++ b/xorg-server/dix/swapreq.c @@ -51,7 +51,6 @@ SOFTWARE. #endif #include -#define NEED_EVENTS #include #include #include "misc.h" @@ -62,7 +61,7 @@ SOFTWARE. /* Thanks to Jack Palevich for testing and subsequently rewriting all this */ /* Byte swap a list of longs */ -_X_EXPORT void +void SwapLongs (CARD32 *list, unsigned long count) { char n; @@ -88,7 +87,7 @@ SwapLongs (CARD32 *list, unsigned long count) } /* Byte swap a list of shorts */ -_X_EXPORT void +void SwapShorts (short *list, unsigned long count) { char n; @@ -248,7 +247,7 @@ SProcChangeProperty(ClientPtr client) return((* ProcVector[X_ChangeProperty])(client)); } -int +int SProcDeleteProperty(ClientPtr client) { char n; @@ -261,7 +260,7 @@ SProcDeleteProperty(ClientPtr client) } -int +int SProcGetProperty(ClientPtr client) { char n; @@ -853,7 +852,7 @@ SProcFreeColors(ClientPtr client) } -_X_EXPORT void +void SwapColorItem(xColorItem *pItem) { char n; diff --git a/xorg-server/dix/tables.c b/xorg-server/dix/tables.c index e4f93661c..5aafb8b0f 100644 --- a/xorg-server/dix/tables.c +++ b/xorg-server/dix/tables.c @@ -50,8 +50,6 @@ SOFTWARE. #endif #include -#define NEED_EVENTS -#define NEED_REPLIES #include #include "windowstr.h" #include "extnsionst.h" @@ -338,7 +336,7 @@ int (* SwappedProcVector[256]) ( SProcNoOperation }; -_X_EXPORT EventSwapPtr EventSwapVector[128] = +EventSwapPtr EventSwapVector[128] = { (EventSwapPtr)SErrorEvent, NotImplemented, diff --git a/xorg-server/dix/window.c b/xorg-server/dix/window.c index e0b0decce..caff1cbff 100644 --- a/xorg-server/dix/window.c +++ b/xorg-server/dix/window.c @@ -2,25 +2,24 @@ Copyright (c) 2006, Red Hat, 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. +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 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 -RED HAT 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 Red Hat shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from Red Hat. +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. Copyright 1987, 1998 The Open Group @@ -150,12 +149,12 @@ WindowSeekDeviceCursor(WindowPtr pWin, DevCursNodePtr* pNode, DevCursNodePtr* pPrev); -_X_EXPORT int screenIsSaved = SCREEN_SAVER_OFF; +int screenIsSaved = SCREEN_SAVER_OFF; -_X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; +ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; static int FocusPrivatesKeyIndex; -_X_EXPORT DevPrivateKey FocusPrivatesKey = &FocusPrivatesKeyIndex; +DevPrivateKey FocusPrivatesKey = &FocusPrivatesKeyIndex; static Bool TileScreenSaver(int i, int kind); @@ -221,7 +220,7 @@ PrintWindowTree(void) } #endif -_X_EXPORT int +int TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data) { int result; @@ -256,7 +255,7 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data) * exit WalkTree. Does depth-first traverse. *****/ -_X_EXPORT int +int WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data) { return(TraverseTree(WindowTable[pScreen->myNum], func, data)); @@ -360,7 +359,7 @@ CreateRootWindow(ScreenPtr pScreen) BoxRec box; PixmapFormatRec *format; - pWin = (WindowPtr)xalloc(sizeof(WindowRec)); + pWin = xalloc(sizeof(WindowRec)); if (!pWin) return FALSE; @@ -387,7 +386,7 @@ CreateRootWindow(ScreenPtr pScreen) pWin->parent = NullWindow; SetWindowToDefaults(pWin); - pWin->optional = (WindowOptRec *) xalloc (sizeof (WindowOptRec)); + pWin->optional = xalloc (sizeof (WindowOptRec)); if (!pWin->optional) return FALSE; @@ -403,19 +402,6 @@ CreateRootWindow(ScreenPtr pScreen) pWin->optional->inputShape = NULL; pWin->optional->inputMasks = NULL; pWin->optional->deviceCursors = NULL; - pWin->optional->geMasks = (GenericClientMasksPtr)xcalloc(1, sizeof(GenericClientMasksRec)); - if (!pWin->optional->geMasks) - { - xfree(pWin->optional); - return FALSE; - } - - pWin->optional->access.perm = NULL; - pWin->optional->access.deny = NULL; - pWin->optional->access.nperm = 0; - pWin->optional->access.ndeny = 0; - pWin->optional->access.defaultRule = 0; - pWin->optional->colormap = pScreen->defColormap; pWin->optional->visual = pScreen->rootVisual; @@ -564,7 +550,7 @@ RealChildHead(WindowPtr pWin) * Makes a window in response to client request *****/ -_X_EXPORT WindowPtr +WindowPtr CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist, int depth, ClientPtr client, VisualID visual, int *error) @@ -653,7 +639,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, return NullWindow; } - pWin = (WindowPtr)xalloc(sizeof(WindowRec)); + pWin = xalloc(sizeof(WindowRec)); if (!pWin) { *error = BadAlloc; @@ -780,6 +766,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, if (SubSend(pParent)) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = CreateNotify; event.u.createNotify.window = wid; event.u.createNotify.parent = pParent->drawable.id; @@ -797,8 +784,6 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, static void DisposeWindowOptional (WindowPtr pWin) { - GenericMaskPtr gmask = NULL, next = NULL; - if (!pWin->optional) return; /* @@ -829,20 +814,6 @@ DisposeWindowOptional (WindowPtr pWin) pWin->optional->deviceCursors = NULL; } - xfree(pWin->optional->access.perm); - xfree(pWin->optional->access.deny); - - /* Remove generic event mask allocations */ - if (pWin->optional->geMasks) - gmask = pWin->optional->geMasks->geClients; - while(gmask) - { - next = gmask->next; - xfree(gmask); - gmask = next; - } - xfree (pWin->optional->geMasks); - xfree (pWin->optional); pWin->optional = NULL; } @@ -898,9 +869,10 @@ CrushTree(WindowPtr pWin) pParent = pChild->parent; if (SubStrSend(pChild, pParent)) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = DestroyNotify; event.u.destroyNotify.window = pChild->drawable.id; - DeliverEvents(pChild, &event, 1, NullWindow); + DeliverEvents(pChild, &event, 1, NullWindow); } FreeResource(pChild->drawable.id, RT_WINDOW); pSib = pChild->nextSib; @@ -944,9 +916,10 @@ DeleteWindow(pointer value, XID wid) pParent = pWin->parent; if (wid && pParent && SubStrSend(pWin, pParent)) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = DestroyNotify; event.u.destroyNotify.window = pWin->drawable.id; - DeliverEvents(pWin, &event, 1, NullWindow); + DeliverEvents(pWin, &event, 1, NullWindow); } FreeWindowResources(pWin); @@ -990,9 +963,6 @@ DestroySubwindows(WindowPtr pWin, ClientPtr client) return Success; } -#define DeviceEventMasks (KeyPressMask | KeyReleaseMask | ButtonPressMask | \ - ButtonReleaseMask | PointerMotionMask) - /***** * ChangeWindowAttributes * @@ -1001,7 +971,7 @@ DestroySubwindows(WindowPtr pWin, ClientPtr client) * to most significant bit in the mask. *****/ -_X_EXPORT int +int ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) { XID *pVlist; @@ -1487,8 +1457,8 @@ GetWindowAttributes(WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply wa->backingStore = NotUseful; else wa->backingStore = pWin->backingStore; - wa->length = (sizeof(xGetWindowAttributesReply) - - sizeof(xGenericReply)) >> 2; + wa->length = bytes_to_int32(sizeof(xGetWindowAttributesReply) - + sizeof(xGenericReply)); wa->sequenceNumber = client->sequence; wa->backingBitPlanes = wBackingBitPlanes (pWin); wa->backingPixel = wBackingPixel (pWin); @@ -1597,32 +1567,6 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) return( pFirstChange ); } -_X_EXPORT RegionPtr -CreateUnclippedWinSize (WindowPtr pWin) -{ - RegionPtr pRgn; - BoxRec box; - - box.x1 = pWin->drawable.x; - box.y1 = pWin->drawable.y; - box.x2 = pWin->drawable.x + (int) pWin->drawable.width; - box.y2 = pWin->drawable.y + (int) pWin->drawable.height; - pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1); - if (wBoundingShape (pWin) || wClipShape (pWin)) { - ScreenPtr pScreen; - pScreen = pWin->drawable.pScreen; - - REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x, - - pWin->drawable.y); - if (wBoundingShape (pWin)) - REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin)); - if (wClipShape (pWin)) - REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin)); - REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y); - } - return pRgn; -} - void SetWinSize (WindowPtr pWin) { @@ -1718,7 +1662,7 @@ SetBorderSize (WindowPtr pWin) * \param destx,desty position relative to gravity */ -_X_EXPORT void +void GravityTranslate (int x, int y, int oldx, int oldy, int dw, int dh, unsigned gravity, int *destx, int *desty) @@ -2279,6 +2223,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) (RedirectSend(pParent) )) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = ConfigureRequest; event.u.configureRequest.window = pWin->drawable.id; if (mask & CWSibling) @@ -2313,6 +2258,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) if (size_change && ((pWin->eventMask|wOtherEventMasks(pWin)) & ResizeRedirectMask)) { xEvent eventT; + memset(&eventT, 0, sizeof(xEvent)); eventT.u.u.type = ResizeRequest; eventT.u.resizeRequest.window = pWin->drawable.id; eventT.u.resizeRequest.width = w; @@ -2359,6 +2305,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) ActuallyDoSomething: if (SubStrSend(pWin, pParent)) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = ConfigureNotify; event.u.configureNotify.window = pWin->drawable.id; if (pSib) @@ -2515,6 +2462,7 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent, if (WasMapped) UnmapWindow(pWin, FALSE); + memset(&event, 0, sizeof(xEvent)); event.u.u.type = ReparentNotify; event.u.reparent.window = pWin->drawable.id; event.u.reparent.parent = pParent->drawable.id; @@ -2649,7 +2597,7 @@ MapUnmapEventsEnabled(WindowPtr pWin) * MapNotify event is generated. *****/ -_X_EXPORT int +int MapWindow(WindowPtr pWin, ClientPtr client) { ScreenPtr pScreen; @@ -2675,6 +2623,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) (RedirectSend(pParent) )) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = MapRequest; event.u.mapRequest.window = pWin->drawable.id; event.u.mapRequest.parent = pParent->drawable.id; @@ -2687,6 +2636,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) pWin->mapped = TRUE; if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = MapNotify; event.u.mapNotify.window = pWin->drawable.id; event.u.mapNotify.override = pWin->overrideRedirect; @@ -2761,6 +2711,7 @@ MapSubwindows(WindowPtr pParent, ClientPtr client) { if (parentRedirect && !pWin->overrideRedirect) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = MapRequest; event.u.mapRequest.window = pWin->drawable.id; event.u.mapRequest.parent = pParent->drawable.id; @@ -2773,6 +2724,7 @@ MapSubwindows(WindowPtr pParent, ClientPtr client) pWin->mapped = TRUE; if (parentNotify || StrSend(pWin)) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = MapNotify; event.u.mapNotify.window = pWin->drawable.id; event.u.mapNotify.override = pWin->overrideRedirect; @@ -2822,6 +2774,7 @@ UnrealizeTree( WindowPtr pChild; UnrealizeWindowProcPtr Unrealize; MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; + int rc; Unrealize = pWin->drawable.pScreen->UnrealizeWindow; MarkUnrealizedWindow = pWin->drawable.pScreen->MarkUnrealizedWindow; @@ -2835,9 +2788,10 @@ UnrealizeTree( #ifdef PANORAMIX if(!noPanoramiXExtension && !pChild->drawable.pScreen->myNum) { PanoramiXRes *win; - win = (PanoramiXRes*)LookupIDByType(pChild->drawable.id, - XRT_WINDOW); - if(win) + rc = dixLookupResourceByType((pointer *)&win, + pChild->drawable.id, XRT_WINDOW, + serverClient, DixWriteAccess); + if (rc == Success) win->u.win.visibility = VisibilityNotViewable; } #endif @@ -2871,7 +2825,7 @@ UnrealizeTree( * generated. Cannot unmap a root window. *****/ -_X_EXPORT int +int UnmapWindow(WindowPtr pWin, Bool fromConfigure) { WindowPtr pParent; @@ -2885,6 +2839,7 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure) return(Success); if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) { + memset(&event, 0, sizeof(xEvent)); event.u.u.type = UnmapNotify; event.u.unmapNotify.window = pWin->drawable.id; event.u.unmapNotify.fromConfigure = fromConfigure; @@ -3067,7 +3022,7 @@ PointInWindowIsVisible(WindowPtr pWin, int x, int y) } -_X_EXPORT RegionPtr +RegionPtr NotClippedByChildren(WindowPtr pWin) { ScreenPtr pScreen; @@ -3088,17 +3043,17 @@ void SendVisibilityNotify(WindowPtr pWin) { xEvent event; - if (!MapUnmapEventsEnabled(pWin)) - return; #ifndef NO_XINERAMA_PORT unsigned int visibility = pWin->visibility; #endif + if (!MapUnmapEventsEnabled(pWin)) + return; #ifdef PANORAMIX /* This is not quite correct yet, but it's close */ if(!noPanoramiXExtension) { PanoramiXRes *win; WindowPtr pWin2; - int i, Scrnum; + int rc, i, Scrnum; Scrnum = pWin->drawable.pScreen->myNum; @@ -3112,9 +3067,10 @@ SendVisibilityNotify(WindowPtr pWin) for(i = 0; i < PanoramiXNumScreens; i++) { if(i == Scrnum) continue; - pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW); + rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient, + DixWriteAccess); - if (pWin2) { + if (rc == Success) { if(pWin2->visibility == VisibilityPartiallyObscured) return; @@ -3124,17 +3080,19 @@ SendVisibilityNotify(WindowPtr pWin) break; case VisibilityPartiallyObscured: if(Scrnum) { - pWin2 = (WindowPtr)LookupIDByType(win->info[0].id, RT_WINDOW); - if (pWin2) pWin = pWin2; + rc = dixLookupWindow(&pWin2, win->info[0].id, serverClient, + DixWriteAccess); + if (rc == Success) pWin = pWin2; } break; case VisibilityFullyObscured: for(i = 0; i < PanoramiXNumScreens; i++) { if(i == Scrnum) continue; - pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW); + rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient, + DixWriteAccess); - if (pWin2) { + if (rc == Success) { if(pWin2->visibility != VisibilityFullyObscured) return; @@ -3148,6 +3106,7 @@ SendVisibilityNotify(WindowPtr pWin) } #endif + memset(&event, 0, sizeof(xEvent)); event.u.u.type = VisibilityNotify; event.u.visibility.window = pWin->drawable.id; event.u.visibility.state = visibility; @@ -3162,7 +3121,7 @@ static void DrawLogo( ); #endif -_X_EXPORT int +int dixSaveScreens(ClientPtr client, int on, int mode) { int rc, i, what, type; @@ -3279,7 +3238,7 @@ dixSaveScreens(ClientPtr client, int on, int mode) return Success; } -_X_EXPORT int +int SaveScreens(int on, int mode) { return dixSaveScreens(serverClient, on, mode); @@ -3332,8 +3291,8 @@ TileScreenSaver(int i, int kind) cm.height=16; cm.xhot=8; cm.yhot=8; - srcbits = (unsigned char *)xalloc( BitmapBytePad(32)*16); - mskbits = (unsigned char *)xalloc( BitmapBytePad(32)*16); + srcbits = xalloc( BitmapBytePad(32)*16); + mskbits = xalloc( BitmapBytePad(32)*16); if (!srcbits || !mskbits) { xfree(srcbits); @@ -3404,7 +3363,7 @@ TileScreenSaver(int i, int kind) * contain the structure. */ -_X_EXPORT WindowPtr +WindowPtr FindWindowWithOptional (WindowPtr w) { do @@ -3421,13 +3380,13 @@ FindWindowWithOptional (WindowPtr w) * release the optional record */ -_X_EXPORT void +void CheckWindowOptionalNeed (WindowPtr w) { WindowOptPtr optional; WindowOptPtr parentOptional; - if (!w->parent) + if (!w->parent || !w->optional) return; optional = w->optional; if (optional->dontPropagateMask != DontPropagateMasks[w->dontPropagate]) @@ -3462,12 +3421,6 @@ CheckWindowOptionalNeed (WindowPtr w) pNode = pNode->next; } } - if (optional->access.nperm != 0 || - optional->access.ndeny != 0) - return; - - if (optional->geMasks != NULL) - return; parentOptional = FindWindowWithOptional(w)->optional; if (optional->visual != parentOptional->visual) @@ -3488,7 +3441,7 @@ CheckWindowOptionalNeed (WindowPtr w) * values. */ -_X_EXPORT Bool +Bool MakeWindowOptional (WindowPtr pWin) { WindowOptPtr optional; @@ -3496,7 +3449,7 @@ MakeWindowOptional (WindowPtr pWin) if (pWin->optional) return TRUE; - optional = (WindowOptPtr) xalloc (sizeof (WindowOptRec)); + optional = xalloc (sizeof (WindowOptRec)); if (!optional) return FALSE; optional->dontPropagateMask = DontPropagateMasks[pWin->dontPropagate]; @@ -3512,24 +3465,6 @@ MakeWindowOptional (WindowPtr pWin) optional->inputMasks = NULL; optional->deviceCursors = NULL; - optional->geMasks = - (GenericClientMasksPtr)xalloc(sizeof(GenericClientMasksRec)); - if (!optional->geMasks) - { - xfree(optional); - return FALSE; - } else { - int i; - optional->geMasks->geClients = 0; - for (i = 0; i < MAXEXTENSIONS; i++) - optional->geMasks->eventMasks[i] = 0; - } - - optional->access.nperm = 0; - optional->access.ndeny = 0; - optional->access.perm = NULL; - optional->access.deny = NULL; - optional->access.defaultRule = 0; parentOptional = FindWindowWithOptional(pWin)->optional; optional->visual = parentOptional->visual; if (!pWin->cursorIsNone) @@ -3560,7 +3495,7 @@ MakeWindowOptional (WindowPtr pWin) * Assumption: If there is a node for a device in the list, the device has a * cursor. If the cursor is set to None, it is inherited by the parent. */ -_X_EXPORT int +int ChangeWindowDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCursor) @@ -3606,7 +3541,7 @@ ChangeWindowDeviceCursor(WindowPtr pWin, pWin->optional->deviceCursors = pNode->next; xfree(pNode); - return Success; + goto out; } } else @@ -3617,7 +3552,7 @@ ChangeWindowDeviceCursor(WindowPtr pWin, if (!pCursor) return Success; - pNewNode = (DevCursNodePtr)xalloc(sizeof(DevCursNodeRec)); + pNewNode = xalloc(sizeof(DevCursNodeRec)); pNewNode->dev = pDev; pNewNode->next = pWin->optional->deviceCursors; pWin->optional->deviceCursors = pNewNode; @@ -3651,6 +3586,7 @@ ChangeWindowDeviceCursor(WindowPtr pWin, } } +out: if (pWin->realized) WindowHasNewCursor(pWin); @@ -3665,7 +3601,7 @@ ChangeWindowDeviceCursor(WindowPtr pWin, } /* Get device cursor for given device or None if none is set */ -_X_EXPORT CursorPtr +CursorPtr WindowGetDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev) { DevCursorList pList; @@ -3771,7 +3707,7 @@ DrawLogo(WindowPtr pWin) int x, y; unsigned int width, height, size; GC *pGC; - int thin, gap, d31; + int rc, thin, gap, d31; DDXPointRec poly[4]; ChangeGCVal fore[2], back[2]; xrgb rgb[2]; @@ -3792,20 +3728,23 @@ DrawLogo(WindowPtr pWin) fore[0].val = pScreen->whitePixel; else fore[0].val = pScreen->blackPixel; - if ((pWin->backgroundState == BackgroundPixel) && - (cmap = (ColormapPtr)LookupIDByType(wColormap (pWin), RT_COLORMAP))) { - Pixel querypixels[2]; - - querypixels[0] = fore[0].val; - querypixels[1] = pWin->background.pixel; - QueryColors(cmap, 2, querypixels, rgb); - if ((rgb[0].red == rgb[1].red) && - (rgb[0].green == rgb[1].green) && - (rgb[0].blue == rgb[1].blue)) { - if (fore[0].val == pScreen->blackPixel) - fore[0].val = pScreen->whitePixel; - else - fore[0].val = pScreen->blackPixel; + if (pWin->backgroundState == BackgroundPixel) { + rc = dixLookupResourceByType((pointer *)&cmap, wColormap(pWin), + RT_COLORMAP, serverClient, DixReadAccess); + if (rc == Success) { + Pixel querypixels[2]; + + querypixels[0] = fore[0].val; + querypixels[1] = pWin->background.pixel; + QueryColors(cmap, 2, querypixels, rgb); + if ((rgb[0].red == rgb[1].red) && + (rgb[0].green == rgb[1].green) && + (rgb[0].blue == rgb[1].blue)) { + if (fore[0].val == pScreen->blackPixel) + fore[0].val = pScreen->whitePixel; + else + fore[0].val = pScreen->blackPixel; + } } } fore[1].val = FillSolid; diff --git a/xorg-server/doc/Makefile.in b/xorg-server/doc/Makefile.in index 69266a417..7deba9263 100644 --- a/xorg-server/doc/Makefile.in +++ b/xorg-server/doc/Makefile.in @@ -42,8 +42,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -53,7 +56,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -87,6 +91,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -107,9 +112,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -138,7 +146,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -147,9 +157,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -188,12 +202,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -213,7 +228,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -223,6 +237,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -236,11 +251,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -276,6 +290,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -300,7 +315,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -323,6 +337,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -354,7 +369,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/doc/Xserver.man.pre b/xorg-server/doc/Xserver.man.pre index edb95f1c3..615419134 100644 --- a/xorg-server/doc/Xserver.man.pre +++ b/xorg-server/doc/Xserver.man.pre @@ -389,9 +389,6 @@ located in the XKB base directory or a subdirectory, and specified as the relative path from the XKB base directory. The default XKB base directory is .IR __projectroot__/lib/X11/xkb . .TP 8 -.B [+-]kb -enables(+) or disables(-) the XKEYBOARD extension. -.TP 8 .BR [+-]accessx " [ \fItimeout\fP [ \fItimeout_mask\fP [ \fIfeedback\fP [ \fIoptions_mask\fP ] ] ] ]" enables(+) or disables(-) AccessX key sequences. .TP 8 @@ -563,9 +560,6 @@ Outline font directories .I /tmp/.X11-unix/X\fBn\fP Unix domain socket for display number \fBn\fP .TP 30 -.IR /tmp/rcX\fBn\fP -Kerberos 5 replay cache for display number \fBn\fP -.TP 30 .I /usr/adm/X\fBn\fPmsgs Error log file for display number \fBn\fP if run from \fIinit\fP(__adminmansuffix__) .TP 30 @@ -587,13 +581,13 @@ Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1), \fIxdm\fP(1), \fIxhost\fP(1), \fIxfwp\fP(1), .I "Security Extension Specification" .PP -Starting the server: \fIxdm\fP(1), \fIxinit\fP(1) +Starting the server: \fIstartx\fP(1), \fIxdm\fP(1), \fIxinit\fP(1) .PP Controlling the server once started: \fIxset\fP(1), \fIxsetroot\fP(1), \fIxhost\fP(1) .PP Server-specific man pages: -\fIXorg\fP(1), \fIXdmx\fP(1), \fIXnest\fP(1), +\fIXorg\fP(1), \fIXdmx\fP(1), \fIXephyr\fP(1), \fIXnest\fP(1), \fIXvfb\fP(1), \fIXDarwin\fP(1), \fIXWin\fP(1). .PP Server internal documentation: diff --git a/xorg-server/exa/Makefile.am b/xorg-server/exa/Makefile.am index 2b3f1e416..8b759cd76 100644 --- a/xorg-server/exa/Makefile.am +++ b/xorg-server/exa/Makefile.am @@ -17,11 +17,14 @@ AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) libexa_la_SOURCES = \ exa.c \ exa.h \ + exa_classic.c \ + exa_migration_classic.c \ + exa_driver.c \ + exa_mixed.c \ + exa_migration_mixed.c \ exa_accel.c \ exa_glyphs.c \ - exa_migration.c \ exa_offscreen.c \ exa_render.c \ exa_priv.h \ exa_unaccel.c - diff --git a/xorg-server/exa/Makefile.in b/xorg-server/exa/Makefile.in index 3aadbe086..5826ae817 100644 --- a/xorg-server/exa/Makefile.in +++ b/xorg-server/exa/Makefile.in @@ -39,8 +39,11 @@ subdir = exa DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,13 +53,15 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libexa_la_LIBADD = -am_libexa_la_OBJECTS = exa.lo exa_accel.lo exa_glyphs.lo \ - exa_migration.lo exa_offscreen.lo exa_render.lo exa_unaccel.lo +am_libexa_la_OBJECTS = exa.lo exa_classic.lo exa_migration_classic.lo \ + exa_driver.lo exa_mixed.lo exa_migration_mixed.lo exa_accel.lo \ + exa_glyphs.lo exa_offscreen.lo exa_render.lo exa_unaccel.lo libexa_la_OBJECTS = $(am_libexa_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -102,6 +107,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -122,9 +128,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -153,7 +162,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -162,9 +173,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -203,12 +218,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -228,7 +244,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -238,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -254,11 +270,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -294,6 +309,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -318,7 +334,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -341,6 +356,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -372,7 +388,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -388,9 +406,13 @@ AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) libexa_la_SOURCES = \ exa.c \ exa.h \ + exa_classic.c \ + exa_migration_classic.c \ + exa_driver.c \ + exa_mixed.c \ + exa_migration_mixed.c \ exa_accel.c \ exa_glyphs.c \ - exa_migration.c \ exa_offscreen.c \ exa_render.c \ exa_priv.h \ @@ -450,8 +472,12 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_accel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_classic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_glyphs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_migration.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_migration_classic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_migration_mixed.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_mixed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_offscreen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_render.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_unaccel.Plo@am__quote@ diff --git a/xorg-server/exa/exa.c b/xorg-server/exa/exa.c index 270810766..483e3b4eb 100644 --- a/xorg-server/exa/exa.c +++ b/xorg-server/exa/exa.c @@ -41,22 +41,13 @@ static int exaScreenPrivateKeyIndex; DevPrivateKey exaScreenPrivateKey = &exaScreenPrivateKeyIndex; static int exaPixmapPrivateKeyIndex; DevPrivateKey exaPixmapPrivateKey = &exaPixmapPrivateKeyIndex; +static int exaGCPrivateKeyIndex; +DevPrivateKey exaGCPrivateKey = &exaGCPrivateKeyIndex; #ifdef MITSHM static ShmFuncs exaShmFuncs = { NULL, NULL }; #endif -static _X_INLINE void* -ExaGetPixmapAddress(PixmapPtr p) -{ - ExaPixmapPriv(p); - - if (pExaPixmap->offscreen && pExaPixmap->fb_ptr) - return pExaPixmap->fb_ptr; - else - return pExaPixmap->sys_ptr; -} - /** * exaGetPixmapOffset() returns the offset (in bytes) within the framebuffer of * the beginning of the given pixmap. @@ -71,9 +62,9 @@ unsigned long exaGetPixmapOffset(PixmapPtr pPix) { ExaScreenPriv (pPix->drawable.pScreen); + ExaPixmapPriv (pPix); - return ((unsigned long)ExaGetPixmapAddress(pPix) - - (unsigned long)pExaScr->info->memoryBase); + return (CARD8 *)pExaPixmap->fb_ptr - pExaScr->info->memoryBase; } void * @@ -129,7 +120,7 @@ exaGetDrawablePixmap(DrawablePtr pDrawable) return pDrawable->pScreen->GetWindowPixmap ((WindowPtr) pDrawable); else return (PixmapPtr) pDrawable; -} +} /** * Sets the offsets to add to coordinates to make them address the same bits in @@ -159,14 +150,9 @@ exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap, void exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2) { - ExaPixmapPriv(pPix); BoxRec box; - RegionPtr pDamageReg; RegionRec region; - if (!pExaPixmap || !pExaPixmap->pDamage) - return; - box.x1 = max(x1, 0); box.y1 = max(y1, 0); box.x2 = min(x2, pPix->drawable.width); @@ -175,46 +161,12 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2) if (box.x1 >= box.x2 || box.y1 >= box.y2) return; - pDamageReg = DamageRegion(pExaPixmap->pDamage); - REGION_INIT(pScreen, ®ion, &box, 1); - REGION_UNION(pScreen, pDamageReg, pDamageReg, ®ion); + DamageRegionAppend(&pPix->drawable, ®ion); + DamageRegionProcessPending(&pPix->drawable); REGION_UNINIT(pScreen, ®ion); } -static Bool -exaDestroyPixmap (PixmapPtr pPixmap) -{ - ScreenPtr pScreen = pPixmap->drawable.pScreen; - ExaScreenPriv(pScreen); - - if (pPixmap->refcnt == 1) - { - ExaPixmapPriv (pPixmap); - - if (pExaPixmap->driverPriv) { - pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); - pExaPixmap->driverPriv = NULL; - } - - if (pExaPixmap->area) - { - DBG_PIXMAP(("-- 0x%p (0x%x) (%dx%d)\n", - (void*)pPixmap->drawable.id, - ExaGetPixmapPriv(pPixmap)->area->offset, - pPixmap->drawable.width, - pPixmap->drawable.height)); - /* Free the offscreen area */ - exaOffscreenFree (pPixmap->drawable.pScreen, pExaPixmap->area); - pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; - pPixmap->devKind = pExaPixmap->sys_pitch; - } - REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validSys); - REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validFB); - } - return fbDestroyPixmap (pPixmap); -} - static int exaLog2(int val) { @@ -227,14 +179,14 @@ exaLog2(int val) return bits - 1; } -static void +void exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, int w, int h, int bpp) { pExaPixmap->accel_blocked = 0; if (pExaScr->info->maxPitchPixels) { - int max_pitch = pExaScr->info->maxPitchPixels * (bpp + 7) / 8; + int max_pitch = pExaScr->info->maxPitchPixels * bits_to_bytes(bpp); if (pExaPixmap->fb_pitch > max_pitch) pExaPixmap->accel_blocked |= EXA_RANGE_PITCH; @@ -251,179 +203,33 @@ exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT; } -static void +void exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, int w, int h, int bpp) { if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) - pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8; + pExaPixmap->fb_pitch = bits_to_bytes((1 << (exaLog2(w - 1) + 1)) * bpp); else - pExaPixmap->fb_pitch = w * bpp / 8; + pExaPixmap->fb_pitch = bits_to_bytes(w * bpp); pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, pExaScr->info->pixmapPitchAlign); } /** - * exaCreatePixmap() creates a new pixmap. - * - * If width and height are 0, this won't be a full-fledged pixmap and it will - * get ModifyPixmapHeader() called on it later. So, we mark it as pinned, because - * ModifyPixmapHeader() would break migration. These types of pixmaps are used - * for scratch pixmaps, or to represent the visible screen. + * Returns TRUE if the pixmap is not movable. This is the case where it's a + * pixmap which has no private (almost always bad) or it's a scratch pixmap created by + * some X Server internal component (the score says it's pinned). */ -static PixmapPtr -exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, - unsigned usage_hint) -{ - PixmapPtr pPixmap; - ExaPixmapPrivPtr pExaPixmap; - int driver_alloc = 0; - int bpp; - ExaScreenPriv(pScreen); - - if (w > 32767 || h > 32767) - return NullPixmap; - - if (!pExaScr->info->CreatePixmap) { - pPixmap = fbCreatePixmap (pScreen, w, h, depth, usage_hint); - } else { - driver_alloc = 1; - pPixmap = fbCreatePixmap(pScreen, 0, 0, depth, usage_hint); - } - - if (!pPixmap) - return NULL; - - pExaPixmap = ExaGetPixmapPriv(pPixmap); - pExaPixmap->driverPriv = NULL; - - bpp = pPixmap->drawable.bitsPerPixel; - - if (driver_alloc) { - size_t paddedWidth, datasize; - - paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); - if (paddedWidth / 4 > 32767 || h > 32767) - return NullPixmap; - - exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); - - if (paddedWidth < pExaPixmap->fb_pitch) - paddedWidth = pExaPixmap->fb_pitch; - - datasize = h * paddedWidth; - - /* Set this before driver hooks, to allow for !offscreen pixmaps. - * !offscreen pixmaps have a valid pointer at all times. - */ - pPixmap->devPrivate.ptr = NULL; - - pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0); - if (!pExaPixmap->driverPriv) { - fbDestroyPixmap(pPixmap); - return NULL; - } - - (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0, - paddedWidth, NULL); - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - pExaPixmap->fb_ptr = NULL; - pExaPixmap->pDamage = NULL; - pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; - - } else { - pExaPixmap->driverPriv = NULL; - /* Scratch pixmaps may have w/h equal to zero, and may not be - * migrated. - */ - if (!w || !h) - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - else - pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; - - pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; - pExaPixmap->sys_pitch = pPixmap->devKind; - - pPixmap->devPrivate.ptr = NULL; - pExaPixmap->offscreen = FALSE; - - pExaPixmap->fb_ptr = NULL; - exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); - pExaPixmap->fb_size = pExaPixmap->fb_pitch * h; - - if (pExaPixmap->fb_pitch > 131071) { - fbDestroyPixmap(pPixmap); - return NULL; - } - - /* Set up damage tracking */ - pExaPixmap->pDamage = DamageCreate (NULL, NULL, - DamageReportNone, TRUE, - pScreen, pPixmap); - - if (pExaPixmap->pDamage == NULL) { - fbDestroyPixmap (pPixmap); - return NULL; - } - - DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage); - /* This ensures that pending damage reflects the current operation. */ - /* This is used by exa to optimize migration. */ - DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE); - } - - pExaPixmap->area = NULL; - - /* None of the pixmap bits are valid initially */ - REGION_NULL(pScreen, &pExaPixmap->validSys); - REGION_NULL(pScreen, &pExaPixmap->validFB); - - exaSetAccelBlock(pExaScr, pExaPixmap, - w, h, bpp); - - return pPixmap; -} - -static Bool -exaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, - int bitsPerPixel, int devKind, pointer pPixData) +Bool +exaPixmapIsPinned (PixmapPtr pPix) { - ExaScreenPrivPtr pExaScr; - ExaPixmapPrivPtr pExaPixmap; - Bool ret; - - if (!pPixmap) - return FALSE; - - pExaScr = ExaGetScreenPriv(pPixmap->drawable.pScreen); - pExaPixmap = ExaGetPixmapPriv(pPixmap); - - if (pExaPixmap) { - if (pPixData) - pExaPixmap->sys_ptr = pPixData; + ExaPixmapPriv (pPix); - if (devKind > 0) - pExaPixmap->sys_pitch = devKind; + if (pExaPixmap == NULL) + EXA_FatalErrorDebugWithRet(("EXA bug: exaPixmapIsPinned was called on a non-exa pixmap.\n"), TRUE); - if (width > 0 && height > 0 && bitsPerPixel > 0) { - exaSetFbPitch(pExaScr, pExaPixmap, - width, height, bitsPerPixel); - - exaSetAccelBlock(pExaScr, pExaPixmap, - width, height, bitsPerPixel); - } - } - - - if (pExaScr->info->ModifyPixmapHeader) { - ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth, - bitsPerPixel, devKind, pPixData); - if (ret == TRUE) - return ret; - } - return pExaScr->SavedModifyPixmapHeader(pPixmap, width, height, depth, - bitsPerPixel, devKind, pPixData); + return pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED; } /** @@ -439,29 +245,15 @@ exaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, * @return TRUE if the given drawable is in framebuffer memory. */ Bool -exaPixmapIsOffscreen(PixmapPtr p) +exaPixmapIsOffscreen(PixmapPtr pPixmap) { - ScreenPtr pScreen = p->drawable.pScreen; + ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); - ExaPixmapPriv(p); - void *save_ptr; - Bool ret; - - save_ptr = p->devPrivate.ptr; - - if (!save_ptr && pExaPixmap && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) - p->devPrivate.ptr = ExaGetPixmapAddress(p); - if (pExaScr->info->PixmapIsOffscreen) - ret = pExaScr->info->PixmapIsOffscreen(p); - else - ret = ((unsigned long) ((CARD8 *) p->devPrivate.ptr - - (CARD8 *) pExaScr->info->memoryBase) < - pExaScr->info->memorySize); - - p->devPrivate.ptr = save_ptr; + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return FALSE; - return ret; + return (*pExaScr->pixmap_is_offscreen)(pPixmap); } /** @@ -490,52 +282,115 @@ exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp) return NULL; } -void +/** + * Returns TRUE if pixmap can be accessed offscreen. + */ +Bool ExaDoPrepareAccess(DrawablePtr pDrawable, int index) { - ScreenPtr pScreen = pDrawable->pScreen; - ExaScreenPriv (pScreen); - PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable); - Bool offscreen = exaPixmapIsOffscreen(pPixmap); + ScreenPtr pScreen = pDrawable->pScreen; + ExaScreenPriv (pScreen); + PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable); + ExaPixmapPriv(pPixmap); + Bool offscreen; + int i; + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return FALSE; + + if (pExaPixmap == NULL) + EXA_FatalErrorDebugWithRet(("EXA bug: ExaDoPrepareAccess was called on a non-exa pixmap.\n"), FALSE); + + /* Handle repeated / nested calls. */ + for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { + if (pExaScr->access[i].pixmap == pPixmap) { + pExaScr->access[i].count++; + return TRUE; + } + } - /* Unhide pixmap pointer */ - if (pPixmap->devPrivate.ptr == NULL && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) { - pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); + /* If slot for this index is taken, find an empty slot */ + if (pExaScr->access[index].pixmap) { + for (index = EXA_NUM_PREPARE_INDICES - 1; index >= 0; index--) + if (!pExaScr->access[index].pixmap) + break; } - if (!offscreen) - return; + /* Access to this pixmap hasn't been prepared yet, so data pointer should be NULL. */ + if (pPixmap->devPrivate.ptr != NULL) { + EXA_FatalErrorDebug(("EXA bug: pPixmap->devPrivate.ptr was %p, but should have been NULL.\n", + pPixmap->devPrivate.ptr)); + } + + offscreen = exaPixmapIsOffscreen(pPixmap); + + if (offscreen) + pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; + else + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + + /* Store so we can handle repeated / nested calls. */ + pExaScr->access[index].pixmap = pPixmap; + pExaScr->access[index].count = 1; + + if (!offscreen) { + /* Do we need to allocate our system buffer? */ + if ((pExaScr->info->flags & EXA_HANDLES_PIXMAPS) && (pExaScr->info->flags & EXA_MIXED_PIXMAPS)) { + if (!pExaPixmap->sys_ptr && !exaPixmapIsPinned(pPixmap)) { + pExaPixmap->sys_ptr = malloc(pExaPixmap->sys_pitch * pDrawable->height); + if (!pExaPixmap->sys_ptr) + FatalError("EXA: malloc failed for size %d bytes\n", pExaPixmap->sys_pitch * pDrawable->height); + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + } + } + return FALSE; + } exaWaitSync (pDrawable->pScreen); if (pExaScr->info->PrepareAccess == NULL) - return; + return TRUE; - if (index >= EXA_PREPARE_AUX0 && + if (index >= EXA_PREPARE_AUX_DEST && !(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) { + if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) + FatalError("Unsupported AUX indices used on a pinned pixmap.\n"); exaMoveOutPixmap (pPixmap); - return; + return FALSE; } if (!(*pExaScr->info->PrepareAccess) (pPixmap, index)) { - ExaPixmapPriv (pPixmap); if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) - FatalError("Driver failed PrepareAccess on a pinned pixmap\n"); + FatalError("Driver failed PrepareAccess on a pinned pixmap.\n"); exaMoveOutPixmap (pPixmap); + + return FALSE; } + + return TRUE; } void exaPrepareAccessReg(DrawablePtr pDrawable, int index, RegionPtr pReg) { - ExaMigrationRec pixmaps[1]; + PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable); + ExaScreenPriv(pPixmap->drawable.pScreen); - pixmaps[0].as_dst = index == EXA_PREPARE_DEST; - pixmaps[0].as_src = index != EXA_PREPARE_DEST; - pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); - pixmaps[0].pReg = pReg; + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; - exaDoMigration(pixmaps, 1, FALSE); + if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) { + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + } else { + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + } + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = pReg; + + exaDoMigration(pixmaps, 1, FALSE); + } ExaDoPrepareAccess(pDrawable, index); } @@ -564,19 +419,41 @@ exaFinishAccess(DrawablePtr pDrawable, int index) ExaScreenPriv (pScreen); PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable); ExaPixmapPriv (pPixmap); + int i; - /* Rehide pixmap pointer if we're doing that. */ - if (pExaPixmap && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) { - pPixmap->devPrivate.ptr = NULL; + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return; + + if (pExaPixmap == NULL) + EXA_FatalErrorDebugWithRet(("EXA bug: exaFinishAccesss was called on a non-exa pixmap.\n"),); + + /* Handle repeated / nested calls. */ + for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { + if (pExaScr->access[i].pixmap == pPixmap) { + if (--pExaScr->access[i].count > 0) + return; + index = i; + break; + } } + /* Catch unbalanced Prepare/FinishAccess calls. */ + if (i == EXA_NUM_PREPARE_INDICES) + EXA_FatalErrorDebug(("EXA bug: FinishAccess called without PrepareAccess for pixmap 0x%p.\n", + pPixmap)); + + pExaScr->access[index].pixmap = NULL; + + /* We always hide the devPrivate.ptr. */ + pPixmap->devPrivate.ptr = NULL; + if (pExaScr->info->FinishAccess == NULL) return; if (!exaPixmapIsOffscreen (pPixmap)) return; - if (index >= EXA_PREPARE_AUX0 && + if (index >= EXA_PREPARE_AUX_DEST && !(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) { ErrorF("EXA bug: Trying to call driver FinishAccess hook with " "unsupported index EXA_PREPARE_AUX*\n"); @@ -587,86 +464,225 @@ exaFinishAccess(DrawablePtr pDrawable, int index) } /** - * exaValidateGC() sets the ops to EXA's implementations, which may be - * accelerated or may sync the card and fall back to fb. + * Here begins EXA's GC code. + * Do not ever access the fb/mi layer directly. */ + +static void +exaValidateGC(GCPtr pGC, + unsigned long changes, + DrawablePtr pDrawable); + static void -exaValidateGC (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +exaDestroyGC(GCPtr pGC); + +static void +exaChangeGC (GCPtr pGC, + unsigned long mask); + +static void +exaCopyGC (GCPtr pGCSrc, + unsigned long mask, + GCPtr pGCDst); + +static void +exaChangeClip (GCPtr pGC, + int type, + pointer pvalue, + int nrects); + +static void +exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc); + +static void +exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc); + +static void +exaDestroyClip(GCPtr pGC); + +const GCFuncs exaGCFuncs = { + exaValidateGC, + exaChangeGC, + exaCopyGC, + exaDestroyGC, + exaChangeClip, + exaDestroyClip, + exaCopyClip +}; + +/* + * This wrapper exists to allow fbValidateGC to work. + * Note that we no longer assume newly created pixmaps to be in normal ram. + * This assumption is certainly not garuanteed with driver allocated pixmaps. + */ +static PixmapPtr +exaCreatePixmapWithPrepare(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint) +{ + PixmapPtr pPixmap; + ExaScreenPriv(pScreen); + + /* This swaps between this function and the real upper layer function. + * Normally this would swap to the fb layer pointer, this is a very special case. + */ + swap(pExaScr, pScreen, CreatePixmap); + pPixmap = pScreen->CreatePixmap(pScreen, w, h, depth, usage_hint); + swap(pExaScr, pScreen, CreatePixmap); + + if (!pPixmap) + return NULL; + + /* Note the usage of ExaDoPrepareAccess, this allowed because: + * The pixmap is new, so not offscreen in the classic exa case. + * For EXA_HANDLES_PIXMAPS the driver will handle whatever is needed. + * We want to signal that the pixmaps will be used as destination. + */ + ExaDoPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST); + + return pPixmap; +} + +static Bool +exaDestroyPixmapWithFinish(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + Bool ret; + + exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST); + + /* This swaps between this function and the real upper layer function. + * Normally this would swap to the fb layer pointer, this is a very special case. + */ + swap(pExaScr, pScreen, DestroyPixmap); + ret = pScreen->DestroyPixmap(pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + + return ret; +} + +static void +exaValidateGC(GCPtr pGC, + unsigned long changes, + DrawablePtr pDrawable) { /* fbValidateGC will do direct access to pixmaps if the tiling has changed. - * Preempt fbValidateGC by doing its work and masking the change out, so - * that we can do the Prepare/FinishAccess. + * Do a few smart things so fbValidateGC can do it's work. */ -#ifdef FB_24_32BIT - if ((changes & GCTile) && fbGetRotatedPixmap(pGC)) { - (*pGC->pScreen->DestroyPixmap) (fbGetRotatedPixmap(pGC)); - fbGetRotatedPixmap(pGC) = 0; - } - - if (pGC->fillStyle == FillTiled) { - PixmapPtr pOldTile, pNewTile; - - pOldTile = pGC->tile.pixmap; - if (pOldTile->drawable.bitsPerPixel != pDrawable->bitsPerPixel) - { - pNewTile = fbGetRotatedPixmap(pGC); - if (!pNewTile || - pNewTile ->drawable.bitsPerPixel != pDrawable->bitsPerPixel) - { - if (pNewTile) - (*pGC->pScreen->DestroyPixmap) (pNewTile); - /* fb24_32ReformatTile will do direct access of a newly- - * allocated pixmap. This isn't a problem yet, since we don't - * put pixmaps in FB until at least one accelerated EXA op. - */ - exaPrepareAccess(&pOldTile->drawable, EXA_PREPARE_SRC); - pNewTile = fb24_32ReformatTile (pOldTile, - pDrawable->bitsPerPixel); - exaPixmapDirty(pNewTile, 0, 0, pNewTile->drawable.width, pNewTile->drawable.height); - exaFinishAccess(&pOldTile->drawable, EXA_PREPARE_SRC); - } - if (pNewTile) - { - fbGetRotatedPixmap(pGC) = pOldTile; - pGC->tile.pixmap = pNewTile; - changes |= GCTile; - } - } - } -#endif - if (changes & GCTile) { - if (!pGC->tileIsPixel && FbEvenTile (pGC->tile.pixmap->drawable.width * - pDrawable->bitsPerPixel)) - { - exaPrepareAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC); - fbPadPixmap (pGC->tile.pixmap); - exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC); - exaPixmapDirty(pGC->tile.pixmap, 0, 0, - pGC->tile.pixmap->drawable.width, - pGC->tile.pixmap->drawable.height); - } - /* Mask out the GCTile change notification, now that we've done FB's - * job for it. + + ScreenPtr pScreen = pDrawable->pScreen; + ExaScreenPriv(pScreen); + CreatePixmapProcPtr old_ptr = NULL; + DestroyPixmapProcPtr old_ptr2 = NULL; + PixmapPtr pTile = NULL; + EXA_GC_PROLOGUE(pGC); + + /* save the "fb" pointer. */ + old_ptr = pExaScr->SavedCreatePixmap; + /* create a new upper layer pointer. */ + wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmapWithPrepare); + + /* save the "fb" pointer. */ + old_ptr2 = pExaScr->SavedDestroyPixmap; + /* create a new upper layer pointer. */ + wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmapWithFinish); + + /* Either of these conditions is enough to trigger access to a tile pixmap. */ + /* With pGC->tileIsPixel == 1, you run the risk of dereferencing an invalid tile pixmap pointer. */ + if (pGC->fillStyle == FillTiled || ((changes & GCTile) && !pGC->tileIsPixel)) { + pTile = pGC->tile.pixmap; + + /* Sometimes tile pixmaps are swapped, you need access to: + * - The current tile if it depth matches. + * - Or the rotated tile if that one matches depth and !(changes & GCTile). + * - Or the current tile pixmap and a newly created one. */ - changes &= ~GCTile; + if (pTile && pTile->drawable.depth != pDrawable->depth && !(changes & GCTile)) { + PixmapPtr pRotatedTile = fbGetRotatedPixmap(pGC); + if (pRotatedTile->drawable.depth == pDrawable->depth) + pTile = pRotatedTile; + } } - exaPrepareAccessGC(pGC); - fbValidateGC (pGC, changes, pDrawable); - exaFinishAccessGC(pGC); + if (pGC->stipple) + exaPrepareAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); + if (pTile) + exaPrepareAccess(&pTile->drawable, EXA_PREPARE_SRC); + + (*pGC->funcs->ValidateGC)(pGC, changes, pDrawable); - pGC->ops = (GCOps *) &exaOps; + if (pTile) + exaFinishAccess(&pTile->drawable, EXA_PREPARE_SRC); + if (pGC->stipple) + exaFinishAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); + + /* switch back to the normal upper layer. */ + unwrap(pExaScr, pScreen, CreatePixmap); + /* restore copy of fb layer pointer. */ + pExaScr->SavedCreatePixmap = old_ptr; + + /* switch back to the normal upper layer. */ + unwrap(pExaScr, pScreen, DestroyPixmap); + /* restore copy of fb layer pointer. */ + pExaScr->SavedDestroyPixmap = old_ptr2; + + EXA_GC_EPILOGUE(pGC); } -static GCFuncs exaGCFuncs = { - exaValidateGC, - miChangeGC, - miCopyGC, - miDestroyGC, - miChangeClip, - miDestroyClip, - miCopyClip -}; +/* Is exaPrepareAccessGC() needed? */ +static void +exaDestroyGC(GCPtr pGC) +{ + EXA_GC_PROLOGUE (pGC); + (*pGC->funcs->DestroyGC)(pGC); + EXA_GC_EPILOGUE (pGC); +} + +static void +exaChangeGC (GCPtr pGC, + unsigned long mask) +{ + EXA_GC_PROLOGUE (pGC); + (*pGC->funcs->ChangeGC) (pGC, mask); + EXA_GC_EPILOGUE (pGC); +} + +static void +exaCopyGC (GCPtr pGCSrc, + unsigned long mask, + GCPtr pGCDst) +{ + EXA_GC_PROLOGUE (pGCDst); + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); + EXA_GC_EPILOGUE (pGCDst); +} + +static void +exaChangeClip (GCPtr pGC, + int type, + pointer pvalue, + int nrects) +{ + EXA_GC_PROLOGUE (pGC); + (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); + EXA_GC_EPILOGUE (pGC); +} + +static void +exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc) +{ + EXA_GC_PROLOGUE (pGCDst); + (*pGCDst->funcs->CopyClip)(pGCDst, pGCSrc); + EXA_GC_EPILOGUE (pGCDst); +} + +static void +exaDestroyClip(GCPtr pGC) +{ + EXA_GC_PROLOGUE (pGC); + (*pGC->funcs->DestroyClip)(pGC); + EXA_GC_EPILOGUE (pGC); +} /** * exaCreateGC makes a new GC and hooks up its funcs handler, so that @@ -675,32 +691,64 @@ static GCFuncs exaGCFuncs = { static int exaCreateGC (GCPtr pGC) { - if (!fbCreateGC (pGC)) - return FALSE; + ScreenPtr pScreen = pGC->pScreen; + ExaScreenPriv(pScreen); + ExaGCPriv(pGC); + Bool ret; - pGC->funcs = &exaGCFuncs; + swap(pExaScr, pScreen, CreateGC); + if ((ret = (*pScreen->CreateGC) (pGC))) { + wrap(pExaGC, pGC, funcs, (GCFuncs *) &exaGCFuncs); + wrap(pExaGC, pGC, ops, (GCOps *) &exaOps); + } + swap(pExaScr, pScreen, CreateGC); - return TRUE; + return ret; } static Bool exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { Bool ret; + ScreenPtr pScreen = pWin->drawable.pScreen; + ExaScreenPriv(pScreen); + CreatePixmapProcPtr old_ptr = NULL; + DestroyPixmapProcPtr old_ptr2 = NULL; + + /* save the "fb" pointer. */ + old_ptr = pExaScr->SavedCreatePixmap; + /* create a new upper layer pointer. */ + wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmapWithPrepare); + + /* save the "fb" pointer. */ + old_ptr2 = pExaScr->SavedDestroyPixmap; + /* create a new upper layer pointer. */ + wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmapWithFinish); if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) - exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); + exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE) - exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); + exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); - ret = fbChangeWindowAttributes(pWin, mask); + swap(pExaScr, pScreen, ChangeWindowAttributes); + ret = pScreen->ChangeWindowAttributes(pWin, mask); + swap(pExaScr, pScreen, ChangeWindowAttributes); + if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) + exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE) - exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); + exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); - if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) - exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); + /* switch back to the normal upper layer. */ + unwrap(pExaScr, pScreen, CreatePixmap); + /* restore copy of fb layer pointer. */ + pExaScr->SavedCreatePixmap = old_ptr; + + /* switch back to the normal upper layer. */ + unwrap(pExaScr, pScreen, DestroyPixmap); + /* restore copy of fb layer pointer. */ + pExaScr->SavedDestroyPixmap = old_ptr2; return ret; } @@ -708,11 +756,17 @@ exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask) static RegionPtr exaBitmapToRegion(PixmapPtr pPix) { - RegionPtr ret; - exaPrepareAccess(&pPix->drawable, EXA_PREPARE_SRC); - ret = fbPixmapToRegion(pPix); - exaFinishAccess(&pPix->drawable, EXA_PREPARE_SRC); - return ret; + RegionPtr ret; + ScreenPtr pScreen = pPix->drawable.pScreen; + ExaScreenPriv(pScreen); + + exaPrepareAccess(&pPix->drawable, EXA_PREPARE_SRC); + swap(pExaScr, pScreen, BitmapToRegion); + ret = pScreen->BitmapToRegion(pPix); + swap(pExaScr, pScreen, BitmapToRegion); + exaFinishAccess(&pPix->drawable, EXA_PREPARE_SRC); + + return ret; } static Bool @@ -722,9 +776,9 @@ exaCreateScreenResources(ScreenPtr pScreen) PixmapPtr pScreenPixmap; Bool b; - pScreen->CreateScreenResources = pExaScr->SavedCreateScreenResources; + swap(pExaScr, pScreen, CreateScreenResources); b = pScreen->CreateScreenResources(pScreen); - pScreen->CreateScreenResources = exaCreateScreenResources; + swap(pExaScr, pScreen, CreateScreenResources); if (!b) return FALSE; @@ -743,6 +797,50 @@ exaCreateScreenResources(ScreenPtr pScreen) return TRUE; } +static void +ExaBlockHandler(int screenNum, pointer blockData, pointer pTimeout, + pointer pReadmask) +{ + ScreenPtr pScreen = screenInfo.screens[screenNum]; + ExaScreenPriv(pScreen); + + unwrap(pExaScr, pScreen, BlockHandler); + (*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask); + wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler); + + /* Try and keep the offscreen memory area tidy every now and then (at most + * once per second) when the server has been idle for at least 100ms. + */ + if (pExaScr->numOffscreenAvailable > 1) { + CARD32 now = GetTimeInMillis(); + + pExaScr->nextDefragment = now + + max(100, (INT32)(pExaScr->lastDefragment + 1000 - now)); + AdjustWaitForDelay(pTimeout, pExaScr->nextDefragment - now); + } +} + +static void +ExaWakeupHandler(int screenNum, pointer wakeupData, unsigned long result, + pointer pReadmask) +{ + ScreenPtr pScreen = screenInfo.screens[screenNum]; + ExaScreenPriv(pScreen); + + unwrap(pExaScr, pScreen, WakeupHandler); + (*pScreen->WakeupHandler) (screenNum, wakeupData, result, pReadmask); + wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler); + + if (result == 0 && pExaScr->numOffscreenAvailable > 1) { + CARD32 now = GetTimeInMillis(); + + if ((int)(now - pExaScr->nextDefragment) > 0) { + ExaOffscreenDefragment(pScreen); + pExaScr->lastDefragment = now; + } + } +} + /** * exaCloseScreen() unwraps its wrapped screen functions and tears down EXA's * screen private, before calling down to the next CloseSccreen. @@ -758,23 +856,32 @@ exaCloseScreen(int i, ScreenPtr pScreen) if (ps->Glyphs == exaGlyphs) exaGlyphsFini(pScreen); - pScreen->CreateGC = pExaScr->SavedCreateGC; - pScreen->CloseScreen = pExaScr->SavedCloseScreen; - pScreen->GetImage = pExaScr->SavedGetImage; - pScreen->GetSpans = pExaScr->SavedGetSpans; - pScreen->CreatePixmap = pExaScr->SavedCreatePixmap; - pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap; - pScreen->CopyWindow = pExaScr->SavedCopyWindow; - pScreen->ChangeWindowAttributes = pExaScr->SavedChangeWindowAttributes; - pScreen->BitmapToRegion = pExaScr->SavedBitmapToRegion; - pScreen->CreateScreenResources = pExaScr->SavedCreateScreenResources; + if (pScreen->BlockHandler == ExaBlockHandler) + unwrap(pExaScr, pScreen, BlockHandler); + if (pScreen->WakeupHandler == ExaWakeupHandler) + unwrap(pExaScr, pScreen, WakeupHandler); + unwrap(pExaScr, pScreen, CreateGC); + unwrap(pExaScr, pScreen, CloseScreen); + unwrap(pExaScr, pScreen, GetImage); + unwrap(pExaScr, pScreen, GetSpans); + if (pExaScr->SavedCreatePixmap) + unwrap(pExaScr, pScreen, CreatePixmap); + if (pExaScr->SavedDestroyPixmap) + unwrap(pExaScr, pScreen, DestroyPixmap); + if (pExaScr->SavedModifyPixmapHeader) + unwrap(pExaScr, pScreen, ModifyPixmapHeader); + unwrap(pExaScr, pScreen, CopyWindow); + unwrap(pExaScr, pScreen, ChangeWindowAttributes); + unwrap(pExaScr, pScreen, BitmapToRegion); + unwrap(pExaScr, pScreen, CreateScreenResources); #ifdef RENDER if (ps) { - ps->Composite = pExaScr->SavedComposite; - ps->Glyphs = pExaScr->SavedGlyphs; - ps->Trapezoids = pExaScr->SavedTrapezoids; - ps->Triangles = pExaScr->SavedTriangles; - ps->AddTraps = pExaScr->SavedAddTraps; + unwrap(pExaScr, ps, Composite); + if (pExaScr->SavedGlyphs) + unwrap(pExaScr, ps, Glyphs); + unwrap(pExaScr, ps, Trapezoids); + unwrap(pExaScr, ps, Triangles); + unwrap(pExaScr, ps, AddTraps); } #endif @@ -832,7 +939,7 @@ exaDriverInit (ScreenPtr pScreen, return FALSE; } - if (!pScreenInfo->CreatePixmap) { + if (!pScreenInfo->CreatePixmap && !pScreenInfo->CreatePixmap2) { if (!pScreenInfo->memoryBase) { LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memoryBase " "must be non-zero\n", pScreen->myNum); @@ -889,7 +996,6 @@ exaDriverInit (ScreenPtr pScreen, #endif pExaScr = xcalloc (sizeof (ExaScreenPrivRec), 1); - if (!pExaScr) { LogMessage(X_WARNING, "EXA(%d): Failed to allocate screen private\n", pScreen->myNum); @@ -904,51 +1010,38 @@ exaDriverInit (ScreenPtr pScreen, exaDDXDriverInit(pScreen); + if (!dixRequestPrivate(exaGCPrivateKey, sizeof(ExaGCPrivRec))) { + LogMessage(X_WARNING, + "EXA(%d): Failed to allocate GC private\n", + pScreen->myNum); + return FALSE; + } + /* * Replace various fb screen functions */ - pExaScr->SavedCloseScreen = pScreen->CloseScreen; - pScreen->CloseScreen = exaCloseScreen; - - pExaScr->SavedCreateGC = pScreen->CreateGC; - pScreen->CreateGC = exaCreateGC; - - pExaScr->SavedGetImage = pScreen->GetImage; - pScreen->GetImage = exaGetImage; - - pExaScr->SavedGetSpans = pScreen->GetSpans; - pScreen->GetSpans = ExaCheckGetSpans; - - pExaScr->SavedCopyWindow = pScreen->CopyWindow; - pScreen->CopyWindow = exaCopyWindow; - - pExaScr->SavedChangeWindowAttributes = pScreen->ChangeWindowAttributes; - pScreen->ChangeWindowAttributes = exaChangeWindowAttributes; - - pExaScr->SavedBitmapToRegion = pScreen->BitmapToRegion; - pScreen->BitmapToRegion = exaBitmapToRegion; - - pExaScr->SavedCreateScreenResources = pScreen->CreateScreenResources; - pScreen->CreateScreenResources = exaCreateScreenResources; + if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) && + !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) { + wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler); + wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler); + } + wrap(pExaScr, pScreen, CreateGC, exaCreateGC); + wrap(pExaScr, pScreen, CloseScreen, exaCloseScreen); + wrap(pExaScr, pScreen, GetImage, exaGetImage); + wrap(pExaScr, pScreen, GetSpans, ExaCheckGetSpans); + wrap(pExaScr, pScreen, CopyWindow, exaCopyWindow); + wrap(pExaScr, pScreen, ChangeWindowAttributes, exaChangeWindowAttributes); + wrap(pExaScr, pScreen, BitmapToRegion, exaBitmapToRegion); + wrap(pExaScr, pScreen, CreateScreenResources, exaCreateScreenResources); #ifdef RENDER if (ps) { - pExaScr->SavedComposite = ps->Composite; - ps->Composite = exaComposite; - - if (pScreenInfo->PrepareComposite) { - pExaScr->SavedGlyphs = ps->Glyphs; - ps->Glyphs = exaGlyphs; - } - - pExaScr->SavedTriangles = ps->Triangles; - ps->Triangles = exaTriangles; - - pExaScr->SavedTrapezoids = ps->Trapezoids; - ps->Trapezoids = exaTrapezoids; - - pExaScr->SavedAddTraps = ps->AddTraps; - ps->AddTraps = ExaCheckAddTraps; + wrap(pExaScr, ps, Composite, exaComposite); + if (pScreenInfo->PrepareComposite) + wrap(pExaScr, ps, Glyphs, exaGlyphs); + wrap(pExaScr, ps, Trapezoids, exaTrapezoids); + wrap(pExaScr, ps, Triangles, exaTriangles); + wrap(pExaScr, ps, AddTraps, ExaCheckAddTraps); } #endif @@ -969,15 +1062,34 @@ exaDriverInit (ScreenPtr pScreen, pScreen->myNum); return FALSE; } - pExaScr->SavedCreatePixmap = pScreen->CreatePixmap; - pScreen->CreatePixmap = exaCreatePixmap; - - pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap; - pScreen->DestroyPixmap = exaDestroyPixmap; - - pExaScr->SavedModifyPixmapHeader = pScreen->ModifyPixmapHeader; - pScreen->ModifyPixmapHeader = exaModifyPixmapHeader; - if (!pExaScr->info->CreatePixmap) { + if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) { + if (pExaScr->info->flags & EXA_MIXED_PIXMAPS) { + wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_mixed); + wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_mixed); + wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_mixed); + pExaScr->do_migration = exaDoMigration_mixed; + pExaScr->pixmap_is_offscreen = exaPixmapIsOffscreen_mixed; + pExaScr->do_move_in_pixmap = exaMoveInPixmap_mixed; + pExaScr->do_move_out_pixmap = NULL; + } else { + wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_driver); + wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_driver); + wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_driver); + pExaScr->do_migration = NULL; + pExaScr->pixmap_is_offscreen = exaPixmapIsOffscreen_driver; + pExaScr->do_move_in_pixmap = NULL; + pExaScr->do_move_out_pixmap = NULL; + } + } else { + wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_classic); + wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_classic); + wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_classic); + pExaScr->do_migration = exaDoMigration_classic; + pExaScr->pixmap_is_offscreen = exaPixmapIsOffscreen_classic; + pExaScr->do_move_in_pixmap = exaMoveInPixmap_classic; + pExaScr->do_move_out_pixmap = exaMoveOutPixmap_classic; + } + if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) { LogMessage(X_INFO, "EXA(%d): Offscreen pixmap area of %lu bytes\n", pScreen->myNum, pExaScr->info->memorySize - pExaScr->info->offScreenBase); @@ -990,7 +1102,7 @@ exaDriverInit (ScreenPtr pScreen, else LogMessage(X_INFO, "EXA(%d): No offscreen pixmaps\n", pScreen->myNum); - if (!pExaScr->info->CreatePixmap) { + if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) { DBG_PIXMAP(("============== %ld < %ld\n", pExaScr->info->offScreenBase, pExaScr->info->memorySize)); if (pExaScr->info->offScreenBase < pExaScr->info->memorySize) { @@ -1074,3 +1186,47 @@ void exaWaitSync(ScreenPtr pScreen) pExaScr->info->needsSync = FALSE; } } + +/** + * Performs migration of the pixmaps according to the operation information + * provided in pixmaps and can_accel and the migration scheme chosen in the + * config file. + */ +void +exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) +{ + ScreenPtr pScreen = pixmaps[0].pPix->drawable.pScreen; + ExaScreenPriv(pScreen); + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return; + + if (pExaScr->do_migration) + (*pExaScr->do_migration)(pixmaps, npixmaps, can_accel); +} + +void +exaMoveInPixmap (PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return; + + if (pExaScr->do_move_in_pixmap) + (*pExaScr->do_move_in_pixmap)(pPixmap); +} + +void +exaMoveOutPixmap (PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return; + + if (pExaScr->do_move_out_pixmap) + (*pExaScr->do_move_out_pixmap)(pPixmap); +} diff --git a/xorg-server/exa/exa.h b/xorg-server/exa/exa.h index 4a96cc6f3..4b3947327 100644 --- a/xorg-server/exa/exa.h +++ b/xorg-server/exa/exa.h @@ -39,7 +39,7 @@ #include "fb.h" #define EXA_VERSION_MAJOR 2 -#define EXA_VERSION_MINOR 4 +#define EXA_VERSION_MINOR 5 #define EXA_VERSION_RELEASE 0 typedef struct _ExaOffscreenArea ExaOffscreenArea; @@ -66,6 +66,9 @@ struct _ExaOffscreenArea { ExaOffscreenArea *next; unsigned eviction_cost; + + ExaOffscreenArea *prev; /* Double-linked list for defragmentation */ + int align; /* required alignment */ }; /** @@ -499,27 +502,8 @@ typedef struct _ExaDriver { int src_pitch); /** - * UploadToScratch() is used to upload a pixmap to a scratch area for - * acceleration. - * - * @param pSrc source pixmap in host memory - * @param pDst fake, scratch pixmap to be set up in offscreen memory. - * - * The UploadToScratch() call was added to support Xati before Xati had - * support for hostdata uploads and before exaGlyphs() was written. It - * behaves incorrectly (uses an invalid pixmap as pDst), - * and UploadToScreen() should be implemented instead. - * - * Drivers implementing UploadToScratch() had to set up space (likely in a - * statically allocated area) in offscreen memory, copy pSrc to that - * scratch area, and adust pDst->devKind for the pitch and - * pDst->devPrivate.ptr for the pointer to that scratch area. The driver - * was responsible for syncing (as it was implemented using memcpy() in - * Xati), and only the data from the last UploadToScratch() was guaranteed - * to be valid at any given time. - * - * UploadToScratch() should not be implemented by drivers, and will likely - * be removed in a future version of EXA. + * UploadToScratch() is no longer used and will be removed next time the EXA + * major version needs to be bumped. */ Bool (*UploadToScratch) (PixmapPtr pSrc, PixmapPtr pDst); @@ -602,14 +586,14 @@ typedef struct _ExaDriver { * untiling, or to adjust the pixmap's devPrivate.ptr for the purpose of * making CPU access use a different aperture. * - * The index is one of #EXA_PREPARE_DEST, #EXA_PREPARE_SRC, or - * #EXA_PREPARE_MASK, indicating which pixmap is in question. Since only up - * to three pixmaps will have PrepareAccess() called on them per operation, - * drivers can have a small, statically-allocated space to maintain state - * for PrepareAccess() and FinishAccess() in. Note that the same pixmap may - * have PrepareAccess() called on it more than once, for example when doing - * a copy within the same pixmap (so it gets PrepareAccess as() - * #EXA_PREPARE_DEST and then as #EXA_PREPARE_SRC). + * The index is one of #EXA_PREPARE_DEST, #EXA_PREPARE_SRC, + * #EXA_PREPARE_MASK, #EXA_PREPARE_AUX_DEST, #EXA_PREPARE_AUX_SRC, or + * #EXA_PREPARE_AUX_MASK. Since only up to #EXA_NUM_PREPARE_INDICES pixmaps + * will have PrepareAccess() called on them per operation, drivers can have + * a small, statically-allocated space to maintain state for PrepareAccess() + * and FinishAccess() in. Note that PrepareAccess() is only called once per + * pixmap and operation, regardless of whether the pixmap is used as a + * destination and/or source, and the index may not reflect the usage. * * PrepareAccess() may fail. An example might be the case of hardware that * can set up 1 or 2 surfaces for CPU access, but not 3. If PrepareAccess() @@ -676,9 +660,10 @@ typedef struct _ExaDriver { * EXA_PREPARE_AUX* are additional indices for other purposes, e.g. * separate alpha maps with Composite operations. */ - #define EXA_PREPARE_AUX0 3 - #define EXA_PREPARE_AUX1 4 - #define EXA_PREPARE_AUX2 5 + #define EXA_PREPARE_AUX_DEST 3 + #define EXA_PREPARE_AUX_SRC 4 + #define EXA_PREPARE_AUX_MASK 5 + #define EXA_NUM_PREPARE_INDICES 6 /** @} */ /** @@ -714,10 +699,21 @@ typedef struct _ExaDriver { /* Hooks to allow driver to its own pixmap memory management */ void *(*CreatePixmap)(ScreenPtr pScreen, int size, int align); void (*DestroyPixmap)(ScreenPtr pScreen, void *driverPriv); + /** + * Returning a pixmap with non-NULL devPrivate.ptr implies a pixmap which is + * not offscreen, which will never be accelerated and Prepare/FinishAccess won't + * be called. + */ Bool (*ModifyPixmapHeader)(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, pointer pPixData); + /* hooks for drivers with tiling support: + * driver MUST fill out new_fb_pitch with valid pitch of pixmap + */ + void *(*CreatePixmap2)(ScreenPtr pScreen, int width, int height, + int depth, int usage_hint, int bitsPerPixel, + int *new_fb_pitch); /** @} */ } ExaDriverRec, *ExaDriverPtr; @@ -756,66 +752,83 @@ typedef struct _ExaDriver { */ #define EXA_SUPPORTS_PREPARE_AUX (1 << 4) +/** + * EXA_SUPPORTS_OFFSCREEN_OVERLAPS indicates to EXA that the driver Copy hooks + * can handle the source and destination occupying overlapping offscreen memory + * areas. This allows the offscreen memory defragmentation code to defragment + * areas where the defragmented position overlaps the fragmented position. + * + * Typically this is supported by traditional 2D engines but not by 3D engines. + */ +#define EXA_SUPPORTS_OFFSCREEN_OVERLAPS (1 << 5) + +/** + * EXA_MIXED_PIXMAPS will hide unacceleratable pixmaps from drivers and manage the + * problem known software fallbacks like trapezoids. This only migrates pixmaps one way + * into a driver pixmap and then pins it. + */ +#define EXA_MIXED_PIXMAPS (1 << 6) + /** @} */ /* in exa.c */ -ExaDriverPtr +extern _X_EXPORT ExaDriverPtr exaDriverAlloc(void); -Bool +extern _X_EXPORT Bool exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo); -void +extern _X_EXPORT void exaDriverFini(ScreenPtr pScreen); -void +extern _X_EXPORT void exaMarkSync(ScreenPtr pScreen); -void +extern _X_EXPORT void exaWaitSync(ScreenPtr pScreen); -unsigned long +extern _X_EXPORT unsigned long exaGetPixmapOffset(PixmapPtr pPix); -unsigned long +extern _X_EXPORT unsigned long exaGetPixmapPitch(PixmapPtr pPix); -unsigned long +extern _X_EXPORT unsigned long exaGetPixmapSize(PixmapPtr pPix); -void * +extern _X_EXPORT void * exaGetPixmapDriverPrivate(PixmapPtr p); /* in exa_offscreen.c */ -ExaOffscreenArea * +extern _X_EXPORT ExaOffscreenArea * exaOffscreenAlloc(ScreenPtr pScreen, int size, int align, Bool locked, ExaOffscreenSaveProc save, pointer privData); -ExaOffscreenArea * +extern _X_EXPORT ExaOffscreenArea * exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area); -void +extern _X_EXPORT void ExaOffscreenMarkUsed (PixmapPtr pPixmap); -void +extern _X_EXPORT void exaEnableDisableFBAccess (int index, Bool enable); -Bool +extern _X_EXPORT Bool exaDrawableIsOffscreen (DrawablePtr pDrawable); -/* in exa_migration.c */ -void +/* in exa.c */ +extern _X_EXPORT void exaMoveInPixmap (PixmapPtr pPixmap); -void +extern _X_EXPORT void exaMoveOutPixmap (PixmapPtr pPixmap); /* in exa_unaccel.c */ -CARD32 +extern _X_EXPORT CARD32 exaGetPixmapFirstPixel (PixmapPtr pPixmap); diff --git a/xorg-server/exa/exa_accel.c b/xorg-server/exa/exa_accel.c index dac6e6c79..33fbb9843 100644 --- a/xorg-server/exa/exa_accel.c +++ b/xorg-server/exa/exa_accel.c @@ -50,12 +50,6 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, int fullX1, fullX2, fullY1; int partX1, partX2; int off_x, off_y; - ExaMigrationRec pixmaps[1]; - - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = pPixmap; - pixmaps[0].pReg = NULL; if (pExaScr->swappedOut || pGC->fillStyle != FillSolid || @@ -63,7 +57,16 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, { ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted); return; - } else { + } + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = NULL; + exaDoMigration (pixmaps, 1, TRUE); } @@ -148,9 +151,9 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int nbox; int xoff, yoff; int bpp = pDrawable->bitsPerPixel; - Bool access_prepared = FALSE; + Bool ret = TRUE; - if (pExaPixmap->accel_blocked) + if (pExaPixmap->accel_blocked || !pExaScr->info->UploadToScreen) return FALSE; /* Don't bother with under 8bpp, XYPixmaps. */ @@ -164,10 +167,10 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, if (pExaScr->swappedOut) return FALSE; - if (pExaPixmap->pDamage) { + if (pExaScr->do_migration) { ExaMigrationRec pixmaps[1]; - pixmaps[0].as_dst = TRUE; + pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pPix; pixmaps[0].pReg = DamagePendingRegion(pExaPixmap->pDamage); @@ -177,7 +180,7 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff); - if (!pPix || !pExaScr->info->UploadToScreen) + if (!pPix) return FALSE; x += pDrawable->x; @@ -210,42 +213,19 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, src = bits + (y1 - y) * src_stride + (x1 - x) * (bpp / 8); ok = pExaScr->info->UploadToScreen(pPix, x1 + xoff, y1 + yoff, x2 - x1, y2 - y1, src, src_stride); - /* If we fail to accelerate the upload, fall back to using unaccelerated - * fb calls. + /* We have to fall back completely, and ignore what has already been completed. + * Messing with the fb layer directly like we used to is completely unacceptable. */ if (!ok) { - FbStip *dst; - FbStride dst_stride; - int dstBpp; - int dstXoff, dstYoff; - - if (!access_prepared) { - ExaDoPrepareAccess(pDrawable, EXA_PREPARE_DEST); - - access_prepared = TRUE; - } - - fbGetStipDrawable(pDrawable, dst, dst_stride, dstBpp, - dstXoff, dstYoff); - - fbBltStip((FbStip *)bits + (y1 - y) * (src_stride / sizeof(FbStip)), - src_stride / sizeof(FbStip), - (x1 - x) * dstBpp, - dst + (y1 + dstYoff) * dst_stride, - dst_stride, - (x1 + dstXoff) * dstBpp, - (x2 - x1) * dstBpp, - y2 - y1, - GXcopy, FB_ALLONES, dstBpp); + ret = FALSE; + break; } } - if (access_prepared) - exaFinishAccess(pDrawable, EXA_PREPARE_DEST); - else + if (ret) exaMarkSync(pDrawable->pScreen); - return TRUE; + return ret; } static void @@ -379,8 +359,8 @@ exaCopyNtoNTwoDir (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, return TRUE; } -void -exaCopyNtoN (DrawablePtr pSrcDrawable, +Bool +exaHWCopyNtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, @@ -388,22 +368,20 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, int dx, int dy, Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure) + Bool upsidedown) { ExaScreenPriv (pDstDrawable->pScreen); PixmapPtr pSrcPixmap, pDstPixmap; ExaPixmapPrivPtr pSrcExaPixmap, pDstExaPixmap; int src_off_x, src_off_y; int dst_off_x, dst_off_y; - ExaMigrationRec pixmaps[2]; RegionPtr srcregion = NULL, dstregion = NULL; xRectangle *rects; + Bool ret = TRUE; /* avoid doing copy operations if no boxes */ if (nbox == 0) - return; + return TRUE; pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable); pDstPixmap = exaGetDrawablePixmap (pDstDrawable); @@ -446,14 +424,6 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, } } - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = pDstPixmap; - pixmaps[0].pReg = dstregion; - pixmaps[1].as_dst = FALSE; - pixmaps[1].as_src = TRUE; - pixmaps[1].pPix = pSrcPixmap; - pixmaps[1].pReg = srcregion; pSrcExaPixmap = ExaGetPixmapPriv (pSrcPixmap); pDstExaPixmap = ExaGetPixmapPriv (pDstPixmap); @@ -487,7 +457,20 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, } } - exaDoMigration (pixmaps, 2, TRUE); + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[2]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pDstPixmap; + pixmaps[0].pReg = dstregion; + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = pSrcPixmap; + pixmaps[1].pReg = srcregion; + + exaDoMigration (pixmaps, 2, TRUE); + } /* Mixed directions must be handled specially if the card is lame */ if ((pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) && @@ -498,40 +481,64 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, goto fallback; } - if (!exaPixmapIsOffscreen(pSrcPixmap) || - !exaPixmapIsOffscreen(pDstPixmap) || - !(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1, - upsidedown ? -1 : 1, - pGC ? pGC->alu : GXcopy, - pGC ? pGC->planemask : FB_ALLONES)) { - goto fallback; - } + if (exaPixmapIsOffscreen(pDstPixmap)) { + /* Normal blitting. */ + if (exaPixmapIsOffscreen(pSrcPixmap)) { + if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1, + upsidedown ? -1 : 1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : FB_ALLONES)) { + goto fallback; + } - while (nbox--) - { - (*pExaScr->info->Copy) (pDstPixmap, - pbox->x1 + dx + src_off_x, - pbox->y1 + dy + src_off_y, - pbox->x1 + dst_off_x, pbox->y1 + dst_off_y, - pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); - pbox++; - } + while (nbox--) + { + (*pExaScr->info->Copy) (pDstPixmap, + pbox->x1 + dx + src_off_x, + pbox->y1 + dy + src_off_y, + pbox->x1 + dst_off_x, pbox->y1 + dst_off_y, + pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); + pbox++; + } - (*pExaScr->info->DoneCopy) (pDstPixmap); - exaMarkSync (pDstDrawable->pScreen); + (*pExaScr->info->DoneCopy) (pDstPixmap); + exaMarkSync (pDstDrawable->pScreen); + /* UTS: mainly for SHM PutImage's secondary path. */ + } else { + int bpp = pSrcDrawable->bitsPerPixel; + int src_stride = exaGetPixmapPitch(pSrcPixmap); + CARD8 *src = NULL; + + if (!pExaScr->info->UploadToScreen) + goto fallback; + + if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel) + goto fallback; + + if (pSrcDrawable->bitsPerPixel < 8) + goto fallback; + + if (pGC && !(pGC->alu == GXcopy && EXA_PM_IS_SOLID(pSrcDrawable, pGC->planemask))) + goto fallback; + + while (nbox--) + { + src = pSrcExaPixmap->sys_ptr + (pbox->y1 + dy + src_off_y) * src_stride + (pbox->x1 + dx + src_off_x) * (bpp / 8); + if (!pExaScr->info->UploadToScreen(pDstPixmap, pbox->x1 + dst_off_x, + pbox->y1 + dst_off_y, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1, + (char *) src, src_stride)) + goto fallback; + + pbox++; + } + } + } else + goto fallback; goto out; fallback: - EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable, - exaDrawableLocation(pSrcDrawable), - exaDrawableLocation(pDstDrawable))); - exaPrepareAccessReg (pDstDrawable, EXA_PREPARE_DEST, dstregion); - exaPrepareAccessReg (pSrcDrawable, EXA_PREPARE_SRC, srcregion); - fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, - upsidedown, bitplane, closure); - exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC); - exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST); + ret = FALSE; out: if (dstregion) { @@ -542,6 +549,39 @@ out: REGION_UNINIT(pScreen, srcregion); REGION_DESTROY(pScreen, srcregion); } + + return ret; +} + +void +exaCopyNtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure) +{ + ExaScreenPriv(pDstDrawable->pScreen); + + if (pExaScr->fallback_flags & EXA_FALLBACK_COPYWINDOW) + return; + + if (exaHWCopyNtoN(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown)) + return; + + /* This is a CopyWindow, it's cleaner to fallback at the original call. */ + if (pExaScr->fallback_flags & EXA_ACCEL_COPYWINDOW) { + pExaScr->fallback_flags |= EXA_FALLBACK_COPYWINDOW; + return; + } + + /* fallback */ + ExaCheckCopyNtoN(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown, bitplane, closure); } RegionPtr @@ -555,7 +595,7 @@ exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, srcx, srcy, width, height, dstx, dsty); } - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, + return miDoCopy (pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty, exaCopyNtoN, 0, NULL); } @@ -730,7 +770,6 @@ exaPolyFillRect(DrawablePtr pDrawable, int xoff, yoff; int xorg, yorg; int n; - ExaMigrationRec pixmaps[2]; RegionPtr pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED); /* Compute intersection of rects and clip region */ @@ -741,11 +780,6 @@ exaPolyFillRect(DrawablePtr pDrawable, goto out; } - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = pPixmap; - pixmaps[0].pReg = NULL; - exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); if (pExaScr->swappedOut || pExaPixmap->accel_blocked) @@ -778,7 +812,16 @@ exaPolyFillRect(DrawablePtr pDrawable, goto fallback; } - exaDoMigration (pixmaps, 1, TRUE); + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = NULL; + + exaDoMigration (pixmaps, 1, TRUE); + } if (!exaPixmapIsOffscreen (pPixmap) || !(*pExaScr->info->PrepareSolid) (pPixmap, @@ -898,6 +941,7 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) RegionRec rgnDst; int dx, dy; PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); + ExaScreenPriv(pWin->drawable.pScreen); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; @@ -912,11 +956,19 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) -pPixmap->screen_x, -pPixmap->screen_y); #endif - fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, + pExaScr->fallback_flags |= EXA_ACCEL_COPYWINDOW; + miCopyRegion (&pPixmap->drawable, &pPixmap->drawable, NULL, &rgnDst, dx, dy, exaCopyNtoN, 0, NULL); + pExaScr->fallback_flags &= ~EXA_ACCEL_COPYWINDOW; REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + + if (pExaScr->fallback_flags & EXA_FALLBACK_COPYWINDOW) { + pExaScr->fallback_flags &= ~EXA_FALLBACK_COPYWINDOW; + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, dx, dy); + ExaCheckCopyWindow(pWin, ptOldOrg, prgnSrc); + } } static Bool @@ -927,23 +979,23 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel, PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable); ExaPixmapPriv (pPixmap); int xoff, yoff; - ExaMigrationRec pixmaps[1]; Bool ret = FALSE; - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = pPixmap; - pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid, - alu, clientClipType) - ? NULL : pRegion; - exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); REGION_TRANSLATE(pScreen, pRegion, xoff, yoff); if (pExaPixmap->accel_blocked) - { goto out; - } else { + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid, + alu, clientClipType) ? NULL : pRegion; + exaDoMigration (pixmaps, 1, TRUE); } @@ -965,7 +1017,7 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel, (*pExaScr->info->DoneSolid) (pPixmap); exaMarkSync(pDrawable->pScreen); - if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS) && + if (pExaPixmap->pDamage && pDrawable->width == 1 && pDrawable->height == 1 && pDrawable->bitsPerPixel != 24) { ExaPixmapPriv(pPixmap); @@ -1008,7 +1060,6 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, ExaPixmapPrivPtr pTileExaPixmap = ExaGetPixmapPriv(pTile); int xoff, yoff; int tileWidth, tileHeight; - ExaMigrationRec pixmaps[2]; int nbox = REGION_NUM_RECTS (pRegion); BoxPtr pBox = REGION_RECTS (pRegion); Bool ret = FALSE; @@ -1025,23 +1076,25 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, exaGetPixmapFirstPixel (pTile), planemask, alu, clientClipType); - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); - pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillTiled, - alu, clientClipType) - ? NULL : pRegion; - pixmaps[1].as_dst = FALSE; - pixmaps[1].as_src = TRUE; - pixmaps[1].pPix = pTile; - pixmaps[1].pReg = NULL; - + pPixmap = exaGetDrawablePixmap (pDrawable); pExaPixmap = ExaGetPixmapPriv (pPixmap); if (pExaPixmap->accel_blocked || pTileExaPixmap->accel_blocked) - { return FALSE; - } else { + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[2]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillTiled, + alu, clientClipType) ? NULL : pRegion; + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = pTile; + pixmaps[1].pReg = NULL; + exaDoMigration (pixmaps, 2, TRUE); } @@ -1180,31 +1233,36 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *d) { ExaScreenPriv (pDrawable->pScreen); - ExaMigrationRec pixmaps[1]; - BoxRec Box; - RegionRec Reg; - PixmapPtr pPix; + PixmapPtr pPix = exaGetDrawablePixmap (pDrawable); int xoff, yoff; Bool ok; - pixmaps[0].as_dst = FALSE; - pixmaps[0].as_src = TRUE; - pixmaps[0].pPix = pPix = exaGetDrawablePixmap (pDrawable); - pixmaps[0].pReg = &Reg; + if (pExaScr->swappedOut) + goto fallback; exaGetDrawableDeltas (pDrawable, pPix, &xoff, &yoff); - Box.x1 = pDrawable->y + x + xoff; - Box.y1 = pDrawable->y + y + yoff; - Box.x2 = Box.x1 + w; - Box.y2 = Box.y1 + h; + if (pExaScr->do_migration) { + BoxRec Box; + RegionRec Reg; + ExaMigrationRec pixmaps[1]; - REGION_INIT(pScreen, &Reg, &Box, 1); + Box.x1 = pDrawable->y + x + xoff; + Box.y1 = pDrawable->y + y + yoff; + Box.x2 = Box.x1 + w; + Box.y2 = Box.y1 + h; - if (pExaScr->swappedOut) - goto fallback; + REGION_INIT(pScreen, &Reg, &Box, 1); - exaDoMigration(pixmaps, 1, FALSE); + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = pPix; + pixmaps[0].pReg = &Reg; + + exaDoMigration(pixmaps, 1, FALSE); + + REGION_UNINIT(pScreen, &Reg); + } pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff); @@ -1226,17 +1284,9 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, PixmapBytePad(w, pDrawable->depth)); if (ok) { exaWaitSync(pDrawable->pScreen); - goto out; + return; } fallback: - EXA_FALLBACK(("from %p (%c)\n", pDrawable, - exaDrawableLocation(pDrawable))); - - exaPrepareAccessReg (pDrawable, EXA_PREPARE_SRC, &Reg); - fbGetImage (pDrawable, x, y, w, h, format, planeMask, d); - exaFinishAccess (pDrawable, EXA_PREPARE_SRC); - -out: - REGION_UNINIT(pScreen, &Reg); + ExaCheckGetImage(pDrawable, x, y, w, h, format, planeMask, d); } diff --git a/xorg-server/exa/exa_classic.c b/xorg-server/exa/exa_classic.c new file mode 100644 index 000000000..1eff57091 --- /dev/null +++ b/xorg-server/exa/exa_classic.c @@ -0,0 +1,258 @@ +/* + * Copyright © 2009 Maarten Maathuis + * + * 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. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +/* This file holds the classic exa specific implementation. */ + +static _X_INLINE void* +ExaGetPixmapAddress(PixmapPtr p) +{ + ExaPixmapPriv(p); + + if (pExaPixmap->offscreen && pExaPixmap->fb_ptr) + return pExaPixmap->fb_ptr; + else + return pExaPixmap->sys_ptr; +} + +/** + * exaCreatePixmap() creates a new pixmap. + * + * If width and height are 0, this won't be a full-fledged pixmap and it will + * get ModifyPixmapHeader() called on it later. So, we mark it as pinned, because + * ModifyPixmapHeader() would break migration. These types of pixmaps are used + * for scratch pixmaps, or to represent the visible screen. + */ +PixmapPtr +exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint) +{ + PixmapPtr pPixmap; + ExaPixmapPrivPtr pExaPixmap; + BoxRec box; + int bpp; + ExaScreenPriv(pScreen); + + if (w > 32767 || h > 32767) + return NullPixmap; + + swap(pExaScr, pScreen, CreatePixmap); + pPixmap = pScreen->CreatePixmap (pScreen, w, h, depth, usage_hint); + swap(pExaScr, pScreen, CreatePixmap); + + if (!pPixmap) + return NULL; + + pExaPixmap = ExaGetPixmapPriv(pPixmap); + pExaPixmap->driverPriv = NULL; + + bpp = pPixmap->drawable.bitsPerPixel; + + pExaPixmap->driverPriv = NULL; + /* Scratch pixmaps may have w/h equal to zero, and may not be + * migrated. + */ + if (!w || !h) + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + else + pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; + + pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; + pExaPixmap->sys_pitch = pPixmap->devKind; + + pPixmap->devPrivate.ptr = NULL; + pExaPixmap->offscreen = FALSE; + + pExaPixmap->fb_ptr = NULL; + exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); + pExaPixmap->fb_size = pExaPixmap->fb_pitch * h; + + if (pExaPixmap->fb_pitch > 131071) { + swap(pExaScr, pScreen, DestroyPixmap); + pScreen->DestroyPixmap (pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + return NULL; + } + + /* Set up damage tracking */ + pExaPixmap->pDamage = DamageCreate (NULL, NULL, + DamageReportNone, TRUE, + pScreen, pPixmap); + + if (pExaPixmap->pDamage == NULL) { + swap(pExaScr, pScreen, DestroyPixmap); + pScreen->DestroyPixmap (pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + return NULL; + } + + DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage); + /* This ensures that pending damage reflects the current operation. */ + /* This is used by exa to optimize migration. */ + DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE); + + pExaPixmap->area = NULL; + + /* We set the initial pixmap as completely valid for a simple reason. + * Imagine a 1000x1000 pixmap, it has 1 million pixels, 250000 of which + * could form single pixel rects as part of a region. Setting the complete region + * as valid is a natural defragmentation of the region. + */ + box.x1 = 0; + box.y1 = 0; + box.x2 = w; + box.y2 = h; + REGION_INIT(pScreen, &pExaPixmap->validSys, &box, 0); + REGION_INIT(pScreen, &pExaPixmap->validFB, &box, 0); + + exaSetAccelBlock(pExaScr, pExaPixmap, + w, h, bpp); + + return pPixmap; +} + +Bool +exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPrivPtr pExaScr; + ExaPixmapPrivPtr pExaPixmap; + Bool ret; + + if (!pPixmap) + return FALSE; + + pExaScr = ExaGetScreenPriv(pScreen); + pExaPixmap = ExaGetPixmapPriv(pPixmap); + + if (pExaPixmap) { + if (pPixData) + pExaPixmap->sys_ptr = pPixData; + + if (devKind > 0) + pExaPixmap->sys_pitch = devKind; + + /* Classic EXA: + * - Framebuffer. + * - Scratch pixmap with offscreen memory. + */ + if (pExaScr->info->memoryBase && pPixData) { + if ((CARD8 *)pPixData >= pExaScr->info->memoryBase && + ((CARD8 *)pPixData - pExaScr->info->memoryBase) < + pExaScr->info->memorySize) { + pExaPixmap->fb_ptr = pPixData; + pExaPixmap->fb_pitch = devKind; + pExaPixmap->offscreen = TRUE; + } + } + + if (width > 0 && height > 0 && bitsPerPixel > 0) { + exaSetFbPitch(pExaScr, pExaPixmap, + width, height, bitsPerPixel); + + exaSetAccelBlock(pExaScr, pExaPixmap, + width, height, bitsPerPixel); + } + + /* Pixmaps subject to ModifyPixmapHeader will be pinned to system or + * offscreen memory, so there's no need to track damage. + */ + if (pExaPixmap->pDamage) { + DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage); + DamageDestroy(pExaPixmap->pDamage); + pExaPixmap->pDamage = NULL; + } + } + + swap(pExaScr, pScreen, ModifyPixmapHeader); + ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData); + swap(pExaScr, pScreen, ModifyPixmapHeader); + + /* Always NULL this, we don't want lingering pointers. */ + pPixmap->devPrivate.ptr = NULL; + + return ret; +} + +Bool +exaDestroyPixmap_classic (PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + Bool ret; + + if (pPixmap->refcnt == 1) + { + ExaPixmapPriv (pPixmap); + + if (pExaPixmap->area) + { + DBG_PIXMAP(("-- 0x%p (0x%x) (%dx%d)\n", + (void*)pPixmap->drawable.id, + ExaGetPixmapPriv(pPixmap)->area->offset, + pPixmap->drawable.width, + pPixmap->drawable.height)); + /* Free the offscreen area */ + exaOffscreenFree (pPixmap->drawable.pScreen, pExaPixmap->area); + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + pPixmap->devKind = pExaPixmap->sys_pitch; + } + REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validSys); + REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validFB); + } + + swap(pExaScr, pScreen, DestroyPixmap); + ret = pScreen->DestroyPixmap (pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + + return ret; +} + +Bool +exaPixmapIsOffscreen_classic(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + ExaPixmapPriv(pPixmap); + Bool ret; + + if (pExaScr->info->PixmapIsOffscreen) { + pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); + ret = pExaScr->info->PixmapIsOffscreen(pPixmap); + pPixmap->devPrivate.ptr = NULL; + } else + ret = (pExaPixmap->offscreen && pExaPixmap->fb_ptr); + + return ret; +} diff --git a/xorg-server/exa/exa_driver.c b/xorg-server/exa/exa_driver.c new file mode 100644 index 000000000..97036955b --- /dev/null +++ b/xorg-server/exa/exa_driver.c @@ -0,0 +1,214 @@ +/* + * Copyright © 2009 Maarten Maathuis + * + * 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. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +/* This file holds the driver allocated pixmaps specific implementation. */ + +static _X_INLINE void* +ExaGetPixmapAddress(PixmapPtr p) +{ + ExaPixmapPriv(p); + + return pExaPixmap->sys_ptr; +} + +/** + * exaCreatePixmap() creates a new pixmap. + * + * Pixmaps are always marked as pinned, because exa has no control over them. + */ +PixmapPtr +exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint) +{ + PixmapPtr pPixmap; + ExaPixmapPrivPtr pExaPixmap; + int bpp; + size_t paddedWidth, datasize; + ExaScreenPriv(pScreen); + + if (w > 32767 || h > 32767) + return NullPixmap; + + swap(pExaScr, pScreen, CreatePixmap); + pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint); + swap(pExaScr, pScreen, CreatePixmap); + + if (!pPixmap) + return NULL; + + pExaPixmap = ExaGetPixmapPriv(pPixmap); + pExaPixmap->driverPriv = NULL; + + bpp = pPixmap->drawable.bitsPerPixel; + + /* Set this before driver hooks, to allow for !offscreen pixmaps. + * !offscreen pixmaps have a valid pointer at all times. + */ + pPixmap->devPrivate.ptr = NULL; + + if (pExaScr->info->CreatePixmap2) { + int new_pitch = 0; + pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, usage_hint, bpp, &new_pitch); + paddedWidth = pExaPixmap->fb_pitch = new_pitch; + } + else { + paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); + if (paddedWidth / 4 > 32767 || h > 32767) + return NullPixmap; + + exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); + + if (paddedWidth < pExaPixmap->fb_pitch) + paddedWidth = pExaPixmap->fb_pitch; + datasize = h * paddedWidth; + pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0); + } + + if (!pExaPixmap->driverPriv) { + swap(pExaScr, pScreen, DestroyPixmap); + pScreen->DestroyPixmap (pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + return NULL; + } + + /* Allow ModifyPixmapHeader to set sys_ptr appropriately. */ + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + pExaPixmap->fb_ptr = NULL; + pExaPixmap->pDamage = NULL; + pExaPixmap->sys_ptr = NULL; + + (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0, + paddedWidth, NULL); + + pExaPixmap->area = NULL; + + exaSetAccelBlock(pExaScr, pExaPixmap, + w, h, bpp); + + return pPixmap; +} + +Bool +exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPrivPtr pExaScr; + ExaPixmapPrivPtr pExaPixmap; + Bool ret; + + if (!pPixmap) + return FALSE; + + pExaScr = ExaGetScreenPriv(pScreen); + pExaPixmap = ExaGetPixmapPriv(pPixmap); + + if (pExaPixmap) { + if (pPixData) + pExaPixmap->sys_ptr = pPixData; + + if (devKind > 0) + pExaPixmap->sys_pitch = devKind; + + if (width > 0 && height > 0 && bitsPerPixel > 0) { + exaSetFbPitch(pExaScr, pExaPixmap, + width, height, bitsPerPixel); + + exaSetAccelBlock(pExaScr, pExaPixmap, + width, height, bitsPerPixel); + } + } + + if (pExaScr->info->ModifyPixmapHeader) { + ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData); + /* For EXA_HANDLES_PIXMAPS, we set pPixData to NULL. + * If pPixmap->devPrivate.ptr is non-NULL, then we've got a non-offscreen pixmap. + * We need to store the pointer, because PrepareAccess won't be called. + */ + if (!pPixData && pPixmap->devPrivate.ptr && pPixmap->devKind) { + pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; + pExaPixmap->sys_pitch = pPixmap->devKind; + } + if (ret == TRUE) + goto out; + } + + swap(pExaScr, pScreen, ModifyPixmapHeader); + ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData); + swap(pExaScr, pScreen, ModifyPixmapHeader); + +out: + /* Always NULL this, we don't want lingering pointers. */ + pPixmap->devPrivate.ptr = NULL; + + return ret; +} + +Bool +exaDestroyPixmap_driver (PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + Bool ret; + + if (pPixmap->refcnt == 1) + { + ExaPixmapPriv (pPixmap); + + if (pExaPixmap->driverPriv) + pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); + pExaPixmap->driverPriv = NULL; + } + + swap(pExaScr, pScreen, DestroyPixmap); + ret = pScreen->DestroyPixmap (pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + + return ret; +} + +Bool +exaPixmapIsOffscreen_driver(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + Bool ret; + + pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); + ret = pExaScr->info->PixmapIsOffscreen(pPixmap); + pPixmap->devPrivate.ptr = NULL; + + return ret; +} diff --git a/xorg-server/exa/exa_glyphs.c b/xorg-server/exa/exa_glyphs.c index 93b8b36ae..d621ccf76 100644 --- a/xorg-server/exa/exa_glyphs.c +++ b/xorg-server/exa/exa_glyphs.c @@ -68,7 +68,7 @@ #define GLYPH_BUFFER_SIZE 256 typedef struct { - PicturePtr source; + PicturePtr mask; ExaCompositeRectRec rects[GLYPH_BUFFER_SIZE]; int count; } ExaGlyphBuffer, *ExaGlyphBufferPtr; @@ -144,7 +144,7 @@ exaUnrealizeGlyphCaches(ScreenPtr pScreen, /* All caches for a single format share a single pixmap for glyph storage, * allowing mixing glyphs of different sizes without paying a penalty - * for switching between source pixmaps. (Note that for a size of font + * for switching between mask pixmaps. (Note that for a size of font * right at the border between two sizes, we might be switching for almost * every glyph.) * @@ -187,7 +187,6 @@ exaRealizeGlyphCaches(ScreenPtr pScreen, } /* Now allocate the pixmap and picture */ - pPixmap = (*pScreen->CreatePixmap) (pScreen, CACHE_PICTURE_WIDTH, height, depth, 0); @@ -205,7 +204,6 @@ exaRealizeGlyphCaches(ScreenPtr pScreen, return FALSE; /* And store the picture in all the caches for the format */ - for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; int j; @@ -374,7 +372,6 @@ exaGlyphCacheUploadGlyph(ScreenPtr pScreen, PixmapPtr pGlyphPixmap = (PixmapPtr)pGlyphPicture->pDrawable; ExaPixmapPriv(pGlyphPixmap); PixmapPtr pCachePixmap = (PixmapPtr)cache->picture->pDrawable; - ExaMigrationRec pixmaps[1]; if (!pExaScr->info->UploadToScreen || pExaScr->swappedOut || pExaPixmap->accel_blocked) goto composite; @@ -388,12 +385,16 @@ exaGlyphCacheUploadGlyph(ScreenPtr pScreen, if (pGlyphPixmap->drawable.bitsPerPixel != pCachePixmap->drawable.bitsPerPixel) goto composite; - /* cache pixmap must be offscreen. */ - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = pCachePixmap; - pixmaps[0].pReg = NULL; - exaDoMigration (pixmaps, 1, TRUE); + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + /* cache pixmap must be offscreen. */ + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pCachePixmap; + pixmaps[0].pReg = NULL; + exaDoMigration (pixmaps, 1, TRUE); + } if (!exaPixmapIsOffscreen(pCachePixmap)) goto composite; @@ -434,13 +435,19 @@ exaGlyphCacheBufferGlyph(ScreenPtr pScreen, ExaGlyphCachePtr cache, ExaGlyphBufferPtr buffer, GlyphPtr pGlyph, - int xGlyph, - int yGlyph) + PicturePtr pSrc, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst) { ExaCompositeRectPtr rect; int pos; - if (buffer->source && buffer->source != cache->picture) + if (buffer->mask && buffer->mask != cache->picture) return ExaGlyphNeedFlush; if (!cache->picture) { @@ -469,18 +476,19 @@ exaGlyphCacheBufferGlyph(ScreenPtr pScreen, * already in the output buffer were at this position in * the cache */ - pos = cache->evictionPosition; DBG_GLYPH_CACHE((" evicting glyph at %d\n", pos)); if (buffer->count) { int x, y; int i; - + x = CACHE_X(pos); y = CACHE_Y(pos); for (i = 0; i < buffer->count; i++) { - if (buffer->rects[i].xSrc == x && buffer->rects[i].ySrc == y) { + if (pSrc ? + (buffer->rects[i].xMask == x && buffer->rects[i].yMask == y) : + (buffer->rects[i].xSrc == x && buffer->rects[i].ySrc == y)) { DBG_GLYPH_CACHE((" must flush buffer\n")); return ExaGlyphNeedFlush; } @@ -498,13 +506,28 @@ exaGlyphCacheBufferGlyph(ScreenPtr pScreen, exaGlyphCacheUploadGlyph(pScreen, cache, pos, pGlyph); } - buffer->source = cache->picture; + buffer->mask = cache->picture; rect = &buffer->rects[buffer->count]; - rect->xSrc = CACHE_X(pos); - rect->ySrc = CACHE_Y(pos); - rect->xDst = xGlyph - pGlyph->info.x; - rect->yDst = yGlyph - pGlyph->info.y; + + if (pSrc) + { + rect->xSrc = xSrc; + rect->ySrc = ySrc; + rect->xMask = CACHE_X(pos); + rect->yMask = CACHE_Y(pos); + } + else + { + rect->xSrc = CACHE_X(pos); + rect->ySrc = CACHE_Y(pos); + rect->xMask = 0; + rect->yMask = 0; + } + + rect->pDst = pDst; + rect->xDst = xDst; + rect->yDst = yDst; rect->width = pGlyph->info.width; rect->height = pGlyph->info.height; @@ -520,15 +543,21 @@ static ExaGlyphCacheResult exaBufferGlyph(ScreenPtr pScreen, ExaGlyphBufferPtr buffer, GlyphPtr pGlyph, - int xGlyph, - int yGlyph) + PicturePtr pSrc, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst) { ExaScreenPriv(pScreen); unsigned int format = (GlyphPicture(pGlyph)[pScreen->myNum])->format; int width = pGlyph->info.width; int height = pGlyph->info.height; ExaCompositeRectPtr rect; - PicturePtr source; + PicturePtr mask; int i; if (buffer->count == GLYPH_BUFFER_SIZE) @@ -543,9 +572,15 @@ exaBufferGlyph(ScreenPtr pScreen, if (format == cache->format && width <= cache->glyphWidth && height <= cache->glyphHeight) { - ExaGlyphCacheResult result = exaGlyphCacheBufferGlyph(pScreen, &pExaScr->glyphCaches[i], + ExaGlyphCacheResult result = exaGlyphCacheBufferGlyph(pScreen, + &pExaScr->glyphCaches[i], buffer, - pGlyph, xGlyph, yGlyph); + pGlyph, + pSrc, + pDst, + xSrc, ySrc, + xMask, yMask, + xDst, yDst); switch (result) { case ExaGlyphFail: break; @@ -558,19 +593,21 @@ exaBufferGlyph(ScreenPtr pScreen, /* Couldn't find the glyph in the cache, use the glyph picture directly */ - source = GlyphPicture(pGlyph)[pScreen->myNum]; - if (buffer->source && buffer->source != source) + mask = GlyphPicture(pGlyph)[pScreen->myNum]; + if (buffer->mask && buffer->mask != mask) return ExaGlyphNeedFlush; - buffer->source = source; - + buffer->mask = mask; + rect = &buffer->rects[buffer->count]; - rect->xSrc = 0; - rect->ySrc = 0; - rect->xDst = xGlyph - pGlyph->info.x; - rect->yDst = yGlyph - pGlyph->info.y; - rect->width = pGlyph->info.width; - rect->height = pGlyph->info.height; + rect->xSrc = xSrc; + rect->ySrc = ySrc; + rect->xMask = xMask; + rect->yMask = yMask; + rect->xDst = xDst; + rect->yDst = yDst; + rect->width = width; + rect->height = height; buffer->count++; @@ -581,44 +618,23 @@ static void exaGlyphsToMask(PicturePtr pMask, ExaGlyphBufferPtr buffer) { - exaCompositeRects(PictOpAdd, buffer->source, pMask, + exaCompositeRects(PictOpAdd, buffer->mask, NULL, pMask, buffer->count, buffer->rects); buffer->count = 0; - buffer->source = NULL; + buffer->mask = NULL; } static void -exaGlyphsToDst(CARD8 op, - PicturePtr pSrc, +exaGlyphsToDst(PicturePtr pSrc, PicturePtr pDst, - ExaGlyphBufferPtr buffer, - INT16 xSrc, - INT16 ySrc, - INT16 xDst, - INT16 yDst) + ExaGlyphBufferPtr buffer) { - int i; - - for (i = 0; i < buffer->count; i++) { - ExaCompositeRectPtr rect = &buffer->rects[i]; - - CompositePicture (op, - pSrc, - buffer->source, - pDst, - xSrc + rect->xDst - xDst, - ySrc + rect->yDst - yDst, - rect->xSrc, - rect->ySrc, - rect->xDst, - rect->yDst, - rect->width, - rect->height); - } + exaCompositeRects(PictOpOver, pSrc, buffer->mask, pDst, buffer->count, + buffer->rects); buffer->count = 0; - buffer->source = NULL; + buffer->mask = NULL; } /* Cut and paste from render/glyph.c - probably should export it instead */ @@ -674,79 +690,6 @@ GlyphExtents (int nlist, } } -/** - * Returns TRUE if the glyphs in the lists intersect. Only checks based on - * bounding box, which appears to be good enough to catch most cases at least. - */ -static Bool -exaGlyphsIntersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs) -{ - int x1, x2, y1, y2; - int n; - GlyphPtr glyph; - int x, y; - BoxRec extents; - Bool first = TRUE; - - x = 0; - y = 0; - while (nlist--) { - x += list->xOff; - y += list->yOff; - n = list->len; - list++; - while (n--) { - glyph = *glyphs++; - - if (glyph->info.width == 0 || glyph->info.height == 0) { - x += glyph->info.xOff; - y += glyph->info.yOff; - continue; - } - - x1 = x - glyph->info.x; - if (x1 < MINSHORT) - x1 = MINSHORT; - y1 = y - glyph->info.y; - if (y1 < MINSHORT) - y1 = MINSHORT; - x2 = x1 + glyph->info.width; - if (x2 > MAXSHORT) - x2 = MAXSHORT; - y2 = y1 + glyph->info.height; - if (y2 > MAXSHORT) - y2 = MAXSHORT; - - if (first) { - extents.x1 = x1; - extents.y1 = y1; - extents.x2 = x2; - extents.y2 = y2; - first = FALSE; - } else { - if (x1 < extents.x2 && x2 > extents.x1 && - y1 < extents.y2 && y2 > extents.y1) - { - return TRUE; - } - - if (x1 < extents.x1) - extents.x1 = x1; - if (x2 > extents.x2) - extents.x2 = x2; - if (y1 < extents.y1) - extents.y1 = y1; - if (y2 > extents.y2) - extents.y2 = y2; - } - x += glyph->info.xOff; - y += glyph->info.yOff; - } - } - - return FALSE; -} - void exaGlyphs (CARD8 op, PicturePtr pSrc, @@ -760,11 +703,11 @@ exaGlyphs (CARD8 op, { PicturePtr pPicture; PixmapPtr pMaskPixmap = 0; - PicturePtr pMask; + PicturePtr pMask = NULL; ScreenPtr pScreen = pDst->pDrawable->pScreen; int width = 0, height = 0; int x, y; - int xDst = list->xOff, yDst = list->yOff; + int first_xOff = list->xOff, first_yOff = list->yOff; int n; GlyphPtr glyph; int error; @@ -772,31 +715,9 @@ exaGlyphs (CARD8 op, CARD32 component_alpha; ExaGlyphBuffer buffer; - /* If we don't have a mask format but all the glyphs have the same format - * and don't intersect, use the glyph format as mask format for the full - * benefits of the glyph cache. - */ - if (!maskFormat) { - Bool sameFormat = TRUE; - int i; - - maskFormat = list[0].format; - - for (i = 0; i < nlist; i++) { - if (maskFormat->format != list[i].format->format) { - sameFormat = FALSE; - break; - } - } - - if (!sameFormat || (maskFormat->depth != 1 && - exaGlyphsIntersect(nlist, list, glyphs))) { - maskFormat = NULL; - } - } - if (maskFormat) { + ExaScreenPriv(pScreen); GCPtr pGC; xRectangle rect; @@ -823,10 +744,38 @@ exaGlyphs (CARD8 op, pMask = CreatePicture (0, &pMaskPixmap->drawable, maskFormat, CPComponentAlpha, &component_alpha, serverClient, &error); - if (!pMask) + if (!pMask || + (!component_alpha && pExaScr->info->CheckComposite && + !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask))) { + PictFormatPtr argbFormat; + (*pScreen->DestroyPixmap) (pMaskPixmap); - return; + + if (!pMask) + return; + + /* The driver can't seem to composite to a8, let's try argb (but + * without component-alpha) */ + FreePicture ((pointer) pMask, (XID) 0); + + argbFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8); + + if (argbFormat) + maskFormat = argbFormat; + + pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); + if (!pMaskPixmap) + return; + + pMask = CreatePicture (0, &pMaskPixmap->drawable, maskFormat, 0, 0, + serverClient, &error); + if (!pMask) { + (*pScreen->DestroyPixmap) (pMaskPixmap); + return; + } } pGC = GetScratchGC (pMaskPixmap->drawable.depth, pScreen); ValidateGC (&pMaskPixmap->drawable, pGC); @@ -841,12 +790,11 @@ exaGlyphs (CARD8 op, } else { - pMask = pDst; x = 0; y = 0; } buffer.count = 0; - buffer.source = NULL; + buffer.mask = NULL; while (nlist--) { x += list->xOff; @@ -857,16 +805,32 @@ exaGlyphs (CARD8 op, glyph = *glyphs++; pPicture = GlyphPicture (glyph)[pScreen->myNum]; - if (glyph->info.width > 0 && glyph->info.height > 0 && - exaBufferGlyph(pScreen, &buffer, glyph, x, y) == ExaGlyphNeedFlush) + if (glyph->info.width > 0 && glyph->info.height > 0) { + /* pGlyph->info.{x,y} compensate for empty space in the glyph. */ if (maskFormat) - exaGlyphsToMask(pMask, &buffer); + { + if (exaBufferGlyph(pScreen, &buffer, glyph, NULL, pMask, + 0, 0, 0, 0, x - glyph->info.x, y - glyph->info.y) == ExaGlyphNeedFlush) + { + exaGlyphsToMask(pMask, &buffer); + exaBufferGlyph(pScreen, &buffer, glyph, NULL, pMask, + 0, 0, 0, 0, x - glyph->info.x, y - glyph->info.y); + } + } else - exaGlyphsToDst(op, pSrc, pDst, &buffer, - xSrc, ySrc, xDst, yDst); - - exaBufferGlyph(pScreen, &buffer, glyph, x, y); + { + if (exaBufferGlyph(pScreen, &buffer, glyph, pSrc, pDst, + xSrc + (x - glyph->info.x) - first_xOff, ySrc + (y - glyph->info.y) - first_yOff, + 0, 0, x - glyph->info.x, y - glyph->info.y) + == ExaGlyphNeedFlush) + { + exaGlyphsToDst(pSrc, pDst, &buffer); + exaBufferGlyph(pScreen, &buffer, glyph, pSrc, pDst, + xSrc + (x - glyph->info.x) - first_xOff, ySrc + (y - glyph->info.y) - first_yOff, + 0, 0, x - glyph->info.x, y - glyph->info.y); + } + } } x += glyph->info.xOff; @@ -879,8 +843,7 @@ exaGlyphs (CARD8 op, if (maskFormat) exaGlyphsToMask(pMask, &buffer); else - exaGlyphsToDst(op, pSrc, pDst, &buffer, - xSrc, ySrc, xDst, yDst); + exaGlyphsToDst(pSrc, pDst, &buffer); } if (maskFormat) @@ -891,8 +854,8 @@ exaGlyphs (CARD8 op, pSrc, pMask, pDst, - xSrc + x - xDst, - ySrc + y - yDst, + xSrc + x - first_xOff, + ySrc + y - first_yOff, 0, 0, x, y, width, height); diff --git a/xorg-server/exa/exa_migration_classic.c b/xorg-server/exa/exa_migration_classic.c new file mode 100644 index 000000000..d8e1e86da --- /dev/null +++ b/xorg-server/exa/exa_migration_classic.c @@ -0,0 +1,720 @@ +/* + * Copyright © 2006 Intel Corporation + * + * 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: + * Eric Anholt + * Michel Dänzer + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +#if DEBUG_MIGRATE +#define DBG_MIGRATE(a) ErrorF a +#else +#define DBG_MIGRATE(a) +#endif + +/** + * The fallback path for UTS/DFS failing is to just memcpy. exaCopyDirtyToSys + * and exaCopyDirtyToFb both needed to do this loop. + */ +static void +exaMemcpyBox (PixmapPtr pPixmap, BoxPtr pbox, CARD8 *src, int src_pitch, + CARD8 *dst, int dst_pitch) + { + int i, cpp = pPixmap->drawable.bitsPerPixel / 8; + int bytes = (pbox->x2 - pbox->x1) * cpp; + + src += pbox->y1 * src_pitch + pbox->x1 * cpp; + dst += pbox->y1 * dst_pitch + pbox->x1 * cpp; + + for (i = pbox->y2 - pbox->y1; i; i--) { + memcpy (dst, src, bytes); + src += src_pitch; + dst += dst_pitch; + } +} + +/** + * Returns TRUE if the pixmap is dirty (has been modified in its current + * location compared to the other), or lacks a private for tracking + * dirtiness. + */ +static Bool +exaPixmapIsDirty (PixmapPtr pPix) +{ + ExaPixmapPriv (pPix); + + if (pExaPixmap == NULL) + EXA_FatalErrorDebugWithRet(("EXA bug: exaPixmapIsDirty was called on a non-exa pixmap.\n"), TRUE); + + return REGION_NOTEMPTY (pScreen, DamageRegion(pExaPixmap->pDamage)) || + !REGION_EQUAL(pScreen, &pExaPixmap->validSys, &pExaPixmap->validFB); +} + +/** + * Returns TRUE if the pixmap is either pinned in FB, or has a sufficient score + * to be considered "should be in framebuffer". That's just anything that has + * had more acceleration than fallbacks, or has no score yet. + * + * Only valid if using a migration scheme that tracks score. + */ +static Bool +exaPixmapShouldBeInFB (PixmapPtr pPix) +{ + ExaPixmapPriv (pPix); + + if (exaPixmapIsPinned (pPix)) + return TRUE; + + return pExaPixmap->score >= 0; +} + +/** + * If the pixmap is currently dirty, this copies at least the dirty area from + * FB to system or vice versa. Both areas must be allocated. + */ +static void +exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, + Bool (*transfer) (PixmapPtr pPix, int x, int y, int w, int h, + char *sys, int sys_pitch), CARD8 *fallback_src, + CARD8 *fallback_dst, int fallback_srcpitch, int fallback_dstpitch, + int fallback_index, void (*sync) (ScreenPtr pScreen)) +{ + PixmapPtr pPixmap = migrate->pPix; + ExaPixmapPriv (pPixmap); + RegionPtr damage = DamageRegion (pExaPixmap->pDamage); + RegionRec CopyReg; + Bool save_offscreen; + int save_pitch; + BoxPtr pBox; + int nbox; + Bool access_prepared = FALSE; + Bool need_sync = FALSE; + + /* Damaged bits are valid in current copy but invalid in other one */ + if (exaPixmapIsOffscreen(pPixmap)) { + REGION_UNION(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB, + damage); + REGION_SUBTRACT(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys, + damage); + } else { + REGION_UNION(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys, + damage); + REGION_SUBTRACT(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB, + damage); + } + + REGION_EMPTY(pScreen, damage); + + /* Copy bits valid in source but not in destination */ + REGION_NULL(pScreen, &CopyReg); + REGION_SUBTRACT(pScreen, &CopyReg, pValidSrc, pValidDst); + + if (migrate->as_dst) { + ExaScreenPriv (pPixmap->drawable.pScreen); + + /* XXX: The pending damage region will be marked as damaged after the + * operation, so it should serve as an upper bound for the region that + * needs to be synchronized for the operation. Unfortunately, this + * causes corruption in some cases, e.g. when starting compiz. See + * https://bugs.freedesktop.org/show_bug.cgi?id=12916 . + */ + if (pExaScr->optimize_migration) { + RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); + +#if DEBUG_MIGRATE + if (REGION_NIL(pending_damage)) { + static Bool firsttime = TRUE; + + if (firsttime) { + ErrorF("%s: Pending damage region empty!\n", __func__); + firsttime = FALSE; + } + } +#endif + + /* Try to prevent destination valid region from growing too many + * rects by filling it up to the extents of the union of the + * destination valid region and the pending damage region. + */ + if (REGION_NUM_RECTS(pValidDst) > 10) { + BoxRec box; + BoxPtr pValidExt, pDamageExt; + RegionRec closure; + + pValidExt = REGION_EXTENTS(pScreen, pValidDst); + pDamageExt = REGION_EXTENTS(pScreen, pending_damage); + + box.x1 = min(pValidExt->x1, pDamageExt->x1); + box.y1 = min(pValidExt->y1, pDamageExt->y1); + box.x2 = max(pValidExt->x2, pDamageExt->x2); + box.y2 = max(pValidExt->y2, pDamageExt->y2); + + REGION_INIT(pScreen, &closure, &box, 0); + REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, &closure); + } else + REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage); + } + + /* The caller may provide a region to be subtracted from the calculated + * dirty region. This is to avoid migration of bits that don't + * contribute to the result of the operation. + */ + if (migrate->pReg) + REGION_SUBTRACT(pScreen, &CopyReg, &CopyReg, migrate->pReg); + } else { + /* The caller may restrict the region to be migrated for source pixmaps + * to what's relevant for the operation. + */ + if (migrate->pReg) + REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, migrate->pReg); + } + + pBox = REGION_RECTS(&CopyReg); + nbox = REGION_NUM_RECTS(&CopyReg); + + save_offscreen = pExaPixmap->offscreen; + save_pitch = pPixmap->devKind; + pExaPixmap->offscreen = TRUE; + pPixmap->devKind = pExaPixmap->fb_pitch; + + while (nbox--) { + pBox->x1 = max(pBox->x1, 0); + pBox->y1 = max(pBox->y1, 0); + pBox->x2 = min(pBox->x2, pPixmap->drawable.width); + pBox->y2 = min(pBox->y2, pPixmap->drawable.height); + + if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2) + continue; + + if (!transfer || !transfer (pPixmap, + pBox->x1, pBox->y1, + pBox->x2 - pBox->x1, + pBox->y2 - pBox->y1, + (char *) (pExaPixmap->sys_ptr + + pBox->y1 * pExaPixmap->sys_pitch + + pBox->x1 * pPixmap->drawable.bitsPerPixel / 8), + pExaPixmap->sys_pitch)) + { + if (!access_prepared) { + ExaDoPrepareAccess(&pPixmap->drawable, fallback_index); + access_prepared = TRUE; + } + exaMemcpyBox (pPixmap, pBox, + fallback_src, fallback_srcpitch, + fallback_dst, fallback_dstpitch); + } else + need_sync = TRUE; + + pBox++; + } + + if (access_prepared) + exaFinishAccess(&pPixmap->drawable, fallback_index); + else if (need_sync && sync) + sync (pPixmap->drawable.pScreen); + + pExaPixmap->offscreen = save_offscreen; + pPixmap->devKind = save_pitch; + + /* Try to prevent source valid region from growing too many rects by + * removing parts of it which are also in the destination valid region. + * Removing anything beyond that would lead to data loss. + */ + if (REGION_NUM_RECTS(pValidSrc) > 20) + REGION_SUBTRACT(pScreen, pValidSrc, pValidSrc, pValidDst); + + /* The copied bits are now valid in destination */ + REGION_UNION(pScreen, pValidDst, pValidDst, &CopyReg); + + REGION_UNINIT(pScreen, &CopyReg); +} + +/** + * If the pixmap is currently dirty, this copies at least the dirty area from + * the framebuffer memory copy to the system memory copy. Both areas must be + * allocated. + */ +static void +exaCopyDirtyToSys (ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + ExaScreenPriv (pPixmap->drawable.pScreen); + ExaPixmapPriv (pPixmap); + + exaCopyDirty(migrate, &pExaPixmap->validSys, &pExaPixmap->validFB, + pExaScr->info->DownloadFromScreen, pExaPixmap->fb_ptr, + pExaPixmap->sys_ptr, pExaPixmap->fb_pitch, + pExaPixmap->sys_pitch, EXA_PREPARE_SRC, exaWaitSync); +} + +/** + * If the pixmap is currently dirty, this copies at least the dirty area from + * the system memory copy to the framebuffer memory copy. Both areas must be + * allocated. + */ +static void +exaCopyDirtyToFb (ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + ExaScreenPriv (pPixmap->drawable.pScreen); + ExaPixmapPriv (pPixmap); + + exaCopyDirty(migrate, &pExaPixmap->validFB, &pExaPixmap->validSys, + pExaScr->info->UploadToScreen, pExaPixmap->sys_ptr, + pExaPixmap->fb_ptr, pExaPixmap->sys_pitch, + pExaPixmap->fb_pitch, EXA_PREPARE_DEST, NULL); +} + +/** + * Allocates a framebuffer copy of the pixmap if necessary, and then copies + * any necessary pixmap data into the framebuffer copy and points the pixmap at + * it. + * + * Note that when first allocated, a pixmap will have FALSE dirty flag. + * This is intentional because pixmap data starts out undefined. So if we move + * it in due to the first operation against it being accelerated, it will have + * undefined framebuffer contents that we didn't have to upload. If we do + * moveouts (and moveins) after the first movein, then we will only have to copy + * back and forth if the pixmap was written to after the last synchronization of + * the two copies. Then, at exaPixmapSave (when the framebuffer copy goes away) + * we mark the pixmap dirty, so that the next exaMoveInPixmap will actually move + * all the data, since it's almost surely all valid now. + */ +static void +exaDoMoveInPixmap (ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv (pScreen); + ExaPixmapPriv (pPixmap); + + /* If we're VT-switched away, no touching card memory allowed. */ + if (pExaScr->swappedOut) + return; + + /* If we're not allowed to move, then fail. */ + if (exaPixmapIsPinned(pPixmap)) + return; + + /* Don't migrate in pixmaps which are less than 8bpp. This avoids a lot of + * fragility in EXA, and <8bpp is probably not used enough any more to care + * (at least, not in acceleratd paths). + */ + if (pPixmap->drawable.bitsPerPixel < 8) + return; + + if (pExaPixmap->accel_blocked) + return; + + if (pExaPixmap->area == NULL) { + pExaPixmap->area = + exaOffscreenAlloc (pScreen, pExaPixmap->fb_size, + pExaScr->info->pixmapOffsetAlign, FALSE, + exaPixmapSave, (pointer) pPixmap); + if (pExaPixmap->area == NULL) + return; + + pExaPixmap->fb_ptr = (CARD8 *) pExaScr->info->memoryBase + + pExaPixmap->area->offset; + } + + exaCopyDirtyToFb (migrate); + + if (exaPixmapIsOffscreen(pPixmap)) + return; + + DBG_MIGRATE (("-> %p (0x%x) (%dx%d) (%c)\n", pPixmap, + (ExaGetPixmapPriv(pPixmap)->area ? + ExaGetPixmapPriv(pPixmap)->area->offset : 0), + pPixmap->drawable.width, + pPixmap->drawable.height, + exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); + + pExaPixmap->offscreen = TRUE; + + pPixmap->devKind = pExaPixmap->fb_pitch; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; +} + +void +exaMoveInPixmap_classic (PixmapPtr pPixmap) +{ + static ExaMigrationRec migrate = { .as_dst = FALSE, .as_src = TRUE, + .pReg = NULL }; + + migrate.pPix = pPixmap; + exaDoMoveInPixmap (&migrate); +} + +/** + * Switches the current active location of the pixmap to system memory, copying + * updated data out if necessary. + */ +static void +exaDoMoveOutPixmap (ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + ExaPixmapPriv (pPixmap); + + if (!pExaPixmap->area || exaPixmapIsPinned(pPixmap)) + return; + + exaCopyDirtyToSys (migrate); + + if (exaPixmapIsOffscreen(pPixmap)) { + + DBG_MIGRATE (("<- %p (%p) (%dx%d) (%c)\n", pPixmap, + (void*)(ExaGetPixmapPriv(pPixmap)->area ? + ExaGetPixmapPriv(pPixmap)->area->offset : 0), + pPixmap->drawable.width, + pPixmap->drawable.height, + exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); + + pExaPixmap->offscreen = FALSE; + + pPixmap->devKind = pExaPixmap->sys_pitch; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } +} + +void +exaMoveOutPixmap_classic (PixmapPtr pPixmap) +{ + static ExaMigrationRec migrate = { .as_dst = FALSE, .as_src = TRUE, + .pReg = NULL }; + + migrate.pPix = pPixmap; + exaDoMoveOutPixmap (&migrate); +} + + +/** + * Copies out important pixmap data and removes references to framebuffer area. + * Called when the memory manager decides it's time to kick the pixmap out of + * framebuffer entirely. + */ +void +exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area) +{ + PixmapPtr pPixmap = area->privData; + ExaPixmapPriv(pPixmap); + + exaMoveOutPixmap(pPixmap); + + pExaPixmap->fb_ptr = NULL; + pExaPixmap->area = NULL; + + /* Mark all FB bits as invalid, so all valid system bits get copied to FB + * next time */ + REGION_EMPTY(pPixmap->drawable.pScreen, &pExaPixmap->validFB); +} + +/** + * For the "greedy" migration scheme, pushes the pixmap toward being located in + * framebuffer memory. + */ +static void +exaMigrateTowardFb (ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + ExaPixmapPriv (pPixmap); + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) { + DBG_MIGRATE(("UseScreen: not migrating pinned pixmap %p\n", + (pointer)pPixmap)); + return; + } + + DBG_MIGRATE(("UseScreen %p score %d\n", + (pointer)pPixmap, pExaPixmap->score)); + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_INIT) { + exaDoMoveInPixmap(migrate); + pExaPixmap->score = 0; + } + + if (pExaPixmap->score < EXA_PIXMAP_SCORE_MAX) + pExaPixmap->score++; + + if (pExaPixmap->score >= EXA_PIXMAP_SCORE_MOVE_IN && + !exaPixmapIsOffscreen(pPixmap)) + { + exaDoMoveInPixmap(migrate); + } + + if (exaPixmapIsOffscreen(pPixmap)) { + exaCopyDirtyToFb (migrate); + ExaOffscreenMarkUsed (pPixmap); + } else + exaCopyDirtyToSys (migrate); +} + +/** + * For the "greedy" migration scheme, pushes the pixmap toward being located in + * system memory. + */ +static void +exaMigrateTowardSys (ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + ExaPixmapPriv (pPixmap); + + DBG_MIGRATE(("UseMem: %p score %d\n", (pointer)pPixmap, pExaPixmap->score)); + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) + return; + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_INIT) + pExaPixmap->score = 0; + + if (pExaPixmap->score > EXA_PIXMAP_SCORE_MIN) + pExaPixmap->score--; + + if (pExaPixmap->score <= EXA_PIXMAP_SCORE_MOVE_OUT && pExaPixmap->area) + exaDoMoveOutPixmap(migrate); + + if (exaPixmapIsOffscreen(pPixmap)) { + exaCopyDirtyToFb (migrate); + ExaOffscreenMarkUsed (pPixmap); + } else + exaCopyDirtyToSys (migrate); +} + +/** + * If the pixmap has both a framebuffer and system memory copy, this function + * asserts that both of them are the same. + */ +static Bool +exaAssertNotDirty (PixmapPtr pPixmap) +{ + ExaPixmapPriv (pPixmap); + CARD8 *dst, *src; + RegionRec ValidReg; + int dst_pitch, src_pitch, cpp, y, nbox, save_pitch; + BoxPtr pBox; + Bool ret = TRUE, save_offscreen; + + if (exaPixmapIsPinned(pPixmap) || pExaPixmap->area == NULL) + return ret; + + REGION_NULL(pScreen, &ValidReg); + REGION_INTERSECT(pScreen, &ValidReg, &pExaPixmap->validFB, + &pExaPixmap->validSys); + nbox = REGION_NUM_RECTS(&ValidReg); + + if (!nbox) + goto out; + + pBox = REGION_RECTS(&ValidReg); + + dst_pitch = pExaPixmap->sys_pitch; + src_pitch = pExaPixmap->fb_pitch; + cpp = pPixmap->drawable.bitsPerPixel / 8; + + save_offscreen = pExaPixmap->offscreen; + save_pitch = pPixmap->devKind; + pExaPixmap->offscreen = TRUE; + pPixmap->devKind = pExaPixmap->fb_pitch; + + if (!ExaDoPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC)) + goto skip; + + while (nbox--) { + int rowbytes; + + pBox->x1 = max(pBox->x1, 0); + pBox->y1 = max(pBox->y1, 0); + pBox->x2 = min(pBox->x2, pPixmap->drawable.width); + pBox->y2 = min(pBox->y2, pPixmap->drawable.height); + + if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2) + continue; + + rowbytes = (pBox->x2 - pBox->x1) * cpp; + src = (CARD8 *) pPixmap->devPrivate.ptr + pBox->y1 * src_pitch + pBox->x1 * cpp; + dst = pExaPixmap->sys_ptr + pBox->y1 * dst_pitch + pBox->x1 * cpp; + + for (y = pBox->y1; y < pBox->y2; + y++, src += src_pitch, dst += dst_pitch) { + if (memcmp(dst, src, rowbytes) != 0) { + ret = FALSE; + exaPixmapDirty(pPixmap, pBox->x1, pBox->y1, pBox->x2, + pBox->y2); + break; + } + } + } + +skip: + exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC); + + pExaPixmap->offscreen = save_offscreen; + pPixmap->devKind = save_pitch; + +out: + REGION_UNINIT(pScreen, &ValidReg); + return ret; +} + +/** + * Performs migration of the pixmaps according to the operation information + * provided in pixmaps and can_accel and the migration scheme chosen in the + * config file. + */ +void +exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) +{ + ScreenPtr pScreen = pixmaps[0].pPix->drawable.pScreen; + ExaScreenPriv(pScreen); + int i, j; + + /* If this debugging flag is set, check each pixmap for whether it is marked + * as clean, and if so, actually check if that's the case. This should help + * catch issues with failing to mark a drawable as dirty. While it will + * catch them late (after the operation happened), it at least explains what + * went wrong, and instrumenting the code to find what operation happened + * to the pixmap last shouldn't be hard. + */ + if (pExaScr->checkDirtyCorrectness) { + for (i = 0; i < npixmaps; i++) { + if (!exaPixmapIsDirty (pixmaps[i].pPix) && + !exaAssertNotDirty (pixmaps[i].pPix)) + ErrorF("%s: Pixmap %d dirty but not marked as such!\n", __func__, i); + } + } + /* If anything is pinned in system memory, we won't be able to + * accelerate. + */ + for (i = 0; i < npixmaps; i++) { + if (exaPixmapIsPinned (pixmaps[i].pPix) && + !exaPixmapIsOffscreen (pixmaps[i].pPix)) + { + EXA_FALLBACK(("Pixmap %p (%dx%d) pinned in sys\n", pixmaps[i].pPix, + pixmaps[i].pPix->drawable.width, + pixmaps[i].pPix->drawable.height)); + can_accel = FALSE; + break; + } + } + + if (pExaScr->migration == ExaMigrationSmart) { + /* If we've got something as a destination that we shouldn't cause to + * become newly dirtied, take the unaccelerated route. + */ + for (i = 0; i < npixmaps; i++) { + if (pixmaps[i].as_dst && !exaPixmapShouldBeInFB (pixmaps[i].pPix) && + !exaPixmapIsDirty (pixmaps[i].pPix)) + { + for (i = 0; i < npixmaps; i++) { + if (!exaPixmapIsDirty (pixmaps[i].pPix)) + exaDoMoveOutPixmap (pixmaps + i); + } + return; + } + } + + /* If we aren't going to accelerate, then we migrate everybody toward + * system memory, and kick out if it's free. + */ + if (!can_accel) { + for (i = 0; i < npixmaps; i++) { + exaMigrateTowardSys (pixmaps + i); + if (!exaPixmapIsDirty (pixmaps[i].pPix)) + exaDoMoveOutPixmap (pixmaps + i); + } + return; + } + + /* Finally, the acceleration path. Move them all in. */ + for (i = 0; i < npixmaps; i++) { + exaMigrateTowardFb(pixmaps + i); + exaDoMoveInPixmap(pixmaps + i); + } + } else if (pExaScr->migration == ExaMigrationGreedy) { + /* If we can't accelerate, either because the driver can't or because one of + * the pixmaps is pinned in system memory, then we migrate everybody toward + * system memory. + * + * We also migrate toward system if all pixmaps involved are currently in + * system memory -- this can mitigate thrashing when there are significantly + * more pixmaps active than would fit in memory. + * + * If not, then we migrate toward FB so that hopefully acceleration can + * happen. + */ + if (!can_accel) { + for (i = 0; i < npixmaps; i++) + exaMigrateTowardSys (pixmaps + i); + return; + } + + for (i = 0; i < npixmaps; i++) { + if (exaPixmapIsOffscreen(pixmaps[i].pPix)) { + /* Found one in FB, so move all to FB. */ + for (j = 0; j < npixmaps; j++) + exaMigrateTowardFb(pixmaps + i); + return; + } + } + + /* Nobody's in FB, so move all away from FB. */ + for (i = 0; i < npixmaps; i++) + exaMigrateTowardSys(pixmaps + i); + } else if (pExaScr->migration == ExaMigrationAlways) { + /* Always move the pixmaps out if we can't accelerate. If we can + * accelerate, try to move them all in. If that fails, then move them + * back out. + */ + if (!can_accel) { + for (i = 0; i < npixmaps; i++) + exaDoMoveOutPixmap(pixmaps + i); + return; + } + + /* Now, try to move them all into FB */ + for (i = 0; i < npixmaps; i++) { + exaDoMoveInPixmap(pixmaps + i); + } + + /* If we couldn't fit everything in, abort */ + for (i = 0; i < npixmaps; i++) { + if (!exaPixmapIsOffscreen(pixmaps[i].pPix)) { + return; + } + } + + /* Yay, everything's offscreen, mark memory as used */ + for (i = 0; i < npixmaps; i++) { + ExaOffscreenMarkUsed (pixmaps[i].pPix); + } + } +} diff --git a/xorg-server/exa/exa_migration_mixed.c b/xorg-server/exa/exa_migration_mixed.c new file mode 100644 index 000000000..d1ee9871b --- /dev/null +++ b/xorg-server/exa/exa_migration_mixed.c @@ -0,0 +1,194 @@ +/* + * Copyright © 2009 Maarten Maathuis + * + * 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. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +static void +exaUploadFallback(PixmapPtr pPixmap, CARD8 *src, int src_pitch) +{ + ExaPixmapPriv(pPixmap); + RegionPtr damage = DamageRegion (pExaPixmap->pDamage); + GCPtr pGC = GetScratchGC (pPixmap->drawable.depth, + pPixmap->drawable.pScreen); + int nbox, cpp = pPixmap->drawable.bitsPerPixel / 8; + DamagePtr backup = pExaPixmap->pDamage; + BoxPtr pbox; + CARD8 *src2; + + /* We don't want damage optimisations. */ + pExaPixmap->pDamage = NULL; + ValidateGC (&pPixmap->drawable, pGC); + + pbox = REGION_RECTS(damage); + nbox = REGION_NUM_RECTS(damage); + + while (nbox--) { + src2 = src + pbox->y1 * src_pitch + pbox->x1 * cpp; + + ExaCheckPutImage(&pPixmap->drawable, pGC, + pPixmap->drawable.depth, pbox->x1, pbox->y1, + pbox->x2 - pbox->x1, pbox->y2 - pbox->y1, 0, + ZPixmap, (char*) src2); + + pbox++; + } + + FreeScratchGC (pGC); + pExaPixmap->pDamage = backup; +} + +void +exaCreateDriverPixmap_mixed(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + ExaPixmapPriv(pPixmap); + RegionPtr damage = DamageRegion (pExaPixmap->pDamage); + void *sys_buffer = pExaPixmap->sys_ptr; + int w = pPixmap->drawable.width, h = pPixmap->drawable.height; + int depth = pPixmap->drawable.depth, bpp = pPixmap->drawable.bitsPerPixel; + int usage_hint = pPixmap->usage_hint; + int sys_pitch = pExaPixmap->sys_pitch; + int paddedWidth = sys_pitch; + int nbox; + BoxPtr pbox; + + /* Already done. */ + if (pExaPixmap->driverPriv) + return; + + if (exaPixmapIsPinned(pPixmap)) + return; + + /* Can't accel 1/4 bpp. */ + if (pExaPixmap->accel_blocked || bpp < 8) + return; + + if (pExaScr->info->CreatePixmap2) { + int new_pitch = 0; + pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, usage_hint, bpp, &new_pitch); + paddedWidth = pExaPixmap->fb_pitch = new_pitch; + } else { + if (paddedWidth < pExaPixmap->fb_pitch) + paddedWidth = pExaPixmap->fb_pitch; + pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, paddedWidth*h, 0); + } + + if (!pExaPixmap->driverPriv) + return; + + pExaPixmap->offscreen = TRUE; + pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr = NULL; + pExaPixmap->sys_pitch = pPixmap->devKind = 0; + + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0, + paddedWidth, NULL); + + /* scratch pixmaps */ + if (!w || !h) + goto finish; + + /* we do not malloc memory by default. */ + if (!sys_buffer) + goto finish; + + if (!pExaScr->info->UploadToScreen) + goto fallback; + + pbox = REGION_RECTS(damage); + nbox = REGION_NUM_RECTS(damage); + + while (nbox--) { + if (!pExaScr->info->UploadToScreen(pPixmap, pbox->x1, pbox->y1, pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1, (char *) (sys_buffer) + pbox->y1 * sys_pitch + pbox->x1 * (bpp / 8), sys_pitch)) + goto fallback; + + pbox++; + } + + goto finish; + +fallback: + exaUploadFallback(pPixmap, sys_buffer, sys_pitch); + +finish: + free(sys_buffer); + + /* We no longer need this. */ + if (pExaPixmap->pDamage) { + DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage); + DamageDestroy(pExaPixmap->pDamage); + pExaPixmap->pDamage = NULL; + } +} + +void +exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) +{ + int i; + + /* If anything is pinned in system memory, we won't be able to + * accelerate. + */ + for (i = 0; i < npixmaps; i++) { + if (exaPixmapIsPinned (pixmaps[i].pPix) && + !exaPixmapIsOffscreen (pixmaps[i].pPix)) + { + can_accel = FALSE; + break; + } + } + + /* We can do nothing. */ + if (!can_accel) + return; + + for (i = 0; i < npixmaps; i++) { + PixmapPtr pPixmap = pixmaps[i].pPix; + ExaPixmapPriv(pPixmap); + if (!pExaPixmap->driverPriv) + exaCreateDriverPixmap_mixed(pPixmap); + } +} + +void +exaMoveInPixmap_mixed(PixmapPtr pPixmap) +{ + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = NULL; + + exaDoMigration(pixmaps, 1, TRUE); +} diff --git a/xorg-server/exa/exa_mixed.c b/xorg-server/exa/exa_mixed.c new file mode 100644 index 000000000..01f87ba87 --- /dev/null +++ b/xorg-server/exa/exa_mixed.c @@ -0,0 +1,251 @@ +/* + * Copyright © 2009 Maarten Maathuis + * + * 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. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +/* This file holds the driver allocated pixmaps + better initial placement code. + * A pinned pixmap implies one that is either driver based already or otherwise altered. + * Proper care is taken to free the initially allocated buffer. + */ + +static _X_INLINE void* +ExaGetPixmapAddress(PixmapPtr p) +{ + ExaPixmapPriv(p); + + return pExaPixmap->sys_ptr; +} + +/** + * exaCreatePixmap() creates a new pixmap. + * + * Pixmaps are always marked as pinned, unless the pixmap can still be transfered to a + * driver pixmaps. + */ +PixmapPtr +exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint) +{ + PixmapPtr pPixmap; + ExaPixmapPrivPtr pExaPixmap; + int bpp; + size_t paddedWidth, datasize; + ExaScreenPriv(pScreen); + + if (w > 32767 || h > 32767) + return NullPixmap; + + swap(pExaScr, pScreen, CreatePixmap); + pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint); + swap(pExaScr, pScreen, CreatePixmap); + + if (!pPixmap) + return NULL; + + pExaPixmap = ExaGetPixmapPriv(pPixmap); + pExaPixmap->driverPriv = NULL; + + bpp = pPixmap->drawable.bitsPerPixel; + + paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); + if (paddedWidth / 4 > 32767 || h > 32767) + return NullPixmap; + + datasize = h * paddedWidth; + + /* We will allocate the system pixmap later if needed. */ + pPixmap->devPrivate.ptr = NULL; + pExaPixmap->sys_ptr = NULL; + pExaPixmap->sys_pitch = paddedWidth; + + pExaPixmap->area = NULL; + pExaPixmap->offscreen = FALSE; + pExaPixmap->fb_ptr = NULL; + pExaPixmap->pDamage = NULL; + + exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); + exaSetAccelBlock(pExaScr, pExaPixmap, + w, h, bpp); + + /* Avoid freeing sys_ptr. */ + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + + (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0, + paddedWidth, NULL); + + /* We want to be able to transfer the pixmap to driver memory later on. */ + pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; + + /* A scratch pixmap will become a driver pixmap right away. */ + if (!w || !h) { + exaCreateDriverPixmap_mixed(pPixmap); + } else { + /* Set up damage tracking */ + pExaPixmap->pDamage = DamageCreate (NULL, NULL, + DamageReportNone, TRUE, + pScreen, pPixmap); + + if (pExaPixmap->pDamage == NULL) { + swap(pExaScr, pScreen, DestroyPixmap); + pScreen->DestroyPixmap (pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + return NULL; + } + + DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage); + /* This ensures that pending damage reflects the current operation. */ + /* This is used by exa to optimize migration. */ + DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE); + } + + return pPixmap; +} + +Bool +exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPrivPtr pExaScr; + ExaPixmapPrivPtr pExaPixmap; + Bool ret; + + if (!pPixmap) + return FALSE; + + pExaScr = ExaGetScreenPriv(pScreen); + pExaPixmap = ExaGetPixmapPriv(pPixmap); + + if (pExaPixmap) { + if (!exaPixmapIsPinned(pPixmap)) { + free(pExaPixmap->sys_ptr); + pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr = NULL; + pExaPixmap->sys_pitch = pPixmap->devKind = 0; + + /* We no longer need this. */ + if (pExaPixmap->pDamage) { + DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage); + DamageDestroy(pExaPixmap->pDamage); + pExaPixmap->pDamage = NULL; + } + } + + if (pPixData) + pExaPixmap->sys_ptr = pPixData; + + if (devKind > 0) + pExaPixmap->sys_pitch = devKind; + + if (width > 0 && height > 0 && bitsPerPixel > 0) { + exaSetFbPitch(pExaScr, pExaPixmap, + width, height, bitsPerPixel); + + exaSetAccelBlock(pExaScr, pExaPixmap, + width, height, bitsPerPixel); + } + + /* Anything can happen, don't try to predict it all. */ + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + } + + /* Only pass driver pixmaps to the driver. */ + if (pExaScr->info->ModifyPixmapHeader && pExaPixmap->driverPriv) { + ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData); + /* For EXA_HANDLES_PIXMAPS, we set pPixData to NULL. + * If pPixmap->devPrivate.ptr is non-NULL, then we've got a non-offscreen pixmap. + * We need to store the pointer, because PrepareAccess won't be called. + */ + if (!pPixData && pPixmap->devPrivate.ptr && pPixmap->devKind) { + pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; + pExaPixmap->sys_pitch = pPixmap->devKind; + } + if (ret == TRUE) + goto out; + } + + swap(pExaScr, pScreen, ModifyPixmapHeader); + ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData); + swap(pExaScr, pScreen, ModifyPixmapHeader); + +out: + /* Always NULL this, we don't want lingering pointers. */ + pPixmap->devPrivate.ptr = NULL; + + return ret; +} + +Bool +exaDestroyPixmap_mixed(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + Bool ret; + + if (pPixmap->refcnt == 1) + { + ExaPixmapPriv (pPixmap); + + if (pExaPixmap->driverPriv) + pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); + else if (pExaPixmap->sys_ptr && !exaPixmapIsPinned(pPixmap)) + free(pExaPixmap->sys_ptr); + pExaPixmap->driverPriv = NULL; + pExaPixmap->sys_ptr = NULL; + } + + swap(pExaScr, pScreen, DestroyPixmap); + ret = pScreen->DestroyPixmap (pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + + return ret; +} + +Bool +exaPixmapIsOffscreen_mixed(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + ExaPixmapPriv(pPixmap); + pointer saved_ptr; + Bool ret; + + if (!pExaPixmap->driverPriv) + return FALSE; + + saved_ptr = pPixmap->devPrivate.ptr; + pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); + ret = pExaScr->info->PixmapIsOffscreen(pPixmap); + pPixmap->devPrivate.ptr = saved_ptr; + + return ret; +} diff --git a/xorg-server/exa/exa_offscreen.c b/xorg-server/exa/exa_offscreen.c index 4aaa2c132..eb53b2a30 100644 --- a/xorg-server/exa/exa_offscreen.c +++ b/xorg-server/exa/exa_offscreen.c @@ -93,7 +93,7 @@ exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align) { ExaOffscreenArea *begin, *end, *best; unsigned cost, best_cost; - int avail, real_size, tmp; + int avail, real_size; best_cost = UINT_MAX; begin = end = pExaScr->info->offScreenAreas; @@ -111,10 +111,7 @@ exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align) break; /* adjust size needed to account for alignment loss for this area */ - real_size = size; - tmp = begin->base_offset % align; - if (tmp) - real_size += (align - tmp); + real_size = size + (begin->base_offset + begin->size - size) % align; while (avail < real_size && end != NULL) { @@ -172,7 +169,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, { ExaOffscreenArea *area; ExaScreenPriv (pScreen); - int tmp, real_size = 0; + int real_size = 0, free_total = 0, largest_avail = 0; #if DEBUG_OFFSCREEN static int number = 0; ErrorF("================= ============ allocating a new pixmap %d\n", ++number); @@ -205,14 +202,37 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, continue; /* adjust size to match alignment requirement */ - real_size = size; - tmp = area->base_offset % align; - if (tmp) - real_size += (align - tmp); + real_size = size + (area->base_offset + area->size - size) % align; /* does it fit? */ if (real_size <= area->size) break; + + free_total += area->size; + + if (area->size > largest_avail) + largest_avail = area->size; + } + + if (!area && free_total >= size) { + CARD32 now = GetTimeInMillis(); + + /* Don't defragment more than once per second, to avoid adding more + * overhead than we're trying to prevent + */ + if (abs((INT32) (now - pExaScr->lastDefragment)) > 1000) { + area = ExaOffscreenDefragment(pScreen); + pExaScr->lastDefragment = now; + + if (area) { + /* adjust size to match alignment requirement */ + real_size = size + (area->base_offset + area->size - size) % align; + + /* does it fit? */ + if (real_size > area->size) + area = NULL; + } + } } if (!area) @@ -228,10 +248,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, } /* adjust size needed to account for alignment loss for this area */ - real_size = size; - tmp = area->base_offset % align; - if (tmp) - real_size += (align - tmp); + real_size = size + (area->base_offset + area->size - size) % align; /* * Kick out first area if in use @@ -254,17 +271,27 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, ExaOffscreenArea *new_area = xalloc (sizeof (ExaOffscreenArea)); if (!new_area) return NULL; - new_area->base_offset = area->base_offset + real_size; + new_area->base_offset = area->base_offset; + new_area->offset = new_area->base_offset; + new_area->align = 0; new_area->size = area->size - real_size; new_area->state = ExaOffscreenAvail; new_area->save = NULL; new_area->last_use = 0; new_area->eviction_cost = 0; - new_area->next = area->next; - area->next = new_area; + new_area->next = area; + new_area->prev = area->prev; + if (area->prev->next) + area->prev->next = new_area; + else + pExaScr->info->offScreenAreas = new_area; + area->prev = new_area; + area->base_offset = new_area->base_offset + new_area->size; area->size = real_size; - } + } else + pExaScr->numOffscreenAvailable--; + /* * Mark this area as in use */ @@ -277,6 +304,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, area->last_use = pExaScr->offScreenCounter++; area->offset = (area->base_offset + align - 1); area->offset -= area->offset % align; + area->align = align; ExaOffscreenValidate (pScreen); @@ -371,6 +399,9 @@ exaEnableDisableFBAccess (int index, Bool enable) ScreenPtr pScreen = screenInfo.screens[index]; ExaScreenPriv (pScreen); + if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) + return; + if (!enable && pExaScr->disableFbCount++ == 0) { if (pExaScr->info->exa_minor < 1) ExaOffscreenSwapOut (pScreen); @@ -388,7 +419,7 @@ exaEnableDisableFBAccess (int index, Bool enable) /* merge the next free area into this one */ static void -ExaOffscreenMerge (ExaOffscreenArea *area) +ExaOffscreenMerge (ExaScreenPrivPtr pExaScr, ExaOffscreenArea *area) { ExaOffscreenArea *next = area->next; @@ -396,7 +427,13 @@ ExaOffscreenMerge (ExaOffscreenArea *area) area->size += next->size; /* frob pointer */ area->next = next->next; + if (area->next) + area->next->prev = area; + else + pExaScr->info->offScreenAreas->prev = area; xfree (next); + + pExaScr->numOffscreenAvailable--; } /** @@ -433,19 +470,19 @@ exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area) if (area == pExaScr->info->offScreenAreas) prev = NULL; else - for (prev = pExaScr->info->offScreenAreas; prev; prev = prev->next) - if (prev->next == area) - break; + prev = area->prev; + + pExaScr->numOffscreenAvailable++; /* link with next area if free */ if (next && next->state == ExaOffscreenAvail) - ExaOffscreenMerge (area); + ExaOffscreenMerge (pExaScr, area); /* link with prev area if free */ if (prev && prev->state == ExaOffscreenAvail) { area = prev; - ExaOffscreenMerge (area); + ExaOffscreenMerge (pExaScr, area); } ExaOffscreenValidate (pScreen); @@ -465,6 +502,167 @@ ExaOffscreenMarkUsed (PixmapPtr pPixmap) pExaPixmap->area->last_use = pExaScr->offScreenCounter++; } +/** + * Defragment offscreen memory by compacting allocated areas at the end of it, + * leaving the total amount of memory available as a single area at the + * beginning (when there are no pinned allocations). + */ +_X_HIDDEN ExaOffscreenArea* +ExaOffscreenDefragment (ScreenPtr pScreen) +{ + ExaScreenPriv (pScreen); + ExaOffscreenArea *area, *largest_available = NULL; + int largest_size = 0; + PixmapPtr pDstPix; + ExaPixmapPrivPtr pExaDstPix; + + pDstPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, 0, 0); + + if (!pDstPix) + return NULL; + + pExaDstPix = ExaGetPixmapPriv (pDstPix); + pExaDstPix->offscreen = TRUE; + + for (area = pExaScr->info->offScreenAreas->prev; + area != pExaScr->info->offScreenAreas; + ) + { + ExaOffscreenArea *prev = area->prev; + PixmapPtr pSrcPix; + ExaPixmapPrivPtr pExaSrcPix; + Bool save_offscreen; + int save_pitch; + + if (area->state != ExaOffscreenAvail || + prev->state == ExaOffscreenLocked || + (prev->state == ExaOffscreenRemovable && + prev->save != exaPixmapSave)) { + area = prev; + continue; + } + + if (prev->state == ExaOffscreenAvail) { + if (area == largest_available) { + largest_available = prev; + largest_size += prev->size; + } + area = prev; + ExaOffscreenMerge (pExaScr, area); + continue; + } + + if (area->size > largest_size) { + largest_available = area; + largest_size = area->size; + } + + pSrcPix = prev->privData; + pExaSrcPix = ExaGetPixmapPriv (pSrcPix); + + pExaDstPix->fb_ptr = pExaScr->info->memoryBase + + area->base_offset + area->size - prev->size + prev->base_offset - + prev->offset; + pExaDstPix->fb_ptr -= (unsigned long)pExaDstPix->fb_ptr % prev->align; + + if (pExaDstPix->fb_ptr <= pExaSrcPix->fb_ptr) { + area = prev; + continue; + } + + if (!(pExaScr->info->flags & EXA_SUPPORTS_OFFSCREEN_OVERLAPS) && + (pExaSrcPix->fb_ptr + prev->size) > pExaDstPix->fb_ptr) { + area = prev; + continue; + } + + save_offscreen = pExaSrcPix->offscreen; + save_pitch = pSrcPix->devKind; + + pExaSrcPix->offscreen = TRUE; + pSrcPix->devKind = pExaSrcPix->fb_pitch; + + pDstPix->drawable.width = pSrcPix->drawable.width; + pDstPix->devKind = pSrcPix->devKind; + pDstPix->drawable.height = pSrcPix->drawable.height; + pDstPix->drawable.depth = pSrcPix->drawable.depth; + pDstPix->drawable.bitsPerPixel = pSrcPix->drawable.bitsPerPixel; + + if (!pExaScr->info->PrepareCopy (pSrcPix, pDstPix, -1, -1, GXcopy, ~0)) { + pExaSrcPix->offscreen = save_offscreen; + pSrcPix->devKind = save_pitch; + area = prev; + continue; + } + + pExaScr->info->Copy (pDstPix, 0, 0, 0, 0, pDstPix->drawable.width, + pDstPix->drawable.height); + pExaScr->info->DoneCopy (pDstPix); + exaMarkSync (pScreen); + + DBG_OFFSCREEN(("Before swap: prev=0x%08x-0x%08x-0x%08x area=0x%08x-0x%08x-0x%08x\n", + prev->base_offset, prev->offset, prev->base_offset + prev->size, + area->base_offset, area->offset, area->base_offset + area->size)); + + /* Calculate swapped area offsets and sizes */ + area->base_offset = prev->base_offset; + area->offset = area->base_offset; + prev->offset += pExaDstPix->fb_ptr - pExaSrcPix->fb_ptr; + assert(prev->offset >= pExaScr->info->offScreenBase && + prev->offset < pExaScr->info->memorySize); + prev->base_offset = prev->offset; + if (area->next) + prev->size = area->next->base_offset - prev->base_offset; + else + prev->size = pExaScr->info->memorySize - prev->base_offset; + area->size = prev->base_offset - area->base_offset; + + DBG_OFFSCREEN(("After swap: area=0x%08x-0x%08x-0x%08x prev=0x%08x-0x%08x-0x%08x\n", + area->base_offset, area->offset, area->base_offset + area->size, + prev->base_offset, prev->offset, prev->base_offset + prev->size)); + + /* Swap areas in list */ + if (area->next) + area->next->prev = prev; + else + pExaScr->info->offScreenAreas->prev = prev; + if (prev->prev->next) + prev->prev->next = area; + else + pExaScr->info->offScreenAreas = area; + prev->next = area->next; + area->next = prev; + area->prev = prev->prev; + prev->prev = area; + if (!area->prev->next) + pExaScr->info->offScreenAreas = area; + +#if DEBUG_OFFSCREEN + if (prev->prev == prev || prev->next == prev) + ErrorF("Whoops, prev points to itself!\n"); + + if (area->prev == area || area->next == area) + ErrorF("Whoops, area points to itself!\n"); +#endif + + pExaSrcPix->fb_ptr = pExaDstPix->fb_ptr; + pExaSrcPix->offscreen = save_offscreen; + pSrcPix->devKind = save_pitch; + } + + pDstPix->drawable.width = 0; + pDstPix->drawable.height = 0; + pDstPix->drawable.depth = 0; + pDstPix->drawable.bitsPerPixel = 0; + + (*pScreen->DestroyPixmap) (pDstPix); + + if (area->state == ExaOffscreenAvail && area->size > largest_size) + return area; + + return largest_available; +} + /** * exaOffscreenInit initializes the offscreen memory manager. * @@ -488,15 +686,18 @@ exaOffscreenInit (ScreenPtr pScreen) area->state = ExaOffscreenAvail; area->base_offset = pExaScr->info->offScreenBase; area->offset = area->base_offset; + area->align = 0; area->size = pExaScr->info->memorySize - area->base_offset; area->save = NULL; area->next = NULL; + area->prev = area; area->last_use = 0; area->eviction_cost = 0; /* Add it to the free areas */ pExaScr->info->offScreenAreas = area; pExaScr->offScreenCounter = 1; + pExaScr->numOffscreenAvailable = 1; ExaOffscreenValidate (pScreen); diff --git a/xorg-server/exa/exa_priv.h b/xorg-server/exa/exa_priv.h index 0911c6d8a..869cf1772 100644 --- a/xorg-server/exa/exa_priv.h +++ b/xorg-server/exa/exa_priv.h @@ -33,7 +33,6 @@ #include "exa.h" #include -#define NEED_EVENTS #include #ifdef MITSHM #include "shmint.h" @@ -86,6 +85,18 @@ exaDrawableLocation(DrawablePtr pDrawable); #define EXA_MAX_FB FB_OVERLAY_MAX #endif +#ifdef DEBUG +#define EXA_FatalErrorDebug(x) FatalError x +#define EXA_FatalErrorDebugWithRet(x, ret) FatalError x +#else +#define EXA_FatalErrorDebug(x) ErrorF x +#define EXA_FatalErrorDebugWithRet(x, ret) \ +do { \ + ErrorF x; \ + return ret; \ +} while (0) +#endif + /** * This is the list of migration heuristics supported by EXA. See * exaDoMigration() for what their implementations do. @@ -128,9 +139,21 @@ typedef struct { #define EXA_NUM_GLYPH_CACHES 4 +#define EXA_FALLBACK_COPYWINDOW (1 << 0) +#define EXA_ACCEL_COPYWINDOW (1 << 1) + +typedef struct _ExaMigrationRec { + Bool as_dst; + Bool as_src; + PixmapPtr pPix; + RegionPtr pReg; +} ExaMigrationRec, *ExaMigrationPtr; + typedef void (*EnableDisableFBAccessProcPtr)(int, Bool); typedef struct { ExaDriverPtr info; + ScreenBlockHandlerProcPtr SavedBlockHandler; + ScreenWakeupHandlerProcPtr SavedWakeupHandler; CreateGCProcPtr SavedCreateGC; CloseScreenProcPtr SavedCloseScreen; GetImageProcPtr SavedGetImage; @@ -149,13 +172,29 @@ typedef struct { TrapezoidsProcPtr SavedTrapezoids; AddTrapsProcPtr SavedAddTraps; #endif - + void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); + Bool (*pixmap_is_offscreen) (PixmapPtr pPixmap); + void (*do_move_in_pixmap) (PixmapPtr pPixmap); + void (*do_move_out_pixmap) (PixmapPtr pPixmap); + Bool swappedOut; enum ExaMigrationHeuristic migration; Bool checkDirtyCorrectness; unsigned disableFbCount; Bool optimize_migration; unsigned offScreenCounter; + unsigned numOffscreenAvailable; + CARD32 lastDefragment; + CARD32 nextDefragment; + + /* Reference counting for accessed pixmaps */ + struct { + PixmapPtr pixmap; + int count; + } access[EXA_NUM_PREPARE_INDICES]; + + /* Holds information on fallbacks that cannot be relayed otherwise. */ + unsigned int fallback_flags; ExaGlyphCacheRec glyphCaches[EXA_NUM_GLYPH_CACHES]; } ExaScreenPrivRec, *ExaScreenPrivPtr; @@ -174,9 +213,40 @@ typedef struct { extern DevPrivateKey exaScreenPrivateKey; extern DevPrivateKey exaPixmapPrivateKey; +extern DevPrivateKey exaGCPrivateKey; #define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixLookupPrivate(&(s)->devPrivates, exaScreenPrivateKey)) #define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s) +#define ExaGetGCPriv(gc) ((ExaGCPrivPtr)dixLookupPrivate(&(gc)->devPrivates, exaGCPrivateKey)) +#define ExaGCPriv(gc) ExaGCPrivPtr pExaGC = ExaGetGCPriv(gc) + +/* + * Some macros to deal with function wrapping. + */ +#define wrap(priv, real, mem, func) {\ + priv->Saved##mem = real->mem; \ + real->mem = func; \ +} + +#define unwrap(priv, real, mem) {\ + real->mem = priv->Saved##mem; \ +} + +#define swap(priv, real, mem) {\ + void *tmp = priv->Saved##mem; \ + priv->Saved##mem = real->mem; \ + real->mem = tmp; \ +} + +#define EXA_GC_PROLOGUE(_gc_) \ + ExaGCPriv(_gc_); \ + swap(pExaGC, _gc_, funcs); \ + swap(pExaGC, _gc_, ops); + +#define EXA_GC_EPILOGUE(_gc_) \ + swap(pExaGC, _gc_, funcs); \ + swap(pExaGC, _gc_, ops); + /** Align an offset to an arbitrary alignment */ #define EXA_ALIGN(offset, align) (((offset) + (align) - 1) - \ (((offset) + (align) - 1) % (align))) @@ -237,17 +307,19 @@ typedef struct { */ void *driverPriv; } ExaPixmapPrivRec, *ExaPixmapPrivPtr; - -typedef struct _ExaMigrationRec { - Bool as_dst; - Bool as_src; - PixmapPtr pPix; - RegionPtr pReg; -} ExaMigrationRec, *ExaMigrationPtr; typedef struct { + /* GC values from the layer below. */ + GCOps *Savedops; + GCFuncs *Savedfuncs; +} ExaGCPrivRec, *ExaGCPrivPtr; + +typedef struct { + PicturePtr pDst; INT16 xSrc; INT16 ySrc; + INT16 xMask; + INT16 yMask; INT16 xDst; INT16 yDst; INT16 width; @@ -280,6 +352,11 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits); +void +ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, + Bool upsidedown, Pixel bitplane, void *closure); + RegionPtr ExaCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty); @@ -324,6 +401,13 @@ ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int w, int h, int x, int y); +void +ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); + +void +ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, char *d); + void ExaCheckGetSpans (DrawablePtr pDrawable, int wMax, @@ -363,6 +447,34 @@ void exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *d); +RegionPtr +exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, + int srcx, int srcy, int width, int height, int dstx, int dsty); + +Bool +exaHWCopyNtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown); + +void +exaCopyNtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + extern const GCOps exaOps; #ifdef RENDER @@ -388,6 +500,9 @@ ExaOffscreenSwapOut (ScreenPtr pScreen); void ExaOffscreenSwapIn (ScreenPtr pScreen); +ExaOffscreenArea* +ExaOffscreenDefragment (ScreenPtr pScreen); + Bool exaOffscreenInit(ScreenPtr pScreen); @@ -395,7 +510,7 @@ void ExaOffscreenFini (ScreenPtr pScreen); /* exa.c */ -void +Bool ExaDoPrepareAccess(DrawablePtr pDrawable, int index); void @@ -423,22 +538,76 @@ exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp); PixmapPtr exaGetDrawablePixmap(DrawablePtr pDrawable); -RegionPtr -exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, - int srcx, int srcy, int width, int height, int dstx, int dsty); +void +exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, + int w, int h, int bpp); void -exaCopyNtoN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure); +exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, + int w, int h, int bpp); + +void +exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); + +Bool +exaPixmapIsPinned (PixmapPtr pPix); + +extern const GCFuncs exaGCFuncs; + +/* exa_classic.c */ +PixmapPtr +exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint); + +Bool +exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData); + +Bool +exaDestroyPixmap_classic (PixmapPtr pPixmap); + +Bool +exaPixmapIsOffscreen_classic(PixmapPtr pPixmap); + +/* exa_driver.c */ +PixmapPtr +exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint); + +Bool +exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData); + +Bool +exaDestroyPixmap_driver (PixmapPtr pPixmap); + +Bool +exaPixmapIsOffscreen_driver(PixmapPtr pPixmap); + +/* exa_mixed.c */ +PixmapPtr +exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint); + +Bool +exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData); + +Bool +exaDestroyPixmap_mixed(PixmapPtr pPixmap); + +Bool +exaPixmapIsOffscreen_mixed(PixmapPtr pPixmap); + +/* exa_migration_mixed.c */ +void +exaCreateDriverPixmap_mixed(PixmapPtr pPixmap); + +void +exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); + +void +exaMoveInPixmap_mixed(PixmapPtr pPixmap); /* exa_render.c */ Bool @@ -461,6 +630,7 @@ exaComposite(CARD8 op, void exaCompositeRects(CARD8 op, PicturePtr Src, + PicturePtr pMask, PicturePtr pDst, int nrect, ExaCompositeRectPtr rects); @@ -493,11 +663,17 @@ exaGlyphs (CARD8 op, GlyphListPtr list, GlyphPtr *glyphs); -/* exa_migration.c */ +/* exa_migration_classic.c */ void -exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); +exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); void exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area); +void +exaMoveOutPixmap_classic (PixmapPtr pPixmap); + +void +exaMoveInPixmap_classic (PixmapPtr pPixmap); + #endif /* EXAPRIV_H */ diff --git a/xorg-server/exa/exa_render.c b/xorg-server/exa/exa_render.c index 9a79b4781..1ac29f233 100644 --- a/xorg-server/exa/exa_render.c +++ b/xorg-server/exa/exa_render.c @@ -54,6 +54,12 @@ static void exaCompositeFallbackPictDesc(PicturePtr pict, char *string, int n) case PICT_x8r8g8b8: snprintf(format, 20, "XRGB8888"); break; + case PICT_b8g8r8a8: + snprintf(format, 20, "BGRA8888"); + break; + case PICT_b8g8r8x8: + snprintf(format, 20, "BGRX8888"); + break; case PICT_r5g6b5: snprintf(format, 20, "RGB565 "); break; @@ -158,12 +164,18 @@ exaGetPixelFromRGBA(CARD32 *pixel, gshift = bbits; rshift = gshift + gbits; ashift = rshift + rbits; - } else { /* PICT_TYPE_ABGR */ + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { rshift = 0; gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; - } + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { + bshift = PICT_FORMAT_BPP(format) - bbits; + gshift = bshift - gbits; + rshift = gshift - rbits; + ashift = 0; + } else + return FALSE; *pixel |= ( blue >> (16 - bbits)) << bshift; *pixel |= ( red >> (16 - rbits)) << rshift; @@ -197,12 +209,18 @@ exaGetRGBAFromPixel(CARD32 pixel, gshift = bbits; rshift = gshift + gbits; ashift = rshift + rbits; - } else { /* PICT_TYPE_ABGR */ + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { rshift = 0; gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; - } + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { + bshift = PICT_FORMAT_BPP(format) - bbits; + gshift = bshift - gbits; + rshift = gshift - rbits; + ashift = 0; + } else + return FALSE; *red = ((pixel >> rshift ) & ((1 << rbits) - 1)) << (16 - rbits); while (rbits < 16) { @@ -253,7 +271,6 @@ exaTryDriverSolidFill(PicturePtr pSrc, ExaPixmapPrivPtr pSrcExaPix, pDstExaPix; CARD32 pixel; CARD16 red, green, blue, alpha; - ExaMigrationRec pixmaps[1]; pDstPix = exaGetDrawablePixmap (pDst->pDrawable); pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); @@ -284,11 +301,15 @@ exaTryDriverSolidFill(PicturePtr pSrc, pixel = exaGetPixmapFirstPixel (pSrcPix); - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = pDstPix; - pixmaps[0].pReg = ®ion; - exaDoMigration(pixmaps, 1, TRUE); + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pDstPix; + pixmaps[0].pReg = ®ion; + exaDoMigration(pixmaps, 1, TRUE); + } if (!exaPixmapIsOffscreen(pDstPix)) { REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); @@ -334,16 +355,15 @@ exaTryDriverSolidFill(PicturePtr pSrc, static int exaTryDriverCompositeRects(CARD8 op, PicturePtr pSrc, + PicturePtr pMask, PicturePtr pDst, int nrect, ExaCompositeRectPtr rects) { ExaScreenPriv (pDst->pDrawable->pScreen); - int src_off_x, src_off_y, dst_off_x, dst_off_y; - PixmapPtr pSrcPix, pDstPix; - ExaPixmapPrivPtr pSrcExaPix, pDstExaPix; - struct _Pixmap scratch; - ExaMigrationRec pixmaps[2]; + int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y; + PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix; + ExaPixmapPrivPtr pSrcExaPix, pMaskExaPix = NULL, pDstExaPix; if (!pExaScr->info->PrepareComposite) return -1; @@ -351,6 +371,11 @@ exaTryDriverCompositeRects(CARD8 op, pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); pSrcExaPix = ExaGetPixmapPriv(pSrcPix); + if (pMask) { + pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); + pMaskExaPix = ExaGetPixmapPriv(pMaskPix); + } + pDstPix = exaGetDrawablePixmap(pDst->pDrawable); pDstExaPix = ExaGetPixmapPriv(pDstPix); @@ -358,61 +383,74 @@ exaTryDriverCompositeRects(CARD8 op, * FIXME: If it cannot, use temporary pixmaps so that the drawing * happens within limits. */ - if (pSrcExaPix->accel_blocked || - pDstExaPix->accel_blocked) + if (pSrcExaPix->accel_blocked || pDstExaPix->accel_blocked || + (pMask && pMaskExaPix->accel_blocked)) { return -1; } if (pExaScr->info->CheckComposite && - !(*pExaScr->info->CheckComposite) (op, pSrc, NULL, pDst)) + !(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst)) { return -1; } - - exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y); - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = exaOpReadsDestination(op); - pixmaps[0].pPix = pDstPix; - pixmaps[0].pReg = NULL; - pixmaps[1].as_dst = FALSE; - pixmaps[1].as_src = TRUE; - pixmaps[1].pPix = pSrcPix; - pixmaps[1].pReg = NULL; - exaDoMigration(pixmaps, 2, TRUE); + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[3]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = exaOpReadsDestination(op); + pixmaps[0].pPix = pDstPix; + pixmaps[0].pReg = NULL; + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = pSrcPix; + pixmaps[1].pReg = NULL; + if (pMask) { + pixmaps[2].as_dst = FALSE; + pixmaps[2].as_src = TRUE; + pixmaps[2].pPix = pMaskPix; + pixmaps[2].pReg = NULL; + exaDoMigration(pixmaps, 3, TRUE); + } else + exaDoMigration(pixmaps, 2, TRUE); + } - pSrcPix = exaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y); - if (!exaPixmapIsOffscreen(pDstPix)) + pDstPix = exaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y); + if (!pDstPix) return 0; - if (!pSrcPix && pExaScr->info->UploadToScratch) - { - pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); - if ((*pExaScr->info->UploadToScratch) (pSrcPix, &scratch)) - pSrcPix = &scratch; - } + pSrcPix = exaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y); if (!pSrcPix) return 0; - if (!(*pExaScr->info->PrepareComposite) (op, pSrc, NULL, pDst, pSrcPix, - NULL, pDstPix)) + if (pMask) { + pMaskPix = exaGetOffscreenPixmap (pMask->pDrawable, &mask_off_x, &mask_off_y); + + if (!pMaskPix) + return 0; + } + + if (!(*pExaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix, + pMaskPix, pDstPix)) return -1; while (nrect--) { INT16 xDst = rects->xDst + pDst->pDrawable->x; INT16 yDst = rects->yDst + pDst->pDrawable->y; + INT16 xMask = pMask ? rects->xMask + pMask->pDrawable->x : 0; + INT16 yMask = pMask ? rects->yMask + pMask->pDrawable->y : 0; INT16 xSrc = rects->xSrc + pSrc->pDrawable->x; INT16 ySrc = rects->ySrc + pSrc->pDrawable->y; RegionRec region; BoxPtr pbox; int nbox; - - if (!miComputeCompositeRegion (®ion, pSrc, NULL, pDst, - xSrc, ySrc, 0, 0, xDst, yDst, + + if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, rects->width, rects->height)) goto next_rect; @@ -421,6 +459,8 @@ exaTryDriverCompositeRects(CARD8 op, nbox = REGION_NUM_RECTS(®ion); pbox = REGION_RECTS(®ion); + xMask = xMask + mask_off_x - xDst - dst_off_x; + yMask = yMask + mask_off_y - yDst - dst_off_y; xSrc = xSrc + src_off_x - xDst - dst_off_x; ySrc = ySrc + src_off_y - yDst - dst_off_y; @@ -429,7 +469,8 @@ exaTryDriverCompositeRects(CARD8 op, (*pExaScr->info->Composite) (pDstPix, pbox->x1 + xSrc, pbox->y1 + ySrc, - 0, 0, + pbox->x1 + xMask, + pbox->y1 + yMask, pbox->x1, pbox->y1, pbox->x2 - pbox->x1, @@ -451,25 +492,28 @@ exaTryDriverCompositeRects(CARD8 op, /** * Copy a number of rectangles from source to destination in a single - * operation. This is specialized for building a glyph mask: we don'y - * have a mask argument because we don't need it for that, and we - * don't have he special-case fallbacks found in exaComposite() - if the - * driver can support it, we use the driver functionality, otherwise we - * fallback straight to software. + * operation. This is specialized for glyph rendering: we don't have the + * special-case fallbacks found in exaComposite() - if the driver can support + * it, we use the driver functionality, otherwise we fall back straight to + * software. */ void exaCompositeRects(CARD8 op, PicturePtr pSrc, + PicturePtr pMask, PicturePtr pDst, int nrect, ExaCompositeRectPtr rects) { - PixmapPtr pPixmap = exaGetDrawablePixmap(pDst->pDrawable); - ExaPixmapPriv(pPixmap); + ExaScreenPriv (pDst->pDrawable->pScreen); int n; ExaCompositeRectPtr r; - - if (pExaPixmap->pDamage) { + int ret; + + /* If we get a mask, that means we're rendering to the exaGlyphs + * destination directly, so the damage layer takes care of this. + */ + if (!pMask) { RegionRec region; int x1 = MAXSHORT; int y1 = MAXSHORT; @@ -526,24 +570,44 @@ exaCompositeRects(CARD8 op, /************************************************************/ ValidatePicture (pSrc); + if (pMask) + ValidatePicture (pMask); ValidatePicture (pDst); - - if (exaTryDriverCompositeRects(op, pSrc, pDst, nrect, rects) != 1) { - n = nrect; - r = rects; - while (n--) { - ExaCheckComposite (op, pSrc, NULL, pDst, - r->xSrc, r->ySrc, - 0, 0, - r->xDst, r->yDst, - r->width, r->height); - r++; + + ret = exaTryDriverCompositeRects(op, pSrc, pMask, pDst, nrect, rects); + + if (ret != 1) { + if (ret == -1 && op == PictOpOver && pMask && pMask->componentAlpha && + (!pExaScr->info->CheckComposite || + ((*pExaScr->info->CheckComposite)(PictOpOutReverse, pSrc, pMask, + pDst) && + (*pExaScr->info->CheckComposite)(PictOpAdd, pSrc, pMask, pDst)))) { + ret = exaTryDriverCompositeRects(PictOpOutReverse, pSrc, pMask, + pDst, nrect, rects); + if (ret == 1) { + op = PictOpAdd; + ret = exaTryDriverCompositeRects(op, pSrc, pMask, pDst, nrect, + rects); + } + } + + if (ret != 1) { + n = nrect; + r = rects; + while (n--) { + ExaCheckComposite (op, pSrc, pMask, pDst, + r->xSrc, r->ySrc, + r->xMask, r->yMask, + r->xDst, r->yDst, + r->width, r->height); + r++; + } } } /************************************************************/ - if (pExaPixmap->pDamage) { + if (!pMask) { /* Now we have to flush the damage out from pendingDamage => damage * Calling DamageRegionProcessPending has that effect. */ @@ -573,8 +637,6 @@ exaTryDriverComposite(CARD8 op, int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y; PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix; ExaPixmapPrivPtr pSrcExaPix, pMaskExaPix = NULL, pDstExaPix; - struct _Pixmap scratch; - ExaMigrationRec pixmaps[3]; pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); pSrcExaPix = ExaGetPixmapPriv(pSrcPix); @@ -624,22 +686,25 @@ exaTryDriverComposite(CARD8 op, REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y); - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = exaOpReadsDestination(op); - pixmaps[0].pPix = pDstPix; - pixmaps[0].pReg = pixmaps[0].as_src ? NULL : ®ion; - pixmaps[1].as_dst = FALSE; - pixmaps[1].as_src = TRUE; - pixmaps[1].pPix = pSrcPix; - pixmaps[1].pReg = NULL; - if (pMask) { - pixmaps[2].as_dst = FALSE; - pixmaps[2].as_src = TRUE; - pixmaps[2].pPix = pMaskPix; - pixmaps[2].pReg = NULL; - exaDoMigration(pixmaps, 3, TRUE); - } else { - exaDoMigration(pixmaps, 2, TRUE); + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[3]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = exaOpReadsDestination(op); + pixmaps[0].pPix = pDstPix; + pixmaps[0].pReg = pixmaps[0].as_src ? NULL : ®ion; + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = pSrcPix; + pixmaps[1].pReg = NULL; + if (pMask) { + pixmaps[2].as_dst = FALSE; + pixmaps[2].as_src = TRUE; + pixmaps[2].pPix = pMaskPix; + pixmaps[2].pReg = NULL; + exaDoMigration(pixmaps, 3, TRUE); + } else + exaDoMigration(pixmaps, 2, TRUE); } pSrcPix = exaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y); @@ -652,16 +717,6 @@ exaTryDriverComposite(CARD8 op, return 0; } - if (!pSrcPix && (!pMask || pMaskPix) && pExaScr->info->UploadToScratch) { - pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); - if ((*pExaScr->info->UploadToScratch) (pSrcPix, &scratch)) - pSrcPix = &scratch; - } else if (pSrcPix && pMask && !pMaskPix && pExaScr->info->UploadToScratch) { - pMaskPix = exaGetDrawablePixmap (pMask->pDrawable); - if ((*pExaScr->info->UploadToScratch) (pMaskPix, &scratch)) - pMaskPix = &scratch; - } - if (!pSrcPix || (pMask && !pMaskPix)) { REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); return 0; @@ -832,11 +887,13 @@ exaComposite(CARD8 op, { if ((op == PictOpSrc && ((pSrc->format == pDst->format) || + (pSrc->format==PICT_b8g8r8a8 && pDst->format==PICT_b8g8r8x8) || (pSrc->format==PICT_a8r8g8b8 && pDst->format==PICT_x8r8g8b8) || (pSrc->format==PICT_a8b8g8r8 && pDst->format==PICT_x8b8g8r8))) || (op == PictOpOver && !pSrc->alphaMap && !pDst->alphaMap && pSrc->format == pDst->format && - (pSrc->format==PICT_x8r8g8b8 || pSrc->format==PICT_x8b8g8r8))) + (pSrc->format==PICT_x8r8g8b8 || pSrc->format==PICT_x8b8g8r8 || + pSrc->format==PICT_b8g8r8x8))) { if (pSrc->pDrawable->width == 1 && pSrc->pDrawable->height == 1 && @@ -851,6 +908,7 @@ exaComposite(CARD8 op, !pSrc->repeat && !pSrc->transform) { + Bool ret; xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; xSrc += pSrc->pDrawable->x; @@ -861,12 +919,20 @@ exaComposite(CARD8 op, yDst, width, height)) goto done; - - exaCopyNtoN (pSrc->pDrawable, pDst->pDrawable, NULL, + ret = exaHWCopyNtoN(pSrc->pDrawable, pDst->pDrawable, NULL, REGION_RECTS(®ion), REGION_NUM_RECTS(®ion), - xSrc - xDst, ySrc - yDst, - FALSE, FALSE, 0, NULL); + xSrc - xDst, ySrc - yDst, FALSE, FALSE); REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + + /* Reset values to their original values. */ + xDst -= pDst->pDrawable->x; + yDst -= pDst->pDrawable->y; + xSrc -= pSrc->pDrawable->x; + ySrc -= pSrc->pDrawable->y; + + if (!ret) + goto fallback; + goto done; } else if (pSrc->pDrawable != NULL && @@ -1054,15 +1120,15 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst, BoxRec bounds; if (maskFormat) { + PicturePtr pPicture; + INT16 xDst, yDst; + INT16 xRel, yRel; + miTrapezoidBounds (ntrap, traps, &bounds); if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) return; - PicturePtr pPicture; - INT16 xDst, yDst; - INT16 xRel, yRel; - xDst = traps[0].left.p1.x >> 16; yDst = traps[0].left.p1.y >> 16; @@ -1118,15 +1184,15 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst, BoxRec bounds; if (maskFormat) { + PicturePtr pPicture; + INT16 xDst, yDst; + INT16 xRel, yRel; + miTriangleBounds (ntri, tris, &bounds); if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) return; - PicturePtr pPicture; - INT16 xDst, yDst; - INT16 xRel, yRel; - xDst = tris[0].p1.x >> 16; yDst = tris[0].p1.y >> 16; diff --git a/xorg-server/exa/exa_unaccel.c b/xorg-server/exa/exa_unaccel.c index a515bac1f..f4700adac 100644 --- a/xorg-server/exa/exa_unaccel.c +++ b/xorg-server/exa/exa_unaccel.c @@ -74,22 +74,26 @@ void ExaCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans, DDXPointPtr ppt, int *pwidth, int fSorted) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC (pGC); - fbFillSpans (pDrawable, pGC, nspans, ppt, pwidth, fSorted); + pGC->ops->FillSpans (pDrawable, pGC, nspans, ppt, pwidth, fSorted); exaFinishAccessGC (pGC); exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } void ExaCheckSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *psrc, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); - fbSetSpans (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted); + pGC->ops->SetSpans (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted); exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } void @@ -99,6 +103,7 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, { ExaPixmapPriv(exaGetDrawablePixmap(pDrawable)); + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle, pGC->alu, pGC->clientClipType)) @@ -106,8 +111,30 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, else exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pExaPixmap->pDamage ? DamagePendingRegion(pExaPixmap->pDamage) : NULL); - fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits); + pGC->ops->PutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits); exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); +} + +void +ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, + Bool upsidedown, Pixel bitplane, void *closure) +{ + EXA_GC_PROLOGUE(pGC); + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, + exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); + exaPrepareAccess (pDst, EXA_PREPARE_DEST); + exaPrepareAccess (pSrc, EXA_PREPARE_SRC); + /* This will eventually call fbCopyNtoN, with some calculation overhead. */ + while (nbox--) { + pGC->ops->CopyArea (pSrc, pDst, pGC, pbox->x1 - pSrc->x + dx, pbox->y1 - pSrc->y + dy, + pbox->x2 - pbox->x1, pbox->y2 - pbox->y1, pbox->x1 - pDst->x, pbox->y1 - pDst->y); + pbox++; + } + exaFinishAccess (pSrc, EXA_PREPARE_SRC); + exaFinishAccess (pDst, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } RegionPtr @@ -116,13 +143,15 @@ ExaCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, { RegionPtr ret; + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); exaPrepareAccess (pDst, EXA_PREPARE_DEST); exaPrepareAccess (pSrc, EXA_PREPARE_SRC); - ret = fbCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); + ret = pGC->ops->CopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); exaFinishAccess (pSrc, EXA_PREPARE_SRC); exaFinishAccess (pDst, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); return ret; } @@ -134,14 +163,16 @@ ExaCheckCopyPlane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, { RegionPtr ret; + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); exaPrepareAccess (pDst, EXA_PREPARE_DEST); exaPrepareAccess (pSrc, EXA_PREPARE_SRC); - ret = fbCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, + ret = pGC->ops->CopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, bitPlane); exaFinishAccess (pSrc, EXA_PREPARE_SRC); exaFinishAccess (pDst, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); return ret; } @@ -150,85 +181,75 @@ void ExaCheckPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); - fbPolyPoint (pDrawable, pGC, mode, npt, pptInit); + pGC->ops->PolyPoint (pDrawable, pGC, mode, npt, pptInit); exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } void ExaCheckPolylines (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c), width %d, mode %d, count %d\n", pDrawable, exaDrawableLocation(pDrawable), pGC->lineWidth, mode, npt)); - if (pGC->lineWidth == 0) { - exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); - exaPrepareAccessGC (pGC); - fbPolyLine (pDrawable, pGC, mode, npt, ppt); - exaFinishAccessGC (pGC); - exaFinishAccess (pDrawable, EXA_PREPARE_DEST); - return; - } - /* fb calls mi functions in the lineWidth != 0 case. */ - fbPolyLine (pDrawable, pGC, mode, npt, ppt); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + pGC->ops->Polylines (pDrawable, pGC, mode, npt, ppt); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } void ExaCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nsegInit, xSegment *pSegInit) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c) width %d, count %d\n", pDrawable, exaDrawableLocation(pDrawable), pGC->lineWidth, nsegInit)); - if (pGC->lineWidth == 0) { - exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); - exaPrepareAccessGC (pGC); - fbPolySegment (pDrawable, pGC, nsegInit, pSegInit); - exaFinishAccessGC (pGC); - exaFinishAccess (pDrawable, EXA_PREPARE_DEST); - return; - } - /* fb calls mi functions in the lineWidth != 0 case. */ - fbPolySegment (pDrawable, pGC, nsegInit, pSegInit); + + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + pGC->ops->PolySegment (pDrawable, pGC, nsegInit, pSegInit); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } void ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *pArcs) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); - /* Disable this as fbPolyArc can call miZeroPolyArc which in turn - * can call accelerated functions, that as yet, haven't been notified - * with exaFinishAccess(). - */ -#if 0 - if (pGC->lineWidth == 0) - { - exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); - exaPrepareAccessGC (pGC); - fbPolyArc (pDrawable, pGC, narcs, pArcs); - exaFinishAccessGC (pGC); - exaFinishAccess (pDrawable, EXA_PREPARE_DEST); - return; - } -#endif - miPolyArc (pDrawable, pGC, narcs, pArcs); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + pGC->ops->PolyArc (pDrawable, pGC, narcs, pArcs); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } void ExaCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC (pGC); - fbPolyFillRect (pDrawable, pGC, nrect, prect); + pGC->ops->PolyFillRect (pDrawable, pGC, nrect, prect); exaFinishAccessGC (pGC); exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } void @@ -236,13 +257,15 @@ ExaCheckImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC (pGC); - fbImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + pGC->ops->ImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); exaFinishAccessGC (pGC); exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } void @@ -250,13 +273,15 @@ ExaCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("to %p (%c), style %d alu %d\n", pDrawable, exaDrawableLocation(pDrawable), pGC->fillStyle, pGC->alu)); exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC (pGC); - fbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + pGC->ops->PolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); exaFinishAccessGC (pGC); exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); } void @@ -264,16 +289,64 @@ ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int w, int h, int x, int y) { + EXA_GC_PROLOGUE(pGC); EXA_FALLBACK(("from %p to %p (%c,%c)\n", pBitmap, pDrawable, exaDrawableLocation(&pBitmap->drawable), exaDrawableLocation(pDrawable))); exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); exaPrepareAccess (&pBitmap->drawable, EXA_PREPARE_SRC); exaPrepareAccessGC (pGC); - fbPushPixels (pGC, pBitmap, pDrawable, w, h, x, y); + pGC->ops->PushPixels (pGC, pBitmap, pDrawable, w, h, x, y); exaFinishAccessGC (pGC); exaFinishAccess (&pBitmap->drawable, EXA_PREPARE_SRC); exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + EXA_GC_EPILOGUE(pGC); +} + +void +ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + DrawablePtr pDrawable = &pWin->drawable; + ScreenPtr pScreen = pDrawable->pScreen; + ExaScreenPriv(pScreen); + EXA_FALLBACK(("from %p\n", pWin)); + + /* being both src and dest, src is safest. */ + exaPrepareAccess(pDrawable, EXA_PREPARE_SRC); + swap(pExaScr, pScreen, CopyWindow); + pScreen->CopyWindow (pWin, ptOldOrg, prgnSrc); + swap(pExaScr, pScreen, CopyWindow); + exaFinishAccess (pDrawable, EXA_PREPARE_SRC); +} + +void +ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, char *d) +{ + BoxRec Box; + RegionRec Reg; + int xoff, yoff; + ScreenPtr pScreen = pDrawable->pScreen; + PixmapPtr pPix = exaGetDrawablePixmap (pDrawable); + ExaScreenPriv(pScreen); + + EXA_FALLBACK(("from %p (%c)\n", pDrawable, + exaDrawableLocation(pDrawable))); + + exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); + + Box.x1 = pDrawable->y + x + xoff; + Box.y1 = pDrawable->y + y + yoff; + Box.x2 = Box.x1 + w; + Box.y2 = Box.y1 + h; + + REGION_INIT(pScreen, &Reg, &Box, 1); + + exaPrepareAccessReg (pDrawable, EXA_PREPARE_SRC, &Reg); + swap(pExaScr, pScreen, GetImage); + pScreen->GetImage (pDrawable, x, y, w, h, format, planeMask, d); + swap(pExaScr, pScreen, GetImage); + exaFinishAccess (pDrawable, EXA_PREPARE_SRC); } void @@ -284,9 +357,14 @@ ExaCheckGetSpans (DrawablePtr pDrawable, int nspans, char *pdstStart) { + ScreenPtr pScreen = pDrawable->pScreen; + ExaScreenPriv(pScreen); + EXA_FALLBACK(("from %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess (pDrawable, EXA_PREPARE_SRC); - fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + swap(pExaScr, pScreen, GetSpans); + pScreen->GetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + swap(pExaScr, pScreen, GetSpans); exaFinishAccess (pDrawable, EXA_PREPARE_SRC); } @@ -304,6 +382,11 @@ ExaCheckComposite (CARD8 op, CARD16 width, CARD16 height) { + ScreenPtr pScreen = pDst->pDrawable->pScreen; +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreen(pScreen); +#endif /* RENDER */ + ExaScreenPriv(pScreen); RegionRec region; int xoff, yoff; @@ -314,15 +397,15 @@ ExaCheckComposite (CARD8 op, * may be used for moving them out. */ if (pSrc->alphaMap && pSrc->alphaMap->pDrawable) - exaPrepareAccess(pSrc->alphaMap->pDrawable, EXA_PREPARE_AUX2); + exaPrepareAccess(pSrc->alphaMap->pDrawable, EXA_PREPARE_AUX_SRC); if (pMask && pMask->alphaMap && pMask->alphaMap->pDrawable) - exaPrepareAccess(pMask->alphaMap->pDrawable, EXA_PREPARE_AUX1); + exaPrepareAccess(pMask->alphaMap->pDrawable, EXA_PREPARE_AUX_MASK); if (!exaOpReadsDestination(op)) { if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height)) - return; + goto skip; exaGetDrawableDeltas (pDst->pDrawable, exaGetDrawablePixmap(pDst->pDrawable), @@ -331,13 +414,13 @@ ExaCheckComposite (CARD8 op, REGION_TRANSLATE(pScreen, ®ion, xoff, yoff); if (pDst->alphaMap && pDst->alphaMap->pDrawable) - exaPrepareAccessReg(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX0, + exaPrepareAccessReg(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX_DEST, ®ion); exaPrepareAccessReg (pDst->pDrawable, EXA_PREPARE_DEST, ®ion); } else { if (pDst->alphaMap && pDst->alphaMap->pDrawable) - exaPrepareAccess(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX0); + exaPrepareAccess(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX_DEST); exaPrepareAccess (pDst->pDrawable, EXA_PREPARE_DEST); } @@ -349,7 +432,9 @@ ExaCheckComposite (CARD8 op, exaPrepareAccess (pSrc->pDrawable, EXA_PREPARE_SRC); if (pMask && pMask->pDrawable != NULL) exaPrepareAccess (pMask->pDrawable, EXA_PREPARE_MASK); - fbComposite (op, +#ifdef RENDER + swap(pExaScr, ps, Composite); + ps->Composite (op, pSrc, pMask, pDst, @@ -361,17 +446,21 @@ ExaCheckComposite (CARD8 op, yDst, width, height); + swap(pExaScr, ps, Composite); +#endif /* RENDER */ if (pMask && pMask->pDrawable != NULL) exaFinishAccess (pMask->pDrawable, EXA_PREPARE_MASK); - if (pMask && pMask->alphaMap && pMask->alphaMap->pDrawable) - exaFinishAccess(pMask->alphaMap->pDrawable, EXA_PREPARE_AUX1); if (pSrc->pDrawable != NULL) exaFinishAccess (pSrc->pDrawable, EXA_PREPARE_SRC); - if (pSrc->alphaMap && pSrc->alphaMap->pDrawable) - exaFinishAccess(pSrc->alphaMap->pDrawable, EXA_PREPARE_AUX2); exaFinishAccess (pDst->pDrawable, EXA_PREPARE_DEST); if (pDst->alphaMap && pDst->alphaMap->pDrawable) - exaFinishAccess(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX0); + exaFinishAccess(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX_DEST); + +skip: + if (pSrc->alphaMap && pSrc->alphaMap->pDrawable) + exaFinishAccess(pSrc->alphaMap->pDrawable, EXA_PREPARE_AUX_SRC); + if (pMask && pMask->alphaMap && pMask->alphaMap->pDrawable) + exaFinishAccess(pMask->alphaMap->pDrawable, EXA_PREPARE_AUX_MASK); REGION_UNINIT(pScreen, ®ion); } @@ -383,68 +472,57 @@ ExaCheckAddTraps (PicturePtr pPicture, int ntrap, xTrap *traps) { + ScreenPtr pScreen = pPicture->pDrawable->pScreen; +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreen(pScreen); +#endif /* RENDER */ + ExaScreenPriv(pScreen); + EXA_FALLBACK(("to pict %p (%c)\n", exaDrawableLocation(pPicture->pDrawable))); exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); - fbAddTraps (pPicture, x_off, y_off, ntrap, traps); +#ifdef RENDER + swap(pExaScr, ps, AddTraps); + ps->AddTraps (pPicture, x_off, y_off, ntrap, traps); + swap(pExaScr, ps, AddTraps); +#endif /* RENDER */ exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); } /** * Gets the 0,0 pixel of a pixmap. Used for doing solid fills of tiled pixmaps * that happen to be 1x1. Pixmap must be at least 8bpp. - * - * XXX This really belongs in fb, so it can be aware of tiling and etc. */ CARD32 exaGetPixmapFirstPixel (PixmapPtr pPixmap) { - CARD32 pixel; - void *fb; - Bool need_finish = FALSE; - BoxRec box; - RegionRec migration; - ExaPixmapPriv (pPixmap); - Bool sys_valid = pExaPixmap->pDamage && - !miPointInRegion(&pExaPixmap->validSys, 0, 0, &box); - Bool damaged = pExaPixmap->pDamage && - miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0, &box); - Bool offscreen = exaPixmapIsOffscreen(pPixmap); - - fb = pExaPixmap->sys_ptr; - - /* Try to avoid framebuffer readbacks */ - if ((!offscreen && !sys_valid && !damaged) || - (offscreen && (!sys_valid || damaged))) - { - box.x1 = 0; - box.y1 = 0; - box.x2 = 1; - box.y2 = 1; - REGION_INIT(pScreen, &migration, &box, 1); - - need_finish = TRUE; - - exaPrepareAccessReg(&pPixmap->drawable, EXA_PREPARE_SRC, &migration); - fb = pPixmap->devPrivate.ptr; - } - switch (pPixmap->drawable.bitsPerPixel) { case 32: - pixel = *(CARD32 *)fb; - break; + { + CARD32 pixel; + + pPixmap->drawable.pScreen->GetImage(&pPixmap->drawable, 0, 0, 1, 1, + ZPixmap, ~0, (char*)&pixel); + return pixel; + } case 16: - pixel = *(CARD16 *)fb; - break; + { + CARD16 pixel; + + pPixmap->drawable.pScreen->GetImage(&pPixmap->drawable, 0, 0, 1, 1, + ZPixmap, ~0, (char*)&pixel); + return pixel; + } + case 8: + { + CARD8 pixel; + + pPixmap->drawable.pScreen->GetImage(&pPixmap->drawable, 0, 0, 1, 1, + ZPixmap, ~0, (char*)&pixel); + return pixel; + } default: - pixel = *(CARD8 *)fb; - break; - } - - if (need_finish) { - exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC); - REGION_UNINIT(pScreen, &migration); + FatalError("%s called for invalid bpp %d\n", __func__, + pPixmap->drawable.bitsPerPixel); } - - return pixel; } diff --git a/xorg-server/fb/Makefile.am b/xorg-server/fb/Makefile.am index 399426933..64e49f345 100644 --- a/xorg-server/fb/Makefile.am +++ b/xorg-server/fb/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = \ AM_CFLAGS = $(DIX_CFLAGS) if XORG -sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h +sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h endif libfb_la_CFLAGS = $(AM_CFLAGS) diff --git a/xorg-server/fb/Makefile.in b/xorg-server/fb/Makefile.in index 9e240a845..8a5bd3918 100644 --- a/xorg-server/fb/Makefile.in +++ b/xorg-server/fb/Makefile.in @@ -39,8 +39,11 @@ subdir = fb DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -99,7 +103,7 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) DIST_SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) -am__sdk_HEADERS_DIST = fb.h fbrop.h fboverlay.h wfbrename.h +am__sdk_HEADERS_DIST = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -131,6 +135,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -151,9 +156,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -182,7 +190,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -191,9 +201,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -232,12 +246,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -257,7 +272,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -267,6 +281,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -280,11 +295,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -320,6 +334,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -344,7 +359,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -367,6 +381,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -398,7 +413,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -411,7 +428,7 @@ INCLUDES = \ -I$(top_srcdir)/hw/xfree86/common AM_CFLAGS = $(DIX_CFLAGS) -@XORG_TRUE@sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h +@XORG_TRUE@sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h libfb_la_CFLAGS = $(AM_CFLAGS) libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libfb_la_SOURCES = \ diff --git a/xorg-server/fb/fb.h b/xorg-server/fb/fb.h index 4572af612..2d3c85d44 100644 --- a/xorg-server/fb/fb.h +++ b/xorg-server/fb/fb.h @@ -167,9 +167,9 @@ typedef int FbStride; #ifdef FB_DEBUG -extern void fbValidateDrawable(DrawablePtr d); -extern void fbInitializeDrawable(DrawablePtr d); -extern void fbSetBits (FbStip *bits, int stride, FbStip data); +extern _X_EXPORT void fbValidateDrawable(DrawablePtr d); +extern _X_EXPORT void fbInitializeDrawable(DrawablePtr d); +extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data); #define FB_HEAD_BITS (FbStip) (0xbaadf00d) #define FB_TAIL_BITS (FbStip) (0xbaddf0ad) #else @@ -595,10 +595,10 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data); } \ } -extern DevPrivateKey fbGetGCPrivateKey(void); -extern DevPrivateKey fbGetWinPrivateKey(void); -extern const GCOps fbGCOps; -extern const GCFuncs fbGCFuncs; +extern _X_EXPORT DevPrivateKey fbGetGCPrivateKey(void); +extern _X_EXPORT DevPrivateKey fbGetWinPrivateKey(void); +extern _X_EXPORT const GCOps fbGCOps; +extern _X_EXPORT const GCFuncs fbGCFuncs; #ifdef FB_24_32BIT #define FB_SCREEN_PRIVATE @@ -631,7 +631,7 @@ typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw); #ifdef FB_SCREEN_PRIVATE -extern DevPrivateKey fbGetScreenPrivateKey(void); +extern _X_EXPORT DevPrivateKey fbGetScreenPrivateKey(void); /* private field of a screen */ typedef struct { @@ -749,7 +749,7 @@ typedef struct { /* * fb24_32.c */ -void +extern _X_EXPORT void fb24_32GetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, @@ -757,7 +757,7 @@ fb24_32GetSpans(DrawablePtr pDrawable, int nspans, char *pchardstStart); -void +extern _X_EXPORT void fb24_32SetSpans (DrawablePtr pDrawable, GCPtr pGC, char *src, @@ -766,7 +766,7 @@ fb24_32SetSpans (DrawablePtr pDrawable, int nspans, int fSorted); -void +extern _X_EXPORT void fb24_32PutZImage (DrawablePtr pDrawable, RegionPtr pClip, int alu, @@ -778,7 +778,7 @@ fb24_32PutZImage (DrawablePtr pDrawable, CARD8 *src, FbStride srcStride); -void +extern _X_EXPORT void fb24_32GetImage (DrawablePtr pDrawable, int x, int y, @@ -788,7 +788,7 @@ fb24_32GetImage (DrawablePtr pDrawable, unsigned long planeMask, char *d); -void +extern _X_EXPORT void fb24_32CopyMtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -801,13 +801,13 @@ fb24_32CopyMtoN (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -PixmapPtr +extern _X_EXPORT PixmapPtr fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel); -Bool +extern _X_EXPORT Bool fb24_32CreateScreenResources(ScreenPtr pScreen); -Bool +extern _X_EXPORT Bool fb24_32ModifyPixmapHeader (PixmapPtr pPixmap, int width, int height, @@ -819,14 +819,16 @@ fb24_32ModifyPixmapHeader (PixmapPtr pPixmap, /* * fballpriv.c */ -Bool +extern _X_EXPORT DevPrivateKey fbGetWinPrivateKey(void); + +extern _X_EXPORT Bool fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCIndex); /* * fbarc.c */ -void +extern _X_EXPORT void fbPolyArc (DrawablePtr pDrawable, GCPtr pGC, int narcs, @@ -836,7 +838,7 @@ fbPolyArc (DrawablePtr pDrawable, * fbbits.c */ -void +extern _X_EXPORT void fbBresSolid8(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -850,7 +852,7 @@ fbBresSolid8(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbBresDash8 (DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -864,7 +866,7 @@ fbBresDash8 (DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbDots8 (FbBits *dst, FbStride dstStride, int dstBpp, @@ -878,7 +880,7 @@ fbDots8 (FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbArc8 (FbBits *dst, FbStride dstStride, int dstBpp, @@ -888,7 +890,7 @@ fbArc8 (FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbGlyph8 (FbBits *dstLine, FbStride dstStride, int dstBpp, @@ -897,20 +899,20 @@ fbGlyph8 (FbBits *dstLine, int height, int shift); -void +extern _X_EXPORT void fbPolyline8 (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); -void +extern _X_EXPORT void fbPolySegment8 (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pseg); -void +extern _X_EXPORT void fbBresSolid16(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -924,7 +926,7 @@ fbBresSolid16(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbBresDash16(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -938,7 +940,7 @@ fbBresDash16(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbDots16(FbBits *dst, FbStride dstStride, int dstBpp, @@ -952,7 +954,7 @@ fbDots16(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbArc16(FbBits *dst, FbStride dstStride, int dstBpp, @@ -962,7 +964,7 @@ fbArc16(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbGlyph16(FbBits *dstLine, FbStride dstStride, int dstBpp, @@ -971,21 +973,21 @@ fbGlyph16(FbBits *dstLine, int height, int shift); -void +extern _X_EXPORT void fbPolyline16 (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); -void +extern _X_EXPORT void fbPolySegment16 (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pseg); -void +extern _X_EXPORT void fbBresSolid24(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -999,7 +1001,7 @@ fbBresSolid24(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbBresDash24(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -1013,7 +1015,7 @@ fbBresDash24(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbDots24(FbBits *dst, FbStride dstStride, int dstBpp, @@ -1027,7 +1029,7 @@ fbDots24(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbArc24(FbBits *dst, FbStride dstStride, int dstBpp, @@ -1037,7 +1039,7 @@ fbArc24(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbGlyph24(FbBits *dstLine, FbStride dstStride, int dstBpp, @@ -1046,21 +1048,21 @@ fbGlyph24(FbBits *dstLine, int height, int shift); -void +extern _X_EXPORT void fbPolyline24 (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); -void +extern _X_EXPORT void fbPolySegment24 (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pseg); -void +extern _X_EXPORT void fbBresSolid32(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -1074,7 +1076,7 @@ fbBresSolid32(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbBresDash32(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -1088,7 +1090,7 @@ fbBresDash32(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbDots32(FbBits *dst, FbStride dstStride, int dstBpp, @@ -1102,7 +1104,7 @@ fbDots32(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbArc32(FbBits *dst, FbStride dstStride, int dstBpp, @@ -1112,7 +1114,7 @@ fbArc32(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbGlyph32(FbBits *dstLine, FbStride dstStride, int dstBpp, @@ -1120,14 +1122,14 @@ fbGlyph32(FbBits *dstLine, FbBits fg, int height, int shift); -void +extern _X_EXPORT void fbPolyline32 (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); -void +extern _X_EXPORT void fbPolySegment32 (DrawablePtr pDrawable, GCPtr pGC, int nseg, @@ -1136,7 +1138,7 @@ fbPolySegment32 (DrawablePtr pDrawable, /* * fbblt.c */ -void +extern _X_EXPORT void fbBlt (FbBits *src, FbStride srcStride, int srcX, @@ -1155,7 +1157,7 @@ fbBlt (FbBits *src, Bool reverse, Bool upsidedown); -void +extern _X_EXPORT void fbBlt24 (FbBits *srcLine, FbStride srcStride, int srcX, @@ -1173,7 +1175,7 @@ fbBlt24 (FbBits *srcLine, Bool reverse, Bool upsidedown); -void +extern _X_EXPORT void fbBltStip (FbStip *src, FbStride srcStride, /* in FbStip units, not FbBits units */ int srcX, @@ -1192,7 +1194,7 @@ fbBltStip (FbStip *src, /* * fbbltone.c */ -void +extern _X_EXPORT void fbBltOne (FbStip *src, FbStride srcStride, int srcX, @@ -1210,7 +1212,7 @@ fbBltOne (FbStip *src, FbBits bgxor); #ifdef FB_24BIT -void +extern _X_EXPORT void fbBltOne24 (FbStip *src, FbStride srcStride, /* FbStip units per scanline */ int srcX, /* bit position of source */ @@ -1228,7 +1230,7 @@ fbBltOne24 (FbStip *src, FbBits bgxor); #endif -void +extern _X_EXPORT void fbBltPlane (FbBits *src, FbStride srcStride, int srcX, @@ -1250,47 +1252,47 @@ fbBltPlane (FbBits *src, /* * fbcmap.c */ -int +extern _X_EXPORT int fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps); -void +extern _X_EXPORT void fbInstallColormap(ColormapPtr pmap); -void +extern _X_EXPORT void fbUninstallColormap(ColormapPtr pmap); -void +extern _X_EXPORT void fbResolveColor(unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, VisualPtr pVisual); -Bool +extern _X_EXPORT Bool fbInitializeColormap(ColormapPtr pmap); -int +extern _X_EXPORT int fbExpandDirectColors (ColormapPtr pmap, int ndef, xColorItem *indefs, xColorItem *outdefs); -Bool +extern _X_EXPORT Bool fbCreateDefColormap(ScreenPtr pScreen); -void +extern _X_EXPORT void fbClearVisualTypes(void); -Bool +extern _X_EXPORT Bool fbHasVisualTypes (int depth); -Bool +extern _X_EXPORT Bool fbSetVisualTypes (int depth, int visuals, int bitsPerRGB); -Bool +extern _X_EXPORT Bool fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB, Pixel redMask, Pixel greenMask, Pixel blueMask); -Bool +extern _X_EXPORT Bool fbInitVisuals (VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, @@ -1304,19 +1306,20 @@ fbInitVisuals (VisualPtr *visualp, * fbcopy.c */ -typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pDstBox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure); - -void +/* Compatibility definition, to be removed at next ABI change. */ +typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pDstBox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +extern _X_EXPORT void fbCopyNtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1329,7 +1332,34 @@ fbCopyNtoN (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -void +/* Compatibility wrapper, to be removed at next ABI change. */ +extern _X_EXPORT void +fbCopyRegion (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + RegionPtr pDstRegion, + int dx, + int dy, + fbCopyProc copyProc, + Pixel bitPlane, + void *closure); + +/* Compatibility wrapper, to be removed at next ABI change. */ +extern _X_EXPORT RegionPtr +fbDoCopy (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + fbCopyProc copyProc, + Pixel bitplane, + void *closure); + +extern _X_EXPORT void fbCopy1toN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1342,7 +1372,7 @@ fbCopy1toN (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -void +extern _X_EXPORT void fbCopyNto1 (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1355,32 +1385,7 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -void -fbCopyRegion (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - RegionPtr pDstRegion, - int dx, - int dy, - fbCopyProc copyProc, - Pixel bitPlane, - void *closure); - -RegionPtr -fbDoCopy (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - int xIn, - int yIn, - int widthSrc, - int heightSrc, - int xOut, - int yOut, - fbCopyProc copyProc, - Pixel bitplane, - void *closure); - -RegionPtr +extern _X_EXPORT RegionPtr fbCopyArea (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1391,7 +1396,7 @@ fbCopyArea (DrawablePtr pSrcDrawable, int xOut, int yOut); -RegionPtr +extern _X_EXPORT RegionPtr fbCopyPlane (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1406,7 +1411,7 @@ fbCopyPlane (DrawablePtr pSrcDrawable, /* * fbfill.c */ -void +extern _X_EXPORT void fbFill (DrawablePtr pDrawable, GCPtr pGC, int x, @@ -1414,7 +1419,7 @@ fbFill (DrawablePtr pDrawable, int width, int height); -void +extern _X_EXPORT void fbSolidBoxClipped (DrawablePtr pDrawable, RegionPtr pClip, int xa, @@ -1427,7 +1432,7 @@ fbSolidBoxClipped (DrawablePtr pDrawable, /* * fbfillrect.c */ -void +extern _X_EXPORT void fbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectInit, @@ -1440,7 +1445,7 @@ fbPolyFillRect(DrawablePtr pDrawable, /* * fbfillsp.c */ -void +extern _X_EXPORT void fbFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nInit, @@ -1453,19 +1458,19 @@ fbFillSpans (DrawablePtr pDrawable, * fbgc.c */ -Bool +extern _X_EXPORT Bool fbCreateGC(GCPtr pGC); -void +extern _X_EXPORT void fbPadPixmap (PixmapPtr pPixmap); -void +extern _X_EXPORT void fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); /* * fbgetsp.c */ -void +extern _X_EXPORT void fbGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, @@ -1477,14 +1482,14 @@ fbGetSpans(DrawablePtr pDrawable, * fbglyph.c */ -Bool +extern _X_EXPORT Bool fbGlyphIn (RegionPtr pRegion, int x, int y, int width, int height); -void +extern _X_EXPORT void fbPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, int x, @@ -1493,7 +1498,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable, CharInfoPtr *ppci, pointer pglyphBase); -void +extern _X_EXPORT void fbImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, int x, @@ -1506,7 +1511,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable, * fbimage.c */ -void +extern _X_EXPORT void fbPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, @@ -1518,7 +1523,7 @@ fbPutImage (DrawablePtr pDrawable, int format, char *pImage); -void +extern _X_EXPORT void fbPutZImage (DrawablePtr pDrawable, RegionPtr pClip, int alu, @@ -1530,7 +1535,7 @@ fbPutZImage (DrawablePtr pDrawable, FbStip *src, FbStride srcStride); -void +extern _X_EXPORT void fbPutXYImage (DrawablePtr pDrawable, RegionPtr pClip, FbBits fg, @@ -1548,7 +1553,7 @@ fbPutXYImage (DrawablePtr pDrawable, FbStride srcStride, int srcX); -void +extern _X_EXPORT void fbGetImage (DrawablePtr pDrawable, int x, int y, @@ -1561,31 +1566,31 @@ fbGetImage (DrawablePtr pDrawable, * fbline.c */ -void +extern _X_EXPORT void fbZeroLine (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt); -void +extern _X_EXPORT void fbZeroSegment (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs); -void +extern _X_EXPORT void fbPolyLine (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt); -void +extern _X_EXPORT void fbFixCoordModePrevious (int npt, DDXPointPtr ppt); -void +extern _X_EXPORT void fbPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg, @@ -1597,7 +1602,7 @@ fbPolySegment (DrawablePtr pDrawable, * fbpict.c */ -Bool +extern _X_EXPORT Bool fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); @@ -1606,25 +1611,25 @@ fbPictureInit (ScreenPtr pScreen, * fbpixmap.c */ -PixmapPtr +extern _X_EXPORT PixmapPtr fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp, unsigned usage_hint); -PixmapPtr +extern _X_EXPORT PixmapPtr fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint); -Bool +extern _X_EXPORT Bool fbDestroyPixmap (PixmapPtr pPixmap); -RegionPtr +extern _X_EXPORT RegionPtr fbPixmapToRegion(PixmapPtr pPix); /* * fbpoint.c */ -void +extern _X_EXPORT void fbDots (FbBits *dstOrig, FbStride dstStride, int dstBpp, @@ -1638,7 +1643,7 @@ fbDots (FbBits *dstOrig, FbBits andOrig, FbBits xorOrig); -void +extern _X_EXPORT void fbPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, @@ -1648,7 +1653,7 @@ fbPolyPoint (DrawablePtr pDrawable, /* * fbpush.c */ -void +extern _X_EXPORT void fbPushPattern (DrawablePtr pDrawable, GCPtr pGC, @@ -1662,7 +1667,7 @@ fbPushPattern (DrawablePtr pDrawable, int width, int height); -void +extern _X_EXPORT void fbPushFill (DrawablePtr pDrawable, GCPtr pGC, @@ -1675,20 +1680,7 @@ fbPushFill (DrawablePtr pDrawable, int width, int height); -void -fbPush1toN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure); - -void +extern _X_EXPORT void fbPushImage (DrawablePtr pDrawable, GCPtr pGC, @@ -1701,7 +1693,7 @@ fbPushImage (DrawablePtr pDrawable, int width, int height); -void +extern _X_EXPORT void fbPushPixels (GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, @@ -1715,27 +1707,27 @@ fbPushPixels (GCPtr pGC, * fbscreen.c */ -Bool +extern _X_EXPORT Bool fbCloseScreen (int indx, ScreenPtr pScreen); -Bool +extern _X_EXPORT Bool fbRealizeFont(ScreenPtr pScreen, FontPtr pFont); -Bool +extern _X_EXPORT Bool fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont); -void +extern _X_EXPORT void fbQueryBestSize (int class, unsigned short *width, unsigned short *height, ScreenPtr pScreen); -PixmapPtr +extern _X_EXPORT PixmapPtr _fbGetWindowPixmap (WindowPtr pWindow); -void +extern _X_EXPORT void _fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap); -Bool +extern _X_EXPORT Bool fbSetupScreen(ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */ int xsize, /* in pixels */ @@ -1745,7 +1737,7 @@ fbSetupScreen(ScreenPtr pScreen, int width, /* pixel width of frame buffer */ int bpp); /* bits per pixel of frame buffer */ -Bool +extern _X_EXPORT Bool wfbFinishScreenInit(ScreenPtr pScreen, pointer pbits, int xsize, @@ -1757,7 +1749,7 @@ wfbFinishScreenInit(ScreenPtr pScreen, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap); -Bool +extern _X_EXPORT Bool wfbScreenInit(ScreenPtr pScreen, pointer pbits, int xsize, @@ -1769,7 +1761,7 @@ wfbScreenInit(ScreenPtr pScreen, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap); -Bool +extern _X_EXPORT Bool fbFinishScreenInit(ScreenPtr pScreen, pointer pbits, int xsize, @@ -1779,7 +1771,7 @@ fbFinishScreenInit(ScreenPtr pScreen, int width, int bpp); -Bool +extern _X_EXPORT Bool fbScreenInit(ScreenPtr pScreen, pointer pbits, int xsize, @@ -1788,9 +1780,6 @@ fbScreenInit(ScreenPtr pScreen, int dpiy, int width, int bpp); - -void -fbInitializeBackingStore (ScreenPtr pScreen); /* * fbseg.c @@ -1808,12 +1797,12 @@ typedef void FbBres (DrawablePtr pDrawable, int e3, int len); -FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash; +extern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash; /* * fbsetsp.c */ -void +extern _X_EXPORT void fbSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *src, @@ -1822,11 +1811,11 @@ fbSetSpans (DrawablePtr pDrawable, int nspans, int fSorted); -FbBres * +extern _X_EXPORT FbBres * fbSelectBres (DrawablePtr pDrawable, GCPtr pGC); -void +extern _X_EXPORT void fbBres (DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -1840,7 +1829,7 @@ fbBres (DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbSegment (DrawablePtr pDrawable, GCPtr pGC, int xa, @@ -1855,7 +1844,7 @@ fbSegment (DrawablePtr pDrawable, * fbsolid.c */ -void +extern _X_EXPORT void fbSolid (FbBits *dst, FbStride dstStride, int dstX, @@ -1868,7 +1857,7 @@ fbSolid (FbBits *dst, FbBits xor); #ifdef FB_24BIT -void +extern _X_EXPORT void fbSolid24 (FbBits *dst, FbStride dstStride, int dstX, @@ -1884,13 +1873,13 @@ fbSolid24 (FbBits *dst, * fbstipple.c */ -void +extern _X_EXPORT void fbTransparentSpan (FbBits *dst, FbBits stip, FbBits fgxor, int n); -void +extern _X_EXPORT void fbEvenStipple (FbBits *dst, FbStride dstStride, int dstX, @@ -1911,7 +1900,7 @@ fbEvenStipple (FbBits *dst, int xRot, int yRot); -void +extern _X_EXPORT void fbOddStipple (FbBits *dst, FbStride dstStride, int dstX, @@ -1933,7 +1922,7 @@ fbOddStipple (FbBits *dst, int xRot, int yRot); -void +extern _X_EXPORT void fbStipple (FbBits *dst, FbStride dstStride, int dstX, @@ -1960,7 +1949,7 @@ fbStipple (FbBits *dst, * fbtile.c */ -void +extern _X_EXPORT void fbEvenTile (FbBits *dst, FbStride dstStride, int dstX, @@ -1977,7 +1966,7 @@ fbEvenTile (FbBits *dst, int xRot, int yRot); -void +extern _X_EXPORT void fbOddTile (FbBits *dst, FbStride dstStride, int dstX, @@ -1997,7 +1986,7 @@ fbOddTile (FbBits *dst, int xRot, int yRot); -void +extern _X_EXPORT void fbTile (FbBits *dst, FbStride dstStride, int dstX, @@ -2020,37 +2009,37 @@ fbTile (FbBits *dst, /* * fbutil.c */ -FbBits +extern _X_EXPORT FbBits fbReplicatePixel (Pixel p, int bpp); -void +extern _X_EXPORT void fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp); #ifdef FB_ACCESS_WRAPPER -extern ReadMemoryProcPtr wfbReadMemory; -extern WriteMemoryProcPtr wfbWriteMemory; +extern _X_EXPORT ReadMemoryProcPtr wfbReadMemory; +extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory; #endif /* * fbwindow.c */ -Bool +extern _X_EXPORT Bool fbCreateWindow(WindowPtr pWin); -Bool +extern _X_EXPORT Bool fbDestroyWindow(WindowPtr pWin); -Bool +extern _X_EXPORT Bool fbMapWindow(WindowPtr pWindow); -Bool +extern _X_EXPORT Bool fbPositionWindow(WindowPtr pWin, int x, int y); -Bool +extern _X_EXPORT Bool fbUnmapWindow(WindowPtr pWindow); -void +extern _X_EXPORT void fbCopyWindowProc (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -2063,23 +2052,25 @@ fbCopyWindowProc (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -void +extern _X_EXPORT void fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); -Bool +extern _X_EXPORT Bool fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask); -void +extern _X_EXPORT void fbFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, FbBits and, FbBits xor); -pixman_image_t *image_from_pict (PicturePtr pict, - Bool has_clip); -void free_pixman_pict (PicturePtr, pixman_image_t *); +extern _X_EXPORT pixman_image_t * +image_from_pict (PicturePtr pict, + Bool has_clip, + Bool is_src); +extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *); #endif /* _FB_H_ */ diff --git a/xorg-server/fb/fbcmap.c b/xorg-server/fb/fbcmap.c index c29a5131c..207c6aefc 100644 --- a/xorg-server/fb/fbcmap.c +++ b/xorg-server/fb/fbcmap.c @@ -85,8 +85,10 @@ fbUninstallColormap(ColormapPtr pmap) { if (pmap->mid != pmap->pScreen->defColormap) { - curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&curpmap, + pmap->pScreen->defColormap, + RT_COLORMAP, + serverClient, DixInstallAccess); (*pmap->pScreen->InstallColormap)(curpmap); } } diff --git a/xorg-server/fb/fbcopy.c b/xorg-server/fb/fbcopy.c index b8b0b6a8c..07eb663c6 100644 --- a/xorg-server/fb/fbcopy.c +++ b/xorg-server/fb/fbcopy.c @@ -28,6 +28,39 @@ #include "fb.h" +/* Compatibility wrapper, to be removed at next ABI change. */ +void +fbCopyRegion (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + RegionPtr pDstRegion, + int dx, + int dy, + fbCopyProc copyProc, + Pixel bitPlane, + void *closure) +{ + miCopyRegion(pSrcDrawable, pDstDrawable, pGC, pDstRegion, dx, dy, copyProc, bitPlane, closure); +} + +/* Compatibility wrapper, to be removed at next ABI change. */ +RegionPtr +fbDoCopy (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + fbCopyProc copyProc, + Pixel bitPlane, + void *closure) +{ + return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, copyProc, bitPlane, closure); +} + void fbCopyNtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, @@ -289,329 +322,6 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, } } -void -fbCopyRegion (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - RegionPtr pDstRegion, - int dx, - int dy, - fbCopyProc copyProc, - Pixel bitPlane, - void *closure) -{ - int careful; - Bool reverse; - Bool upsidedown; - BoxPtr pbox; - int nbox; - BoxPtr pboxNew1, pboxNew2, pboxBase, pboxNext, pboxTmp; - - pbox = REGION_RECTS(pDstRegion); - nbox = REGION_NUM_RECTS(pDstRegion); - - /* XXX we have to err on the side of safety when both are windows, - * because we don't know if IncludeInferiors is being used. - */ - careful = ((pSrcDrawable == pDstDrawable) || - ((pSrcDrawable->type == DRAWABLE_WINDOW) && - (pDstDrawable->type == DRAWABLE_WINDOW))); - - pboxNew1 = NULL; - pboxNew2 = NULL; - if (careful && dy < 0) - { - upsidedown = TRUE; - - if (nbox > 1) - { - /* keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - if(!pboxNew1) - return; - pboxBase = pboxNext = pbox+nbox-1; - while (pboxBase >= pbox) - { - while ((pboxNext >= pbox) && - (pboxBase->y1 == pboxNext->y1)) - pboxNext--; - pboxTmp = pboxNext+1; - while (pboxTmp <= pboxBase) - { - *pboxNew1++ = *pboxTmp++; - } - pboxBase = pboxNext; - } - pboxNew1 -= nbox; - pbox = pboxNew1; - } - } - else - { - /* walk source top to bottom */ - upsidedown = FALSE; - } - - if (careful && dx < 0) - { - /* walk source right to left */ - if (dy <= 0) - reverse = TRUE; - else - reverse = FALSE; - - if (nbox > 1) - { - /* reverse order of rects in each band */ - pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - if(!pboxNew2) - { - if (pboxNew1) - xfree(pboxNew1); - return; - } - pboxBase = pboxNext = pbox; - while (pboxBase < pbox+nbox) - { - while ((pboxNext < pbox+nbox) && - (pboxNext->y1 == pboxBase->y1)) - pboxNext++; - pboxTmp = pboxNext; - while (pboxTmp != pboxBase) - { - *pboxNew2++ = *--pboxTmp; - } - pboxBase = pboxNext; - } - pboxNew2 -= nbox; - pbox = pboxNew2; - } - } - else - { - /* walk source left to right */ - reverse = FALSE; - } - - (*copyProc) (pSrcDrawable, - pDstDrawable, - pGC, - pbox, - nbox, - dx, dy, - reverse, upsidedown, bitPlane, closure); - - if (pboxNew1) - xfree (pboxNew1); - if (pboxNew2) - xfree (pboxNew2); -} - -RegionPtr -fbDoCopy (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - int xIn, - int yIn, - int widthSrc, - int heightSrc, - int xOut, - int yOut, - fbCopyProc copyProc, - Pixel bitPlane, - void *closure) -{ - RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ - Bool freeSrcClip = FALSE; - RegionPtr prgnExposed = NULL; - RegionRec rgnDst; - int dx; - int dy; - int numRects; - int box_x1; - int box_y1; - int box_x2; - int box_y2; - Bool fastSrc = FALSE; /* for fast clipping with pixmap source */ - Bool fastDst = FALSE; /* for fast clipping with one rect dest */ - Bool fastExpose = FALSE; /* for fast exposures with pixmap source */ - - /* Short cut for unmapped windows */ - - if (pDstDrawable->type == DRAWABLE_WINDOW && - !((WindowPtr)pDstDrawable)->realized) - { - return NULL; - } - - if ((pSrcDrawable != pDstDrawable) && - pSrcDrawable->pScreen->SourceValidate) - { - (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc); - } - - /* Compute source clip region */ - if (pSrcDrawable->type == DRAWABLE_PIXMAP) - { - if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE)) - prgnSrcClip = fbGetCompositeClip(pGC); - else - fastSrc = TRUE; - } - else - { - if (pGC->subWindowMode == IncludeInferiors) - { - /* - * XFree86 DDX empties the border clip when the - * VT is inactive, make sure the region isn't empty - */ - if (!((WindowPtr) pSrcDrawable)->parent && - REGION_NOTEMPTY (pSrcDrawable->pScreen, - &((WindowPtr) pSrcDrawable)->borderClip)) - { - /* - * special case bitblt from root window in - * IncludeInferiors mode; just like from a pixmap - */ - fastSrc = TRUE; - } - else if ((pSrcDrawable == pDstDrawable) && - (pGC->clientClipType == CT_NONE)) - { - prgnSrcClip = fbGetCompositeClip(pGC); - } - else - { - prgnSrcClip = NotClippedByChildren((WindowPtr)pSrcDrawable); - freeSrcClip = TRUE; - } - } - else - { - prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; - } - } - - xIn += pSrcDrawable->x; - yIn += pSrcDrawable->y; - - xOut += pDstDrawable->x; - yOut += pDstDrawable->y; - - box_x1 = xIn; - box_y1 = yIn; - box_x2 = xIn + widthSrc; - box_y2 = yIn + heightSrc; - - dx = xIn - xOut; - dy = yIn - yOut; - - /* Don't create a source region if we are doing a fast clip */ - if (fastSrc) - { - RegionPtr cclip; - - fastExpose = TRUE; - /* - * clip the source; if regions extend beyond the source size, - * make sure exposure events get sent - */ - if (box_x1 < pSrcDrawable->x) - { - box_x1 = pSrcDrawable->x; - fastExpose = FALSE; - } - if (box_y1 < pSrcDrawable->y) - { - box_y1 = pSrcDrawable->y; - fastExpose = FALSE; - } - if (box_x2 > pSrcDrawable->x + (int) pSrcDrawable->width) - { - box_x2 = pSrcDrawable->x + (int) pSrcDrawable->width; - fastExpose = FALSE; - } - if (box_y2 > pSrcDrawable->y + (int) pSrcDrawable->height) - { - box_y2 = pSrcDrawable->y + (int) pSrcDrawable->height; - fastExpose = FALSE; - } - - /* Translate and clip the dst to the destination composite clip */ - box_x1 -= dx; - box_x2 -= dx; - box_y1 -= dy; - box_y2 -= dy; - - /* If the destination composite clip is one rectangle we can - do the clip directly. Otherwise we have to create a full - blown region and call intersect */ - - cclip = fbGetCompositeClip(pGC); - if (REGION_NUM_RECTS(cclip) == 1) - { - BoxPtr pBox = REGION_RECTS(cclip); - - if (box_x1 < pBox->x1) box_x1 = pBox->x1; - if (box_x2 > pBox->x2) box_x2 = pBox->x2; - if (box_y1 < pBox->y1) box_y1 = pBox->y1; - if (box_y2 > pBox->y2) box_y2 = pBox->y2; - fastDst = TRUE; - } - } - - /* Check to see if the region is empty */ - if (box_x1 >= box_x2 || box_y1 >= box_y2) - { - REGION_NULL(pGC->pScreen, &rgnDst); - } - else - { - BoxRec box; - box.x1 = box_x1; - box.y1 = box_y1; - box.x2 = box_x2; - box.y2 = box_y2; - REGION_INIT(pGC->pScreen, &rgnDst, &box, 1); - } - - /* Clip against complex source if needed */ - if (!fastSrc) - { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); - REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); - } - - /* Clip against complex dest if needed */ - if (!fastDst) - { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, - fbGetCompositeClip(pGC)); - } - - /* Do bit blitting */ - numRects = REGION_NUM_RECTS(&rgnDst); - if (numRects && widthSrc && heightSrc) - fbCopyRegion (pSrcDrawable, pDstDrawable, pGC, - &rgnDst, dx, dy, copyProc, bitPlane, closure); - - /* Pixmap sources generate a NoExposed (we return NULL to do this) */ - if (!fastExpose && pGC->fExpose) - prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, - xIn - pSrcDrawable->x, - yIn - pSrcDrawable->y, - widthSrc, heightSrc, - xOut - pDstDrawable->x, - yOut - pDstDrawable->y, - (unsigned long) bitPlane); - REGION_UNINIT(pGC->pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); - fbValidateDrawable (pDstDrawable); - return prgnExposed; -} - RegionPtr fbCopyArea (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, @@ -623,7 +333,7 @@ fbCopyArea (DrawablePtr pSrcDrawable, int xOut, int yOut) { - fbCopyProc copy; + miCopyProc copy; #ifdef FB_24_32BIT if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel) @@ -631,7 +341,7 @@ fbCopyArea (DrawablePtr pSrcDrawable, else #endif copy = fbCopyNtoN; - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, + return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, copy, 0, 0); } @@ -648,11 +358,11 @@ fbCopyPlane (DrawablePtr pSrcDrawable, unsigned long bitplane) { if (pSrcDrawable->bitsPerPixel > 1) - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, + return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, fbCopyNto1, (Pixel) bitplane, 0); else if (bitplane & 1) - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, + return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, fbCopy1toN, (Pixel) bitplane, 0); else diff --git a/xorg-server/fb/fboverlay.c b/xorg-server/fb/fboverlay.c index 1432cb6f0..99939e8bf 100644 --- a/xorg-server/fb/fboverlay.c +++ b/xorg-server/fb/fboverlay.c @@ -248,7 +248,7 @@ fbOverlayCopyWindow(WindowPtr pWin, { REGION_TRANSLATE(pScreen, &layerRgn[i], -dx, -dy); pPixmap = pScrPriv->layer[i].u.run.pixmap; - fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, + miCopyRegion (&pPixmap->drawable, &pPixmap->drawable, 0, &layerRgn[i], dx, dy, pScrPriv->CopyWindow, 0, (void *)(long) i); diff --git a/xorg-server/fb/fboverlay.h b/xorg-server/fb/fboverlay.h index f3db0bb7d..b626a7702 100644 --- a/xorg-server/fb/fboverlay.h +++ b/xorg-server/fb/fboverlay.h @@ -27,7 +27,7 @@ #include "privates.h" -extern DevPrivateKey fbOverlayGetScreenPrivateKey(void); +extern _X_EXPORT DevPrivateKey fbOverlayGetScreenPrivateKey(void); #ifndef FB_OVERLAY_MAX #define FB_OVERLAY_MAX 2 @@ -53,46 +53,46 @@ typedef struct _fbOverlayLayer { typedef struct _fbOverlayScrPriv { int nlayers; fbOverlayPaintKeyProc PaintKey; - fbCopyProc CopyWindow; + miCopyProc CopyWindow; FbOverlayLayer layer[FB_OVERLAY_MAX]; } FbOverlayScrPrivRec, *FbOverlayScrPrivPtr; #define fbOverlayGetScrPriv(s) \ dixLookupPrivate(&(s)->devPrivates, fbOverlayGetScreenPrivateKey()) -Bool +extern _X_EXPORT Bool fbOverlayCreateWindow(WindowPtr pWin); -Bool +extern _X_EXPORT Bool fbOverlayCloseScreen (int iScreen, ScreenPtr pScreen); -int +extern _X_EXPORT int fbOverlayWindowLayer(WindowPtr pWin); -Bool +extern _X_EXPORT Bool fbOverlayCreateScreenResources(ScreenPtr pScreen); -void +extern _X_EXPORT void fbOverlayPaintKey (DrawablePtr pDrawable, RegionPtr pRegion, CARD32 pixel, int layer); -void +extern _X_EXPORT void fbOverlayUpdateLayerRegion (ScreenPtr pScreen, int layer, RegionPtr prgn); -void +extern _X_EXPORT void fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); -void +extern _X_EXPORT void fbOverlayWindowExposures (WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed); -Bool +extern _X_EXPORT Bool fbOverlaySetupScreen(ScreenPtr pScreen, pointer pbits1, pointer pbits2, @@ -105,7 +105,7 @@ fbOverlaySetupScreen(ScreenPtr pScreen, int bpp1, int bpp2); -Bool +extern _X_EXPORT Bool fbOverlayFinishScreenInit(ScreenPtr pScreen, pointer pbits1, pointer pbits2, diff --git a/xorg-server/fb/fbpict.c b/xorg-server/fb/fbpict.c index 1355e9071..dd9cefe15 100644 --- a/xorg-server/fb/fbpict.c +++ b/xorg-server/fb/fbpict.c @@ -159,26 +159,13 @@ fbComposite (CARD8 op, { pixman_image_t *src, *mask, *dest; - xDst += pDst->pDrawable->x; - yDst += pDst->pDrawable->y; - if (pSrc->pDrawable) - { - xSrc += pSrc->pDrawable->x; - ySrc += pSrc->pDrawable->y; - } - if (pMask && pMask->pDrawable) - { - xMask += pMask->pDrawable->x; - yMask += pMask->pDrawable->y; - } - miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height); if (pMask) miCompositeSourceValidate (pMask, xMask, yMask, width, height); - src = image_from_pict (pSrc, TRUE); - mask = image_from_pict (pMask, TRUE); - dest = image_from_pict (pDst, TRUE); + src = image_from_pict (pSrc, TRUE, TRUE); + mask = image_from_pict (pMask, TRUE, TRUE); + dest = image_from_pict (pDst, TRUE, FALSE); if (src && dest && !(pMask && !mask)) { @@ -281,22 +268,78 @@ create_conical_gradient_image (PictGradient *gradient) gradient->nstops); } +static DrawablePtr +copy_drawable (DrawablePtr pDraw) +{ + ScreenPtr pScreen = pDraw->pScreen; + PixmapPtr pPixmap; + GCPtr pGC; + int width, height; + ChangeGCVal gcv[2]; + + width = pDraw->width; + height = pDraw->height; + + pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pDraw->depth, 0); + + if (!pPixmap) + return NULL; + + pGC = GetScratchGC (pDraw->depth, pScreen); + + if (!pGC) + { + (*pScreen->DestroyPixmap) (pPixmap); + return NULL; + } + + /* First fill the pixmap with zeros */ + gcv[0].val = 0x00000000; + gcv[1].val = IncludeInferiors; + dixChangeGC (NullClient, pGC, GCBackground | GCSubwindowMode, NULL, gcv); + ValidateGC ((DrawablePtr)pPixmap, pGC); + miClearDrawable ((DrawablePtr)pPixmap, pGC); + + /* Then copy the window there */ + ValidateGC(&pPixmap->drawable, pGC); + (* pGC->ops->CopyArea) (pDraw, &pPixmap->drawable, pGC, 0, 0, width, height, 0, 0); + + FreeScratchGC (pGC); + + return &pPixmap->drawable; +} + +static void +destroy_drawable (pixman_image_t *image, void *data) +{ + DrawablePtr pDrawable = data; + ScreenPtr pScreen = pDrawable->pScreen; + + pScreen->DestroyPixmap ((PixmapPtr)pDrawable); +} + static pixman_image_t * create_bits_picture (PicturePtr pict, - Bool has_clip) + Bool has_clip, + Bool is_src) { FbBits *bits; FbStride stride; int bpp, xoff, yoff; pixman_image_t *image; + DrawablePtr drawable; + + if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW) + drawable = copy_drawable (pict->pDrawable); + else + drawable = pict->pDrawable; - fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff); + fbGetDrawable (drawable, bits, stride, bpp, xoff, yoff); - bits = (FbBits*)((CARD8*)bits + yoff * stride * sizeof(FbBits) + xoff * (bpp / 8)); + bits = (FbBits*)((CARD8*)bits + drawable->y * stride * sizeof(FbBits) + drawable->x * (bpp / 8)); image = pixman_image_create_bits ( - pict->format, - pict->pDrawable->width, pict->pDrawable->height, + pict->format, drawable->width, drawable->height, (uint32_t *)bits, stride * sizeof (FbStride)); @@ -314,21 +357,46 @@ create_bits_picture (PicturePtr pict, #endif #endif - /* pCompositeClip is undefined for source pictures, so - * only set the clip region for pictures with drawables - */ if (has_clip) { - if (pict->clientClipType != CT_NONE) - pixman_image_set_has_client_clip (image, TRUE); - - pixman_image_set_clip_region (image, pict->pCompositeClip); + if (is_src) + { + if (pict->clientClipType != CT_NONE) + { + pixman_image_set_has_client_clip (image, TRUE); + + pixman_region_translate (pict->clientClip, + pict->clipOrigin.x, + pict->clipOrigin.y); + + pixman_image_set_clip_region (image, pict->clientClip); + + pixman_region_translate (pict->clientClip, + - pict->clipOrigin.x, + - pict->clipOrigin.y); + } + } + else + { + pixman_region_translate (pict->pCompositeClip, + - pict->pDrawable->x, + - pict->pDrawable->y); + + pixman_image_set_clip_region (image, pict->pCompositeClip); + + pixman_region_translate (pict->pCompositeClip, + pict->pDrawable->x, + pict->pDrawable->y); + } } /* Indexed table */ if (pict->pFormat->index.devPrivate) pixman_image_set_indexed (image, pict->pFormat->index.devPrivate); + if (drawable != pict->pDrawable) + pixman_image_set_destroy_function (image, destroy_drawable, drawable); + return image; } @@ -368,7 +436,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict) if (pict->alphaMap) { - pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE); + pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE, TRUE); pixman_image_set_alpha_map ( image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y); @@ -402,7 +470,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict) pixman_image_t * image_from_pict (PicturePtr pict, - Bool has_clip) + Bool has_clip, + Bool is_src) { pixman_image_t *image = NULL; @@ -411,7 +480,7 @@ image_from_pict (PicturePtr pict, if (pict->pDrawable) { - image = create_bits_picture (pict, has_clip); + image = create_bits_picture (pict, has_clip, is_src); } else if (pict->pSourcePict) { diff --git a/xorg-server/fb/fbpict.h b/xorg-server/fb/fbpict.h index b4c1dcf12..b89f90ff1 100644 --- a/xorg-server/fb/fbpict.h +++ b/xorg-server/fb/fbpict.h @@ -95,6 +95,8 @@ fbCanGetSolid(PicturePtr pict) case PICT_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: + case PICT_b8g8r8a8: + case PICT_b8g8r8x8: case PICT_r8g8b8: case PICT_b8g8r8: case PICT_r5g6b5: @@ -383,7 +385,7 @@ typedef struct _FbComposeData { CARD16 height; } FbComposeData; -void +extern _X_EXPORT void fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer); typedef FASTCALL void (*CombineMaskU) (CARD32 *src, const CARD32 *mask, int width); @@ -398,7 +400,7 @@ typedef struct _FbComposeFunctions { /* fbcompose.c */ -void +extern _X_EXPORT void fbCompositeGeneral (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -413,7 +415,7 @@ fbCompositeGeneral (CARD8 op, CARD16 height); /* fbpict.c */ -void +extern _X_EXPORT void fbComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -440,7 +442,7 @@ typedef void (*CompositeFunc) (CARD8 op, CARD16 width, CARD16 height); -void +extern _X_EXPORT void fbWalkCompositeRegion (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -459,20 +461,20 @@ fbWalkCompositeRegion (CARD8 op, /* fbtrap.c */ -void +extern _X_EXPORT void fbAddTraps (PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntrap, xTrap *traps); -void +extern _X_EXPORT void fbRasterizeTrapezoid (PicturePtr alpha, xTrapezoid *trap, int x_off, int y_off); -void +extern _X_EXPORT void fbAddTriangles (PicturePtr pPicture, INT16 xOff, INT16 yOff, diff --git a/xorg-server/fb/fbrop.h b/xorg-server/fb/fbrop.h index 1685ee836..a01fdabfe 100644 --- a/xorg-server/fb/fbrop.h +++ b/xorg-server/fb/fbrop.h @@ -27,7 +27,7 @@ typedef struct _mergeRopBits { FbBits ca1, cx1, ca2, cx2; } FbMergeRopRec, *FbMergeRopPtr; -extern const FbMergeRopRec FbMergeRopBits[16]; +extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16]; #define FbDeclareMergeRop() FbBits _ca1, _cx1, _ca2, _cx2; #define FbDeclarePrebuiltMergeRop() FbBits _cca, _ccx; @@ -95,14 +95,14 @@ extern const FbMergeRopRec FbMergeRopBits[16]; * Stippling operations; */ -extern const FbBits fbStipple16Bits[256]; /* half of table */ +extern _X_EXPORT const FbBits fbStipple16Bits[256]; /* half of table */ #define FbStipple16Bits(b) \ (fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT) -extern const FbBits fbStipple8Bits[256]; -extern const FbBits fbStipple4Bits[16]; -extern const FbBits fbStipple2Bits[4]; -extern const FbBits fbStipple1Bits[2]; -extern const FbBits *const fbStippleTable[]; +extern _X_EXPORT const FbBits fbStipple8Bits[256]; +extern _X_EXPORT const FbBits fbStipple4Bits[16]; +extern _X_EXPORT const FbBits fbStipple2Bits[4]; +extern _X_EXPORT const FbBits fbStipple1Bits[2]; +extern _X_EXPORT const FbBits *const fbStippleTable[]; #define FbStippleRRop(dst, b, fa, fx, ba, bx) \ (FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b) diff --git a/xorg-server/fb/fbscreen.c b/xorg-server/fb/fbscreen.c index ea2491211..24eadde1a 100644 --- a/xorg-server/fb/fbscreen.c +++ b/xorg-server/fb/fbscreen.c @@ -241,14 +241,6 @@ fbFinishScreenInit(ScreenPtr pScreen, pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader; pScreen->CreateScreenResources = fb24_32CreateScreenResources; } -#endif -#if 0 - /* leave backing store initialization to the enclosing code so - * it can choose the correct order of wrappers - */ - /* init backing store here so we can overwrite CloseScreen without stepping - * on the backing store wrapped version */ - fbInitializeBackingStore (pScreen); #endif return TRUE; } diff --git a/xorg-server/fb/fbtrap.c b/xorg-server/fb/fbtrap.c index 830603ae7..b1e1eff4a 100644 --- a/xorg-server/fb/fbtrap.c +++ b/xorg-server/fb/fbtrap.c @@ -40,7 +40,7 @@ fbAddTraps (PicturePtr pPicture, int ntrap, xTrap *traps) { - pixman_image_t *image = image_from_pict (pPicture, FALSE); + pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE); if (!image) return; @@ -56,7 +56,7 @@ fbRasterizeTrapezoid (PicturePtr pPicture, int x_off, int y_off) { - pixman_image_t *image = image_from_pict (pPicture, FALSE); + pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE); if (!image) return; diff --git a/xorg-server/fb/fbwindow.c b/xorg-server/fb/fbwindow.c index 70e75a9e9..46c033448 100644 --- a/xorg-server/fb/fbwindow.c +++ b/xorg-server/fb/fbwindow.c @@ -115,7 +115,7 @@ fbCopyWindowProc (DrawablePtr pSrcDrawable, fbFinishAccess (pSrcDrawable); } -void +void fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) @@ -140,7 +140,7 @@ fbCopyWindow(WindowPtr pWin, -pPixmap->screen_x, -pPixmap->screen_y); #endif - fbCopyRegion (pDrawable, pDrawable, + miCopyRegion (pDrawable, pDrawable, 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); diff --git a/xorg-server/glx/Makefile.am b/xorg-server/glx/Makefile.am index 6facc2011..a23ae0a47 100644 --- a/xorg-server/glx/Makefile.am +++ b/xorg-server/glx/Makefile.am @@ -7,6 +7,7 @@ noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) AM_CFLAGS = \ @DIX_CFLAGS@ \ @GL_CFLAGS@ \ + @DRI_CFLAGS@ \ @XLIB_CFLAGS@ \ @LIBDRM_CFLAGS@ \ @DRIPROTO_CFLAGS@ \ diff --git a/xorg-server/glx/Makefile.in b/xorg-server/glx/Makefile.in index 4eeb62b6b..515cc690c 100644 --- a/xorg-server/glx/Makefile.in +++ b/xorg-server/glx/Makefile.in @@ -39,8 +39,11 @@ host_triplet = @host@ subdir = glx DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -94,6 +98,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -114,9 +119,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -145,7 +153,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -154,9 +164,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -195,12 +209,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -220,7 +235,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -230,6 +244,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -243,11 +258,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -283,6 +297,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -307,7 +322,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -330,6 +344,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -361,7 +376,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -372,6 +389,7 @@ noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) AM_CFLAGS = \ @DIX_CFLAGS@ \ @GL_CFLAGS@ \ + @DRI_CFLAGS@ \ @XLIB_CFLAGS@ \ @LIBDRM_CFLAGS@ \ @DRIPROTO_CFLAGS@ \ diff --git a/xorg-server/glx/extension_string.c b/xorg-server/glx/extension_string.c index a4b202af3..9d110cf98 100644 --- a/xorg-server/glx/extension_string.c +++ b/xorg-server/glx/extension_string.c @@ -80,7 +80,7 @@ static const struct extension_info known_glx_extensions[] = { { GLX(SGI_swap_control), VER(0,0), N, }, { GLX(SGIS_multisample), VER(0,0), Y, }, { GLX(SGIX_fbconfig), VER(1,3), Y, }, - { GLX(SGIX_pbuffer), VER(1,3), N, }, + { GLX(SGIX_pbuffer), VER(1,3), Y, }, { GLX(SGIX_visual_select_group), VER(0,0), Y, }, { NULL } }; diff --git a/xorg-server/glx/glapi.c b/xorg-server/glx/glapi.c index 94a804329..fa3808e4d 100644 --- a/xorg-server/glx/glapi.c +++ b/xorg-server/glx/glapi.c @@ -53,7 +53,8 @@ #ifdef HAVE_DIX_CONFIG_H #include -#define PUBLIC +#include +#define PUBLIC _X_EXPORT #else @@ -242,7 +243,7 @@ str_dup(const char *str) * We should call this periodically from a function such as glXMakeCurrent * in order to test if multiple threads are being used. */ -void +PUBLIC void _glapi_check_multithread(void) { #if defined(THREADS) && !defined(GLX_USE_TLS) diff --git a/xorg-server/glx/glthread.c b/xorg-server/glx/glthread.c index b818f4e26..4caaea110 100644 --- a/xorg-server/glx/glthread.c +++ b/xorg-server/glx/glthread.c @@ -31,6 +31,7 @@ #ifdef HAVE_DIX_CONFIG_H #include +#include #endif #include @@ -71,7 +72,7 @@ */ #ifdef PTHREADS -unsigned long +_X_EXPORT unsigned long _glthread_GetID(void) { return (unsigned long) pthread_self(); @@ -125,7 +126,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) #define USE_LOCK_FOR_KEY /* undef this to try a version without lock for the global key... */ -unsigned long +_X_EXPORT unsigned long _glthread_GetID(void) { abort(); /* XXX not implemented yet */ @@ -256,7 +257,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) */ #ifdef USE_XTHREADS -unsigned long +_X_EXPORT unsigned long _glthread_GetID(void) { return (unsigned long) xthread_self(); @@ -346,7 +347,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) * no-op functions */ -unsigned long +_X_EXPORT unsigned long _glthread_GetID(void) { return 0; diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c index ff8b126be..f5632d162 100644 --- a/xorg-server/glx/glxcmds.c +++ b/xorg-server/glx/glxcmds.c @@ -28,8 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES -#define FONT_PCF #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -53,12 +51,6 @@ #include "indirect_table.h" #include "indirect_util.h" -void -GlxSetRenderTables (struct _glapi_table *table) -{ - _glapi_set_dispatch (table); -} - static int validGlxScreen(ClientPtr client, int screen, __GLXscreen **pGlxScreen, int *err) { @@ -139,6 +131,58 @@ validGlxFBConfigForWindow(ClientPtr client, __GLXconfig *config, return TRUE; } +static int +validGlxContext(ClientPtr client, XID id, int access_mode, + __GLXcontext **context, int *err) +{ + *err = dixLookupResourceByType((pointer *) context, id, + __glXContextRes, client, access_mode); + if (*err != Success) { + client->errorValue = id; + if (*err == BadValue) + *err = __glXError(GLXBadContext); + return FALSE; + } + + return TRUE; +} + +static int +validGlxDrawable(ClientPtr client, XID id, int type, int access_mode, + __GLXdrawable **drawable, int *err) +{ + int rc; + + rc = dixLookupResourceByType((pointer *) drawable, id, + __glXDrawableRes, client, access_mode); + if (rc != Success && rc != BadValue) { + *err = rc; + client->errorValue = id; + return FALSE; + } + + if (rc == BadValue || + (type != GLX_DRAWABLE_ANY && type != (*drawable)->type)) { + client->errorValue = id; + switch (type) { + case GLX_DRAWABLE_WINDOW: + *err = __glXError(GLXBadWindow); + return FALSE; + case GLX_DRAWABLE_PIXMAP: + *err = __glXError(GLXBadPixmap); + return FALSE; + case GLX_DRAWABLE_PBUFFER: + *err = __glXError(GLXBadPbuffer); + return FALSE; + case GLX_DRAWABLE_ANY: + *err = __glXError(GLXBadDrawable); + return FALSE; + } + } + + return TRUE; +} + void __glXContextDestroy(__GLXcontext *context) { @@ -181,7 +225,8 @@ DoCreateContext(__GLXclientState *cl, GLXContextID gcId, { ClientPtr client = cl->client; __GLXcontext *glxc, *shareglxc; - + int err; + LEGAL_NEW_RESOURCE(gcId, client); /* @@ -196,11 +241,10 @@ DoCreateContext(__GLXclientState *cl, GLXContextID gcId, if (shareList == None) { shareglxc = 0; } else { - shareglxc = (__GLXcontext *) LookupIDByType(shareList, __glXContextRes); - if (!shareglxc) { - client->errorValue = shareList; - return __glXError(GLXBadContext); - } + if (!validGlxContext(client, shareList, DixReadAccess, + &shareglxc, &err)) + return err; + if (shareglxc->isDirect) { /* ** NOTE: no support for sharing display lists between direct @@ -315,25 +359,16 @@ int __glXDisp_CreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) } int __glXDisp_DestroyContext(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; - GLXContextID gcId = req->context; __GLXcontext *glxc; - - glxc = (__GLXcontext *) LookupIDByType(gcId, __glXContextRes); - if (glxc) { - /* - ** Just free the resource; don't actually destroy the context, - ** because it might be in use. The - ** destroy method will be called by the resource destruction routine - ** if necessary. - */ - FreeResourceByType(gcId, __glXContextRes, FALSE); - return Success; - } else { - client->errorValue = gcId; - return __glXError(GLXBadContext); - } + int err; + + if (!validGlxContext(cl->client, req->context, DixDestroyAccess, + &glxc, &err)) + return err; + + FreeResourceByType(req->context, __glXContextRes, FALSE); + return Success; } /*****************************************************************************/ @@ -428,20 +463,10 @@ static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc) } /** - * Given a drawable ID, get the associated drawable and / or pixmap. - * - * If the specified drawable ID is not a pixmap, \c ppPixmap will be set - * to \c NULL on return. In either case, \c ppDraw will be set to a drawable. - * In the case where the drawable ID is a pixmap, \c ppDraw will be set to - * the drawable associated with that pixmap. - * - * \param glxc Associated GLX context. - * \param drawId ID of the drawable. - * \param client Pointer to the client state. - * \return the __GLXdrawable is returned on success. Otherwise NULL. - * - * \notes This function will need some modification when support pbuffers - * is added. + * This is a helper function to handle the legacy (pre GLX 1.3) cases + * where passing an X window to glXMakeCurrent is valid. Given a + * resource ID, look up the GLX drawable if available, otherwise, make + * sure it's an X window and create a GLX drawable one the fly. */ static __GLXdrawable * __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client, @@ -451,10 +476,8 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client, __GLXdrawable *pGlxDraw; int rc; - /* This is the GLX 1.3 case - the client passes in a GLXWindow or - * GLXPixmap and we just return the __GLXdrawable. */ - pGlxDraw = (__GLXdrawable *) LookupIDByType(drawId, __glXDrawableRes); - if (pGlxDraw != NULL) { + if (validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY, + DixWriteAccess, &pGlxDraw, &rc)) { if (glxc != NULL && pGlxDraw->config != glxc->config) { client->errorValue = drawId; *error = BadMatch; @@ -464,13 +487,10 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client, return pGlxDraw; } - /* The drawId wasn't a GLX drawable, so presumably it's a regular - * X window. In that case, we create a shadow GLXWindow for it on - * demand here for pre GLX 1.3 compatibility and use the X Window - * XID as its GLXWindow XID. The client can't explicitly create a - * GLXWindow with the same XID as an X Window, so we wont get any - * resource ID clashes. Effectively, the X Window is now also a - * GLXWindow. */ + /* The drawId wasn't a GLX drawable. Make sure it's a window and + * create a GLXWindow for it. Check that the drawable screen + * matches the context screen and that the context fbconfig is + * compatible with the window visual. */ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess); if (rc != Success || pDraw->type != DRAWABLE_WINDOW) { @@ -479,18 +499,13 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client, return NULL; } - /* If we're not given a context, don't create the __GLXdrawable */ - if (glxc == NULL) { - *error = __glXError(GLXBadDrawable); + if (pDraw->pScreen != glxc->pGlxScreen->pScreen) { + client->errorValue = pDraw->pScreen->myNum; + *error = BadMatch; return NULL; } - /* We're binding an X Window for the first time and need to create - * a GLX drawable for it. Check that the drawable screen matches - * the context screen and that the context fbconfig is compatible - * with the window visual. */ - if (pDraw->pScreen != glxc->pGlxScreen->pScreen || - !validGlxFBConfigForWindow(client, glxc->config, pDraw, error)) + if (!validGlxFBConfigForWindow(client, glxc->config, pDraw, error)) return NULL; pGlxDraw = glxc->pGlxScreen->createDrawable(glxc->pGlxScreen, @@ -522,7 +537,7 @@ DoMakeCurrent(__GLXclientState *cl, __GLXcontext *glxc, *prevglxc; __GLXdrawable *drawPriv = NULL; __GLXdrawable *readPriv = NULL; - GLint error; + int error; GLuint mask; /* @@ -563,11 +578,8 @@ DoMakeCurrent(__GLXclientState *cl, if (contextId != None) { int status; - glxc = (__GLXcontext *) LookupIDByType(contextId, __glXContextRes); - if (!glxc) { - client->errorValue = contextId; - return __glXError(GLXBadContext); - } + if (!validGlxContext(client, contextId, DixUseAccess, &glxc, &error)) + return error; if ((glxc != prevglxc) && glxc->isCurrent) { /* Context is current to somebody else */ return BadAccess; @@ -690,15 +702,10 @@ int __glXDisp_IsDirect(__GLXclientState *cl, GLbyte *pc) xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; xGLXIsDirectReply reply; __GLXcontext *glxc; + int err; - /* - ** Find the GL context. - */ - glxc = (__GLXcontext *) LookupIDByType(req->context, __glXContextRes); - if (!glxc) { - client->errorValue = req->context; - return __glXError(GLXBadContext); - } + if (!validGlxContext(cl->client, req->context, DixReadAccess, &glxc, &err)) + return err; reply.isDirect = glxc->isDirect; reply.length = 0; @@ -785,8 +792,8 @@ int __glXDisp_WaitX(__GLXclientState *cl, GLbyte *pc) return error; } - if (glxc && glxc->drawPriv->waitGL) - (*glxc->drawPriv->waitGL)(glxc->drawPriv); + if (glxc && glxc->drawPriv->waitX) + (*glxc->drawPriv->waitX)(glxc->drawPriv); return Success; } @@ -802,19 +809,10 @@ int __glXDisp_CopyContext(__GLXclientState *cl, GLbyte *pc) __GLXcontext *src, *dst; int error; - /* - ** Check that each context exists. - */ - src = (__GLXcontext *) LookupIDByType(source, __glXContextRes); - if (!src) { - client->errorValue = source; - return __glXError(GLXBadContext); - } - dst = (__GLXcontext *) LookupIDByType(dest, __glXContextRes); - if (!dst) { - client->errorValue = dest; - return __glXError(GLXBadContext); - } + if (!validGlxContext(cl->client, source, DixReadAccess, &src, &error)) + return error; + if (!validGlxContext(cl->client, dest, DixWriteAccess, &dst, &error)) + return error; /* ** They must be in the same address space, and same screen. @@ -872,6 +870,14 @@ int __glXDisp_CopyContext(__GLXclientState *cl, GLbyte *pc) return Success; } +enum { + GLX_VIS_CONFIG_UNPAIRED = 18, + GLX_VIS_CONFIG_PAIRED = 20 +}; + +enum { + GLX_VIS_CONFIG_TOTAL = GLX_VIS_CONFIG_UNPAIRED + GLX_VIS_CONFIG_PAIRED +}; int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) { @@ -880,7 +886,7 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) xGLXGetVisualConfigsReply reply; __GLXscreen *pGlxScreen; __GLXconfig *modes; - CARD32 buf[__GLX_TOTAL_CONFIG]; + CARD32 buf[GLX_VIS_CONFIG_TOTAL]; int p, i, err; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; @@ -889,8 +895,8 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) return err; reply.numVisuals = pGlxScreen->numVisuals; - reply.numProps = __GLX_TOTAL_CONFIG; - reply.length = (reply.numVisuals * __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG) >> 2; + reply.numProps = GLX_VIS_CONFIG_TOTAL; + reply.length = (reply.numVisuals * __GLX_SIZE_CARD32 * GLX_VIS_CONFIG_TOTAL) >> 2; reply.type = X_Reply; reply.sequenceNumber = client->sequence; @@ -928,6 +934,8 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) buf[p++] = modes->stencilBits; buf[p++] = modes->numAuxBuffers; buf[p++] = modes->level; + + assert(p == GLX_VIS_CONFIG_UNPAIRED); /* ** Add token/value pairs for extensions. */ @@ -952,11 +960,11 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) buf[p++] = 0; /* copy over visualSelectGroup (GLX_VISUAL_SELECT_GROUP_SGIX)? */ buf[p++] = 0; + assert(p == GLX_VIS_CONFIG_TOTAL); if (client->swapped) { - __GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG); + __GLX_SWAP_INT_ARRAY(buf, p); } - WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, - (char *)buf); + WriteToClient(client, __GLX_SIZE_CARD32 * p, (char *)buf); } return Success; } @@ -1131,7 +1139,11 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config int err; err = dixLookupDrawable(&pDraw, drawableId, client, 0, DixAddAccess); - if (err != Success || pDraw->type != DRAWABLE_PIXMAP) { + if (err != Success) { + client->errorValue = drawableId; + return err; + } + if (pDraw->type != DRAWABLE_PIXMAP) { client->errorValue = drawableId; return BadPixmap; } @@ -1146,14 +1158,18 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config } static void -determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs) +determineTextureTarget(ClientPtr client, XID glxDrawableID, + CARD32 *attribs, CARD32 numAttribs) { GLenum target = 0; GLenum format = 0; - int i; + int i, err; __GLXdrawable *pGlxDraw; - pGlxDraw = LookupIDByType(glxDrawableID, __glXDrawableRes); + if (!validGlxDrawable(client, glxDrawableID, GLX_DRAWABLE_PIXMAP, + DixWriteAccess, &pGlxDraw, &err)) + /* We just added it in CreatePixmap, so we should never get here. */ + return; for (i = 0; i < numAttribs; i++) { if (attribs[2 * i] == GLX_TEXTURE_TARGET_EXT) { @@ -1217,7 +1233,7 @@ int __glXDisp_CreatePixmap(__GLXclientState *cl, GLbyte *pc) if (err != Success) return err; - determineTextureTarget(req->glxpixmap, + determineTextureTarget(cl->client, req->glxpixmap, (CARD32*) (req + 1), req->numAttribs); return Success; @@ -1243,24 +1259,12 @@ int __glXDisp_CreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) static int DoDestroyDrawable(__GLXclientState *cl, XID glxdrawable, int type) { - ClientPtr client = cl->client; __GLXdrawable *pGlxDraw; + int err; - /* - ** Check it's the right type of drawable. - */ - pGlxDraw = LookupIDByType(glxdrawable, __glXDrawableRes); - if (pGlxDraw == NULL || pGlxDraw->type != type) { - client->errorValue = glxdrawable; - switch (type) { - case GLX_DRAWABLE_WINDOW: - return __glXError(GLXBadWindow); - case GLX_DRAWABLE_PIXMAP: - return __glXError(GLXBadDrawable); - case GLX_DRAWABLE_PBUFFER: - return __glXError(GLXBadPbuffer); - } - } + if (!validGlxDrawable(cl->client, glxdrawable, type, + DixDestroyAccess, &pGlxDraw, &err)) + return err; FreeResource(glxdrawable, FALSE); @@ -1360,9 +1364,12 @@ DoChangeDrawableAttributes(ClientPtr client, XID glxdrawable, int numAttribs, CARD32 *attribs) { __GLXdrawable *pGlxDraw; - int i; + int i, err; + + if (!validGlxDrawable(client, glxdrawable, GLX_DRAWABLE_ANY, + DixSetAttrAccess, &pGlxDraw, &err)) + return err; - pGlxDraw = LookupIDByType(glxdrawable, __glXDrawableRes); for (i = 0; i < numAttribs; i++) { switch(attribs[i * 2]) { case GLX_EVENT_MASK: @@ -1490,12 +1497,10 @@ DoQueryContext(__GLXclientState *cl, GLXContextID gcId) int nProps; int *sendBuf, *pSendBuf; int nReplyBytes; + int err; - ctx = (__GLXcontext *) LookupIDByType(gcId, __glXContextRes); - if (!ctx) { - client->errorValue = gcId; - return __glXError(GLXBadContext); - } + if (!validGlxContext(cl->client, gcId, DixReadAccess, &ctx, &err)) + return err; nProps = 3; reply.length = nProps << 1; @@ -1563,11 +1568,9 @@ int __glXDisp_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc) if (!context) return error; - pGlxDraw = __glXGetDrawable(NULL, drawId, client, &error); - if (!pGlxDraw || pGlxDraw->type != GLX_DRAWABLE_PIXMAP) { - client->errorValue = drawId; - return __glXError(GLXBadPixmap); - } + if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_PIXMAP, + DixReadAccess, &pGlxDraw, &error)) + return error; if (!context->textureFromPixmap) return __glXError(GLXUnsupportedPrivateRequest); @@ -1596,11 +1599,9 @@ int __glXDisp_ReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) if (!context) return error; - pGlxDraw = __glXGetDrawable(NULL, drawId, client, &error); - if (!pGlxDraw || pGlxDraw->type != GLX_DRAWABLE_PIXMAP) { - client->errorValue = drawId; + if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_PIXMAP, + DixReadAccess, &pGlxDraw, &error)) return error; - } if (!context->textureFromPixmap) return __glXError(GLXUnsupportedPrivateRequest); @@ -1680,11 +1681,9 @@ DoGetDrawableAttributes(__GLXclientState *cl, XID drawId) CARD32 attributes[6]; int numAttribs, error; - pGlxDraw = __glXGetDrawable(NULL, drawId, client, &error); - if (!pGlxDraw) { - client->errorValue = drawId; + if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY, + DixGetAttrAccess, &pGlxDraw, &error)) return error; - } numAttribs = 3; reply.length = numAttribs << 1; diff --git a/xorg-server/glx/glxcmdsswap.c b/xorg-server/glx/glxcmdsswap.c index 65edf6991..f1c0ce69f 100644 --- a/xorg-server/glx/glxcmdsswap.c +++ b/xorg-server/glx/glxcmdsswap.c @@ -28,8 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES -#define FONT_PCF #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/glx/glxdrawable.h b/xorg-server/glx/glxdrawable.h index f5a040359..3f165ed4f 100644 --- a/xorg-server/glx/glxdrawable.h +++ b/xorg-server/glx/glxdrawable.h @@ -35,13 +35,12 @@ * Silicon Graphics, Inc. */ -#include - /* We just need to avoid clashing with DRAWABLE_{WINDOW,PIXMAP} */ enum { GLX_DRAWABLE_WINDOW, GLX_DRAWABLE_PIXMAP, - GLX_DRAWABLE_PBUFFER + GLX_DRAWABLE_PBUFFER, + GLX_DRAWABLE_ANY }; struct __GLXdrawable { diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c index 64606ab5a..c9d226bdf 100644 --- a/xorg-server/glx/glxdri.c +++ b/xorg-server/glx/glxdri.c @@ -38,6 +38,7 @@ #include #include +#include #define _XF86DRI_SERVER_ #include @@ -1086,7 +1087,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) if (!DRIGetDeviceInfo(pScreen, &hFB, &junk, &framebuffer.size, &framebuffer.stride, &framebuffer.dev_priv_size, &framebuffer.dev_priv)) { - LogMessage(X_ERROR, "AIGLX error: XF86DRIGetDeviceInfo failed"); + LogMessage(X_ERROR, "AIGLX error: XF86DRIGetDeviceInfo failed\n"); goto handle_error; } @@ -1097,7 +1098,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) status = drmMap(fd, hFB, framebuffer.size, (drmAddressPtr)&framebuffer.base); if (status != 0) { - LogMessage(X_ERROR, "AIGLX error: drmMap of framebuffer failed (%s)", + LogMessage(X_ERROR, "AIGLX error: drmMap of framebuffer failed (%s)\n", strerror(-status)); goto handle_error; } @@ -1107,7 +1108,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) */ status = drmMap(fd, hSAREA, SAREA_MAX, &pSAREA); if (status != 0) { - LogMessage(X_ERROR, "AIGLX error: drmMap of SAREA failed (%s)", + LogMessage(X_ERROR, "AIGLX error: drmMap of SAREA failed (%s)\n", strerror(-status)); goto handle_error; } @@ -1125,7 +1126,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen); if (screen->driScreen == NULL) { - LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed"); + LogMessage(X_ERROR, + "AIGLX error: Calling driver entry point failed\n"); goto handle_error; } @@ -1138,6 +1140,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen) __glXScreenInit(&screen->base, pScreen); + /* The first call simply determines the length of the extension string. + * This allows us to allocate some memory to hold the extension string, + * but it requires that we call __glXGetExtensionString a second time. + */ buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); if (buffer_size > 0) { if (screen->base.GLXextensions != NULL) { @@ -1152,7 +1158,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) __glXsetEnterLeaveServerFuncs(__glXDRIenterServer, __glXDRIleaveServer); screen->enterVT = pScrn->EnterVT; - pScrn->EnterVT = glxDRIEnterVT; + pScrn->EnterVT = glxDRIEnterVT; screen->leaveVT = pScrn->LeaveVT; pScrn->LeaveVT = glxDRILeaveVT; @@ -1183,7 +1189,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) return NULL; } -__GLXprovider __glXDRIProvider = { +_X_EXPORT __GLXprovider __glXDRIProvider = { __glXDRIscreenProbe, "DRI", NULL diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c index 146ea828f..ed7fb4c4b 100644 --- a/xorg-server/glx/glxdri2.c +++ b/xorg-server/glx/glxdri2.c @@ -551,6 +551,15 @@ initializeExtensions(__GLXDRIscreen *screen) LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n"); for (i = 0; extensions[i]; i++) { +#ifdef __DRI_READ_DRAWABLE + if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) { + __glXEnableExtension(screen->glx_enable_bits, + "GLX_SGI_make_current_read"); + + LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_make_current_read\n"); + } +#endif + #ifdef __DRI_SWAP_CONTROL if (strcmp(extensions[i]->name, __DRI_SWAP_CONTROL) == 0) { screen->swapControl = @@ -661,6 +670,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen) __glXScreenInit(&screen->base, pScreen); + /* The first call simply determines the length of the extension string. + * This allows us to allocate some memory to hold the extension string, + * but it requires that we call __glXGetExtensionString a second time. + */ buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); if (buffer_size > 0) { if (screen->base.GLXextensions != NULL) { @@ -693,7 +706,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) return NULL; } -__GLXprovider __glXDRI2Provider = { +_X_EXPORT __GLXprovider __glXDRI2Provider = { __glXDRIscreenProbe, "DRI2", NULL diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c index f8c441e65..44f658fa9 100644 --- a/xorg-server/glx/glxdriswrast.c +++ b/xorg-server/glx/glxdriswrast.c @@ -55,6 +55,13 @@ #include "dispatch.h" #include "extension_string.h" +/* RTLD_LOCAL is not defined on Cygwin */ +#ifdef __CYGWIN__ +#ifndef RTLD_LOCAL +#define RTLD_LOCAL 0 +#endif +#endif + typedef struct __GLXDRIscreen __GLXDRIscreen; typedef struct __GLXDRIcontext __GLXDRIcontext; typedef struct __GLXDRIdrawable __GLXDRIdrawable; @@ -492,7 +499,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen); if (screen->driScreen == NULL) { - LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed"); + LogMessage(X_ERROR, + "AIGLX error: Calling driver entry point failed\n"); goto handle_error; } @@ -518,7 +526,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) return NULL; } -__GLXprovider __glXDRISWRastProvider = { +_X_EXPORT __GLXprovider __glXDRISWRastProvider = { __glXDRIscreenProbe, "DRISWRAST", NULL diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c index ca1d2ec8d..19d70d495 100644 --- a/xorg-server/glx/glxext.c +++ b/xorg-server/glx/glxext.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -37,6 +36,7 @@ #include "glxserver.h" #include #include +#include #include "privates.h" #include #include "g_disptab.h" @@ -171,14 +171,20 @@ void __glXAddToContextList(__GLXcontext *cx) glxAllContexts = cx; } -void __glXRemoveFromContextList(__GLXcontext *cx) +static void __glXRemoveFromContextList(__GLXcontext *cx) { - __GLXcontext *c, **prev; + __GLXcontext *c, *prev; - prev = &glxAllContexts; - for (c = glxAllContexts; c; c = c->next) - if (c == cx) - *prev = c->next; + if (cx == glxAllContexts) + glxAllContexts = cx->next; + else { + prev = glxAllContexts; + for (c = glxAllContexts; c; c = c->next) { + if (c == cx) + prev->next = c->next; + prev = c; + } + } } /* @@ -341,6 +347,10 @@ void GlxExtensionInit(void) __glXDrawableRes = CreateNewResourceType((DeleteType)DrawableGone); __glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone); + RegisterResourceName(__glXContextRes, "GLXContext"); + RegisterResourceName(__glXDrawableRes, "GLXDrawable"); + RegisterResourceName(__glXSwapBarrierRes, "GLXSwapBarrier"); + if (!dixRequestPrivate(glxClientPrivateKey, sizeof (__GLXclientState))) return; if (!AddCallback (&ClientStateCallback, glxClientCallback, 0)) diff --git a/xorg-server/glx/glxscreens.c b/xorg-server/glx/glxscreens.c index 95d35eb67..81faddd04 100644 --- a/xorg-server/glx/glxscreens.c +++ b/xorg-server/glx/glxscreens.c @@ -177,6 +177,7 @@ static char GLXServerExtensions[] = "GLX_SGIX_swap_barrier " #endif "GLX_SGIX_fbconfig " + "GLX_SGIX_pbuffer " "GLX_MESA_copy_sub_buffer " ; @@ -211,6 +212,7 @@ glxCloseScreen (int index, ScreenPtr pScreen) __GLXscreen *pGlxScreen = glxGetScreen(pScreen); pScreen->CloseScreen = pGlxScreen->CloseScreen; + pScreen->DestroyWindow = pGlxScreen->DestroyWindow; pGlxScreen->destroy(pGlxScreen); @@ -223,8 +225,8 @@ glxGetScreen(ScreenPtr pScreen) return dixLookupPrivate(&pScreen->devPrivates, glxScreenPrivateKey); } -void GlxSetVisualConfigs(int nconfigs, - __GLXvisualConfig *configs, void **privates) +_X_EXPORT void GlxSetVisualConfigs(int nconfigs, + void *configs, void **privates) { /* We keep this stub around for the DDX drivers that still * call it. */ @@ -253,6 +255,7 @@ AddScreenVisuals(ScreenPtr pScreen, int count, int d) VisualPtr visuals; ColormapPtr installedCmap; DepthPtr depth; + int rc; depth = NULL; for (i = 0; i < pScreen->numDepths; i++) { @@ -293,8 +296,10 @@ AddScreenVisuals(ScreenPtr pScreen, int count, int d) * for all colormaps. */ for (i = 0; i < numInstalledCmaps; i++) { - installedCmap = LookupIDByType (installedCmaps[i], RT_COLORMAP); - if (!installedCmap) + rc = dixLookupResourceByType((pointer *)&installedCmap, + installedCmaps[i], RT_COLORMAP, + serverClient, DixReadAccess); + if (rc != Success) continue; j = installedCmap->pVisual - pScreen->visuals; installedCmap->pVisual = &visuals[j]; @@ -391,6 +396,31 @@ pickFBConfig(__GLXscreen *pGlxScreen, VisualPtr visual) return best; } +static Bool +glxDestroyWindow(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + __GLXscreen *pGlxScreen = glxGetScreen(pScreen); + Bool retval = TRUE; + + FreeResource(pWin->drawable.id, FALSE); + + /* call lower wrapped functions */ + if (pGlxScreen->DestroyWindow) { + /* unwrap */ + pScreen->DestroyWindow = pGlxScreen->DestroyWindow; + + /* call lower layers */ + retval = (*pScreen->DestroyWindow)(pWin); + + /* rewrap */ + pGlxScreen->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = glxDestroyWindow; + } + + return retval; +} + void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) { __GLXconfig *m; @@ -405,6 +435,8 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) pGlxScreen->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = glxCloseScreen; + pGlxScreen->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = glxDestroyWindow; i = 0; for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) { diff --git a/xorg-server/glx/glxscreens.h b/xorg-server/glx/glxscreens.h index 34e441e7c..3c1bdd4ba 100644 --- a/xorg-server/glx/glxscreens.h +++ b/xorg-server/glx/glxscreens.h @@ -162,6 +162,7 @@ struct __GLXscreen { char *GLXextensions; Bool (*CloseScreen)(int index, ScreenPtr pScreen); + Bool (*DestroyWindow)(WindowPtr pWindow); }; diff --git a/xorg-server/glx/glxserver.h b/xorg-server/glx/glxserver.h index a5ca0a20b..46c938268 100644 --- a/xorg-server/glx/glxserver.h +++ b/xorg-server/glx/glxserver.h @@ -55,7 +55,6 @@ #define GL_GLEXT_PROTOTYPES /* we want prototypes */ #include #include -#include /* For glxscreens.h */ typedef struct __GLXdrawable __GLXdrawable; @@ -93,10 +92,7 @@ extern __GLXclientState *glxGetClient(ClientPtr pClient); void GlxExtensionInit(void); void GlxSetVisualConfigs(int nconfigs, - __GLXvisualConfig *configs, void **privates); - -struct _glapi_table; -void GlxSetRenderTables (struct _glapi_table *table); + void *configs, void **privates); void __glXScreenInitVisuals(__GLXscreen *screen); diff --git a/xorg-server/glx/indirect_dispatch.c b/xorg-server/glx/indirect_dispatch.c index 6547f5d96..666551903 100644 --- a/xorg-server/glx/indirect_dispatch.c +++ b/xorg-server/glx/indirect_dispatch.c @@ -3743,7 +3743,7 @@ void __glXDisp_ResetMinmax(GLbyte * pc) void __glXDisp_TexImage3D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80)); __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); diff --git a/xorg-server/glx/indirect_dispatch_swap.c b/xorg-server/glx/indirect_dispatch_swap.c index 0b8c27cac..3221c809d 100644 --- a/xorg-server/glx/indirect_dispatch_swap.c +++ b/xorg-server/glx/indirect_dispatch_swap.c @@ -3879,7 +3879,7 @@ void __glXDispSwap_ResetMinmax(GLbyte * pc) void __glXDispSwap_TexImage3D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80)); __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); diff --git a/xorg-server/glx/indirect_program.c b/xorg-server/glx/indirect_program.c index d23a0a9e6..237da2908 100644 --- a/xorg-server/glx/indirect_program.c +++ b/xorg-server/glx/indirect_program.c @@ -29,7 +29,6 @@ * \author Ian Romanick */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -103,7 +102,7 @@ int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc, CALL_by_offset(GET_DISPATCH(), (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), get_program_string_offset, - (target, pname, answer)); + (target, pname, (GLubyte *)answer)); } if (__glXErrorOccured()) { diff --git a/xorg-server/glx/indirect_reqsize.c b/xorg-server/glx/indirect_reqsize.c index c47f01ee9..35bb9370f 100644 --- a/xorg-server/glx/indirect_reqsize.c +++ b/xorg-server/glx/indirect_reqsize.c @@ -39,12 +39,12 @@ #endif #ifdef HAVE_ALIAS # define ALIAS2(from,to) \ - GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + int __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ __attribute__ ((alias( # to ))); # define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize ) #else # define ALIAS(from,to) \ - GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + int __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ { return __glX ## to ## ReqSize( pc, swap ); } #endif diff --git a/xorg-server/glx/indirect_texture_compression.c b/xorg-server/glx/indirect_texture_compression.c index 3c09663fc..25c6eb30e 100644 --- a/xorg-server/glx/indirect_texture_compression.c +++ b/xorg-server/glx/indirect_texture_compression.c @@ -23,7 +23,6 @@ * SOFTWARE. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/glx/indirect_util.c b/xorg-server/glx/indirect_util.c index 58c194c99..44309104e 100644 --- a/xorg-server/glx/indirect_util.c +++ b/xorg-server/glx/indirect_util.c @@ -126,7 +126,7 @@ __glXSendReply( ClientPtr client, const void * data, size_t elements, elements = 0; } else if ( (elements > 1) || always_array ) { - reply_ints = ((elements * element_size) + 3) >> 2; + reply_ints = bytes_to_int32(elements * element_size); } __glXReply.length = reply_ints; @@ -174,7 +174,7 @@ __glXSendReplySwap( ClientPtr client, const void * data, size_t elements, elements = 0; } else if ( (elements > 1) || always_array ) { - reply_ints = ((elements * element_size) + 3) >> 2; + reply_ints = bytes_to_int32(elements * element_size); } __glXReply.length = bswap_32( reply_ints ); diff --git a/xorg-server/glx/render2.c b/xorg-server/glx/render2.c index a86a22acb..eb7c30ba0 100644 --- a/xorg-server/glx/render2.c +++ b/xorg-server/glx/render2.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -/* #define NEED_REPLIES */ #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -252,8 +251,3 @@ void __glXDisp_DrawArrays(GLbyte *pc) CALL_DisableClientState( GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY) ); CALL_DisableClientState( GET_DISPATCH(), (GL_FOG_COORD_ARRAY) ); } - -void __glXDisp_DrawArraysEXT(GLbyte *pc) -{ - __glXDisp_DrawArrays(pc); -} diff --git a/xorg-server/glx/render2swap.c b/xorg-server/glx/render2swap.c index 49449ff6f..17354c4f8 100644 --- a/xorg-server/glx/render2swap.c +++ b/xorg-server/glx/render2swap.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -/* #define NEED_REPLIES */ #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -363,8 +362,3 @@ void __glXDispSwap_DrawArrays(GLbyte *pc) CALL_DisableClientState( GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY) ); CALL_DisableClientState( GET_DISPATCH(), (GL_FOG_COORD_ARRAY) ); } - -void __glXDispSwap_DrawArraysEXT(GLbyte *pc) -{ - __glXDispSwap_DrawArrays(pc); -} diff --git a/xorg-server/glx/renderpix.c b/xorg-server/glx/renderpix.c index 17deb33c4..056e62c87 100644 --- a/xorg-server/glx/renderpix.c +++ b/xorg-server/glx/renderpix.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/glx/renderpixswap.c b/xorg-server/glx/renderpixswap.c index ebb20cfda..9cd57410e 100644 --- a/xorg-server/glx/renderpixswap.c +++ b/xorg-server/glx/renderpixswap.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/glx/rensize.c b/xorg-server/glx/rensize.c index 5c6b1500d..8a58e08d7 100644 --- a/xorg-server/glx/rensize.c +++ b/xorg-server/glx/rensize.c @@ -195,7 +195,7 @@ int __glXImageSize( GLenum format, GLenum type, GLenum target, } else { groupsPerRow = w; } - rowSize = (groupsPerRow + 7) >> 3; + rowSize = bits_to_bytes(groupsPerRow); padding = (rowSize % alignment); if (padding) { rowSize += alignment - padding; diff --git a/xorg-server/glx/single2.c b/xorg-server/glx/single2.c index d8b259269..50a59ed71 100644 --- a/xorg-server/glx/single2.c +++ b/xorg-server/glx/single2.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -336,6 +335,9 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) string = (const char *) CALL_GetString( GET_DISPATCH(), (name) ); client = cl->client; + if (string == NULL) + string = ""; + /* ** Restrict extensions to those that are supported by both the ** implementation and the connection. That is, return the diff --git a/xorg-server/glx/single2swap.c b/xorg-server/glx/single2swap.c index fcb0657d4..cf83bdc88 100644 --- a/xorg-server/glx/single2swap.c +++ b/xorg-server/glx/single2swap.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/glx/singlepix.c b/xorg-server/glx/singlepix.c index 6611b0380..a0a6a7918 100644 --- a/xorg-server/glx/singlepix.c +++ b/xorg-server/glx/singlepix.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -92,6 +91,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } + __GLX_NOTE_FLUSHED_CMDS(cx); return Success; } diff --git a/xorg-server/glx/singlepixswap.c b/xorg-server/glx/singlepixswap.c index b546ec864..a7febc9a6 100644 --- a/xorg-server/glx/singlepixswap.c +++ b/xorg-server/glx/singlepixswap.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -103,6 +102,7 @@ int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc) __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } + __GLX_NOTE_FLUSHED_CMDS(cx); return Success; } diff --git a/xorg-server/glx/swap_interval.c b/xorg-server/glx/swap_interval.c index 24abd69fa..3a5242022 100644 --- a/xorg-server/glx/swap_interval.c +++ b/xorg-server/glx/swap_interval.c @@ -22,7 +22,6 @@ * USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/glx/xfont.c b/xorg-server/glx/xfont.c index 6df373a16..b8b466d87 100644 --- a/xorg-server/glx/xfont.c +++ b/xorg-server/glx/xfont.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -181,12 +180,17 @@ int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc) ** Font can actually be either the ID of a font or the ID of a GC ** containing a font. */ - pFont = (FontPtr)LookupIDByType(req->font, RT_FONT); - if (!pFont) { - pGC = (GC *)LookupIDByType(req->font, RT_GC); - if (!pGC) { + + error = dixLookupResourceByType((pointer *)&pFont, + req->font, RT_FONT, + client, DixReadAccess); + if (error != Success) { + error = dixLookupResourceByType((pointer *)&pGC, + req->font, RT_GC, + client, DixReadAccess); + if (error != Success) { client->errorValue = req->font; - return BadFont; + return error == BadGC ? BadFont : error; } pFont = pGC->font; } diff --git a/xorg-server/hw/Makefile.in b/xorg-server/hw/Makefile.in index b6326eb22..21283c7f0 100644 --- a/xorg-server/hw/Makefile.in +++ b/xorg-server/hw/Makefile.in @@ -36,8 +36,11 @@ host_triplet = @host@ subdir = hw DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,7 +50,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -97,6 +101,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -117,9 +122,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -148,7 +156,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -157,9 +167,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -198,12 +212,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -223,7 +238,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -233,6 +247,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -246,11 +261,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -286,6 +300,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -310,7 +325,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -333,6 +347,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -364,7 +379,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/dmx/Makefile.am b/xorg-server/hw/dmx/Makefile.am index 8457aea60..9e9b39a19 100644 --- a/xorg-server/hw/dmx/Makefile.am +++ b/xorg-server/hw/dmx/Makefile.am @@ -11,9 +11,8 @@ if GLX SUBDIRS += glxProxy GLX_LIBS = glxProxy/libglxproxy.a GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h -GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod \ - -I@MESA_SOURCE@/include -GLX_DEFS = @GL_CFLAGS@ +GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod +GLX_DEFS = @GL_CFLAGS@ endif if BUILDDOCS @@ -86,6 +85,7 @@ XDMX_LIBS = \ $(GLX_LIBS) \ input/libdmxinput.a \ config/libdmxconfig.a \ + $(MAIN_LIB) \ $(XSERVER_LIBS) Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) diff --git a/xorg-server/hw/dmx/Makefile.in b/xorg-server/hw/dmx/Makefile.in index c2dde0609..a9dd8132d 100644 --- a/xorg-server/hw/dmx/Makefile.in +++ b/xorg-server/hw/dmx/Makefile.in @@ -41,8 +41,11 @@ bin_PROGRAMS = Xdmx$(EXEEXT) subdir = hw/dmx DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -52,7 +55,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" @@ -81,7 +85,8 @@ am_Xdmx_OBJECTS = dmx.$(OBJEXT) dmxcb.$(OBJEXT) dmxcmap.$(OBJEXT) \ Xdmx_OBJECTS = $(am_Xdmx_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(GLX_LIBS) input/libdmxinput.a \ - config/libdmxconfig.a $(am__DEPENDENCIES_1) + config/libdmxconfig.a $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) Xdmx_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(Xdmx_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -164,6 +169,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -184,9 +190,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -215,7 +224,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -224,9 +235,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -265,12 +280,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -290,7 +306,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -300,6 +315,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -313,11 +329,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -334,6 +349,7 @@ XDMX_LIBS = \ $(GLX_LIBS) \ input/libdmxinput.a \ config/libdmxconfig.a \ + $(MAIN_LIB) \ $(XSERVER_LIBS) XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ @@ -363,6 +379,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -387,7 +404,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -410,6 +426,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -441,7 +458,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -452,10 +471,8 @@ SUBDIRS = input config examples $(am__append_1) $(am__append_2) @XINERAMA_TRUE@PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c @GLX_TRUE@GLX_LIBS = glxProxy/libglxproxy.a @GLX_TRUE@GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h -@GLX_TRUE@GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod \ -@GLX_TRUE@ -I@MESA_SOURCE@/include - -@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@ +@GLX_TRUE@GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod +@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@ AM_CFLAGS = \ -DHAVE_DMX_CONFIG_H \ $(DIX_CFLAGS) \ diff --git a/xorg-server/hw/dmx/config/Makefile.am b/xorg-server/hw/dmx/config/Makefile.am index c31e04942..9fa7113be 100644 --- a/xorg-server/hw/dmx/config/Makefile.am +++ b/xorg-server/hw/dmx/config/Makefile.am @@ -22,14 +22,12 @@ libdmxconfig_a_SOURCES = $(LIBSRCS) if GLX GLX_DEFS = @GL_CFLAGS@ -GLX_INCS = -I@MESA_SOURCE@/include endif AM_YFLAGS = -d AM_CFLAGS = \ $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ - $(GLX_INCS) \ -DHAVE_DMX_CONFIG_H \ -DDMX_LOG_STANDALONE \ $(GLX_DEFS) \ diff --git a/xorg-server/hw/dmx/config/Makefile.in b/xorg-server/hw/dmx/config/Makefile.in index d6d1cf153..ea3f9eeca 100644 --- a/xorg-server/hw/dmx/config/Makefile.in +++ b/xorg-server/hw/dmx/config/Makefile.in @@ -41,8 +41,11 @@ subdir = hw/dmx/config DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO \ parser.c parser.h scanner.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -52,7 +55,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) @@ -128,6 +132,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -148,9 +153,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -179,7 +187,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -188,9 +198,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -229,12 +243,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -254,7 +269,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -264,6 +278,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -277,11 +292,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -317,6 +331,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -341,7 +356,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -364,6 +378,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -395,7 +410,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -417,12 +434,10 @@ BUILT_SOURCES = parser.c parser.h scanner.c MAINTAINERCLEANFILES = $(BUILT_SOURCES) libdmxconfig_a_SOURCES = $(LIBSRCS) @GLX_TRUE@GLX_DEFS = @GL_CFLAGS@ -@GLX_TRUE@GLX_INCS = -I@MESA_SOURCE@/include AM_YFLAGS = -d AM_CFLAGS = \ $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ - $(GLX_INCS) \ -DHAVE_DMX_CONFIG_H \ -DDMX_LOG_STANDALONE \ $(GLX_DEFS) \ diff --git a/xorg-server/hw/dmx/config/parser.c b/xorg-server/hw/dmx/config/parser.c index 61e4e201c..93303f1e7 100644 --- a/xorg-server/hw/dmx/config/parser.c +++ b/xorg-server/hw/dmx/config/parser.c @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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. - + the Free Software Foundation, either version 3 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. */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,47 +54,20 @@ /* Pure parsers. */ #define YYPURE 0 -/* Using locations. */ -#define YYLSP_NEEDED 0 - +/* Push parsers. */ +#define YYPUSH 0 +/* Pull parsers. */ +#define YYPULL 1 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_VIRTUAL = 258, - T_DISPLAY = 259, - T_WALL = 260, - T_OPTION = 261, - T_PARAM = 262, - T_STRING = 263, - T_DIMENSION = 264, - T_OFFSET = 265, - T_ORIGIN = 266, - T_COMMENT = 267, - T_LINE_COMMENT = 268 - }; -#endif -/* Tokens. */ -#define T_VIRTUAL 258 -#define T_DISPLAY 259 -#define T_WALL 260 -#define T_OPTION 261 -#define T_PARAM 262 -#define T_STRING 263 -#define T_DIMENSION 264 -#define T_OFFSET 265 -#define T_ORIGIN 266 -#define T_COMMENT 267 -#define T_LINE_COMMENT 268 - +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 35 "parser.y" #ifdef HAVE_DMX_CONFIG_H @@ -118,6 +90,9 @@ DMXConfigEntryPtr dmxConfigEntry = NULL; } +/* Line 189 of yacc.c */ +#line 95 "parser.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -136,10 +111,49 @@ DMXConfigEntryPtr dmxConfigEntry = NULL; # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_VIRTUAL = 258, + T_DISPLAY = 259, + T_WALL = 260, + T_OPTION = 261, + T_PARAM = 262, + T_STRING = 263, + T_DIMENSION = 264, + T_OFFSET = 265, + T_ORIGIN = 266, + T_COMMENT = 267, + T_LINE_COMMENT = 268 + }; +#endif +/* Tokens. */ +#define T_VIRTUAL 258 +#define T_DISPLAY 259 +#define T_WALL 260 +#define T_OPTION 261 +#define T_PARAM 262 +#define T_STRING 263 +#define T_DIMENSION 264 +#define T_OFFSET 265 +#define T_ORIGIN 266 +#define T_COMMENT 267 +#define T_LINE_COMMENT 268 + + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 56 "parser.y" { + +/* Line 214 of yacc.c */ +#line 56 "parser.y" + DMXConfigTokenPtr token; DMXConfigStringPtr string; DMXConfigNumberPtr number; @@ -154,22 +168,23 @@ typedef union YYSTYPE DMXConfigSubPtr subentry; DMXConfigVirtualPtr virtual; DMXConfigEntryPtr entry; -} -/* Line 187 of yacc.c. */ -#line 160 "parser.c" - YYSTYPE; + + + +/* Line 214 of yacc.c */ +#line 176 "parser.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 173 "parser.c" +/* Line 264 of yacc.c */ +#line 188 "parser.c" #ifdef short # undef short @@ -244,14 +259,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -332,9 +347,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -368,12 +383,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -813,17 +828,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -857,11 +875,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1141,10 +1159,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1160,11 +1176,10 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ - -/* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ @@ -1172,9 +1187,9 @@ int yynerrs; -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1198,66 +1213,68 @@ yyparse () #endif #endif { - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; @@ -1287,7 +1304,6 @@ yyparse () YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1295,7 +1311,6 @@ yyparse () yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -1318,9 +1333,8 @@ yyparse () (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1331,7 +1345,6 @@ yyparse () yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1341,6 +1354,9 @@ yyparse () YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1349,16 +1365,16 @@ yyparse () yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1390,20 +1406,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1443,86 +1455,120 @@ yyreduce: switch (yyn) { case 2: + +/* Line 1455 of yacc.c */ #line 95 "parser.y" { dmxConfigEntry = (yyvsp[(1) - (1)].entry); } break; case 4: + +/* Line 1455 of yacc.c */ #line 99 "parser.y" { APPEND(DMXConfigEntryPtr,(yyvsp[(1) - (2)].entry),(yyvsp[(2) - (2)].entry)); (yyval.entry) = (yyvsp[(1) - (2)].entry); } break; case 5: + +/* Line 1455 of yacc.c */ #line 102 "parser.y" { (yyval.entry) = dmxConfigEntryVirtual((yyvsp[(1) - (1)].virtual)); } break; case 6: + +/* Line 1455 of yacc.c */ #line 103 "parser.y" { (yyval.entry) = dmxConfigEntryComment((yyvsp[(1) - (1)].comment)); } break; case 7: + +/* Line 1455 of yacc.c */ #line 107 "parser.y" { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[(1) - (4)].token), NULL, NULL, (yyvsp[(2) - (4)].token), (yyvsp[(3) - (4)].subentry), (yyvsp[(4) - (4)].token)); } break; case 8: + +/* Line 1455 of yacc.c */ #line 109 "parser.y" { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[(1) - (5)].token), NULL, (yyvsp[(2) - (5)].pair), (yyvsp[(3) - (5)].token), (yyvsp[(4) - (5)].subentry), (yyvsp[(5) - (5)].token)); } break; case 9: + +/* Line 1455 of yacc.c */ #line 111 "parser.y" { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[(1) - (5)].token), (yyvsp[(2) - (5)].string), NULL, (yyvsp[(3) - (5)].token), (yyvsp[(4) - (5)].subentry), (yyvsp[(5) - (5)].token)); } break; case 10: + +/* Line 1455 of yacc.c */ #line 113 "parser.y" { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[(1) - (6)].token), (yyvsp[(2) - (6)].string), (yyvsp[(3) - (6)].pair), (yyvsp[(4) - (6)].token), (yyvsp[(5) - (6)].subentry), (yyvsp[(6) - (6)].token) ); } break; case 12: + +/* Line 1455 of yacc.c */ #line 117 "parser.y" { APPEND(DMXConfigSubPtr,(yyvsp[(1) - (2)].subentry),(yyvsp[(2) - (2)].subentry)); (yyval.subentry) = (yyvsp[(1) - (2)].subentry); } break; case 13: + +/* Line 1455 of yacc.c */ #line 120 "parser.y" { (yyval.subentry) = dmxConfigSubComment((yyvsp[(1) - (1)].comment)); } break; case 14: + +/* Line 1455 of yacc.c */ #line 121 "parser.y" { (yyval.subentry) = dmxConfigSubDisplay((yyvsp[(1) - (1)].display)); } break; case 15: + +/* Line 1455 of yacc.c */ #line 122 "parser.y" { (yyval.subentry) = dmxConfigSubWall((yyvsp[(1) - (1)].wall)); } break; case 16: + +/* Line 1455 of yacc.c */ #line 123 "parser.y" { (yyval.subentry) = dmxConfigSubOption((yyvsp[(1) - (1)].option)); } break; case 17: + +/* Line 1455 of yacc.c */ #line 124 "parser.y" { (yyval.subentry) = dmxConfigSubParam((yyvsp[(1) - (1)].param)); } break; case 18: + +/* Line 1455 of yacc.c */ #line 128 "parser.y" { (yyval.option) = dmxConfigCreateOption((yyvsp[(1) - (3)].token), (yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].token)); } break; case 19: + +/* Line 1455 of yacc.c */ #line 132 "parser.y" { (yyval.param) = dmxConfigCreateParam((yyvsp[(1) - (3)].token), NULL, (yyvsp[(2) - (3)].string), NULL, (yyvsp[(3) - (3)].token)); } break; case 20: + +/* Line 1455 of yacc.c */ #line 134 "parser.y" { (yyval.param) = dmxConfigCreateParam((yyvsp[(1) - (4)].token), (yyvsp[(2) - (4)].token), NULL, (yyvsp[(4) - (4)].token), NULL); (yyval.param)->next = (yyvsp[(3) - (4)].param); @@ -1530,148 +1576,205 @@ yyreduce: break; case 22: + +/* Line 1455 of yacc.c */ #line 140 "parser.y" { APPEND(DMXConfigParamPtr,(yyvsp[(1) - (2)].param),(yyvsp[(2) - (2)].param)); (yyval.param) = (yyvsp[(1) - (2)].param); } break; case 23: + +/* Line 1455 of yacc.c */ #line 144 "parser.y" { (yyval.param) = dmxConfigCreateParam(NULL, NULL, (yyvsp[(1) - (2)].string), NULL, (yyvsp[(2) - (2)].token)); } break; case 24: + +/* Line 1455 of yacc.c */ #line 148 "parser.y" { (yyval.pdim) = dmxConfigCreatePartDim((yyvsp[(1) - (2)].pair), (yyvsp[(2) - (2)].pair)); } break; case 25: + +/* Line 1455 of yacc.c */ #line 150 "parser.y" { (yyval.pdim) = dmxConfigCreatePartDim((yyvsp[(1) - (1)].pair), NULL); } break; case 26: + +/* Line 1455 of yacc.c */ #line 152 "parser.y" { (yyval.pdim) = dmxConfigCreatePartDim(NULL, (yyvsp[(1) - (1)].pair)); } break; case 27: + +/* Line 1455 of yacc.c */ #line 156 "parser.y" { (yyval.fdim) = dmxConfigCreateFullDim((yyvsp[(1) - (3)].pdim), (yyvsp[(3) - (3)].pdim)); } break; case 28: + +/* Line 1455 of yacc.c */ #line 158 "parser.y" { (yyval.fdim) = dmxConfigCreateFullDim(NULL, (yyvsp[(2) - (2)].pdim)); } break; case 29: + +/* Line 1455 of yacc.c */ #line 160 "parser.y" { (yyval.fdim) = dmxConfigCreateFullDim((yyvsp[(1) - (1)].pdim), NULL); } break; case 30: + +/* Line 1455 of yacc.c */ #line 164 "parser.y" { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (5)].token), (yyvsp[(2) - (5)].string), (yyvsp[(3) - (5)].fdim), (yyvsp[(4) - (5)].pair), (yyvsp[(5) - (5)].token)); } break; case 31: + +/* Line 1455 of yacc.c */ #line 166 "parser.y" { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (4)].token), NULL, (yyvsp[(2) - (4)].fdim), (yyvsp[(3) - (4)].pair), (yyvsp[(4) - (4)].token)); } break; case 32: + +/* Line 1455 of yacc.c */ #line 168 "parser.y" { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (4)].token), (yyvsp[(2) - (4)].string), NULL, (yyvsp[(3) - (4)].pair), (yyvsp[(4) - (4)].token)); } break; case 33: + +/* Line 1455 of yacc.c */ #line 171 "parser.y" { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (4)].token), (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].fdim), NULL, (yyvsp[(4) - (4)].token)); } break; case 34: + +/* Line 1455 of yacc.c */ #line 173 "parser.y" { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (3)].token), NULL, (yyvsp[(2) - (3)].fdim), NULL, (yyvsp[(3) - (3)].token)); } break; case 35: + +/* Line 1455 of yacc.c */ #line 175 "parser.y" { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (3)].token), (yyvsp[(2) - (3)].string), NULL, NULL, (yyvsp[(3) - (3)].token)); } break; case 36: + +/* Line 1455 of yacc.c */ #line 177 "parser.y" { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (2)].token), NULL, NULL, NULL, (yyvsp[(2) - (2)].token)); } break; case 37: + +/* Line 1455 of yacc.c */ #line 181 "parser.y" { (yyval.wall) = dmxConfigCreateWall((yyvsp[(1) - (5)].token), (yyvsp[(2) - (5)].pair), (yyvsp[(3) - (5)].pair), (yyvsp[(4) - (5)].string), (yyvsp[(5) - (5)].token)); } break; case 38: + +/* Line 1455 of yacc.c */ #line 183 "parser.y" { (yyval.wall) = dmxConfigCreateWall((yyvsp[(1) - (4)].token), (yyvsp[(2) - (4)].pair), NULL, (yyvsp[(3) - (4)].string), (yyvsp[(4) - (4)].token)); } break; case 39: + +/* Line 1455 of yacc.c */ #line 185 "parser.y" { (yyval.wall) = dmxConfigCreateWall((yyvsp[(1) - (3)].token), NULL, NULL, (yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].token)); } break; case 41: + +/* Line 1455 of yacc.c */ #line 189 "parser.y" { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } break; case 43: + +/* Line 1455 of yacc.c */ #line 193 "parser.y" { (yyval.string) = (yyvsp[(1) - (2)].string); (yyval.string)->comment = (yyvsp[(2) - (2)].comment)->comment; } break; case 45: + +/* Line 1455 of yacc.c */ #line 197 "parser.y" { (yyval.pair) = (yyvsp[(1) - (2)].pair); (yyval.pair)->comment = (yyvsp[(2) - (2)].comment)->comment; } break; case 47: + +/* Line 1455 of yacc.c */ #line 201 "parser.y" { (yyval.pair) = (yyvsp[(1) - (2)].pair); (yyval.pair)->comment = (yyvsp[(2) - (2)].comment)->comment; } break; case 49: + +/* Line 1455 of yacc.c */ #line 205 "parser.y" { (yyval.pair) = (yyvsp[(1) - (2)].pair); (yyval.pair)->comment = (yyvsp[(2) - (2)].comment)->comment; } break; case 51: + +/* Line 1455 of yacc.c */ #line 209 "parser.y" { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } break; case 53: + +/* Line 1455 of yacc.c */ #line 213 "parser.y" { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } break; case 55: + +/* Line 1455 of yacc.c */ #line 217 "parser.y" { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } break; case 57: + +/* Line 1455 of yacc.c */ #line 221 "parser.y" { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } break; case 59: + +/* Line 1455 of yacc.c */ #line 225 "parser.y" { APPEND(DMXConfigStringPtr, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].string)); (yyval.string) = (yyvsp[(1) - (2)].string); } break; -/* Line 1267 of yacc.c. */ -#line 1675 "parser.c" + +/* Line 1455 of yacc.c */ +#line 1778 "parser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1682,7 +1785,6 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1747,7 +1849,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -1764,7 +1866,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -1821,9 +1923,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -1848,7 +1947,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -1859,7 +1958,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered diff --git a/xorg-server/hw/dmx/config/parser.h b/xorg-server/hw/dmx/config/parser.h index 1c9fde16c..b04521f54 100644 --- a/xorg-server/hw/dmx/config/parser.h +++ b/xorg-server/hw/dmx/config/parser.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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. - + the Free Software Foundation, either version 3 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. */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -70,8 +70,11 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 56 "parser.y" { + +/* Line 1676 of yacc.c */ +#line 56 "parser.y" + DMXConfigTokenPtr token; DMXConfigStringPtr string; DMXConfigNumberPtr number; @@ -86,14 +89,17 @@ typedef union YYSTYPE DMXConfigSubPtr subentry; DMXConfigVirtualPtr virtual; DMXConfigEntryPtr entry; -} -/* Line 1489 of yacc.c. */ -#line 92 "parser.h" - YYSTYPE; + + + +/* Line 1676 of yacc.c */ +#line 97 "parser.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif extern YYSTYPE yylval; + diff --git a/xorg-server/hw/dmx/config/scanner.c b/xorg-server/hw/dmx/config/scanner.c index 9f30f0eef..4735aad54 100644 --- a/xorg-server/hw/dmx/config/scanner.c +++ b/xorg-server/hw/dmx/config/scanner.c @@ -53,6 +53,7 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -83,8 +84,6 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! C99 */ - #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -545,7 +544,7 @@ static int gettoken(int token, const char *text, int leng); static int getcomment(int token, const char *text, int leng); static int lineno = 1; -#line 549 "scanner.c" +#line 548 "scanner.c" #define INITIAL 0 #define OTHER 1 @@ -627,8 +626,7 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 +#define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ @@ -647,7 +645,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -734,7 +732,7 @@ YY_DECL #line 62 "scanner.l" -#line 738 "scanner.c" +#line 736 "scanner.c" if ( !(yy_init) ) { @@ -924,7 +922,7 @@ YY_RULE_SETUP #line 83 "scanner.l" ECHO; YY_BREAK -#line 928 "scanner.c" +#line 926 "scanner.c" case YY_END_OF_BUFFER: { @@ -1683,8 +1681,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ diff --git a/xorg-server/hw/dmx/dmx.c b/xorg-server/hw/dmx/dmx.c index 10d9e2206..87d408d7e 100644 --- a/xorg-server/hw/dmx/dmx.c +++ b/xorg-server/hw/dmx/dmx.c @@ -51,7 +51,6 @@ #include "misc.h" #include "os.h" #include "dixstruct.h" -#define EXTENSION_PROC_ARGS void * #include "extnsionst.h" #include "opaque.h" @@ -361,10 +360,10 @@ static int ProcDMXGetScreenAttributes(ClientPtr client) rep.rootWindowYorigin = attr.rootWindowYorigin; length = attr.displayName ? strlen(attr.displayName) : 0; - paddedLength = (length + 3) & ~3; + paddedLength = pad_to_int32(length); rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = paddedLength >> 2; + rep.length = bytes_to_int32(paddedLength); rep.displayNameLength = length; if (client->swapped) { @@ -406,7 +405,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client) REQUEST_AT_LEAST_SIZE(xDMXChangeScreensAttributesReq); - len = client->req_len - (sizeof(xDMXChangeScreensAttributesReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xDMXChangeScreensAttributesReq)); if (len < stuff->screenCount + stuff->maskCount) return BadLength; @@ -475,8 +474,8 @@ static int ProcDMXAddScreen(ClientPtr client) int paddedLength; REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq); - paddedLength = (stuff->displayNameLength + 3) & ~3; - len = client->req_len - (sizeof(xDMXAddScreenReq) >> 2); + paddedLength = pad_to_int32(stuff->displayNameLength); + len = client->req_len - bytes_to_int32(sizeof(xDMXAddScreenReq)); if (len != Ones(stuff->valueMask) + paddedLength/4) return BadLength; @@ -796,10 +795,10 @@ static int ProcDMXGetInputAttributes(ClientPtr client) rep.detached = attr.detached; length = attr.name ? strlen(attr.name) : 0; - paddedLength = (length + 3) & ~3; + paddedLength = pad_to_int32(length); rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = paddedLength >> 2; + rep.length = bytes_to_int32(paddedLength); rep.nameLength = length; if (client->swapped) { swaps(&rep.sequenceNumber, n); @@ -829,7 +828,7 @@ static int ProcDMXAddInput(ClientPtr client) int id = -1; REQUEST_AT_LEAST_SIZE(xDMXAddInputReq); - paddedLength = (stuff->displayNameLength + 3) & ~3; + paddedLength = pad_to_int32(stuff->displayNameLength); len = client->req_len - (sizeof(xDMXAddInputReq) >> 2); if (len != Ones(stuff->valueMask) + paddedLength/4) return BadLength; @@ -998,7 +997,7 @@ static int SProcDMXAddScreen(ClientPtr client) REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq); swapl(&stuff->displayNameLength, n); swapl(&stuff->valueMask, n); - paddedLength = (stuff->displayNameLength + 3) & ~3; + paddedLength = pad_to_int32(stuff->displayNameLength); SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4); return ProcDMXAddScreen(client); } @@ -1078,7 +1077,7 @@ static int SProcDMXAddInput(ClientPtr client) REQUEST_AT_LEAST_SIZE(xDMXAddInputReq); swapl(&stuff->displayNameLength, n); swapl(&stuff->valueMask, n); - paddedLength = (stuff->displayNameLength + 3) & ~3; + paddedLength = pad_to_int32(stuff->displayNameLength); SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4); return ProcDMXAddInput(client); } diff --git a/xorg-server/hw/dmx/dmx.h b/xorg-server/hw/dmx/dmx.h index 05e5fabd1..6ebd00efd 100644 --- a/xorg-server/hw/dmx/dmx.h +++ b/xorg-server/hw/dmx/dmx.h @@ -341,21 +341,21 @@ do { \ #define _MAXSCREENSALLOCF(o,size,fatal) \ do { \ if (!o) { \ - o = xcalloc((size), sizeof(*(o))); \ + o = calloc((size), sizeof(*(o))); \ if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \ } \ } while (0) #define _MAXSCREENSALLOCR(o,size,retval) \ do { \ if (!o) { \ - o = xcalloc((size), sizeof(*(o))); \ + o = calloc((size), sizeof(*(o))); \ if (!o) return retval; \ } \ } while (0) #define MAXSCREENSFREE(o) \ do { \ - if (o) xfree(o); \ + if (o) free(o); \ o = NULL; \ } while (0) diff --git a/xorg-server/hw/dmx/dmxcb.c b/xorg-server/hw/dmx/dmxcb.c index ae6eb6fb2..4e7279a51 100644 --- a/xorg-server/hw/dmx/dmxcb.c +++ b/xorg-server/hw/dmx/dmxcb.c @@ -43,12 +43,6 @@ #include "dmxinput.h" #include "dmxlog.h" -#undef Xmalloc -#undef Xcalloc -#undef Xrealloc -#undef Xfree - - extern int connBlockScreenStart; #ifdef PANORAMIX diff --git a/xorg-server/hw/dmx/dmxclient.h b/xorg-server/hw/dmx/dmxclient.h index f0c3608da..147d14ed8 100644 --- a/xorg-server/hw/dmx/dmxclient.h +++ b/xorg-server/hw/dmx/dmxclient.h @@ -91,10 +91,8 @@ typedef XID KeySym64; #undef PictFormatType #endif -#ifdef XKB #include -#include -#endif +#include "xkbstr.h" #include @@ -134,14 +132,9 @@ extern int ChangeDeviceNotify; /* Some protocol gets included last, after undefines. */ #include -#ifdef XKB #include -#ifndef XKB_IN_SERVER -#define XKB_IN_SERVER -#endif -#include +#include "xkbstr.h" #undef XPointer -#endif #include #endif diff --git a/xorg-server/hw/dmx/dmxcursor.c b/xorg-server/hw/dmx/dmxcursor.c index 32934bbad..e8a18451f 100644 --- a/xorg-server/hw/dmx/dmxcursor.c +++ b/xorg-server/hw/dmx/dmxcursor.c @@ -90,6 +90,7 @@ #include "globals.h" #include "cursorstr.h" #include "dixevents.h" /* For GetSpriteCursor() */ +#include "inputstr.h" /* for inputInfo.pointer */ #if DMX_CURSOR_DEBUG #define DMXDBG0(f) dmxLog(dmxDebug,f) diff --git a/xorg-server/hw/dmx/dmxextension.c b/xorg-server/hw/dmx/dmxextension.c index 91479e7a5..d367f262c 100644 --- a/xorg-server/hw/dmx/dmxextension.c +++ b/xorg-server/hw/dmx/dmxextension.c @@ -41,6 +41,8 @@ #include #endif +#include + #include "dmx.h" #include "dmxinit.h" #include "dmxextension.h" @@ -64,12 +66,6 @@ #include /* For DMX_BAD_* */ #include "cursorstr.h" -#undef Xmalloc -#undef Xcalloc -#undef Xrealloc -#undef Xfree - - /* The default font is declared in dix/globals.c, but is not included in * _any_ header files. */ extern FontPtr defaultFont; @@ -1127,9 +1123,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n) } /* Now allocate the memory we need */ - images = xcalloc(len_images, sizeof(char)); - gids = xalloc(glyphSet->hash.tableEntries*sizeof(Glyph)); - glyphs = xalloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo)); + images = calloc(len_images, sizeof(char)); + gids = malloc(glyphSet->hash.tableEntries*sizeof(Glyph)); + glyphs = malloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo)); pos = images; ctr = 0; @@ -1164,9 +1160,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n) len_images); /* Clean up */ - xfree(len_images); - xfree(gids); - xfree(glyphs); + free(len_images); + free(gids); + free(glyphs); } #endif diff --git a/xorg-server/hw/dmx/dmxfont.c b/xorg-server/hw/dmx/dmxfont.c index c739159a8..c33aee79a 100644 --- a/xorg-server/hw/dmx/dmxfont.c +++ b/xorg-server/hw/dmx/dmxfont.c @@ -49,12 +49,6 @@ #include "dixfont.h" #include "dixstruct.h" -#undef Xmalloc -#undef Xcalloc -#undef Xrealloc -#undef Xfree - - static int (*dmxSaveProcVector[256])(ClientPtr); static int dmxFontLastError; @@ -259,7 +253,7 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont) { DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; dmxFontPrivPtr pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex); - char *name; + const char *name; char **oldFontPath = NULL; int nOldPaths; Atom name_atom, value_atom; @@ -421,7 +415,7 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont) } if (!value_atom) return FALSE; - name = (char *)NameForAtom(value_atom); + name = NameForAtom(value_atom); if (!name) return FALSE; pFontPriv->font[pScreen->myNum] = diff --git a/xorg-server/hw/dmx/dmxpict.c b/xorg-server/hw/dmx/dmxpict.c index 8bce6892e..37dfa10ac 100644 --- a/xorg-server/hw/dmx/dmxpict.c +++ b/xorg-server/hw/dmx/dmxpict.c @@ -56,12 +56,6 @@ #include "mipict.h" #include "fbpict.h" -#undef Xmalloc -#undef Xcalloc -#undef Xrealloc -#undef Xfree - - extern int RenderErrBase; extern int (*ProcRenderVector[RenderNumberRequests])(ClientPtr); diff --git a/xorg-server/hw/dmx/dmxscrinit.c b/xorg-server/hw/dmx/dmxscrinit.c index 28c8b0185..b5afb5839 100644 --- a/xorg-server/hw/dmx/dmxscrinit.c +++ b/xorg-server/hw/dmx/dmxscrinit.c @@ -61,12 +61,6 @@ #include "mipointer.h" #include "micmap.h" -#undef Xmalloc -#undef Xcalloc -#undef Xrealloc -#undef Xfree - - extern Bool dmxCloseScreen(int idx, ScreenPtr pScreen); static Bool dmxSaveScreen(ScreenPtr pScreen, int what); @@ -74,7 +68,7 @@ static unsigned long dmxGeneration; static unsigned long *dmxCursorGeneration; static int dmxGCPrivateKeyIndex; -DevPrivateKey dmxGCPrivateKey = &dmxGCPrivateKey; /**< Private index for GCs */ +DevPrivateKey dmxGCPrivateKey = &dmxGCPrivateKeyIndex; /**< Private index for GCs */ static int dmxWinPrivateKeyIndex; DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKeyIndex; /**< Private index for Windows */ static int dmxPixPrivateKeyIndex; diff --git a/xorg-server/hw/dmx/doc/Makefile.in b/xorg-server/hw/dmx/doc/Makefile.in index 57e43fd8b..29ca37483 100644 --- a/xorg-server/hw/dmx/doc/Makefile.in +++ b/xorg-server/hw/dmx/doc/Makefile.in @@ -58,8 +58,11 @@ host_triplet = @host@ subdir = hw/dmx/doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -69,7 +72,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -81,6 +85,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -101,9 +106,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -132,7 +140,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -141,9 +151,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -182,12 +196,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -207,7 +222,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -217,6 +231,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -230,11 +245,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -270,6 +284,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -294,7 +309,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -317,6 +331,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -348,7 +363,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/dmx/examples/Makefile.in b/xorg-server/hw/dmx/examples/Makefile.in index f30be248c..c59d1ef2b 100644 --- a/xorg-server/hw/dmx/examples/Makefile.in +++ b/xorg-server/hw/dmx/examples/Makefile.in @@ -42,8 +42,11 @@ noinst_PROGRAMS = xinput$(EXEEXT) xtest$(EXEEXT) evi$(EXEEXT) \ subdir = hw/dmx/examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -53,7 +56,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -179,6 +183,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -199,9 +204,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -230,7 +238,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -239,9 +249,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -280,12 +294,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -305,7 +320,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -315,6 +329,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -328,11 +343,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -368,6 +382,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -392,7 +407,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -415,6 +429,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -446,7 +461,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/dmx/glxProxy/Makefile.am b/xorg-server/hw/dmx/glxProxy/Makefile.am index f99549817..851604883 100644 --- a/xorg-server/hw/dmx/glxProxy/Makefile.am +++ b/xorg-server/hw/dmx/glxProxy/Makefile.am @@ -36,9 +36,6 @@ AM_CFLAGS = \ $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ -I$(top_srcdir)/include \ - -I$(top_srcdir)/GL/include \ - -I$(top_builddir)/GL/include \ - -I@MESA_SOURCE@/include \ -DHAVE_DMX_CONFIG_H \ @DMXMODULES_CFLAGS@ \ -I$(top_srcdir)/hw/xfree86/os-support diff --git a/xorg-server/hw/dmx/glxProxy/Makefile.in b/xorg-server/hw/dmx/glxProxy/Makefile.in index e71ed7362..3cb47e7dd 100644 --- a/xorg-server/hw/dmx/glxProxy/Makefile.in +++ b/xorg-server/hw/dmx/glxProxy/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/dmx/glxProxy DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) @@ -83,6 +87,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -103,9 +108,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -134,7 +142,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -143,9 +153,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -184,12 +198,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -209,7 +224,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -219,6 +233,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -232,11 +247,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -272,6 +286,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -296,7 +311,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -319,6 +333,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -350,7 +365,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -393,9 +410,6 @@ AM_CFLAGS = \ $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ -I$(top_srcdir)/include \ - -I$(top_srcdir)/GL/include \ - -I$(top_builddir)/GL/include \ - -I@MESA_SOURCE@/include \ -DHAVE_DMX_CONFIG_H \ @DMXMODULES_CFLAGS@ \ -I$(top_srcdir)/hw/xfree86/os-support diff --git a/xorg-server/hw/dmx/glxProxy/g_renderswap.c b/xorg-server/hw/dmx/glxProxy/g_renderswap.c index 940a06af7..b92821d0a 100644 --- a/xorg-server/hw/dmx/glxProxy/g_renderswap.c +++ b/xorg-server/hw/dmx/glxProxy/g_renderswap.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #include "glxserver.h" #include "glxext.h" #include "g_disptab.h" diff --git a/xorg-server/hw/dmx/glxProxy/global.c b/xorg-server/hw/dmx/glxProxy/global.c index 70b8afbb5..9cf8c11c3 100644 --- a/xorg-server/hw/dmx/glxProxy/global.c +++ b/xorg-server/hw/dmx/glxProxy/global.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #include "glxserver.h" /* diff --git a/xorg-server/hw/dmx/glxProxy/glxcmds.c b/xorg-server/hw/dmx/glxProxy/glxcmds.c index 536921a87..31fd431e7 100644 --- a/xorg-server/hw/dmx/glxProxy/glxcmds.c +++ b/xorg-server/hw/dmx/glxProxy/glxcmds.c @@ -43,8 +43,6 @@ #undef Xrealloc #undef Xfree -#define NEED_REPLIES -#define FONT_PCF #include "glxserver.h" #include #include "g_disptab.h" diff --git a/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c b/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c index 7c36be3b7..b3720f6f6 100644 --- a/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c +++ b/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c @@ -28,8 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES -#define FONT_PCF #include "glxserver.h" #include "glxutil.h" #include diff --git a/xorg-server/hw/dmx/glxProxy/glxext.c b/xorg-server/hw/dmx/glxProxy/glxext.c index 3a2488132..b30d144ee 100644 --- a/xorg-server/hw/dmx/glxProxy/glxext.c +++ b/xorg-server/hw/dmx/glxProxy/glxext.c @@ -34,7 +34,6 @@ #include "dmx.h" -#define NEED_REPLIES #include "glxserver.h" #include #include diff --git a/xorg-server/hw/dmx/glxProxy/glxsingle.c b/xorg-server/hw/dmx/glxProxy/glxsingle.c index 0fb915ad7..dcc604052 100644 --- a/xorg-server/hw/dmx/glxProxy/glxsingle.c +++ b/xorg-server/hw/dmx/glxProxy/glxsingle.c @@ -44,7 +44,6 @@ #undef Xrealloc #undef Xfree -#define NEED_REPLIES #include "glxserver.h" #include "glxext.h" #include "g_disptab.h" @@ -903,7 +902,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) else { /* this is a GL_BITMAP pixel type, should copy bits */ int r; - int src_rowsize = ((sw * ebits) + 7) / 8; + int src_rowsize = bits_to_bytes(sw * ebits); int src_pad = src_rowsize % 4; if ( src_pad ) { src_rowsize += (4 - src_pad); diff --git a/xorg-server/hw/dmx/glxProxy/glxutil.c b/xorg-server/hw/dmx/glxProxy/glxutil.c index e3056bbd4..d0ce50486 100644 --- a/xorg-server/hw/dmx/glxProxy/glxutil.c +++ b/xorg-server/hw/dmx/glxProxy/glxutil.c @@ -28,19 +28,12 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES -#define FONT_PCF #include "glxserver.h" #include #include #include #include "glxutil.h" - -#undef Xmalloc -#undef Xcalloc -#undef Xrealloc -#undef Xfree - +#include /************************************************************************/ @@ -58,7 +51,7 @@ __glXMalloc(size_t size) if (size == 0) { return NULL; } - addr = (void *) xalloc(size); + addr = malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -75,7 +68,7 @@ __glXCalloc(size_t numElements, size_t elementSize) if ((numElements == 0) || (elementSize == 0)) { return NULL; } - addr = xcalloc(numElements, elementSize); + addr = calloc(numElements, elementSize); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -93,13 +86,13 @@ __glXRealloc(void *addr, size_t newSize) xfree(addr); return NULL; } else { - newAddr = xrealloc(addr, newSize); + newAddr = realloc(addr, newSize); } } else { if (newSize == 0) { return NULL; } else { - newAddr = xalloc(newSize); + newAddr = malloc(newSize); } } if (newAddr == NULL) { @@ -113,6 +106,6 @@ void __glXFree(void *addr) { if (addr) { - xfree(addr); + free(addr); } } diff --git a/xorg-server/hw/dmx/glxProxy/glxvendor.c b/xorg-server/hw/dmx/glxProxy/glxvendor.c index 1e5a32629..6b1f9a820 100644 --- a/xorg-server/hw/dmx/glxProxy/glxvendor.c +++ b/xorg-server/hw/dmx/glxProxy/glxvendor.c @@ -43,7 +43,6 @@ #undef Xrealloc #undef Xfree -#define NEED_REPLIES #include "glxserver.h" #include "glxext.h" #include "g_disptab.h" diff --git a/xorg-server/hw/dmx/glxProxy/glxvisuals.c b/xorg-server/hw/dmx/glxProxy/glxvisuals.c index c8b1eea31..898c6be7b 100644 --- a/xorg-server/hw/dmx/glxProxy/glxvisuals.c +++ b/xorg-server/hw/dmx/glxProxy/glxvisuals.c @@ -37,12 +37,7 @@ #include "glxserver.h" #include "glxutil.h" #include "dmx_glxvisuals.h" - -#undef Xmalloc -#undef Xcalloc -#undef Xrealloc -#undef Xfree - +#include static int numConfigs = 0; static __GLXvisualConfig *visualConfigs = NULL; diff --git a/xorg-server/hw/dmx/glxProxy/render2swap.c b/xorg-server/hw/dmx/glxProxy/render2swap.c index 6e7505324..37e43d8fa 100644 --- a/xorg-server/hw/dmx/glxProxy/render2swap.c +++ b/xorg-server/hw/dmx/glxProxy/render2swap.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -/* #define NEED_REPLIES */ #include "glxserver.h" #include "unpack.h" #include "g_disptab.h" diff --git a/xorg-server/hw/dmx/glxProxy/renderpixswap.c b/xorg-server/hw/dmx/glxProxy/renderpixswap.c index 3e4548d2e..462feeeb1 100644 --- a/xorg-server/hw/dmx/glxProxy/renderpixswap.c +++ b/xorg-server/hw/dmx/glxProxy/renderpixswap.c @@ -28,7 +28,6 @@ * Silicon Graphics, Inc. */ -#define NEED_REPLIES #include "glxserver.h" #include "unpack.h" #include "g_disptab.h" diff --git a/xorg-server/hw/dmx/input/ChkNotMaskEv.c b/xorg-server/hw/dmx/input/ChkNotMaskEv.c index fdc67a889..635332e63 100644 --- a/xorg-server/hw/dmx/input/ChkNotMaskEv.c +++ b/xorg-server/hw/dmx/input/ChkNotMaskEv.c @@ -58,7 +58,6 @@ #include #endif -#define NEED_EVENTS #include "dmx.h" #include "ChkNotMaskEv.h" diff --git a/xorg-server/hw/dmx/input/Makefile.am b/xorg-server/hw/dmx/input/Makefile.am index 8ea500316..47dbd967b 100644 --- a/xorg-server/hw/dmx/input/Makefile.am +++ b/xorg-server/hw/dmx/input/Makefile.am @@ -58,12 +58,10 @@ libdmxinput_a_SOURCES = ChkNotMaskEv.c \ if GLX GLX_DEFS = @GL_CFLAGS@ -GLX_INCS = -I@MESA_SOURCE@/include endif AM_CFLAGS = $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ - $(GLX_INCS) \ -DHAVE_DMX_CONFIG_H \ $(GLX_DEFS) \ @DMXMODULES_CFLAGS@ diff --git a/xorg-server/hw/dmx/input/Makefile.in b/xorg-server/hw/dmx/input/Makefile.in index ca7d43b57..aba7574db 100644 --- a/xorg-server/hw/dmx/input/Makefile.in +++ b/xorg-server/hw/dmx/input/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/dmx/input DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) @@ -97,6 +101,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -117,9 +122,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -148,7 +156,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -157,9 +167,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -198,12 +212,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -223,7 +238,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -233,6 +247,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -246,11 +261,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -286,6 +300,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -310,7 +325,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -333,6 +347,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -364,7 +379,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -423,10 +440,8 @@ libdmxinput_a_SOURCES = ChkNotMaskEv.c \ $(LIBSRCS) @GLX_TRUE@GLX_DEFS = @GL_CFLAGS@ -@GLX_TRUE@GLX_INCS = -I@MESA_SOURCE@/include AM_CFLAGS = $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ - $(GLX_INCS) \ -DHAVE_DMX_CONFIG_H \ $(GLX_DEFS) \ @DMXMODULES_CFLAGS@ diff --git a/xorg-server/hw/dmx/input/atKeynames.h b/xorg-server/hw/dmx/input/atKeynames.h index 85f13ac32..e632ca27c 100644 --- a/xorg-server/hw/dmx/input/atKeynames.h +++ b/xorg-server/hw/dmx/input/atKeynames.h @@ -67,7 +67,6 @@ #define ScrollLockMask Mod5Mask #define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7))) -#define ModifierDown(k) ((keyc->state & (k)) == (k)) /* * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three) diff --git a/xorg-server/hw/dmx/input/dmxcommon.c b/xorg-server/hw/dmx/input/dmxcommon.c index e77bb7918..2bffb17e7 100644 --- a/xorg-server/hw/dmx/input/dmxcommon.c +++ b/xorg-server/hw/dmx/input/dmxcommon.c @@ -258,7 +258,6 @@ void dmxCommonKbdGetMap(DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap) * specified \a pDev. */ void dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info) { -#ifdef XKB GETPRIVFROMPDEV; GETDMXINPUTFROMPRIV; char *pt; @@ -284,7 +283,6 @@ void dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info) if ((pt = strchr(info->names.keycodes, '+'))) *pt = '\0'; } dmxCommonRestoreState(priv); -#endif } /** Turn \a pDev on (i.e., take input from \a pDev). */ @@ -577,7 +575,6 @@ void dmxCommonSaveState(pointer private) if (dmxInput->console) priv = dmxInput->devs[0]->private; if (!priv->display || priv->stateSaved) return; DMXDBG0("dmxCommonSaveState\n"); -#ifdef XKB if (dmxUseXKB && (priv->xkb = XkbAllocKeyboard())) { if (XkbGetIndicatorMap(priv->display, XkbAllIndicatorsMask, priv->xkb) || XkbGetNames(priv->display, XkbAllNamesMask, priv->xkb)) { @@ -596,7 +593,6 @@ void dmxCommonSaveState(pointer private) } } } -#endif XGetKeyboardControl(priv->display, &ks); priv->savedKctrl.click = ks.key_click_percent; @@ -636,14 +632,12 @@ void dmxCommonRestoreState(pointer private) priv->stateSaved = 0; DMXDBG0("dmxCommonRestoreState\n"); -#ifdef XKB if (priv->xkb) { *priv->xkb->indicators = priv->savedIndicators; XkbSetIndicatorMap(priv->display, ~0, priv->xkb); XkbFreeKeyboard(priv->xkb, 0, True); priv->xkb = 0; } -#endif for (start = GetTimeInMillis(); GetTimeInMillis() - start < 5000;) { CARD32 tmp; diff --git a/xorg-server/hw/dmx/input/dmxcommon.h b/xorg-server/hw/dmx/input/dmxcommon.h index a9b260cd9..68f2b520d 100644 --- a/xorg-server/hw/dmx/input/dmxcommon.h +++ b/xorg-server/hw/dmx/input/dmxcommon.h @@ -54,14 +54,10 @@ XModifierKeymap *savedModMap; \ int stateSaved -#ifdef XKB #define DMX_COMMON_XKB \ DMX_COMMON_OTHER; \ XkbDescPtr xkb; \ XkbIndicatorRec savedIndicators -#else -#define DMX_COMMON_XKB DMX_COMMON_OTHER -#endif #define DMX_COMMON_PRIVATE \ DMX_COMMON_XKB; \ diff --git a/xorg-server/hw/dmx/input/dmxdummy.c b/xorg-server/hw/dmx/input/dmxdummy.c index 2afe2580d..971892b9f 100644 --- a/xorg-server/hw/dmx/input/dmxdummy.c +++ b/xorg-server/hw/dmx/input/dmxdummy.c @@ -60,9 +60,7 @@ void dmxDummyKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info) info->freemap = 0; info->focusClass = 1; info->kbdFeedbackClass = 1; -#ifdef XKB info->force = 1; -#endif } /** Return information about the dummy mouse device specified in \a pDev diff --git a/xorg-server/hw/dmx/input/dmxeq.c b/xorg-server/hw/dmx/input/dmxeq.c index 86ba960b8..33e8771c9 100644 --- a/xorg-server/hw/dmx/input/dmxeq.c +++ b/xorg-server/hw/dmx/input/dmxeq.c @@ -80,7 +80,6 @@ #include "scrnintstr.h" /* For screenInfo */ #include -#define EXTENSION_PROC_ARGS void * #if DMX_EQ_DEBUG #define DMXDBG2(f,a,b) dmxLog(dmxDebug,f,a,b) diff --git a/xorg-server/hw/dmx/input/dmxevents.c b/xorg-server/hw/dmx/input/dmxevents.c index 24275a189..37f8cb33b 100644 --- a/xorg-server/hw/dmx/input/dmxevents.c +++ b/xorg-server/hw/dmx/input/dmxevents.c @@ -56,6 +56,7 @@ #include "inputstr.h" #include "mipointer.h" #include "mi.h" +#include "exglobals.h" #include "XIstubs.h" @@ -99,7 +100,6 @@ static int dmxCheckFunctionKeys(DMXLocalInputInfoPtr dmxLocal, KeySym keySym) { DMXInputInfo *dmxInput = &dmxInputs[dmxLocal->inputIdx]; - unsigned short state = 0; #if 1 /* hack to detect ctrl-alt-q, etc */ static int ctrl = 0, alt = 0; @@ -119,6 +119,8 @@ static int dmxCheckFunctionKeys(DMXLocalInputInfoPtr dmxLocal, if (!ctrl || !alt) return 0; #else + unsigned short state = 0; + if (dmxLocal->sendsCore) state = dmxLocalCoreKeyboard->pDevice->key->state; else if (dmxLocal->pDevice->key) @@ -236,7 +238,7 @@ static void enqueueMotion(DevicePtr pDev, int x, int y) nevents = GetPointerEvents(events, p, MotionNotify, detail, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(p, (events + i)->event); + mieqEnqueue(p, (InternalEvent*)(events + i)->event); return; } @@ -694,7 +696,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, /*ErrorF("KEY %d sym %d\n", detail, (int) keySym);*/ nevents = GetKeyboardEvents(events, p, type, detail); for (i = 0; i < nevents; i++) - mieqEnqueue(p, (events + i)->event); + mieqEnqueue(p, (InternalEvent*)(events + i)->event); return; case ButtonPress: @@ -707,7 +709,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, 0, /* num_valuators = 0 */ valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(p, (events + i)->event); + mieqEnqueue(p, (InternalEvent*)(events + i)->event); return; case MotionNotify: @@ -718,7 +720,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, nevents = GetPointerEvents(events, p, type, detail, POINTER_ABSOLUTE, 0, 3, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(p, (events + i)->event); + mieqEnqueue(p, (InternalEvent*)(events + i)->event); return; case EnterNotify: diff --git a/xorg-server/hw/dmx/input/dmxinputinit.c b/xorg-server/hw/dmx/input/dmxinputinit.c index 77f8ed5fc..666db2138 100644 --- a/xorg-server/hw/dmx/input/dmxinputinit.c +++ b/xorg-server/hw/dmx/input/dmxinputinit.c @@ -76,17 +76,8 @@ #include #include #include "exevents.h" -#define EXTENSION_PROC_ARGS void * #include "extinit.h" -/* From XI.h */ -#ifndef Relative -#define Relative 0 -#endif -#ifndef Absolute -#define Absolute 1 -#endif - DMXLocalInputInfoPtr dmxLocalCorePointer, dmxLocalCoreKeyboard; static DMXLocalInputInfoRec DMXDummyMou = { @@ -306,15 +297,13 @@ static void _dmxKeyboardKbdCtrlProc(DMXLocalInputInfoPtr dmxLocal, dmxLocal->kctrl = *ctrl; if (dmxLocal->kCtrl) { dmxLocal->kCtrl(&dmxLocal->pDevice->public, ctrl); -#ifdef XKB - if (!noXkbExtension && dmxLocal->pDevice->kbdfeed) { + if (dmxLocal->pDevice->kbdfeed) { XkbEventCauseRec cause; XkbSetCauseUnknown(&cause); /* Generate XKB events, as necessary */ XkbUpdateIndicators(dmxLocal->pDevice, XkbAllIndicatorsMask, False, NULL, &cause); } -#endif } } @@ -370,7 +359,6 @@ void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice, } } -#ifdef XKB static void dmxKeyboardFreeNames(XkbComponentNamesPtr names) { if (names->keymap) XFree(names->keymap); @@ -380,76 +368,63 @@ static void dmxKeyboardFreeNames(XkbComponentNamesPtr names) if (names->symbols) XFree(names->symbols); if (names->geometry) XFree(names->geometry); } -#endif static int dmxKeyboardOn(DeviceIntPtr pDevice, DMXLocalInitInfo *info) { -#ifdef XKB GETDMXINPUTFROMPDEVICE; -#else - DevicePtr pDev = &pDevice->public; -#endif - -#ifdef XKB - if (noXkbExtension) { -#endif - if (!InitKeyboardDeviceStruct(pDev, &info->keySyms, info->modMap, - dmxKeyboardBellProc, - dmxKeyboardKbdCtrlProc)) - return BadImplementation; -#ifdef XKB + XkbRMLVOSet rmlvo; + + rmlvo.rules = dmxConfigGetXkbRules(); + rmlvo.model = dmxConfigGetXkbModel(); + rmlvo.layout = dmxConfigGetXkbLayout(); + rmlvo.variant = dmxConfigGetXkbVariant(); + rmlvo.options = dmxConfigGetXkbOptions(); + + XkbSetRulesDflts(&rmlvo); + if (!info->force && (dmxInput->keycodes + || dmxInput->symbols + || dmxInput->geometry)) { + if (info->freenames) dmxKeyboardFreeNames(&info->names); + info->freenames = 0; + info->names.keycodes = dmxInput->keycodes; + info->names.types = NULL; + info->names.compat = NULL; + info->names.symbols = dmxInput->symbols; + info->names.geometry = dmxInput->geometry; + + dmxLogInput(dmxInput, "XKEYBOARD: From command line: %s", + info->names.keycodes); + if (info->names.symbols && *info->names.symbols) + dmxLogInputCont(dmxInput, " %s", info->names.symbols); + if (info->names.geometry && *info->names.geometry) + dmxLogInputCont(dmxInput, " %s", info->names.geometry); + dmxLogInputCont(dmxInput, "\n"); + } else if (info->names.keycodes) { + dmxLogInput(dmxInput, "XKEYBOARD: From device: %s", + info->names.keycodes); + if (info->names.symbols && *info->names.symbols) + dmxLogInputCont(dmxInput, " %s", info->names.symbols); + if (info->names.geometry && *info->names.geometry) + dmxLogInputCont(dmxInput, " %s", info->names.geometry); + dmxLogInputCont(dmxInput, "\n"); } else { - XkbSetRulesDflts(dmxConfigGetXkbRules(), - dmxConfigGetXkbModel(), - dmxConfigGetXkbLayout(), - dmxConfigGetXkbVariant(), - dmxConfigGetXkbOptions()); - if (!info->force && (dmxInput->keycodes - || dmxInput->symbols - || dmxInput->geometry)) { - if (info->freenames) dmxKeyboardFreeNames(&info->names); - info->freenames = 0; - info->names.keycodes = dmxInput->keycodes; - info->names.types = NULL; - info->names.compat = NULL; - info->names.symbols = dmxInput->symbols; - info->names.geometry = dmxInput->geometry; - - dmxLogInput(dmxInput, "XKEYBOARD: From command line: %s", - info->names.keycodes); - if (info->names.symbols && *info->names.symbols) - dmxLogInputCont(dmxInput, " %s", info->names.symbols); - if (info->names.geometry && *info->names.geometry) - dmxLogInputCont(dmxInput, " %s", info->names.geometry); - dmxLogInputCont(dmxInput, "\n"); - } else if (info->names.keycodes) { - dmxLogInput(dmxInput, "XKEYBOARD: From device: %s", - info->names.keycodes); - if (info->names.symbols && *info->names.symbols) - dmxLogInputCont(dmxInput, " %s", info->names.symbols); - if (info->names.geometry && *info->names.geometry) - dmxLogInputCont(dmxInput, " %s", info->names.geometry); - dmxLogInputCont(dmxInput, "\n"); - } else { - dmxLogInput(dmxInput, "XKEYBOARD: Defaults: %s %s %s %s %s\n", - dmxConfigGetXkbRules(), - dmxConfigGetXkbLayout(), - dmxConfigGetXkbModel(), - dmxConfigGetXkbVariant() - ? dmxConfigGetXkbVariant() : "", - dmxConfigGetXkbOptions() - ? dmxConfigGetXkbOptions() : ""); - } - XkbInitKeyboardDeviceStruct(pDevice, - &info->names, - &info->keySyms, - info->modMap, - dmxKeyboardBellProc, - dmxKeyboardKbdCtrlProc); + dmxLogInput(dmxInput, "XKEYBOARD: Defaults: %s %s %s %s %s\n", + dmxConfigGetXkbRules(), + dmxConfigGetXkbLayout(), + dmxConfigGetXkbModel(), + dmxConfigGetXkbVariant() + ? dmxConfigGetXkbVariant() : "", + dmxConfigGetXkbOptions() + ? dmxConfigGetXkbOptions() : ""); } + XkbInitKeyboardDeviceStruct(pDevice, + &info->names, + &info->keySyms, + dmxKeyboardBellProc, + dmxKeyboardKbdCtrlProc); + if (info->freenames) dmxKeyboardFreeNames(&info->names); -#endif return Success; } @@ -461,7 +436,9 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) int fd; DMXLocalInitInfo info; int i; - + Atom btn_labels[MAX_BUTTONS] = {0}; /* FIXME */ + Atom axis_labels[MAX_VALUATORS] = {0}; /* FIXME */ + if (dmxInput->detached) return Success; memset(&info, 0, sizeof(info)); @@ -479,35 +456,41 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) DevicePtr pDev = (DevicePtr) pDevice; InitKeyboardDeviceStruct(pDev, &info.keySyms, - info.modMap, dmxBell, dmxKbdCtrl); } if (info.buttonClass) { - InitButtonClassDeviceStruct(pDevice, info.numButtons, info.map); + InitButtonClassDeviceStruct(pDevice, info.numButtons, + btn_labels, info.map); } if (info.valuatorClass) { if (info.numRelAxes && dmxLocal->sendsCore) { InitValuatorClassDeviceStruct(pDevice, info.numRelAxes, + axis_labels, GetMaximumEventsNum(), Relative); for (i = 0; i < info.numRelAxes; i++) - InitValuatorAxisStruct(pDevice, i, info.minval[0], - info.maxval[0], info.res[0], + InitValuatorAxisStruct(pDevice, i, axis_labels[i], + info.minval[0], info.maxval[0], + info.res[0], info.minres[0], info.maxres[0]); } else if (info.numRelAxes) { InitValuatorClassDeviceStruct(pDevice, info.numRelAxes, + axis_labels, dmxPointerGetMotionBufferSize(), Relative); for (i = 0; i < info.numRelAxes; i++) - InitValuatorAxisStruct(pDevice, i, info.minval[0], + InitValuatorAxisStruct(pDevice, i, axis_labels[i], + info.minval[0], info.maxval[0], info.res[0], info.minres[0], info.maxres[0]); } else if (info.numAbsAxes) { InitValuatorClassDeviceStruct(pDevice, info.numAbsAxes, + axis_labels, dmxPointerGetMotionBufferSize(), Absolute); for (i = 0; i < info.numAbsAxes; i++) InitValuatorAxisStruct(pDevice, i+info.numRelAxes, + axis_labels[i + info.numRelAxes], info.minval[i+1], info.maxval[i+1], info.res[i+1], info.minres[i+1], info.maxres[i+1]); @@ -517,9 +500,6 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) if (info.proximityClass) InitProximityClassDeviceStruct(pDevice); if (info.ptrFeedbackClass) InitPtrFeedbackClassDeviceStruct(pDevice, dmxChangePointerControl); - if (info.kbdFeedbackClass) - InitKbdFeedbackClassDeviceStruct(pDevice, dmxKeyboardBellProc, - dmxKeyboardKbdCtrlProc); if (info.intFeedbackClass || info.strFeedbackClass) dmxLog(dmxWarning, "Integer and string feedback not supported for %s\n", @@ -552,9 +532,7 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) XFree(info.keySyms.map); info.keySyms.map = NULL; } -#ifdef XKB if (info.xkb) XkbFreeKeyboard(info.xkb, 0, True); -#endif return Success; } @@ -1212,7 +1190,7 @@ int dmxInputDetach(DMXInputInfo *dmxInput) : (dmxLocal->sendsCore ? " [sends core events]" : "")); - DisableDevice(dmxLocal->pDevice); + DisableDevice(dmxLocal->pDevice, TRUE); } dmxInput->detached = True; dmxInputLogDevices(); @@ -1280,7 +1258,7 @@ static int dmxInputAttachOld(DMXInputInfo *dmxInput, int *id) : (dmxLocal->sendsCore ? " [sends core events]" : "")); - EnableDevice(dmxLocal->pDevice); + EnableDevice(dmxLocal->pDevice, TRUE); } dmxInputLogDevices(); return 0; diff --git a/xorg-server/hw/dmx/input/dmxinputinit.h b/xorg-server/hw/dmx/input/dmxinputinit.h index 6f491edf9..2e625cfd4 100644 --- a/xorg-server/hw/dmx/input/dmxinputinit.h +++ b/xorg-server/hw/dmx/input/dmxinputinit.h @@ -87,12 +87,10 @@ typedef struct _DMXLocalInitInfo { KeySymsRec keySyms; /**< Key symbols */ int freemap; /**< If non-zero, free keySyms.map */ CARD8 modMap[MAP_LENGTH]; /**< Modifier map */ -#ifdef XKB XkbDescPtr xkb; /**< XKB description */ XkbComponentNamesRec names; /**< XKB component names */ int freenames; /**< Non-zero if names should be free'd */ int force; /**< Do not allow command line override */ -#endif int buttonClass; /**< Non-zero if buttons are present */ int numButtons; /**< Number of buttons */ diff --git a/xorg-server/hw/dmx/input/dmxxinput.c b/xorg-server/hw/dmx/input/dmxxinput.c index 97f43927a..a2a4156ab 100644 --- a/xorg-server/hw/dmx/input/dmxxinput.c +++ b/xorg-server/hw/dmx/input/dmxxinput.c @@ -40,7 +40,6 @@ #include #endif -#define NEED_EVENTS #include #include #include "inputstr.h" diff --git a/xorg-server/hw/dmx/input/lnx-keyboard.c b/xorg-server/hw/dmx/input/lnx-keyboard.c index 55ff9f859..744b6ace5 100644 --- a/xorg-server/hw/dmx/input/lnx-keyboard.c +++ b/xorg-server/hw/dmx/input/lnx-keyboard.c @@ -697,7 +697,7 @@ static void kbdLinuxConvert(DevicePtr pDev, /* No auto-repeat? */ if ((feed && !feed->ctrl.autoRepeat) - || priv->pKeyboard->key->modifierMap[keyCode] + || priv->pKeyboard->key->xkbInfo->desc->map->modmap[keyCode] || (feed && !(feed->ctrl.autoRepeats[keyCode >> 3] & (1 << (keyCode & 7))))) return; /* Ignore */ diff --git a/xorg-server/hw/dmx/input/usb-keyboard.c b/xorg-server/hw/dmx/input/usb-keyboard.c index efec2705b..12ca8ab96 100644 --- a/xorg-server/hw/dmx/input/usb-keyboard.c +++ b/xorg-server/hw/dmx/input/usb-keyboard.c @@ -331,7 +331,7 @@ static void kbdUSBConvert(DevicePtr pDev, /* No auto-repeat? */ if ((feed && !feed->ctrl.autoRepeat) - || priv->pDevice->key->modifierMap[keyCode] + || priv->pDevice->key->xkbInfo->desc->map->modmap[keyCode] || (feed && !(feed->ctrl.autoRepeats[keyCode >> 3] & (1 << (keyCode & 7))))) return; /* Ignore */ @@ -434,8 +434,6 @@ void kbdUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info) kbdUSBGetMap(pDev, &info->keySyms, info->modMap); info->focusClass = 1; info->kbdFeedbackClass = 1; -#ifdef XKB info->names.keycodes = xstrdup("powerpcps2"); info->force = 1; -#endif } diff --git a/xorg-server/hw/kdrive/Makefile.in b/xorg-server/hw/kdrive/Makefile.in index 6b3799ef9..18414c088 100644 --- a/xorg-server/hw/kdrive/Makefile.in +++ b/xorg-server/hw/kdrive/Makefile.in @@ -36,8 +36,11 @@ host_triplet = @host@ subdir = hw/kdrive DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,7 +50,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -97,6 +101,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -117,9 +122,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -148,7 +156,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -157,9 +167,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -198,12 +212,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -223,7 +238,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -233,6 +247,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -246,11 +261,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -286,6 +300,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -310,7 +325,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -333,6 +347,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -364,7 +379,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/kdrive/ephyr/Makefile.am b/xorg-server/hw/kdrive/ephyr/Makefile.am index 9380e4d0a..ec6f4450a 100644 --- a/xorg-server/hw/kdrive/ephyr/Makefile.am +++ b/xorg-server/hw/kdrive/ephyr/Makefile.am @@ -8,14 +8,14 @@ INCLUDES = \ -I$(top_srcdir)/exa if XV -LIBXEPHYR_HOSTXV=libxephyr-hostxv.a +LIBXEPHYR_HOSTXV=libxephyr-hostxv.la endif if DRI -LIBXEPHYR_HOSTDRI=libxephyr-hostdri.a +LIBXEPHYR_HOSTDRI=libxephyr-hostdri.la endif -noinst_LIBRARIES = libxephyr-hostx.a $(LIBXEPHYR_HOSTXV) $(LIBXEPHYR_HOSTDRI) libxephyr.a +noinst_LTLIBRARIES = libxephyr-hostx.la $(LIBXEPHYR_HOSTXV) $(LIBXEPHYR_HOSTDRI) libxephyr.la bin_PROGRAMS = Xephyr @@ -47,24 +47,24 @@ XEPHYR_SRCS = \ ephyr_draw.c \ os.c -libxephyr_hostx_a_SOURCES = $(HOSTX_SRCS) +libxephyr_hostx_la_SOURCES = $(HOSTX_SRCS) if XV -libxephyr_hostxv_a_SOURCES = $(HOSTVIDEO_SRCS) +libxephyr_hostxv_la_SOURCES = $(HOSTVIDEO_SRCS) endif if DRI -libxephyr_hostdri_a_SOURCES = $(HOSTDRI_SRCS) +libxephyr_hostdri_la_SOURCES = $(HOSTDRI_SRCS) endif -libxephyr_a_SOURCES = $(XEPHYR_SRCS) +libxephyr_la_SOURCES = $(XEPHYR_SRCS) Xephyr_SOURCES = \ ephyrinit.c Xephyr_LDADD = \ - libxephyr.a \ - libxephyr-hostx.a \ + libxephyr.la \ + libxephyr-hostx.la \ $(LIBXEPHYR_HOSTXV) \ $(LIBXEPHYR_HOSTDRI) \ $(top_builddir)/exa/libexa.la \ @@ -72,8 +72,8 @@ Xephyr_LDADD = \ @XEPHYR_LIBS@ Xephyr_DEPENDENCIES = \ - libxephyr.a \ - libxephyr-hostx.a \ + libxephyr.la \ + libxephyr-hostx.la \ $(LIBXEPHYR_HOSTXV) \ $(LIBXEPHYR_HOSTDRI) \ @KDRIVE_LOCAL_LIBS@ diff --git a/xorg-server/hw/kdrive/ephyr/Makefile.in b/xorg-server/hw/kdrive/ephyr/Makefile.in index af425f7e4..150757fe1 100644 --- a/xorg-server/hw/kdrive/ephyr/Makefile.in +++ b/xorg-server/hw/kdrive/ephyr/Makefile.in @@ -45,8 +45,11 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/kdrive/ephyr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -56,37 +59,35 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libxephyr_hostdri_a_AR = $(AR) $(ARFLAGS) -libxephyr_hostdri_a_LIBADD = -am__libxephyr_hostdri_a_SOURCES_DIST = ephyrdriext.c ephyrdriext.h \ +LTLIBRARIES = $(noinst_LTLIBRARIES) +libxephyr_hostdri_la_LIBADD = +am__libxephyr_hostdri_la_SOURCES_DIST = ephyrdriext.c ephyrdriext.h \ ephyrdri.c ephyrdri.h XF86dri.c xf86dri.h ephyrglxext.c \ ephyrglxext.h ephyrhostglx.c ephyrhostglx.h -am__objects_1 = ephyrdriext.$(OBJEXT) ephyrdri.$(OBJEXT) \ - XF86dri.$(OBJEXT) ephyrglxext.$(OBJEXT) ephyrhostglx.$(OBJEXT) -@DRI_TRUE@am_libxephyr_hostdri_a_OBJECTS = $(am__objects_1) -libxephyr_hostdri_a_OBJECTS = $(am_libxephyr_hostdri_a_OBJECTS) -libxephyr_hostx_a_AR = $(AR) $(ARFLAGS) -libxephyr_hostx_a_LIBADD = -am__objects_2 = hostx.$(OBJEXT) -am_libxephyr_hostx_a_OBJECTS = $(am__objects_2) -libxephyr_hostx_a_OBJECTS = $(am_libxephyr_hostx_a_OBJECTS) -libxephyr_hostxv_a_AR = $(AR) $(ARFLAGS) -libxephyr_hostxv_a_LIBADD = -am__libxephyr_hostxv_a_SOURCES_DIST = ephyrvideo.c ephyrhostvideo.c \ +am__objects_1 = ephyrdriext.lo ephyrdri.lo XF86dri.lo ephyrglxext.lo \ + ephyrhostglx.lo +@DRI_TRUE@am_libxephyr_hostdri_la_OBJECTS = $(am__objects_1) +libxephyr_hostdri_la_OBJECTS = $(am_libxephyr_hostdri_la_OBJECTS) +@DRI_TRUE@am_libxephyr_hostdri_la_rpath = +libxephyr_hostx_la_LIBADD = +am__objects_2 = hostx.lo +am_libxephyr_hostx_la_OBJECTS = $(am__objects_2) +libxephyr_hostx_la_OBJECTS = $(am_libxephyr_hostx_la_OBJECTS) +libxephyr_hostxv_la_LIBADD = +am__libxephyr_hostxv_la_SOURCES_DIST = ephyrvideo.c ephyrhostvideo.c \ ephyrhostvideo.h -am__objects_3 = ephyrvideo.$(OBJEXT) ephyrhostvideo.$(OBJEXT) -@XV_TRUE@am_libxephyr_hostxv_a_OBJECTS = $(am__objects_3) -libxephyr_hostxv_a_OBJECTS = $(am_libxephyr_hostxv_a_OBJECTS) -libxephyr_a_AR = $(AR) $(ARFLAGS) -libxephyr_a_LIBADD = -am__objects_4 = ephyr.$(OBJEXT) ephyr_draw.$(OBJEXT) os.$(OBJEXT) -am_libxephyr_a_OBJECTS = $(am__objects_4) -libxephyr_a_OBJECTS = $(am_libxephyr_a_OBJECTS) +am__objects_3 = ephyrvideo.lo ephyrhostvideo.lo +@XV_TRUE@am_libxephyr_hostxv_la_OBJECTS = $(am__objects_3) +libxephyr_hostxv_la_OBJECTS = $(am_libxephyr_hostxv_la_OBJECTS) +@XV_TRUE@am_libxephyr_hostxv_la_rpath = +libxephyr_la_LIBADD = +am__objects_4 = ephyr.lo ephyr_draw.lo os.lo +am_libxephyr_la_OBJECTS = $(am__objects_4) +libxephyr_la_OBJECTS = $(am_libxephyr_la_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" PROGRAMS = $(bin_PROGRAMS) am_Xephyr_OBJECTS = ephyrinit.$(OBJEXT) @@ -104,13 +105,13 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libxephyr_hostdri_a_SOURCES) $(libxephyr_hostx_a_SOURCES) \ - $(libxephyr_hostxv_a_SOURCES) $(libxephyr_a_SOURCES) \ - $(Xephyr_SOURCES) -DIST_SOURCES = $(am__libxephyr_hostdri_a_SOURCES_DIST) \ - $(libxephyr_hostx_a_SOURCES) \ - $(am__libxephyr_hostxv_a_SOURCES_DIST) $(libxephyr_a_SOURCES) \ - $(Xephyr_SOURCES) +SOURCES = $(libxephyr_hostdri_la_SOURCES) \ + $(libxephyr_hostx_la_SOURCES) $(libxephyr_hostxv_la_SOURCES) \ + $(libxephyr_la_SOURCES) $(Xephyr_SOURCES) +DIST_SOURCES = $(am__libxephyr_hostdri_la_SOURCES_DIST) \ + $(libxephyr_hostx_la_SOURCES) \ + $(am__libxephyr_hostxv_la_SOURCES_DIST) \ + $(libxephyr_la_SOURCES) $(Xephyr_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -141,6 +142,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -161,9 +163,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -192,7 +197,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -201,9 +208,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -242,12 +253,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -267,7 +279,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -277,6 +288,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -290,11 +302,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -330,6 +341,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -354,7 +366,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -377,6 +388,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -408,7 +420,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -423,9 +437,9 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/exa -@XV_TRUE@LIBXEPHYR_HOSTXV = libxephyr-hostxv.a -@DRI_TRUE@LIBXEPHYR_HOSTDRI = libxephyr-hostdri.a -noinst_LIBRARIES = libxephyr-hostx.a $(LIBXEPHYR_HOSTXV) $(LIBXEPHYR_HOSTDRI) libxephyr.a +@XV_TRUE@LIBXEPHYR_HOSTXV = libxephyr-hostxv.la +@DRI_TRUE@LIBXEPHYR_HOSTDRI = libxephyr-hostdri.la +noinst_LTLIBRARIES = libxephyr-hostx.la $(LIBXEPHYR_HOSTXV) $(LIBXEPHYR_HOSTDRI) libxephyr.la HOSTX_SRCS = \ hostx.c \ hostx.h @@ -454,16 +468,16 @@ XEPHYR_SRCS = \ ephyr_draw.c \ os.c -libxephyr_hostx_a_SOURCES = $(HOSTX_SRCS) -@XV_TRUE@libxephyr_hostxv_a_SOURCES = $(HOSTVIDEO_SRCS) -@DRI_TRUE@libxephyr_hostdri_a_SOURCES = $(HOSTDRI_SRCS) -libxephyr_a_SOURCES = $(XEPHYR_SRCS) +libxephyr_hostx_la_SOURCES = $(HOSTX_SRCS) +@XV_TRUE@libxephyr_hostxv_la_SOURCES = $(HOSTVIDEO_SRCS) +@DRI_TRUE@libxephyr_hostdri_la_SOURCES = $(HOSTDRI_SRCS) +libxephyr_la_SOURCES = $(XEPHYR_SRCS) Xephyr_SOURCES = \ ephyrinit.c Xephyr_LDADD = \ - libxephyr.a \ - libxephyr-hostx.a \ + libxephyr.la \ + libxephyr-hostx.la \ $(LIBXEPHYR_HOSTXV) \ $(LIBXEPHYR_HOSTDRI) \ $(top_builddir)/exa/libexa.la \ @@ -471,8 +485,8 @@ Xephyr_LDADD = \ @XEPHYR_LIBS@ Xephyr_DEPENDENCIES = \ - libxephyr.a \ - libxephyr-hostx.a \ + libxephyr.la \ + libxephyr-hostx.la \ $(LIBXEPHYR_HOSTXV) \ $(LIBXEPHYR_HOSTDRI) \ @KDRIVE_LOCAL_LIBS@ @@ -556,24 +570,22 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libxephyr-hostdri.a: $(libxephyr_hostdri_a_OBJECTS) $(libxephyr_hostdri_a_DEPENDENCIES) - -rm -f libxephyr-hostdri.a - $(libxephyr_hostdri_a_AR) libxephyr-hostdri.a $(libxephyr_hostdri_a_OBJECTS) $(libxephyr_hostdri_a_LIBADD) - $(RANLIB) libxephyr-hostdri.a -libxephyr-hostx.a: $(libxephyr_hostx_a_OBJECTS) $(libxephyr_hostx_a_DEPENDENCIES) - -rm -f libxephyr-hostx.a - $(libxephyr_hostx_a_AR) libxephyr-hostx.a $(libxephyr_hostx_a_OBJECTS) $(libxephyr_hostx_a_LIBADD) - $(RANLIB) libxephyr-hostx.a -libxephyr-hostxv.a: $(libxephyr_hostxv_a_OBJECTS) $(libxephyr_hostxv_a_DEPENDENCIES) - -rm -f libxephyr-hostxv.a - $(libxephyr_hostxv_a_AR) libxephyr-hostxv.a $(libxephyr_hostxv_a_OBJECTS) $(libxephyr_hostxv_a_LIBADD) - $(RANLIB) libxephyr-hostxv.a -libxephyr.a: $(libxephyr_a_OBJECTS) $(libxephyr_a_DEPENDENCIES) - -rm -f libxephyr.a - $(libxephyr_a_AR) libxephyr.a $(libxephyr_a_OBJECTS) $(libxephyr_a_LIBADD) - $(RANLIB) libxephyr.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libxephyr-hostdri.la: $(libxephyr_hostdri_la_OBJECTS) $(libxephyr_hostdri_la_DEPENDENCIES) + $(LINK) $(am_libxephyr_hostdri_la_rpath) $(libxephyr_hostdri_la_OBJECTS) $(libxephyr_hostdri_la_LIBADD) $(LIBS) +libxephyr-hostx.la: $(libxephyr_hostx_la_OBJECTS) $(libxephyr_hostx_la_DEPENDENCIES) + $(LINK) $(libxephyr_hostx_la_OBJECTS) $(libxephyr_hostx_la_LIBADD) $(LIBS) +libxephyr-hostxv.la: $(libxephyr_hostxv_la_OBJECTS) $(libxephyr_hostxv_la_DEPENDENCIES) + $(LINK) $(am_libxephyr_hostxv_la_rpath) $(libxephyr_hostxv_la_OBJECTS) $(libxephyr_hostxv_la_LIBADD) $(LIBS) +libxephyr.la: $(libxephyr_la_OBJECTS) $(libxephyr_la_DEPENDENCIES) + $(LINK) $(libxephyr_la_OBJECTS) $(libxephyr_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @@ -627,18 +639,18 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XF86dri.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr_draw.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrdri.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrdriext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrglxext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrhostglx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrhostvideo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XF86dri.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr_draw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrdri.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrdriext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrglxext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrhostglx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrhostvideo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrinit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrvideo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrvideo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -771,7 +783,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(DATA) +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -805,7 +817,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ - clean-noinstLIBRARIES mostlyclean-am + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -876,7 +888,7 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool clean-noinstLIBRARIES ctags \ + clean-generic clean-libtool clean-noinstLTLIBRARIES ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-appmanDATA \ diff --git a/xorg-server/hw/kdrive/ephyr/XF86dri.c b/xorg-server/hw/kdrive/ephyr/XF86dri.c index 31f796331..e94a7f0f0 100644 --- a/xorg-server/hw/kdrive/ephyr/XF86dri.c +++ b/xorg-server/hw/kdrive/ephyr/XF86dri.c @@ -58,7 +58,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* THIS IS NOT AN X CONSORTIUM STANDARD */ -#define NEED_REPLIES #include #include #include @@ -134,11 +133,8 @@ Bool XF86DRIQueryExtension (Display *dpy, int *event_basep, int *error_basep) } } -Bool XF86DRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion) - Display* dpy; - int* majorVersion; - int* minorVersion; - int* patchVersion; +Bool XF86DRIQueryVersion(Display *dpy, int *majorVersion, int *minorVersion, + int *patchVersion) { XExtDisplayInfo *info = find_display (dpy); xXF86DRIQueryVersionReply rep; @@ -242,10 +238,7 @@ XF86DRIOpenConnection (Display *dpy, int screen, return True; } -Bool XF86DRIAuthConnection(dpy, screen, magic) - Display* dpy; - int screen; - drm_magic_t magic; +Bool XF86DRIAuthConnection(Display *dpy, int screen, drm_magic_t magic) { XExtDisplayInfo *info = find_display (dpy); xXF86DRIAuthConnectionReq *req; @@ -273,9 +266,7 @@ Bool XF86DRIAuthConnection(dpy, screen, magic) return True; } -Bool XF86DRICloseConnection(dpy, screen) - Display* dpy; - int screen; +Bool XF86DRICloseConnection(Display *dpy, int screen) { XExtDisplayInfo *info = find_display (dpy); xXF86DRICloseConnectionReq *req; @@ -295,14 +286,11 @@ Bool XF86DRICloseConnection(dpy, screen) return True; } -Bool XF86DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion, - ddxDriverMinorVersion, ddxDriverPatchVersion, clientDriverName) - Display* dpy; - int screen; - int* ddxDriverMajorVersion; - int* ddxDriverMinorVersion; - int* ddxDriverPatchVersion; - char** clientDriverName; +Bool XF86DRIGetClientDriverName(Display *dpy, int screen, + int *ddxDriverMajorVersion, + int *ddxDriverMinorVersion, + int *ddxDriverPatchVersion, + char **clientDriverName) { XExtDisplayInfo *info = find_display (dpy); xXF86DRIGetClientDriverNameReply rep; @@ -345,13 +333,8 @@ Bool XF86DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion, return True; } -Bool XF86DRICreateContextWithConfig(dpy, screen, configID, context, - hHWContext) - Display* dpy; - int screen; - int configID; - XID* context; - drm_context_t * hHWContext; +Bool XF86DRICreateContextWithConfig(Display *dpy, int screen, int configID, + XID *context, drm_context_t *hHWContext) { XExtDisplayInfo *info = find_display (dpy); xXF86DRICreateContextReply rep; @@ -381,12 +364,8 @@ Bool XF86DRICreateContextWithConfig(dpy, screen, configID, context, return True; } -Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext) - Display* dpy; - int screen; - Visual* visual; - XID* context; - drm_context_t * hHWContext; +Bool XF86DRICreateContext(Display *dpy, int screen, Visual *visual, + XID *context, drm_context_t *hHWContext) { return XF86DRICreateContextWithConfig( dpy, screen, visual->visualid, context, hHWContext ); diff --git a/xorg-server/hw/kdrive/ephyr/Xephyr.man.pre b/xorg-server/hw/kdrive/ephyr/Xephyr.man.pre index 7f0e811a2..f5e8b984d 100644 --- a/xorg-server/hw/kdrive/ephyr/Xephyr.man.pre +++ b/xorg-server/hw/kdrive/ephyr/Xephyr.man.pre @@ -23,8 +23,8 @@ Xephyr - X server outputting to a window on a pre-existing X display .IR ... ] .SH DESCRIPTION .B Xephyr -is a a kdrive server that outputs to a window on a pre-existing -'host' X display. +is a a kdrive server that outputs to a window on a pre-existing "host" +X display. Think .I Xnest but with support for modern extensions like composite, damage and randr. @@ -75,7 +75,7 @@ round it. It doesn't appear to break anything however. .IP \(bu 2 Keyboard handling is basic but works. .TP \(bu 2 -Mouse button 5 probably wont work. +Mouse button 5 probably won't work. .SH "SEE ALSO" X(__miscmansuffix__), Xserver(__appmansuffix__) .SH AUTHOR diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c index ab8459cfc..296284a01 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.c +++ b/xorg-server/hw/kdrive/ephyr/ephyr.c @@ -429,9 +429,7 @@ ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) RRScreenSizePtr pSize; Rotation randr; int n = 0; - - EPHYR_LOG("mark"); - + struct { int width, height; } sizes[] = { { 1600, 1200 }, @@ -452,6 +450,8 @@ ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) { 0, 0 } }; + EPHYR_LOG("mark"); + *rotations = RR_Rotate_All|RR_Reflect_All; if (!hostx_want_preexisting_window (screen) @@ -743,6 +743,7 @@ ephyrScreenFini (KdScreenInfo *screen) void ephyrUpdateModifierState(unsigned int state) { +#if 0 DeviceIntPtr pkeydev; KeyClassPtr keyc; int i; @@ -753,6 +754,18 @@ ephyrUpdateModifierState(unsigned int state) if (!pkeydev) return; +/* This is pretty broken. + * + * What should happen is that focus out should do as a VT switch does in + * traditional servers: fake releases for all keys (and buttons too, come + * to think of it) currently down. Then, on focus in, get the state from + * the host, and fake keypresses for everything currently down. + * + * So I'm leaving this broken for a little while. Sorry, folks. + * + * -daniels + */ + keyc = pkeydev->key; state = state & 0xff; @@ -770,7 +783,7 @@ ephyrUpdateModifierState(unsigned int state) int count = keyc->modifierKeyCount[i]; for (key = 0; key < MAP_LENGTH; key++) - if (keyc->modifierMap[key] & mask) + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { int bit; BYTE *kptr; @@ -790,14 +803,15 @@ ephyrUpdateModifierState(unsigned int state) /* Modifier shoud be down, but isn't */ if (!(keyc->state & mask) && (state & mask)) for (key = 0; key < MAP_LENGTH; key++) - if (keyc->modifierMap[key] & mask) + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { - if (keyc->modifierMap[key] & mask && ephyrKbd && + if (keyc->xkbInfo->desc->map->modmap[key] & mask && ephyrKbd && ((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled) KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE); /* press */ break; } } +#endif } static void @@ -1060,7 +1074,7 @@ MouseInit (KdPointerInfo *pi) ((EphyrPointerPrivate *)pi->driverPrivate)->enabled = FALSE; pi->nAxes = 3; pi->nButtons = 32; - pi->name = KdSaveString("Xephyr virtual mouse"); + pi->name = strdup("Xephyr virtual mouse"); ephyrMouse = pi; return Success; } @@ -1107,14 +1121,9 @@ EphyrKeyboardInit (KdKeyboardInfo *ki) ErrorF("Couldn't load keymap from host\n"); return BadAlloc; } - ki->keySyms.minKeyCode = ephyrKeySyms.minKeyCode; - ki->keySyms.maxKeyCode = ephyrKeySyms.maxKeyCode; - ki->minScanCode = ki->keySyms.minKeyCode; - ki->maxScanCode = ki->keySyms.maxKeyCode; - ki->keySyms.mapWidth = ephyrKeySyms.mapWidth; - xfree(ki->keySyms.map); - ki->keySyms.map = ephyrKeySyms.map; - ki->name = KdSaveString("Xephyr virtual keyboard"); + ki->minScanCode = ephyrKeySyms.minKeyCode; + ki->maxScanCode = ephyrKeySyms.maxKeyCode; + ki->name = strdup("Xephyr virtual keyboard"); ephyrKbd = ki; return Success; } @@ -1136,8 +1145,6 @@ EphyrKeyboardDisable (KdKeyboardInfo *ki) static void EphyrKeyboardFini (KdKeyboardInfo *ki) { - /* not xfree: we call malloc from hostx.c. */ - free(ki->keySyms.map); ephyrKbd = NULL; return; } diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c index a906ad170..84885d8f0 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c @@ -34,8 +34,6 @@ #include -#define NEED_REPLIES -#define NEED_EVENTS #include #include #define _XF86DRI_SERVER_ @@ -617,10 +615,10 @@ ProcXF86DRIQueryVersion (register ClientPtr client) { xXF86DRIQueryVersionReply rep; register int n; + REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq); EPHYR_LOG ("enter\n") ; - REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -645,10 +643,10 @@ ProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client) xXF86DRIQueryDirectRenderingCapableReply rep; Bool isCapable; register int n; - - EPHYR_LOG ("enter\n") ; REQUEST(xXF86DRIQueryDirectRenderingCapableReq); REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq); + + EPHYR_LOG ("enter\n") ; if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -683,10 +681,10 @@ ProcXF86DRIOpenConnection (register ClientPtr client) xXF86DRIOpenConnectionReply rep; drm_handle_t hSAREA; char* busIdString; - - EPHYR_LOG ("enter\n") ; REQUEST(xXF86DRIOpenConnectionReq); REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq); + + EPHYR_LOG ("enter\n") ; if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -703,8 +701,8 @@ ProcXF86DRIOpenConnection (register ClientPtr client) rep.busIdStringLength = 0; if (busIdString) rep.busIdStringLength = strlen(busIdString); - rep.length = (SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) + - ((rep.busIdStringLength + 3) & ~3)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) + + pad_to_int32(rep.busIdStringLength)); rep.hSAREALow = (CARD32)(hSAREA & 0xffffffff); #if defined(LONG64) && !defined(__linux__) @@ -724,10 +722,10 @@ static int ProcXF86DRIAuthConnection (register ClientPtr client) { xXF86DRIAuthConnectionReply rep; - - EPHYR_LOG ("enter\n") ; REQUEST(xXF86DRIAuthConnectionReq); REQUEST_SIZE_MATCH(xXF86DRIAuthConnectionReq); + + EPHYR_LOG ("enter\n") ; if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -750,9 +748,9 @@ ProcXF86DRIAuthConnection (register ClientPtr client) static int ProcXF86DRICloseConnection (register ClientPtr client) { - EPHYR_LOG ("enter\n") ; REQUEST(xXF86DRICloseConnectionReq); REQUEST_SIZE_MATCH(xXF86DRICloseConnectionReq); + EPHYR_LOG ("enter\n") ; if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -771,10 +769,10 @@ ProcXF86DRIGetClientDriverName (register ClientPtr client) { xXF86DRIGetClientDriverNameReply rep; char* clientDriverName; - - EPHYR_LOG ("enter\n") ; REQUEST(xXF86DRIGetClientDriverNameReq); REQUEST_SIZE_MATCH(xXF86DRIGetClientDriverNameReq); + + EPHYR_LOG ("enter\n") ; if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -791,9 +789,9 @@ ProcXF86DRIGetClientDriverName (register ClientPtr client) rep.clientDriverNameLength = 0; if (clientDriverName) rep.clientDriverNameLength = strlen(clientDriverName); - rep.length = (SIZEOF(xXF86DRIGetClientDriverNameReply) - + rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetClientDriverNameReply) - SIZEOF(xGenericReply) + - ((rep.clientDriverNameLength + 3) & ~3)) >> 2; + pad_to_int32(rep.clientDriverNameLength)); WriteToClient(client, sizeof(xXF86DRIGetClientDriverNameReply), (char *)&rep); @@ -813,10 +811,10 @@ ProcXF86DRICreateContext (register ClientPtr client) VisualPtr visual; int i=0; unsigned long context_id=0; - - EPHYR_LOG ("enter\n") ; REQUEST(xXF86DRICreateContextReq); REQUEST_SIZE_MATCH(xXF86DRICreateContextReq); + + EPHYR_LOG ("enter\n") ; if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -854,10 +852,10 @@ ProcXF86DRICreateContext (register ClientPtr client) static int ProcXF86DRIDestroyContext (register ClientPtr client) { - EPHYR_LOG ("enter\n") ; - REQUEST(xXF86DRIDestroyContextReq); REQUEST_SIZE_MATCH(xXF86DRIDestroyContextReq); + EPHYR_LOG ("enter\n") ; + if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -1026,10 +1024,10 @@ ProcXF86DRICreateDrawable (ClientPtr client) EphyrWindowPair *pair=NULL ; EphyrDRIWindowPrivPtr win_priv=NULL; int rc=0, remote_win=0; - - EPHYR_LOG ("enter\n") ; REQUEST(xXF86DRICreateDrawableReq); REQUEST_SIZE_MATCH(xXF86DRICreateDrawableReq); + + EPHYR_LOG ("enter\n") ; if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -1085,12 +1083,12 @@ ProcXF86DRICreateDrawable (ClientPtr client) static int ProcXF86DRIDestroyDrawable (register ClientPtr client) { - REQUEST(xXF86DRIDestroyDrawableReq); DrawablePtr drawable=NULL; WindowPtr window=NULL; EphyrWindowPair *pair=NULL; - REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq); int rc=0; + REQUEST(xXF86DRIDestroyDrawableReq); + REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq); EPHYR_LOG ("enter\n") ; if (stuff->screen >= screenInfo.numScreens) { @@ -1136,11 +1134,11 @@ ProcXF86DRIGetDrawableInfo (register ClientPtr client) int X=0, Y=0, W=0, H=0, backX=0, backY=0, rc=0, i=0; drm_clip_rect_t *clipRects=NULL; drm_clip_rect_t *backClipRects=NULL; + REQUEST(xXF86DRIGetDrawableInfoReq); + REQUEST_SIZE_MATCH(xXF86DRIGetDrawableInfoReq); EPHYR_LOG ("enter\n") ; memset (&rep, 0, sizeof (rep)) ; - REQUEST(xXF86DRIGetDrawableInfoReq); - REQUEST_SIZE_MATCH(xXF86DRIGetDrawableInfoReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -1237,7 +1235,7 @@ ProcXF86DRIGetDrawableInfo (register ClientPtr client) EPHYR_LOG ("num host clip rects:%d\n", (int)rep.numClipRects) ; EPHYR_LOG ("num host back clip rects:%d\n", (int)rep.numBackClipRects) ; - rep.length = ((rep.length + 3) & ~3) >> 2; + rep.length = bytes_to_int32(rep.length); WriteToClient(client, sizeof(xXF86DRIGetDrawableInfoReply), (char *)&rep); @@ -1267,10 +1265,10 @@ ProcXF86DRIGetDeviceInfo (register ClientPtr client) xXF86DRIGetDeviceInfoReply rep; drm_handle_t hFrameBuffer; void *pDevPrivate; - - EPHYR_LOG ("enter\n") ; REQUEST(xXF86DRIGetDeviceInfoReq); REQUEST_SIZE_MATCH(xXF86DRIGetDeviceInfoReq); + + EPHYR_LOG ("enter\n") ; if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; @@ -1299,9 +1297,9 @@ ProcXF86DRIGetDeviceInfo (register ClientPtr client) rep.length = 0; if (rep.devPrivateSize) { - rep.length = (SIZEOF(xXF86DRIGetDeviceInfoReply) - + rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetDeviceInfoReply) - SIZEOF(xGenericReply) + - ((rep.devPrivateSize + 3) & ~3)) >> 2; + pad_to_int32(rep.devPrivateSize)); } WriteToClient(client, sizeof(xXF86DRIGetDeviceInfoReply), (char *)&rep); diff --git a/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c b/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c index a05bba2e3..728687b46 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c @@ -428,7 +428,7 @@ ephyrHostGLXSendClientInfo (int32_t a_major, int32_t a_minor, req->minor = a_minor; size = strlen (a_extension_list) + 1; - req->length += (size + 3) >> 2; + req->length += bytes_to_int32(size); req->numbytes = size; Data (dpy, a_extension_list, size); diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c index 1399d7aaa..22152ffe0 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c @@ -110,6 +110,7 @@ ddxUseMsg (void) #endif ErrorF("-noxv do not use XV\n"); ErrorF("-name [name] define the name in the WM_CLASS property\n"); + ErrorF("-title [title] set the window title in the WM_NAME property\n"); ErrorF("\n"); exit(1); @@ -242,10 +243,44 @@ ddxProcessArgument (int argc, char **argv, int i) return 0; } } + else if (!strcmp (argv[i], "-title")) + { + if (i+1 < argc && argv[i+1][0] != '-') + { + hostx_set_title(argv[i+1]); + return 2; + } + else + { + UseMsg(); + return 0; + } + } else if (argv[i][0] == ':') { hostx_set_display_name(argv[i]); } + /* Xnest compatibility */ + else if (!strcmp(argv[i], "-display")) + { + hostx_set_display_name(argv[i+1]); + return 2; + } + else if (!strcmp(argv[i], "-sync") || + !strcmp(argv[i], "-full") || + !strcmp(argv[i], "-sss") || + !strcmp(argv[i], "-install")) + { + return 1; + } + else if (!strcmp(argv[i], "-bw") || + !strcmp(argv[i], "-class") || + !strcmp(argv[i], "-geometry") || + !strcmp(argv[i], "-scrns")) + { + return 2; + } + /* end Xnest compat */ return KdProcessArgument (argc, argv, i); } diff --git a/xorg-server/hw/kdrive/ephyr/ephyrvideo.c b/xorg-server/hw/kdrive/ephyr/ephyrvideo.c index c4eb06607..5058ebe03 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrvideo.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrvideo.c @@ -236,7 +236,7 @@ DoSimpleClip (BoxPtr a_dst_box, static Bool ephyrLocalAtomToHost (int a_local_atom, int *a_host_atom) { - char *atom_name=NULL; + const char *atom_name=NULL; int host_atom=None ; EPHYR_RETURN_VAL_IF_FAIL (a_host_atom, FALSE) ; diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c index d289d7335..d546370ba 100644 --- a/xorg-server/hw/kdrive/ephyr/hostx.c +++ b/xorg-server/hw/kdrive/ephyr/hostx.c @@ -78,6 +78,7 @@ struct EphyrHostScreen { Window win; Window win_pre_existing; /* Set via -parent option like xnest */ + Window peer_win; /* Used for GL; should be at most one */ XImage *ximg; int win_width, win_height; int server_depth; @@ -121,6 +122,7 @@ extern int monitorResolution; char *ephyrResName = NULL; int ephyrResNameFromCmd = 0; +char *ephyrTitle = NULL; static void hostx_set_fullscreen_hint(void); @@ -221,20 +223,25 @@ hostx_set_screen_number(EphyrScreenInfo screen, int number) void hostx_set_win_title (EphyrScreenInfo screen, char *extra_text) { - struct EphyrHostScreen *host_screen = host_screen_from_screen_info (screen); -#define BUF_LEN 256 - char buf[BUF_LEN+1]; + struct EphyrHostScreen *host_screen = host_screen_from_screen_info (screen); - if (!host_screen) + if (!host_screen) return; - memset (buf, 0, BUF_LEN+1) ; - snprintf (buf, BUF_LEN, "Xephyr on %s.%d %s", - HostX.server_dpy_name, - host_screen->mynum, - (extra_text != NULL) ? extra_text : ""); + if (ephyrTitle) { + XStoreName(HostX.dpy, host_screen->win, ephyrTitle); + } else { +#define BUF_LEN 256 + char buf[BUF_LEN+1]; - XStoreName (HostX.dpy, host_screen->win, buf); + memset (buf, 0, BUF_LEN+1) ; + snprintf (buf, BUF_LEN, "Xephyr on %s.%d %s", + HostX.server_dpy_name, + host_screen->mynum, + (extra_text != NULL) ? extra_text : ""); + + XStoreName (HostX.dpy, host_screen->win, buf); + } } int @@ -318,6 +325,12 @@ hostx_use_resname (char *name, int fromcmd) ephyrResNameFromCmd = fromcmd; } +void +hostx_set_title (char *title) +{ + ephyrTitle = title; +} + int hostx_init (void) { @@ -582,7 +595,7 @@ hostx_calculate_color_shift(unsigned long mask) { int shift = 1; /* count # of bits in mask */ - while (mask=(mask>>1)) shift++; + while ((mask = (mask >> 1))) shift++; /* cmap entry is an unsigned char so adjust it by size of that */ shift = shift - sizeof(unsigned char) * 8; if (shift < 0) shift = 0; @@ -904,35 +917,17 @@ host_screen_from_window (Window w) { int index = 0; struct EphyrHostScreen *result = NULL; -#if 0 - unsigned int num_children = 0; - Window root = None, parent = None, *children = NULL; -#endif for (index = 0 ; index < HostX.n_screens ; index++) { - if (HostX.screens[index].win == w) + if (HostX.screens[index].win == w || HostX.screens[index].peer_win == w) { result = &HostX.screens[index]; goto out; } } -#if 0 - XQueryTree (hostx_get_display (), w, &root, &parent, - &children, &num_children); - if (parent == root || parent == None) - goto out; - result = host_screen_from_window (parent); -#endif out: -#if 0 - if (children) - { - XFree (children); - children = NULL; - } -#endif return result; } @@ -1226,6 +1221,11 @@ hostx_create_window (int a_screen_number, EPHYR_LOG_ERROR ("failed to create peer window\n") ; goto out ; } + if (HostX.screens[a_screen_number].peer_win == None) { + HostX.screens[a_screen_number].peer_win = win; + } else { + EPHYR_LOG_ERROR ("multiple peer windows created for same screen\n") ; + } XFlush (dpy) ; XMapWindow (dpy, win) ; *a_host_peer = win ; diff --git a/xorg-server/hw/kdrive/ephyr/hostx.h b/xorg-server/hw/kdrive/ephyr/hostx.h index c1b1958de..e65e0c9bc 100644 --- a/xorg-server/hw/kdrive/ephyr/hostx.h +++ b/xorg-server/hw/kdrive/ephyr/hostx.h @@ -148,6 +148,9 @@ hostx_use_preexisting_window(unsigned long win_id); void hostx_use_resname (char *name, int fromcmd); +void +hostx_set_title(char *name); + void hostx_handle_signal(int signum); diff --git a/xorg-server/hw/kdrive/fake/Makefile.am b/xorg-server/hw/kdrive/fake/Makefile.am index 76ed9fc8b..8b93e9e2f 100644 --- a/xorg-server/hw/kdrive/fake/Makefile.am +++ b/xorg-server/hw/kdrive/fake/Makefile.am @@ -2,11 +2,11 @@ INCLUDES = \ @KDRIVE_INCS@ \ @KDRIVE_CFLAGS@ -noinst_LIBRARIES = libfake.a +noinst_LTLIBRARIES = libfake.la bin_PROGRAMS = Xfake -libfake_a_SOURCES = \ +libfake_la_SOURCES = \ fake.c \ kbd.c \ os.c \ @@ -17,14 +17,14 @@ Xfake_SOURCES = \ fakeinit.c Xfake_LDADD = \ - libfake.a \ + libfake.la \ @KDRIVE_LIBS@ \ @XSERVER_LIBS@ -Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -Wl,-undefined=InitExtensions Xfake_DEPENDENCIES = \ - libfake.a \ + libfake.la \ @KDRIVE_LOCAL_LIBS@ relink: diff --git a/xorg-server/hw/kdrive/fake/Makefile.in b/xorg-server/hw/kdrive/fake/Makefile.in index f3e4b7994..a95ba6009 100644 --- a/xorg-server/hw/kdrive/fake/Makefile.in +++ b/xorg-server/hw/kdrive/fake/Makefile.in @@ -39,8 +39,11 @@ bin_PROGRAMS = Xfake$(EXEEXT) subdir = hw/kdrive/fake DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,16 +53,14 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libfake_a_AR = $(AR) $(ARFLAGS) -libfake_a_LIBADD = -am_libfake_a_OBJECTS = fake.$(OBJEXT) kbd.$(OBJEXT) os.$(OBJEXT) \ - mouse.$(OBJEXT) -libfake_a_OBJECTS = $(am_libfake_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libfake_la_LIBADD = +am_libfake_la_OBJECTS = fake.lo kbd.lo os.lo mouse.lo +libfake_la_OBJECTS = $(am_libfake_la_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_Xfake_OBJECTS = fakeinit.$(OBJEXT) @@ -77,8 +78,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libfake_a_SOURCES) $(Xfake_SOURCES) -DIST_SOURCES = $(libfake_a_SOURCES) $(Xfake_SOURCES) +SOURCES = $(libfake_la_SOURCES) $(Xfake_SOURCES) +DIST_SOURCES = $(libfake_la_SOURCES) $(Xfake_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -87,6 +88,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -107,9 +109,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -138,7 +143,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -147,9 +154,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -188,12 +199,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -213,7 +225,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -223,6 +234,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -236,11 +248,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -276,6 +287,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -300,7 +312,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -323,6 +334,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -354,7 +366,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -364,8 +378,8 @@ INCLUDES = \ @KDRIVE_INCS@ \ @KDRIVE_CFLAGS@ -noinst_LIBRARIES = libfake.a -libfake_a_SOURCES = \ +noinst_LTLIBRARIES = libfake.la +libfake_la_SOURCES = \ fake.c \ kbd.c \ os.c \ @@ -376,13 +390,13 @@ Xfake_SOURCES = \ fakeinit.c Xfake_LDADD = \ - libfake.a \ + libfake.la \ @KDRIVE_LIBS@ \ @XSERVER_LIBS@ -Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -Wl,-undefined=InitExtensions Xfake_DEPENDENCIES = \ - libfake.a \ + libfake.la \ @KDRIVE_LOCAL_LIBS@ all: all-am @@ -420,12 +434,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libfake.a: $(libfake_a_OBJECTS) $(libfake_a_DEPENDENCIES) - -rm -f libfake.a - $(libfake_a_AR) libfake.a $(libfake_a_OBJECTS) $(libfake_a_LIBADD) - $(RANLIB) libfake.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libfake.la: $(libfake_la_OBJECTS) $(libfake_la_DEPENDENCIES) + $(LINK) $(libfake_la_OBJECTS) $(libfake_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @@ -479,11 +497,11 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakeinit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kbd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kbd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -596,7 +614,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(PROGRAMS) +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -629,7 +647,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ - clean-noinstLIBRARIES mostlyclean-am + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -700,7 +718,7 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool clean-noinstLIBRARIES ctags \ + clean-generic clean-libtool clean-noinstLTLIBRARIES ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ diff --git a/xorg-server/hw/kdrive/fake/mouse.c b/xorg-server/hw/kdrive/fake/mouse.c index 4b8d2b06d..758f6cd22 100644 --- a/xorg-server/hw/kdrive/fake/mouse.c +++ b/xorg-server/hw/kdrive/fake/mouse.c @@ -23,7 +23,6 @@ #ifdef HAVE_CONFIG_H #include #endif -#define NEED_EVENTS #include #include #include diff --git a/xorg-server/hw/kdrive/fbdev/Makefile.am b/xorg-server/hw/kdrive/fbdev/Makefile.am index cb1292802..5d0ca3f31 100644 --- a/xorg-server/hw/kdrive/fbdev/Makefile.am +++ b/xorg-server/hw/kdrive/fbdev/Makefile.am @@ -2,9 +2,9 @@ INCLUDES = \ @KDRIVE_INCS@ \ @KDRIVE_CFLAGS@ -noinst_LIBRARIES = libfbdev.a +noinst_LTLIBRARIES = libfbdev.la -libfbdev_a_SOURCES = \ +libfbdev_la_SOURCES = \ fbdev.c \ fbdev.h @@ -15,11 +15,11 @@ Xfbdev_SOURCES = \ fbinit.c Xfbdev_LDADD = \ - libfbdev.a \ + libfbdev.la \ @KDRIVE_LIBS@ Xfbdev_DEPENDENCIES = \ - libfbdev.a \ + libfbdev.la \ $(KDRIVE_PURE_LIBS) Xfbdev_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) diff --git a/xorg-server/hw/kdrive/fbdev/Makefile.in b/xorg-server/hw/kdrive/fbdev/Makefile.in index a59ce62dd..b8ca735a9 100644 --- a/xorg-server/hw/kdrive/fbdev/Makefile.in +++ b/xorg-server/hw/kdrive/fbdev/Makefile.in @@ -39,8 +39,11 @@ host_triplet = @host@ subdir = hw/kdrive/fbdev DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,15 +53,14 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libfbdev_a_AR = $(AR) $(ARFLAGS) -libfbdev_a_LIBADD = -am_libfbdev_a_OBJECTS = fbdev.$(OBJEXT) -libfbdev_a_OBJECTS = $(am_libfbdev_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libfbdev_la_LIBADD = +am_libfbdev_la_OBJECTS = fbdev.lo +libfbdev_la_OBJECTS = $(am_libfbdev_la_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__Xfbdev_SOURCES_DIST = fbinit.c @@ -77,8 +79,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libfbdev_a_SOURCES) $(Xfbdev_SOURCES) -DIST_SOURCES = $(libfbdev_a_SOURCES) $(am__Xfbdev_SOURCES_DIST) +SOURCES = $(libfbdev_la_SOURCES) $(Xfbdev_SOURCES) +DIST_SOURCES = $(libfbdev_la_SOURCES) $(am__Xfbdev_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -87,6 +89,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -107,9 +110,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -138,7 +144,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -147,9 +155,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -188,12 +200,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -213,7 +226,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -223,6 +235,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -236,11 +249,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -276,6 +288,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -300,7 +313,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -323,6 +335,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -354,7 +367,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -364,8 +379,8 @@ INCLUDES = \ @KDRIVE_INCS@ \ @KDRIVE_CFLAGS@ -noinst_LIBRARIES = libfbdev.a -libfbdev_a_SOURCES = \ +noinst_LTLIBRARIES = libfbdev.la +libfbdev_la_SOURCES = \ fbdev.c \ fbdev.h @@ -373,11 +388,11 @@ libfbdev_a_SOURCES = \ @KDRIVEFBDEV_TRUE@ fbinit.c @KDRIVEFBDEV_TRUE@Xfbdev_LDADD = \ -@KDRIVEFBDEV_TRUE@ libfbdev.a \ +@KDRIVEFBDEV_TRUE@ libfbdev.la \ @KDRIVEFBDEV_TRUE@ @KDRIVE_LIBS@ @KDRIVEFBDEV_TRUE@Xfbdev_DEPENDENCIES = \ -@KDRIVEFBDEV_TRUE@ libfbdev.a \ +@KDRIVEFBDEV_TRUE@ libfbdev.la \ @KDRIVEFBDEV_TRUE@ $(KDRIVE_PURE_LIBS) @KDRIVEFBDEV_TRUE@Xfbdev_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) @@ -416,12 +431,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libfbdev.a: $(libfbdev_a_OBJECTS) $(libfbdev_a_DEPENDENCIES) - -rm -f libfbdev.a - $(libfbdev_a_AR) libfbdev.a $(libfbdev_a_OBJECTS) $(libfbdev_a_LIBADD) - $(RANLIB) libfbdev.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libfbdev.la: $(libfbdev_la_OBJECTS) $(libfbdev_la_DEPENDENCIES) + $(LINK) $(libfbdev_la_OBJECTS) $(libfbdev_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @@ -475,7 +494,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbdev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbinit.Po@am__quote@ .c.o: @@ -589,7 +608,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(PROGRAMS) +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -622,7 +641,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ - clean-noinstLIBRARIES mostlyclean-am + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -693,7 +712,7 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool clean-noinstLIBRARIES ctags \ + clean-generic clean-libtool clean-noinstLTLIBRARIES ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ diff --git a/xorg-server/hw/kdrive/linux/Makefile.am b/xorg-server/hw/kdrive/linux/Makefile.am index 6380bd5ab..be07561ef 100644 --- a/xorg-server/hw/kdrive/linux/Makefile.am +++ b/xorg-server/hw/kdrive/linux/Makefile.am @@ -4,22 +4,18 @@ INCLUDES = \ AM_CFLAGS = -DHAVE_DIX_CONFIG_H -noinst_LIBRARIES = liblinux.a +noinst_LTLIBRARIES = liblinux.la if TSLIB TSLIB_C = tslib.c endif -if KDRIVE_HW KDRIVE_HW_SOURCES = \ - agp.c \ - agp.h \ evdev.c \ keyboard.c \ linux.c -endif -liblinux_a_SOURCES = \ +liblinux_la_SOURCES = \ bus.c \ klinux.h \ mouse.c \ diff --git a/xorg-server/hw/kdrive/linux/Makefile.in b/xorg-server/hw/kdrive/linux/Makefile.in index 717965e53..c0e625176 100644 --- a/xorg-server/hw/kdrive/linux/Makefile.in +++ b/xorg-server/hw/kdrive/linux/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/kdrive/linux DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,21 +51,19 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -liblinux_a_AR = $(AR) $(ARFLAGS) -liblinux_a_LIBADD = -am__liblinux_a_SOURCES_DIST = bus.c klinux.h mouse.c ms.c ps2.c agp.c \ - agp.h evdev.c keyboard.c linux.c tslib.c -@KDRIVE_HW_TRUE@am__objects_1 = agp.$(OBJEXT) evdev.$(OBJEXT) \ -@KDRIVE_HW_TRUE@ keyboard.$(OBJEXT) linux.$(OBJEXT) -@TSLIB_TRUE@am__objects_2 = tslib.$(OBJEXT) -am_liblinux_a_OBJECTS = bus.$(OBJEXT) mouse.$(OBJEXT) ms.$(OBJEXT) \ - ps2.$(OBJEXT) $(am__objects_1) $(am__objects_2) -liblinux_a_OBJECTS = $(am_liblinux_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +liblinux_la_LIBADD = +am__liblinux_la_SOURCES_DIST = bus.c klinux.h mouse.c ms.c ps2.c \ + evdev.c keyboard.c linux.c tslib.c +am__objects_1 = evdev.lo keyboard.lo linux.lo +@TSLIB_TRUE@am__objects_2 = tslib.lo +am_liblinux_la_OBJECTS = bus.lo mouse.lo ms.lo ps2.lo $(am__objects_1) \ + $(am__objects_2) +liblinux_la_OBJECTS = $(am_liblinux_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -73,8 +74,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(liblinux_a_SOURCES) -DIST_SOURCES = $(am__liblinux_a_SOURCES_DIST) +SOURCES = $(liblinux_la_SOURCES) +DIST_SOURCES = $(am__liblinux_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -83,6 +84,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -103,9 +105,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -134,7 +139,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -143,9 +150,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -184,12 +195,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -209,7 +221,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -219,6 +230,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -232,11 +244,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -272,6 +283,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -296,7 +308,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -319,6 +330,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -350,7 +362,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -361,16 +375,14 @@ INCLUDES = \ @KDRIVE_CFLAGS@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H -noinst_LIBRARIES = liblinux.a +noinst_LTLIBRARIES = liblinux.la @TSLIB_TRUE@TSLIB_C = tslib.c -@KDRIVE_HW_TRUE@KDRIVE_HW_SOURCES = \ -@KDRIVE_HW_TRUE@ agp.c \ -@KDRIVE_HW_TRUE@ agp.h \ -@KDRIVE_HW_TRUE@ evdev.c \ -@KDRIVE_HW_TRUE@ keyboard.c \ -@KDRIVE_HW_TRUE@ linux.c - -liblinux_a_SOURCES = \ +KDRIVE_HW_SOURCES = \ + evdev.c \ + keyboard.c \ + linux.c + +liblinux_la_SOURCES = \ bus.c \ klinux.h \ mouse.c \ @@ -414,12 +426,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -liblinux.a: $(liblinux_a_OBJECTS) $(liblinux_a_DEPENDENCIES) - -rm -f liblinux.a - $(liblinux_a_AR) liblinux.a $(liblinux_a_OBJECTS) $(liblinux_a_LIBADD) - $(RANLIB) liblinux.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +liblinux.la: $(liblinux_la_OBJECTS) $(liblinux_la_DEPENDENCIES) + $(LINK) $(liblinux_la_OBJECTS) $(liblinux_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -427,15 +443,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evdev.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ms.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ps2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tslib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ms.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ps2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tslib.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -548,7 +563,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -577,7 +592,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -649,7 +664,7 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/kdrive/linux/bus.c b/xorg-server/hw/kdrive/linux/bus.c index 2d7a15751..ba8a6cd43 100644 --- a/xorg-server/hw/kdrive/linux/bus.c +++ b/xorg-server/hw/kdrive/linux/bus.c @@ -23,7 +23,6 @@ #ifdef HAVE_CONFIG_H #include #endif -#define NEED_EVENTS #include #include #include @@ -78,7 +77,7 @@ BusInit (KdPointerInfo *pi) close(fd); if (pi->path) xfree(pi->path); - pi->path = KdSaveString(BusNames[i]); + pi->path = strdup(BusNames[i]); return Success; } } diff --git a/xorg-server/hw/kdrive/linux/evdev.c b/xorg-server/hw/kdrive/linux/evdev.c index 4ccd82239..f6017ba51 100644 --- a/xorg-server/hw/kdrive/linux/evdev.c +++ b/xorg-server/hw/kdrive/linux/evdev.c @@ -23,7 +23,6 @@ #ifdef HAVE_CONFIG_H #include #endif -#define NEED_EVENTS #include #include #include @@ -210,7 +209,7 @@ EvdevPtrInit (KdPointerInfo *pi) for (i = 0; i < NUM_DEFAULT_EVDEV; i++) { fd = open (kdefaultEvdev[i], 2); if (fd >= 0) { - pi->path = KdSaveString (kdefaultEvdev[i]); + pi->path = strdup (kdefaultEvdev[i]); break; } } @@ -225,7 +224,7 @@ EvdevPtrInit (KdPointerInfo *pi) close(fd); - pi->name = KdSaveString("Evdev mouse"); + pi->name = strdup("Evdev mouse"); return Success; } @@ -234,6 +233,8 @@ static Status EvdevPtrEnable (KdPointerInfo *pi) { int fd; + unsigned long ev[NBITS(EV_MAX)]; + Kevdev *ke; if (!pi || !pi->path) return BadImplementation; @@ -242,8 +243,6 @@ EvdevPtrEnable (KdPointerInfo *pi) if (fd < 0) return BadMatch; - unsigned long ev[NBITS(EV_MAX)]; - Kevdev *ke; if (ioctl (fd, EVIOCGBIT(0 /*EV*/, sizeof (ev)), ev) < 0) { @@ -353,18 +352,11 @@ EvdevPtrFini (KdPointerInfo *pi) static void readMapping (KdKeyboardInfo *ki) { - int minScanCode, maxScanCode; - if (!ki) return; - minScanCode = 0; - maxScanCode = 193; - - ki->keySyms.mapWidth = 2; - - ki->minScanCode = minScanCode; - ki->maxScanCode = maxScanCode; + ki->minScanCode = 0; + ki->maxScanCode = 193; } static void @@ -412,7 +404,7 @@ EvdevKbdInit (KdKeyboardInfo *ki) close (fd); - ki->name = KdSaveString("Evdev keyboard"); + ki->name = strdup("Evdev keyboard"); readMapping(ki); diff --git a/xorg-server/hw/kdrive/linux/keyboard.c b/xorg-server/hw/kdrive/linux/keyboard.c index ae981b776..79cf59898 100644 --- a/xorg-server/hw/kdrive/linux/keyboard.c +++ b/xorg-server/hw/kdrive/linux/keyboard.c @@ -42,8 +42,6 @@ #include extern int LinuxConsoleFd; -static unsigned char mediumraw_data, mediumraw_up; -static enum { DEFAULT, EXTBYTE1, EXTBYTE2 } mediumraw_state = DEFAULT; static const KeySym linux_to_x[256] = { NoSymbol, NoSymbol, NoSymbol, NoSymbol, @@ -112,7 +110,6 @@ static const KeySym linux_to_x[256] = { XK_udiaeresis, XK_yacute, XK_thorn, XK_ydiaeresis }; -#ifdef XKB /* * Getting a keycode from scancode * @@ -137,6 +134,7 @@ static const KeySym linux_to_x[256] = { for the core X keyboard protocol has to be AT-scancode based so that it corresponds to the Xkb keymap. */ +#if 0 static unsigned char at2lnx[] = { 0x0, /* no valid scancode */ @@ -209,10 +207,6 @@ static unsigned char at2lnx[] = #define NUM_AT_KEYS (sizeof(at2lnx)/sizeof(at2lnx[0])) #define LNX_KEY_INDEX(n) n < NUM_AT_KEYS ? at2lnx[n] : 0 -#else /* not XKB */ -#define LNX_KEY_INDEX(n) n -#endif - static unsigned char tbl[KD_MAX_WIDTH] = { 0, @@ -220,10 +214,12 @@ static unsigned char tbl[KD_MAX_WIDTH] = (1 << KG_ALTGR), (1 << KG_ALTGR) | (1 << KG_SHIFT) }; +#endif static void readKernelMapping(KdKeyboardInfo *ki) { +#if 0 KeySym *k; int i, j; struct kbentry kbe; @@ -489,10 +485,9 @@ readKernelMapping(KdKeyboardInfo *ki) } ki->minScanCode = minKeyCode; ki->maxScanCode = maxKeyCode; +#endif } -#ifdef XKB - /* * We need these to handle extended scancodes correctly (I could just use the * numbers below, but this makes the code more readable @@ -555,9 +550,6 @@ readKernelMapping(KdKeyboardInfo *ki) #define KEY_F17 /* F17 0x72 */ 114 #define KEY_KP_DEC /* KP_DEC 0x73 */ 115 -#endif /* XKB */ - - static void LinuxKeyboardRead (int fd, void *closure) { @@ -568,164 +560,118 @@ LinuxKeyboardRead (int fd, void *closure) while ((n = read (fd, buf, sizeof (buf))) > 0) { b = buf; while (n--) { -#ifdef XKB - if (!noXkbExtension) { - /* - * With xkb we use RAW mode for reading the console, which allows us - * process extended scancodes. - * - * See if this is a prefix extending the following keycode - */ - if (!prefix && ((b[0] & 0x7f) == KEY_Prefix0)) - { - prefix = KEY_Prefix0; -#ifdef DEBUG - ErrorF("Prefix0"); -#endif - /* swallow this up */ - b++; - continue; - } - else if (!prefix && ((b[0] & 0x7f) == KEY_Prefix1)) - { - prefix = KEY_Prefix1; - ErrorF("Prefix1"); - /* swallow this up */ - b++; - continue; - } - scancode = b[0] & 0x7f; - - switch (prefix) { - /* from xf86Events.c */ - case KEY_Prefix0: - { -#ifdef DEBUG - ErrorF("Prefix0 scancode: 0x%02x\n", scancode); -#endif - switch (scancode) { - case KEY_KP_7: - scancode = KEY_Home; break; /* curs home */ - case KEY_KP_8: - scancode = KEY_Up; break; /* curs up */ - case KEY_KP_9: - scancode = KEY_PgUp; break; /* curs pgup */ - case KEY_KP_4: - scancode = KEY_Left; break; /* curs left */ - case KEY_KP_5: - scancode = KEY_Begin; break; /* curs begin */ - case KEY_KP_6: - scancode = KEY_Right; break; /* curs right */ - case KEY_KP_1: - scancode = KEY_End; break; /* curs end */ - case KEY_KP_2: - scancode = KEY_Down; break; /* curs down */ - case KEY_KP_3: - scancode = KEY_PgDown; break; /* curs pgdown */ - case KEY_KP_0: - scancode = KEY_Insert; break; /* curs insert */ - case KEY_KP_Decimal: - scancode = KEY_Delete; break; /* curs delete */ - case KEY_Enter: - scancode = KEY_KP_Enter; break; /* keypad enter */ - case KEY_LCtrl: - scancode = KEY_RCtrl; break; /* right ctrl */ - case KEY_KP_Multiply: - scancode = KEY_Print; break; /* print */ - case KEY_Slash: - scancode = KEY_KP_Divide; break; /* keyp divide */ - case KEY_Alt: - scancode = KEY_AltLang; break; /* right alt */ - case KEY_ScrollLock: - scancode = KEY_Break; break; /* curs break */ - case 0x5b: - scancode = KEY_LMeta; break; - case 0x5c: - scancode = KEY_RMeta; break; - case 0x5d: - scancode = KEY_Menu; break; - case KEY_F3: - scancode = KEY_F13; break; - case KEY_F4: - scancode = KEY_F14; break; - case KEY_F5: - scancode = KEY_F15; break; - case KEY_F6: - scancode = KEY_F16; break; - case KEY_F7: - scancode = KEY_F17; break; - case KEY_KP_Plus: - scancode = KEY_KP_DEC; break; - /* Ignore virtual shifts (E0 2A, E0 AA, E0 36, E0 B6) */ - case 0x2A: - case 0x36: - b++; - prefix = 0; - continue; - default: -#ifdef DEBUG - ErrorF("Unreported Prefix0 scancode: 0x%02x\n", - scancode); -#endif - /* - * "Internet" keyboards are generating lots of new - * codes. Let them pass. There is little consistency - * between them, so don't bother with symbolic names at - * this level. - */ - scancode += 0x78; - } - break; - } - - case KEY_Prefix1: - { - /* we do no handle these */ -#ifdef DEBUG - ErrorF("Prefix1 scancode: 0x%02x\n", scancode); -#endif - b++; - prefix = 0; - continue; + /* + * With xkb we use RAW mode for reading the console, which allows us + * process extended scancodes. + * + * See if this is a prefix extending the following keycode + */ + if (!prefix && ((b[0] & 0x7f) == KEY_Prefix0)) + { + prefix = KEY_Prefix0; + /* swallow this up */ + b++; + continue; + } + else if (!prefix && ((b[0] & 0x7f) == KEY_Prefix1)) + { + prefix = KEY_Prefix1; + /* swallow this up */ + b++; + continue; + } + scancode = b[0] & 0x7f; + + switch (prefix) { + /* from xf86Events.c */ + case KEY_Prefix0: + { + switch (scancode) { + case KEY_KP_7: + scancode = KEY_Home; break; /* curs home */ + case KEY_KP_8: + scancode = KEY_Up; break; /* curs up */ + case KEY_KP_9: + scancode = KEY_PgUp; break; /* curs pgup */ + case KEY_KP_4: + scancode = KEY_Left; break; /* curs left */ + case KEY_KP_5: + scancode = KEY_Begin; break; /* curs begin */ + case KEY_KP_6: + scancode = KEY_Right; break; /* curs right */ + case KEY_KP_1: + scancode = KEY_End; break; /* curs end */ + case KEY_KP_2: + scancode = KEY_Down; break; /* curs down */ + case KEY_KP_3: + scancode = KEY_PgDown; break; /* curs pgdown */ + case KEY_KP_0: + scancode = KEY_Insert; break; /* curs insert */ + case KEY_KP_Decimal: + scancode = KEY_Delete; break; /* curs delete */ + case KEY_Enter: + scancode = KEY_KP_Enter; break; /* keypad enter */ + case KEY_LCtrl: + scancode = KEY_RCtrl; break; /* right ctrl */ + case KEY_KP_Multiply: + scancode = KEY_Print; break; /* print */ + case KEY_Slash: + scancode = KEY_KP_Divide; break; /* keyp divide */ + case KEY_Alt: + scancode = KEY_AltLang; break; /* right alt */ + case KEY_ScrollLock: + scancode = KEY_Break; break; /* curs break */ + case 0x5b: + scancode = KEY_LMeta; break; + case 0x5c: + scancode = KEY_RMeta; break; + case 0x5d: + scancode = KEY_Menu; break; + case KEY_F3: + scancode = KEY_F13; break; + case KEY_F4: + scancode = KEY_F14; break; + case KEY_F5: + scancode = KEY_F15; break; + case KEY_F6: + scancode = KEY_F16; break; + case KEY_F7: + scancode = KEY_F17; break; + case KEY_KP_Plus: + scancode = KEY_KP_DEC; break; + /* Ignore virtual shifts (E0 2A, E0 AA, E0 36, E0 B6) */ + case 0x2A: + case 0x36: + b++; + prefix = 0; + continue; + default: + /* + * "Internet" keyboards are generating lots of new + * codes. Let them pass. There is little consistency + * between them, so don't bother with symbolic names at + * this level. + */ + scancode += 0x78; } + break; + } - default: /* should not happen*/ - case 0: /* do nothing */ -#ifdef DEBUG - ErrorF("Plain scancode: 0x%02x\n", scancode); -#endif - ; - } + case KEY_Prefix1: + { + /* we do no handle these */ + b++; + prefix = 0; + continue; + } - prefix = 0; + default: /* should not happen*/ + case 0: /* do nothing */ + ; } - /* without xkb we use mediumraw mode -- enqueue the scancode as is */ - else -#endif - scancode = b[0] & 0x7f; - /* This is extended medium raw mode interpreter - see linux/drivers/keyboard.c (kbd->kbdmode == VC_MEDIUMRAW) */ - switch (mediumraw_state) - { - case DEFAULT: - if (scancode == 0) - { - mediumraw_state = EXTBYTE1; - mediumraw_up = b[0] & 0x80; - } - else - KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80); - break; - case EXTBYTE1: - mediumraw_data = scancode; - mediumraw_state = EXTBYTE2; - break; - case EXTBYTE2: - /* Note: Only codes < 256 will pass correctly through KdEnqueueKeyboardEvent() */ - KdEnqueueKeyboardEvent (closure, (int)mediumraw_data << 7 | scancode, mediumraw_up); - mediumraw_state = DEFAULT; - break; - } + + prefix = 0; + KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80); b++; } } @@ -750,13 +696,7 @@ LinuxKeyboardEnable (KdKeyboardInfo *ki) ioctl (fd, KDGKBMODE, &LinuxKbdTrans); tcgetattr (fd, &LinuxTermios); -#ifdef XKB - if (!noXkbExtension) - ioctl(fd, KDSKBMODE, K_RAW); - else -#else - ioctl(fd, KDSKBMODE, K_MEDIUMRAW); -#endif + ioctl(fd, KDSKBMODE, K_RAW); nTty = LinuxTermios; nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); nTty.c_oflag = 0; @@ -799,10 +739,10 @@ LinuxKeyboardInit (KdKeyboardInfo *ki) if (ki->path) xfree(ki->path); - ki->path = KdSaveString("console"); + ki->path = strdup("console"); if (ki->name) xfree(ki->name); - ki->name = KdSaveString("Linux console keyboard"); + ki->name = strdup("Linux console keyboard"); readKernelMapping (ki); diff --git a/xorg-server/hw/kdrive/linux/linux.c b/xorg-server/hw/kdrive/linux/linux.c index 258dc7b81..3fba056df 100644 --- a/xorg-server/hw/kdrive/linux/linux.c +++ b/xorg-server/hw/kdrive/linux/linux.c @@ -91,8 +91,8 @@ LinuxInit (void) { FatalError("xf86OpenConsole: Cannot find a free VT\n"); } + close(fd); } - close(fd); sprintf(vtname,"/dev/tty%d",vtno); /* /dev/tty1-64 */ @@ -448,7 +448,7 @@ LinuxFini (void) } void -KdOsAddInputDrivers () +KdOsAddInputDrivers (void) { KdAddPointerDriver(&LinuxMouseDriver); KdAddPointerDriver(&MsMouseDriver); diff --git a/xorg-server/hw/kdrive/linux/mouse.c b/xorg-server/hw/kdrive/linux/mouse.c index 1965342b8..6f399b586 100644 --- a/xorg-server/hw/kdrive/linux/mouse.c +++ b/xorg-server/hw/kdrive/linux/mouse.c @@ -23,7 +23,6 @@ #ifdef HAVE_CONFIG_H #include #endif -#define NEED_EVENTS #include #include #include @@ -945,7 +944,7 @@ MouseInit (KdPointerInfo *pi) for (i = 0; i < NUM_DEFAULT_MOUSE; i++) { fd = open (kdefaultMouse[i], 2); if (fd >= 0) { - pi->path = KdSaveString (kdefaultMouse[i]); + pi->path = strdup (kdefaultMouse[i]); break; } } @@ -962,7 +961,11 @@ MouseInit (KdPointerInfo *pi) km = (Kmouse *) xalloc (sizeof (Kmouse)); if (km) { km->iob.avail = km->iob.used = 0; - MouseFirstProtocol(km, "exps/2"); + MouseFirstProtocol(km, pi->protocol ? pi->protocol : "exps/2"); + /* MouseFirstProtocol sets state to MouseBroken for later protocol + * checks. Skip these checks if a protocol was supplied */ + if (pi->protocol) + km->state = MouseWorking; km->i_prot = 0; km->tty = isatty (fd); km->iob.fd = -1; diff --git a/xorg-server/hw/kdrive/linux/ms.c b/xorg-server/hw/kdrive/linux/ms.c index d0b47a3ee..5786ed170 100644 --- a/xorg-server/hw/kdrive/linux/ms.c +++ b/xorg-server/hw/kdrive/linux/ms.c @@ -24,7 +24,6 @@ THE SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#define NEED_EVENTS #include #include #include @@ -101,9 +100,9 @@ MsInit (KdPointerInfo *pi) return BadImplementation; if (!pi->path || strcmp(pi->path, "auto")) - pi->path = KdSaveString("/dev/mouse"); + pi->path = strdup("/dev/mouse"); if (!pi->name) - pi->name = KdSaveString("Microsoft protocol mouse"); + pi->name = strdup("Microsoft protocol mouse"); return Success; } diff --git a/xorg-server/hw/kdrive/linux/ps2.c b/xorg-server/hw/kdrive/linux/ps2.c index d361e82a1..396758481 100644 --- a/xorg-server/hw/kdrive/linux/ps2.c +++ b/xorg-server/hw/kdrive/linux/ps2.c @@ -23,7 +23,6 @@ #ifdef HAVE_CONFIG_H #include #endif -#define NEED_EVENTS #include #include #include @@ -124,7 +123,7 @@ Ps2Init (KdPointerInfo *pi) for (i = 0; i < NUM_PS2_NAMES; i++) { ps2Port = open (Ps2Names[i], 0); if (ps2Port >= 0) { - pi->path = KdSaveString (Ps2Names[i]); + pi->path = strdup (Ps2Names[i]); break; } } @@ -138,7 +137,7 @@ Ps2Init (KdPointerInfo *pi) close(ps2Port); if (!pi->name) - pi->name = KdSaveString ("PS/2 Mouse"); + pi->name = strdup ("PS/2 Mouse"); return Success; } diff --git a/xorg-server/hw/kdrive/linux/tslib.c b/xorg-server/hw/kdrive/linux/tslib.c index e0e860e48..59011b0e3 100644 --- a/xorg-server/hw/kdrive/linux/tslib.c +++ b/xorg-server/hw/kdrive/linux/tslib.c @@ -35,7 +35,6 @@ #include #endif -#define NEED_EVENTS #include #include #include @@ -115,7 +114,7 @@ TslibEnable (KdPointerInfo *pi) private->raw_event_hook = NULL; private->raw_event_closure = NULL; if (!pi->path) { - pi->path = "/dev/input/touchscreen0"; + pi->path = strdup("/dev/input/touchscreen0"); ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path); } private->tsDev = ts_open(pi->path, 0); @@ -170,7 +169,7 @@ TslibInit (KdPointerInfo *pi) /* hacktastic */ private->phys_screen = 0; pi->nAxes = 3; - pi->name = KdSaveString("Touchscreen"); + pi->name = strdup("Touchscreen"); pi->inputClass = KD_TOUCHSCREEN; return Success; diff --git a/xorg-server/hw/kdrive/sdl/Makefile.in b/xorg-server/hw/kdrive/sdl/Makefile.in index c99bb4f2d..5e1342518 100644 --- a/xorg-server/hw/kdrive/sdl/Makefile.in +++ b/xorg-server/hw/kdrive/sdl/Makefile.in @@ -38,8 +38,11 @@ bin_PROGRAMS = Xsdl$(EXEEXT) subdir = hw/kdrive/sdl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -49,7 +52,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -79,6 +83,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -99,9 +104,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -130,7 +138,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -139,9 +149,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -180,12 +194,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -205,7 +220,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -215,6 +229,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -228,11 +243,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -268,6 +282,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -292,7 +307,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -315,6 +329,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -346,7 +361,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/kdrive/src/Makefile.am b/xorg-server/hw/kdrive/src/Makefile.am index 792f64a4d..7ac23c2aa 100644 --- a/xorg-server/hw/kdrive/src/Makefile.am +++ b/xorg-server/hw/kdrive/src/Makefile.am @@ -4,13 +4,7 @@ INCLUDES = \ AM_CFLAGS = -DHAVE_DIX_CONFIG_H -noinst_LIBRARIES = libkdrive.a libkdrivestubs.a - -if KDRIVE_HW -KDRIVE_HW_SOURCES = \ - vga.c \ - vga.h -endif +noinst_LTLIBRARIES = libkdrive.la libkdrivestubs.la if XV KDRIVE_XV_SOURCES = \ @@ -18,7 +12,7 @@ KDRIVE_XV_SOURCES = \ kxv.h endif -libkdrive_a_SOURCES = \ +libkdrive_la_SOURCES = \ fourcc.h \ kcmap.c \ kcurscol.c \ @@ -26,13 +20,11 @@ libkdrive_a_SOURCES = \ kdrive.h \ kinfo.c \ kinput.c \ - kkeymap.c \ kmap.c \ kmode.c \ kshadow.c \ $(KDRIVE_XV_SOURCES) \ - $(KDRIVE_HW_SOURCES) \ $(top_srcdir)/mi/miinitext.c -libkdrivestubs_a_SOURCES = \ +libkdrivestubs_la_SOURCES = \ $(top_srcdir)/fb/fbcmap_mi.c diff --git a/xorg-server/hw/kdrive/src/Makefile.in b/xorg-server/hw/kdrive/src/Makefile.in index 1b10fce31..cc604d2c4 100644 --- a/xorg-server/hw/kdrive/src/Makefile.in +++ b/xorg-server/hw/kdrive/src/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/kdrive/src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,28 +51,23 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libkdrive_a_AR = $(AR) $(ARFLAGS) -libkdrive_a_LIBADD = -am__libkdrive_a_SOURCES_DIST = fourcc.h kcmap.c kcurscol.c kdrive.c \ - kdrive.h kinfo.c kinput.c kkeymap.c kmap.c kmode.c kshadow.c \ - kxv.c kxv.h vga.c vga.h $(top_srcdir)/mi/miinitext.c -@XV_TRUE@am__objects_1 = kxv.$(OBJEXT) -@KDRIVE_HW_TRUE@am__objects_2 = vga.$(OBJEXT) -am_libkdrive_a_OBJECTS = kcmap.$(OBJEXT) kcurscol.$(OBJEXT) \ - kdrive.$(OBJEXT) kinfo.$(OBJEXT) kinput.$(OBJEXT) \ - kkeymap.$(OBJEXT) kmap.$(OBJEXT) kmode.$(OBJEXT) \ - kshadow.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - miinitext.$(OBJEXT) -libkdrive_a_OBJECTS = $(am_libkdrive_a_OBJECTS) -libkdrivestubs_a_AR = $(AR) $(ARFLAGS) -libkdrivestubs_a_LIBADD = -am_libkdrivestubs_a_OBJECTS = fbcmap_mi.$(OBJEXT) -libkdrivestubs_a_OBJECTS = $(am_libkdrivestubs_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libkdrive_la_LIBADD = +am__libkdrive_la_SOURCES_DIST = fourcc.h kcmap.c kcurscol.c kdrive.c \ + kdrive.h kinfo.c kinput.c kmap.c kmode.c kshadow.c kxv.c kxv.h \ + $(top_srcdir)/mi/miinitext.c +@XV_TRUE@am__objects_1 = kxv.lo +am_libkdrive_la_OBJECTS = kcmap.lo kcurscol.lo kdrive.lo kinfo.lo \ + kinput.lo kmap.lo kmode.lo kshadow.lo $(am__objects_1) \ + miinitext.lo +libkdrive_la_OBJECTS = $(am_libkdrive_la_OBJECTS) +libkdrivestubs_la_LIBADD = +am_libkdrivestubs_la_OBJECTS = fbcmap_mi.lo +libkdrivestubs_la_OBJECTS = $(am_libkdrivestubs_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -80,9 +78,9 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libkdrive_a_SOURCES) $(libkdrivestubs_a_SOURCES) -DIST_SOURCES = $(am__libkdrive_a_SOURCES_DIST) \ - $(libkdrivestubs_a_SOURCES) +SOURCES = $(libkdrive_la_SOURCES) $(libkdrivestubs_la_SOURCES) +DIST_SOURCES = $(am__libkdrive_la_SOURCES_DIST) \ + $(libkdrivestubs_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -91,6 +89,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -111,9 +110,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -142,7 +144,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -151,9 +155,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -192,12 +200,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -217,7 +226,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -227,6 +235,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -240,11 +249,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -280,6 +288,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -304,7 +313,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -327,6 +335,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -358,7 +367,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -369,16 +380,12 @@ INCLUDES = \ @KDRIVE_CFLAGS@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H -noinst_LIBRARIES = libkdrive.a libkdrivestubs.a -@KDRIVE_HW_TRUE@KDRIVE_HW_SOURCES = \ -@KDRIVE_HW_TRUE@ vga.c \ -@KDRIVE_HW_TRUE@ vga.h - +noinst_LTLIBRARIES = libkdrive.la libkdrivestubs.la @XV_TRUE@KDRIVE_XV_SOURCES = \ @XV_TRUE@ kxv.c \ @XV_TRUE@ kxv.h -libkdrive_a_SOURCES = \ +libkdrive_la_SOURCES = \ fourcc.h \ kcmap.c \ kcurscol.c \ @@ -386,15 +393,13 @@ libkdrive_a_SOURCES = \ kdrive.h \ kinfo.c \ kinput.c \ - kkeymap.c \ kmap.c \ kmode.c \ kshadow.c \ $(KDRIVE_XV_SOURCES) \ - $(KDRIVE_HW_SOURCES) \ $(top_srcdir)/mi/miinitext.c -libkdrivestubs_a_SOURCES = \ +libkdrivestubs_la_SOURCES = \ $(top_srcdir)/fb/fbcmap_mi.c all: all-am @@ -432,16 +437,18 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libkdrive.a: $(libkdrive_a_OBJECTS) $(libkdrive_a_DEPENDENCIES) - -rm -f libkdrive.a - $(libkdrive_a_AR) libkdrive.a $(libkdrive_a_OBJECTS) $(libkdrive_a_LIBADD) - $(RANLIB) libkdrive.a -libkdrivestubs.a: $(libkdrivestubs_a_OBJECTS) $(libkdrivestubs_a_DEPENDENCIES) - -rm -f libkdrivestubs.a - $(libkdrivestubs_a_AR) libkdrivestubs.a $(libkdrivestubs_a_OBJECTS) $(libkdrivestubs_a_LIBADD) - $(RANLIB) libkdrivestubs.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libkdrive.la: $(libkdrive_la_OBJECTS) $(libkdrive_la_DEPENDENCIES) + $(LINK) $(libkdrive_la_OBJECTS) $(libkdrive_la_LIBADD) $(LIBS) +libkdrivestubs.la: $(libkdrivestubs_la_OBJECTS) $(libkdrivestubs_la_DEPENDENCIES) + $(LINK) $(libkdrivestubs_la_OBJECTS) $(libkdrivestubs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -449,19 +456,17 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap_mi.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcmap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcurscol.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdrive.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinput.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kkeymap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kshadow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kxv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vga.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap_mi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcurscol.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdrive.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinput.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kshadow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kxv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -484,33 +489,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< -miinitext.o: $(top_srcdir)/mi/miinitext.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.o -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='miinitext.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c - -miinitext.obj: $(top_srcdir)/mi/miinitext.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.obj -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='miinitext.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` - -fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.o -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.o' libtool=no @AMDEPBACKSLASH@ +miinitext.lo: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.lo -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.lo `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='miinitext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.lo `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c -fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.obj' libtool=no @AMDEPBACKSLASH@ +fbcmap_mi.lo: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.lo -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.lo `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.lo `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c mostlyclean-libtool: -rm -f *.lo @@ -602,7 +593,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -631,7 +622,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -703,7 +694,7 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/kdrive/src/kcmap.c b/xorg-server/hw/kdrive/src/kcmap.c index 4941ad17f..2c33e798a 100644 --- a/xorg-server/hw/kdrive/src/kcmap.c +++ b/xorg-server/hw/kdrive/src/kcmap.c @@ -217,7 +217,8 @@ KdUninstallColormap (ColormapPtr pCmap) return; /* install default if on same fb */ - defMap = (ColormapPtr) LookupIDByType(defMapID, RT_COLORMAP); + dixLookupResourceByType((pointer *)&defMap, defMapID, RT_COLORMAP, + serverClient, DixInstallAccess); if (defMap && KdColormapFb (defMap) == fb) (*pCmap->pScreen->InstallColormap)(defMap); else diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c index 97d167e1e..5cfe54ff8 100644 --- a/xorg-server/hw/kdrive/src/kdrive.c +++ b/xorg-server/hw/kdrive/src/kdrive.c @@ -24,9 +24,6 @@ #include #endif #include "kdrive.h" -#ifdef PSEUDO8 -#include "pseudo8/pseudo8.h" -#endif #include #include #include "privates.h" @@ -102,7 +99,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable) WindowPtr pChild; Bool WasViewable; Bool anyMarked = FALSE; - RegionPtr pOldClip = 0; WindowPtr pLayerWin; BoxRec box; @@ -343,7 +339,7 @@ AbortDDX(void) } void -ddxGiveUp () +ddxGiveUp (void) { AbortDDX (); } @@ -521,17 +517,6 @@ KdParseScreen (KdScreenInfo *screen, * {NMO} Reorder buttons */ -char * -KdSaveString (char *str) -{ - char *n = (char *) xalloc (strlen (str) + 1); - - if (!n) - return 0; - strcpy (n, str); - return n; -} - void KdParseRgba (char *rgba) { @@ -553,7 +538,6 @@ void KdUseMsg (void) { ErrorF("\nTinyX Device Dependent Usage:\n"); - ErrorF("-card pcmcia Use PCMCIA card as additional screen\n"); ErrorF("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP{,DEPTH/BPP}[xFREQ]] Specify screen characteristics\n"); ErrorF("-rgba rgb/bgr/vrgb/vbgr/none Specify subpixel ordering for LCD panels\n"); ErrorF("-mouse driver [,n,,options] Specify the pointer driver and its options (n is the number of buttons)\n"); @@ -569,9 +553,6 @@ KdUseMsg (void) ErrorF("-switchCmd Command to execute on vt switch\n"); ErrorF("-zap Terminate server on Ctrl+Alt+Backspace\n"); ErrorF("vtxx Use virtual terminal xx instead of the next available\n"); -#ifdef PSEUDO8 - p8UseMsg (); -#endif } int @@ -580,14 +561,6 @@ KdProcessArgument (int argc, char **argv, int i) KdCardInfo *card; KdScreenInfo *screen; - if (!strcmp (argv[i], "-card")) - { - if ((i+1) < argc) - InitCard (argv[i+1]); - else - UseMsg (); - return 2; - } if (!strcmp (argv[i], "-screen")) { if ((i+1) < argc) @@ -704,11 +677,7 @@ KdProcessArgument (int argc, char **argv, int i) return 2; } -#ifdef PSEUDO8 - return p8ProcessArgument (argc, argv, i); -#else return 0; -#endif } /* @@ -1079,10 +1048,6 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) if (!(*card->cfuncs->initAccel) (pScreen)) screen->dumb = TRUE; -#ifdef PSEUDO8 - (void) p8Init (pScreen, PSEUDO8_USE_DEFAULT); -#endif - if (card->cfuncs->finishInitScreen) if (!(*card->cfuncs->finishInitScreen) (pScreen)) return FALSE; @@ -1290,38 +1255,12 @@ KdDepthToFb (ScreenPtr pScreen, int depth) #endif -#ifdef HAVE_BACKTRACE -/* shamelessly ripped from xf86Events.c */ -void -KdBacktrace (int signum) -{ - void *array[32]; /* more than 32 and you have bigger problems */ - size_t size, i; - char **strings; - - signal(signum, SIG_IGN); - - size = backtrace (array, 32); - fprintf (stderr, "\nBacktrace (%d deep):\n", size); - strings = backtrace_symbols (array, size); - for (i = 0; i < size; i++) - fprintf (stderr, "%d: %s\n", i, strings[i]); - free (strings); - - kdCaughtSignal = TRUE; - if (signum == SIGSEGV) - FatalError("Segmentation fault caught\n"); - else if (signum > 0) - FatalError("Signal %d caught\n", signum); -} -#else -void -KdBacktrace (int signum) +static int +KdSignalWrapper (int signum) { kdCaughtSignal = TRUE; - FatalError("Segmentation fault caught\n"); + return 1; /* use generic OS layer cleanup & abort */ } -#endif void KdInitOutput (ScreenInfo *pScreenInfo, @@ -1368,7 +1307,7 @@ KdInitOutput (ScreenInfo *pScreenInfo, for (screen = card->screenList; screen; screen = screen->next) KdAddScreen (pScreenInfo, screen, argc, argv); - signal(SIGSEGV, KdBacktrace); + OsRegisterSigWrapper(KdSignalWrapper); } void @@ -1376,16 +1315,10 @@ OsVendorFatalError(void) { } -#ifdef DPMSExtension int DPMSSet(ClientPtr client, int level) { -} - -int -DPMSGet (int *level) -{ - return -1; + return Success; } Bool @@ -1393,5 +1326,3 @@ DPMSSupported (void) { return FALSE; } -#endif - diff --git a/xorg-server/hw/kdrive/src/kdrive.h b/xorg-server/hw/kdrive/src/kdrive.h index 8e1998ef9..6fdb7087f 100644 --- a/xorg-server/hw/kdrive/src/kdrive.h +++ b/xorg-server/hw/kdrive/src/kdrive.h @@ -24,8 +24,8 @@ #define _KDRIVE_H_ #include +#include #include -#define NEED_EVENTS #include #include #include "scrnintstr.h" @@ -45,9 +45,7 @@ #include "randrstr.h" #include "globals.h" -#ifdef XKB -#include -#endif +#include "xkbstr.h" #define KD_DPMS_NORMAL 0 #define KD_DPMS_STANDBY 1 @@ -222,6 +220,7 @@ struct _KdPointerInfo { DeviceIntPtr dixdev; char *name; char *path; + char *protocol; InputOption *options; int inputClass; @@ -276,11 +275,6 @@ typedef struct { int modbit; } KdKeySymModsRec; -extern const KeySym kdDefaultKeymap[KD_MAX_LENGTH * KD_MAX_WIDTH]; -extern const int kdDefaultKeymapWidth; -extern const CARD8 kdDefaultModMap[MAP_LENGTH]; -extern const KeySymsRec kdDefaultKeySyms; - typedef struct _KdKeyboardInfo KdKeyboardInfo; typedef struct _KdKeyboardDriver { @@ -301,21 +295,16 @@ struct _KdKeyboardInfo { char *name; char *path; int inputClass; -#ifdef XKB XkbDescPtr xkb; char *xkbRules; char *xkbModel; char *xkbLayout; char *xkbVariant; char *xkbOptions; -#endif int LockLed; - CARD8 keyState[KD_KEY_COUNT/8]; int minScanCode; int maxScanCode; - CARD8 modmap[MAP_LENGTH]; - KeySymsRec keySyms; int leds; int bellPitch; @@ -474,9 +463,6 @@ void KdParseScreen (KdScreenInfo *screen, char *arg); -char * -KdSaveString (char *str); - KdPointerInfo * KdParsePointer (char *arg); diff --git a/xorg-server/hw/kdrive/src/kinfo.c b/xorg-server/hw/kdrive/src/kinfo.c index d592e6803..cb646130e 100644 --- a/xorg-server/hw/kdrive/src/kinfo.c +++ b/xorg-server/hw/kdrive/src/kinfo.c @@ -118,7 +118,7 @@ KdNewPointer (void) if (!pi) return NULL; - pi->name = KdSaveString("Generic Pointer"); + pi->name = strdup("Generic Pointer"); pi->path = NULL; pi->inputClass = KD_MOUSE; pi->driver = NULL; diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c index 8e6a475d1..318d233d4 100644 --- a/xorg-server/hw/kdrive/src/kinput.c +++ b/xorg-server/hw/kdrive/src/kinput.c @@ -38,9 +38,7 @@ #include /* needed for FNONBLOCK & FASYNC */ #endif -#ifdef XKB -#include -#endif +#include "xkbsrv.h" #include #include @@ -48,6 +46,8 @@ #include "exevents.h" #include "extinit.h" #include "exglobals.h" +#include "eventstr.h" +#include "xserver-properties.h" #define AtomFromName(x) MakeAtom(x, strlen(x), 1) @@ -77,12 +77,6 @@ static KdPointerMatrix kdPointerMatrix = { void KdResetInputMachine (void); -#define IsKeyDown(ki, key) ((ki->keyState[(key) >> 3] >> ((key) & 7)) & 1) -#define KEYMAP(ki) (ki->dixdev->key->curKeySyms) -#define KEYMAPDDX(ki) (ki->keySyms) -#define KEYCOL1(ki, k) (KEYMAP(ki).map[((k)-(KEYMAP(ki).minKeyCode))*KEYMAP(ki).mapWidth]) -#define KEYCOL1DDX(ki, k) (KEYMAPDDX(ki).map[((k)-(KEYMAPDDX(ki).minKeyCode))*KEYMAPDDX(ki).mapWidth]) - #define KD_MAX_INPUT_FDS 8 typedef struct _kdInputFd { @@ -327,7 +321,7 @@ KdDisableInput (void) void KdEnableInput (void) { - xEvent xE; + InternalEvent ev; KdKeyboardInfo *ki; KdPointerInfo *pi; @@ -344,8 +338,8 @@ KdEnableInput (void) } /* reset screen saver */ - xE.u.keyButtonPointer.time = GetTimeInMillis (); - NoticeEventTime (&xE); + ev.any.time = GetTimeInMillis (); + NoticeEventTime (&ev); KdUnblockSigio (); } @@ -390,6 +384,8 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) DevicePtr pDev = (DevicePtr)pDevice; KdPointerInfo *pi; Atom xiclass; + Atom *btn_labels; + Atom *axes_labels; if (!pDev) return BadImplementation; @@ -437,9 +433,47 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) return !Success; } - InitPointerDeviceStruct(pDev, pi->map, pi->nButtons, + btn_labels = xcalloc(pi->nButtons, sizeof(Atom)); + if (!btn_labels) + return BadAlloc; + axes_labels = xcalloc(pi->nAxes, sizeof(Atom)); + if (!axes_labels) { + xfree(btn_labels); + return BadAlloc; + } + + switch(pi->nAxes) + { + default: + case 7: + btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); + case 6: + btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); + case 5: + btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); + case 4: + btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); + case 3: + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + case 2: + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + case 1: + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + case 0: + break; + } + + if (pi->nAxes >= 2) { + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + } + + InitPointerDeviceStruct(pDev, pi->map, pi->nButtons, btn_labels, (PtrCtrlProcPtr)NoopDDA, - GetMotionHistorySize(), pi->nAxes); + GetMotionHistorySize(), pi->nAxes, axes_labels); + + xfree(btn_labels); + xfree(axes_labels); if (pi->inputClass == KD_TOUCHSCREEN) { InitAbsoluteClassDeviceStruct(pDevice); @@ -662,85 +696,6 @@ KdKbdCtrl (DeviceIntPtr pDevice, KeybdCtrl *ctrl) extern KeybdCtrl defaultKeyboardControl; -static void -KdInitAutoRepeats (KdKeyboardInfo *ki) -{ - int key_code; - unsigned char mask; - int i; - unsigned char *repeats; - - repeats = defaultKeyboardControl.autoRepeats; - memset (repeats, '\0', 32); - for (key_code = KD_MIN_KEYCODE; key_code <= KD_MAX_KEYCODE; key_code++) - { - if (!ki->modmap[key_code]) - { - i = key_code >> 3; - mask = 1 << (key_code & 7); - repeats[i] |= mask; - } - } -} - -const KdKeySymModsRec kdKeySymMods[] = { - { XK_Control_L, ControlMask }, - { XK_Control_R, ControlMask }, - { XK_Shift_L, ShiftMask }, - { XK_Shift_R, ShiftMask }, - { XK_Caps_Lock, LockMask }, - { XK_Shift_Lock, LockMask }, - { XK_Alt_L, Mod1Mask }, - { XK_Alt_R, Mod1Mask }, - { XK_Meta_L, Mod1Mask }, - { XK_Meta_R, Mod1Mask }, - { XK_Num_Lock, Mod2Mask }, - { XK_Super_L, Mod3Mask }, - { XK_Super_R, Mod3Mask }, - { XK_Hyper_L, Mod3Mask }, - { XK_Hyper_R, Mod3Mask }, - { XK_Mode_switch, Mod4Mask }, - /* PDA specific hacks */ -#ifdef XF86XK_Start - { XF86XK_Start, ControlMask }, -#endif - { XK_Menu, ShiftMask }, - { XK_telephone, Mod1Mask }, -#ifdef XF86XK_AudioRecord - { XF86XK_AudioRecord, Mod2Mask }, -#endif -#ifdef XF86XK_Calendar - { XF86XK_Calendar, Mod3Mask } -#endif -}; - -#define NUM_SYM_MODS (sizeof(kdKeySymMods) / sizeof(kdKeySymMods[0])) - -static void -KdInitModMap (KdKeyboardInfo *ki) -{ - int key_code; - int row; - int width; - KeySym *syms; - int i; - - width = ki->keySyms.mapWidth; - for (key_code = ki->keySyms.minKeyCode; key_code <= ki->keySyms.maxKeyCode; key_code++) - { - ki->modmap[key_code] = 0; - syms = ki->keySyms.map + (key_code - ki->keySyms.minKeyCode) * width; - for (row = 0; row < width; row++, syms++) - { - for (i = 0; i < NUM_SYM_MODS; i++) - { - if (*syms == kdKeySymMods[i].modsym) - ki->modmap[key_code] |= kdKeySymMods[i].modbit; - } - } - } -} - static int KdKeyboardProc(DeviceIntPtr pDevice, int onoff) { @@ -748,9 +703,7 @@ KdKeyboardProc(DeviceIntPtr pDevice, int onoff) DevicePtr pDev = (DevicePtr)pDevice; KdKeyboardInfo *ki; Atom xiclass; -#ifdef XKB - XkbComponentNamesRec names; -#endif + XkbRMLVOSet rmlvo; if (!pDev) return BadImplementation; @@ -796,28 +749,13 @@ KdKeyboardProc(DeviceIntPtr pDevice, int onoff) return !Success; } - KdInitModMap(ki); - KdInitAutoRepeats(ki); - -#ifdef XKB - if (!noXkbExtension) { - memset(&names, 0, sizeof(XkbComponentNamesRec)); - - XkbSetRulesDflts (ki->xkbRules, ki->xkbModel, ki->xkbLayout, - ki->xkbVariant, ki->xkbOptions); - - ret = XkbInitKeyboardDeviceStruct (pDevice, - &names, - &ki->keySyms, - ki->modmap, - KdBell, KdKbdCtrl); - } - else -#endif - ret = InitKeyboardDeviceStruct(pDev, - &ki->keySyms, - ki->modmap, - KdBell, KdKbdCtrl); + memset(&rmlvo, 0, sizeof(rmlvo)); + rmlvo.rules = ki->xkbRules; + rmlvo.model = ki->xkbModel; + rmlvo.layout = ki->xkbLayout; + rmlvo.variant = ki->xkbVariant; + rmlvo.options = ki->xkbOptions; + ret = InitKeyboardDeviceStruct (pDevice, &rmlvo, KdBell, KdKbdCtrl); if (!ret) { ErrorF("Couldn't initialise keyboard %s\n", ki->name); return BadImplementation; @@ -950,23 +888,9 @@ KdKeyboardInfo * KdNewKeyboard (void) { KdKeyboardInfo *ki = xcalloc(sizeof(KdKeyboardInfo), 1); - if (!ki) return NULL; - - ki->keySyms.map = (KeySym *)xcalloc(sizeof(KeySym), - KD_MAX_LENGTH * - kdDefaultKeySyms.mapWidth); - if (!ki->keySyms.map) { - xfree(ki); - return NULL; - } - memcpy(ki->keySyms.map, kdDefaultKeySyms.map, - sizeof(KeySym) * (KD_MAX_LENGTH * kdDefaultKeySyms.mapWidth)); - ki->keySyms.minKeyCode = kdDefaultKeySyms.minKeyCode; - ki->keySyms.maxKeyCode = kdDefaultKeySyms.maxKeyCode; - ki->keySyms.mapWidth = kdDefaultKeySyms.mapWidth; ki->minScanCode = 0; ki->maxScanCode = 0; ki->leds = 0; @@ -974,13 +898,11 @@ KdNewKeyboard (void) ki->bellDuration = 200; ki->next = NULL; ki->options = NULL; -#ifdef XKB - ki->xkbRules = KdSaveString("base"); - ki->xkbModel = KdSaveString("pc105"); - ki->xkbLayout = KdSaveString("us"); + ki->xkbRules = strdup("base"); + ki->xkbModel = strdup("pc105"); + ki->xkbLayout = strdup("us"); ki->xkbVariant = NULL; ki->xkbOptions = NULL; -#endif return ki; } @@ -1164,7 +1086,6 @@ KdParseKbdOptions (KdKeyboardInfo *ki) for (option = ki->options; option; option = option->next) { -#ifdef XKB if (strcasecmp(option->key, "XkbRules") == 0) ki->xkbRules = option->value; else if (strcasecmp(option->key, "XkbModel") == 0) @@ -1176,9 +1097,8 @@ KdParseKbdOptions (KdKeyboardInfo *ki) else if (strcasecmp(option->key, "XkbOptions") == 0) ki->xkbOptions = option->value; else if (!strcasecmp (option->key, "device")) - ki->path = KdSaveString(option->value); + ki->path = strdup(option->value); else -#endif ErrorF("Kbd option key (%s) of value (%s) not assigned!\n", option->key, option->value); } @@ -1200,9 +1120,7 @@ KdParseKeyboard (char *arg) ki->path = NULL; ki->driver = NULL; ki->driverPrivate = NULL; -#ifdef XKB ki->xkb = NULL; -#endif ki->next = NULL; if (!arg) @@ -1275,7 +1193,9 @@ KdParsePointerOptions (KdPointerInfo *pi) else if (!strcmp (option->key, "rawcoord")) pi->transformCoordinates = FALSE; else if (!strcasecmp (option->key, "device")) - pi->path = KdSaveString(option->value); + pi->path = strdup(option->value); + else if (!strcasecmp (option->key, "protocol")) + pi->protocol = strdup(option->value); else ErrorF("Pointer option key (%s) of value (%s) not assigned!\n", option->key, option->value); @@ -1296,6 +1216,7 @@ KdParsePointer (char *arg) return NULL; pi->emulateMiddleButton = kdEmulateMiddleButton; pi->transformCoordinates = !kdRawPointerCoordinates; + pi->protocol = NULL; pi->nButtons = 5; /* XXX should not be hardcoded */ pi->inputClass = KD_MOUSE; @@ -1776,7 +1697,7 @@ char *kdActionNames[] = { #endif /* DEBUG */ static void -KdQueueEvent (DeviceIntPtr pDev, xEvent *ev) +KdQueueEvent (DeviceIntPtr pDev, InternalEvent *ev) { KdAssertSigioBlocked ("KdQueueEvent"); mieqEnqueue (pDev, ev); @@ -1864,13 +1785,6 @@ KdReceiveTimeout (KdPointerInfo *pi) KdRunMouseMachine (pi, timeout, 0, 0, 0, 0, 0, 0); } -#define KILL_SEQUENCE ((1L << KK_CONTROL)|(1L << KK_ALT)|(1L << KK_F8)|(1L << KK_F10)) -#define SPECIAL_SEQUENCE ((1L << KK_CONTROL) | (1L << KK_ALT)) -#define SETKILLKEY(b) (KdSpecialKeys |= (1L << (b))) -#define CLEARKILLKEY(b) (KdSpecialKeys &= ~(1L << (b))) - -CARD32 KdSpecialKeys = 0; - /* * kdCheckTermination * @@ -1884,92 +1798,10 @@ CARD32 KdSpecialKeys = 0; extern int nClients; -static void -KdCheckSpecialKeys(KdKeyboardInfo *ki, int type, int sym) -{ - if (!ki) - return; - - /* - * Ignore key releases - */ - - if (type == KeyRelease) - return; - - /* Some iPaq keyboard -> mouse button mapping used to be here, but I - * refuse to perpetuate this madness. -daniels */ - - /* - * Check for control/alt pressed - */ - if ((ki->dixdev->key->state & (ControlMask|Mod1Mask)) != - (ControlMask|Mod1Mask)) - return; - - /* - * Let OS function see keysym first - */ - - if (kdOsFuncs->SpecialKey) - if ((*kdOsFuncs->SpecialKey) (sym)) - return; - - /* - * Now check for backspace or delete; these signal the - * X server to terminate - * - * I can't believe it's not XKB. -daniels - */ - switch (sym) { - case XK_BackSpace: - case XK_Delete: - case XK_KP_Delete: - /* - * Set the dispatch exception flag so the server will terminate the - * next time through the dispatch loop. - */ - if (kdAllowZap || party_like_its_1989) - dispatchException |= DE_TERMINATE; - break; - } -} - -/* - * kdEnqueueKeyboardEvent - * - * This function converts hardware keyboard event information into an X event - * and enqueues it using MI. It wakes up the server before returning so that - * the event will be processed normally. - * - */ - -static void -KdHandleKeyboardEvent (KdKeyboardInfo *ki, int type, int key) -{ - int byte; - CARD8 bit; - KdPointerInfo *pi; - - byte = key >> 3; - bit = 1 << (key & 7); - - switch (type) { - case KeyPress: - ki->keyState[byte] |= bit; - break; - case KeyRelease: - ki->keyState[byte] &= ~bit; - break; - } - - for (pi = kdPointers; pi; pi = pi->next) - KdRunMouseMachine (pi, keyboard, 0, 0, 0, 0, 0, 0); -} - void KdReleaseAllKeys (void) { +#if 0 int key, nEvents, i; KdKeyboardInfo *ki; @@ -1978,7 +1810,7 @@ KdReleaseAllKeys (void) for (ki = kdKeyboards; ki; ki = ki->next) { for (key = ki->keySyms.minKeyCode; key < ki->keySyms.maxKeyCode; key++) { - if (IsKeyDown(ki, key)) { + if (key_is_down(ki->dixdev, key, KEY_POSTED | KEY_PROCESSED)) { KdHandleKeyboardEvent(ki, KeyRelease, key); GetEventList(&kdEvents); nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, KeyRelease, key); @@ -1989,6 +1821,7 @@ KdReleaseAllKeys (void) } KdUnblockSigio (); +#endif } static void @@ -2002,7 +1835,8 @@ KdCheckLock (void) if (tmp->LockLed && tmp->dixdev && tmp->dixdev->key) { keyc = tmp->dixdev->key; isSet = (tmp->leds & (1 << (tmp->LockLed-1))) != 0; - shouldBeSet = (keyc->state & LockMask) != 0; + /* FIXME: Just use XKB indicators! */ + shouldBeSet = !!(XkbStateFieldFromRec(&keyc->xkbInfo->state) & LockMask); if (isSet != shouldBeSet) KdSetLed (tmp, tmp->LockLed, shouldBeSet); } @@ -2028,7 +1862,7 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo *ki, if (scan_code >= ki->minScanCode && scan_code <= ki->maxScanCode) { key_code = scan_code + KD_MIN_KEYCODE - ki->minScanCode; - + /* * Set up this event -- the type may be modified below */ @@ -2036,19 +1870,12 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo *ki, type = KeyRelease; else type = KeyPress; - -#ifdef XKB - if (noXkbExtension) -#endif - { - KdCheckSpecialKeys(ki, type, key_code); - KdHandleKeyboardEvent(ki, type, key_code); - } - + GetEventList(&kdEvents); + nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, type, key_code); for (i = 0; i < nEvents; i++) - KdQueueEvent(ki->dixdev, (kdEvents + i)->event); + KdQueueEvent(ki->dixdev, (InternalEvent *)((kdEvents + i)->event)); } else { ErrorF("driver %s wanted to post scancode %d outside of [%d, %d]!\n", @@ -2096,8 +1923,8 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry, } else { if (pi->transformCoordinates) { - x = matrix[0][0] * rx + matrix[0][1] * ry; - y = matrix[1][0] * rx + matrix[1][1] * ry; + x = matrix[0][0] * rx + matrix[0][1] * ry + matrix[0][2]; + y = matrix[1][0] * rx + matrix[1][1] * ry + matrix[1][2]; } else { x = rx; @@ -2158,7 +1985,7 @@ _KdEnqueuePointerEvent (KdPointerInfo *pi, int type, int x, int y, int z, nEvents = GetPointerEvents(kdEvents, pi->dixdev, type, b, absrel, 0, 3, valuators); for (i = 0; i < nEvents; i++) - KdQueueEvent(pi->dixdev, (kdEvents + i)->event); + KdQueueEvent(pi->dixdev, (InternalEvent *)((kdEvents + i)->event)); } void @@ -2349,7 +2176,7 @@ miPointerScreenFuncRec kdPointerScreenFuncs = }; void -ProcessInputEvents () +ProcessInputEvents (void) { mieqProcessInputEvents(); miPointerUpdateSprite(inputInfo.pointer); @@ -2458,9 +2285,9 @@ NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev) for (option = options; option; option = option->next) { if (strcmp(option->key, "device") == 0) { if (pi && option->value) - pi->path = KdSaveString(option->value); + pi->path = strdup(option->value); else if (ki && option->value) - ki->path = KdSaveString(option->value); + ki->path = strdup(option->value); } else if (strcmp(option->key, "driver") == 0) { if (pi) { @@ -2486,16 +2313,16 @@ NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev) if (pi) { if (KdAddPointer(pi) != Success || - ActivateDevice(pi->dixdev) != Success || - EnableDevice(pi->dixdev) != TRUE) { + ActivateDevice(pi->dixdev, TRUE) != Success || + EnableDevice(pi->dixdev, TRUE) != TRUE) { ErrorF("couldn't add or enable pointer\n"); return BadImplementation; } } else if (ki) { if (KdAddKeyboard(ki) != Success || - ActivateDevice(ki->dixdev) != Success || - EnableDevice(ki->dixdev) != TRUE) { + ActivateDevice(ki->dixdev, TRUE) != Success || + EnableDevice(ki->dixdev, TRUE) != TRUE) { ErrorF("couldn't add or enable keyboard\n"); return BadImplementation; } @@ -2513,5 +2340,5 @@ NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev) void DeleteInputDeviceRequest(DeviceIntPtr pDev) { - RemoveDevice(pDev); + RemoveDevice(pDev, TRUE); } diff --git a/xorg-server/hw/vfb/InitInput.c b/xorg-server/hw/vfb/InitInput.c index 2af3c6421..7f2d56fa8 100644 --- a/xorg-server/hw/vfb/InitInput.c +++ b/xorg-server/hw/vfb/InitInput.c @@ -31,7 +31,6 @@ from The Open Group. #endif #include -#define NEED_EVENTS #include "mi.h" #include #include "scrnintstr.h" @@ -40,7 +39,10 @@ from The Open Group. #include "mibstore.h" #include "mipointer.h" #include "lk201kbd.h" +#include "xkbsrv.h" #include +#include "xserver-properties.h" +#include "exevents.h" Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) @@ -49,7 +51,7 @@ LegalModifier(unsigned int key, DeviceIntPtr pDev) } void -ProcessInputEvents() +ProcessInputEvents(void) { mieqProcessInputEvents(); } @@ -62,219 +64,20 @@ void DDXRingBell(int volume, int pitch, int duration) #define VFB_MAX_KEY 255 KeySym map[MAP_LENGTH * LK201_GLYPHS_PER_KEY]; -/* The only reason for using the LK201 mappings here was that they were - * easy to lift. - */ -static Bool -GetLK201Mappings(KeySymsPtr pKeySyms, CARD8 *pModMap) -{ -#define INDEX(in) ((in - VFB_MIN_KEY) * LK201_GLYPHS_PER_KEY) - int i; - - for (i = 0; i < MAP_LENGTH; i++) - pModMap[i] = NoSymbol; /* make sure it is restored */ - pModMap[ KEY_LOCK ] = LockMask; - pModMap[ KEY_SHIFT ] = ShiftMask; - pModMap[ KEY_CTRL ] = ControlMask; - pModMap[ KEY_COMPOSE ] = Mod1Mask; - - pKeySyms->minKeyCode = VFB_MIN_KEY; - pKeySyms->maxKeyCode = VFB_MAX_KEY; - pKeySyms->mapWidth = LK201_GLYPHS_PER_KEY; - pKeySyms->map = map; - - for (i = 0; i < (MAP_LENGTH * LK201_GLYPHS_PER_KEY); i++) - map[i] = NoSymbol; /* make sure it is restored */ - - map[INDEX(KEY_F1)] = XK_F1; - map[INDEX(KEY_F2)] = XK_F2; - map[INDEX(KEY_F3)] = XK_F3; - map[INDEX(KEY_F4)] = XK_F4; - map[INDEX(KEY_F5)] = XK_F5; - map[INDEX(KEY_F6)] = XK_F6; - map[INDEX(KEY_F7)] = XK_F7; - map[INDEX(KEY_F8)] = XK_F8; - map[INDEX(KEY_F9)] = XK_F9; - map[INDEX(KEY_F10)] = XK_F10; - map[INDEX(KEY_F11)] = XK_F11; - map[INDEX(KEY_F12)] = XK_F12; - map[INDEX(KEY_F13)] = XK_F13; - map[INDEX(KEY_F14)] = XK_F14; - - map[INDEX(KEY_HELP)] = XK_Help; - map[INDEX(KEY_MENU)] = XK_Menu; - - map[INDEX(KEY_F17)] = XK_F17; - map[INDEX(KEY_F18)] = XK_F18; - map[INDEX(KEY_F19)] = XK_F19; - map[INDEX(KEY_F20)] = XK_F20; - - map[INDEX(KEY_FIND)] = XK_Find; - map[INDEX(KEY_INSERT_HERE)] = XK_Insert; - map[INDEX(KEY_REMOVE)] = XK_Delete; - map[INDEX(KEY_SELECT)] = XK_Select; - map[INDEX(KEY_PREV_SCREEN)] = XK_Prior; - map[INDEX(KEY_NEXT_SCREEN)] = XK_Next; - - map[INDEX(KEY_KP_0)] = XK_KP_0; - map[INDEX(KEY_KP_PERIOD)] = XK_KP_Decimal; - map[INDEX(KEY_KP_ENTER)] = XK_KP_Enter; - map[INDEX(KEY_KP_1)] = XK_KP_1; - map[INDEX(KEY_KP_2)] = XK_KP_2; - map[INDEX(KEY_KP_3)] = XK_KP_3; - map[INDEX(KEY_KP_4)] = XK_KP_4; - map[INDEX(KEY_KP_5)] = XK_KP_5; - map[INDEX(KEY_KP_6)] = XK_KP_6; - map[INDEX(KEY_KP_COMMA)] = XK_KP_Separator; - map[INDEX(KEY_KP_7)] = XK_KP_7; - map[INDEX(KEY_KP_8)] = XK_KP_8; - map[INDEX(KEY_KP_9)] = XK_KP_9; - map[INDEX(KEY_KP_HYPHEN)] = XK_KP_Subtract; - map[INDEX(KEY_KP_PF1)] = XK_KP_F1; - map[INDEX(KEY_KP_PF2)] = XK_KP_F2; - map[INDEX(KEY_KP_PF3)] = XK_KP_F3; - map[INDEX(KEY_KP_PF4)] = XK_KP_F4; - - map[INDEX(KEY_LEFT)] = XK_Left; - map[INDEX(KEY_RIGHT)] = XK_Right; - map[INDEX(KEY_DOWN)] = XK_Down; - map[INDEX(KEY_UP)] = XK_Up; - - map[INDEX(KEY_SHIFT)] = XK_Shift_L; - map[INDEX(KEY_CTRL)] = XK_Control_L; - map[INDEX(KEY_LOCK)] = XK_Caps_Lock; - map[INDEX(KEY_COMPOSE)] = XK_Multi_key; - map[INDEX(KEY_COMPOSE)+1] = XK_Meta_L; - map[INDEX(KEY_DELETE)] = XK_Delete; - map[INDEX(KEY_RETURN)] = XK_Return; - map[INDEX(KEY_TAB)] = XK_Tab; - - map[INDEX(KEY_TILDE)] = XK_quoteleft; - map[INDEX(KEY_TILDE)+1] = XK_asciitilde; - - map[INDEX(KEY_TR_1)] = XK_1; - map[INDEX(KEY_TR_1)+1] = XK_exclam; - map[INDEX(KEY_Q)] = XK_Q; - map[INDEX(KEY_A)] = XK_A; - map[INDEX(KEY_Z)] = XK_Z; - - map[INDEX(KEY_TR_2)] = XK_2; - map[INDEX(KEY_TR_2)+1] = XK_at; - - map[INDEX(KEY_W)] = XK_W; - map[INDEX(KEY_S)] = XK_S; - map[INDEX(KEY_X)] = XK_X; - - map[INDEX(KEY_LANGLE_RANGLE)] = XK_less; - map[INDEX(KEY_LANGLE_RANGLE)+1] = XK_greater; - - map[INDEX(KEY_TR_3)] = XK_3; - map[INDEX(KEY_TR_3)+1] = XK_numbersign; - - map[INDEX(KEY_E)] = XK_E; - map[INDEX(KEY_D)] = XK_D; - map[INDEX(KEY_C)] = XK_C; - - map[INDEX(KEY_TR_4)] = XK_4; - map[INDEX(KEY_TR_4)+1] = XK_dollar; - - map[INDEX(KEY_R)] = XK_R; - map[INDEX(KEY_F)] = XK_F; - map[INDEX(KEY_V)] = XK_V; - map[INDEX(KEY_SPACE)] = XK_space; - - map[INDEX(KEY_TR_5)] = XK_5; - map[INDEX(KEY_TR_5)+1] = XK_percent; - - map[INDEX(KEY_T)] = XK_T; - map[INDEX(KEY_G)] = XK_G; - map[INDEX(KEY_B)] = XK_B; - - map[INDEX(KEY_TR_6)] = XK_6; - map[INDEX(KEY_TR_6)+1] = XK_asciicircum; - - map[INDEX(KEY_Y)] = XK_Y; - map[INDEX(KEY_H)] = XK_H; - map[INDEX(KEY_N)] = XK_N; - - map[INDEX(KEY_TR_7)] = XK_7; - map[INDEX(KEY_TR_7)+1] = XK_ampersand; - - map[INDEX(KEY_U)] = XK_U; - map[INDEX(KEY_J)] = XK_J; - map[INDEX(KEY_M)] = XK_M; - - map[INDEX(KEY_TR_8)] = XK_8; - map[INDEX(KEY_TR_8)+1] = XK_asterisk; - - map[INDEX(KEY_I)] = XK_I; - map[INDEX(KEY_K)] = XK_K; - - map[INDEX(KEY_COMMA)] = XK_comma; - map[INDEX(KEY_COMMA)+1] = XK_less; - - map[INDEX(KEY_TR_9)] = XK_9; - map[INDEX(KEY_TR_9)+1] = XK_parenleft; - - map[INDEX(KEY_O)] = XK_O; - map[INDEX(KEY_L)] = XK_L; - - map[INDEX(KEY_PERIOD)] = XK_period; - map[INDEX(KEY_PERIOD)+1] = XK_greater; - - map[INDEX(KEY_TR_0)] = XK_0; - map[INDEX(KEY_TR_0)+1] = XK_parenright; - - map[INDEX(KEY_P)] = XK_P; - - map[INDEX(KEY_SEMICOLON)] = XK_semicolon; - map[INDEX(KEY_SEMICOLON)+1] = XK_colon; - - map[INDEX(KEY_QMARK)] = XK_slash; - map[INDEX(KEY_QMARK)+1] = XK_question; - - map[INDEX(KEY_PLUS)] = XK_equal; - map[INDEX(KEY_PLUS)+1] = XK_plus; - - map[INDEX(KEY_RBRACE)] = XK_bracketright; - map[INDEX(KEY_RBRACE)+1] = XK_braceright; - - map[INDEX(KEY_VBAR)] = XK_backslash; - map[INDEX(KEY_VBAR)+1] = XK_bar; - - map[INDEX(KEY_UBAR)] = XK_minus; - map[INDEX(KEY_UBAR)+1] = XK_underscore; - - map[INDEX(KEY_LBRACE)] = XK_bracketleft; - map[INDEX(KEY_LBRACE)+1] = XK_braceleft; - - map[INDEX(KEY_QUOTE)] = XK_quoteright; - map[INDEX(KEY_QUOTE)+1] = XK_quotedbl; - - map[INDEX(KEY_F11)] = XK_Escape; - - return TRUE; -#undef INDEX -} - static int vfbKeybdProc(DeviceIntPtr pDevice, int onoff) { - KeySymsRec keySyms; - CARD8 modMap[MAP_LENGTH]; DevicePtr pDev = (DevicePtr)pDevice; switch (onoff) { - case DEVICE_INIT: - GetLK201Mappings(&keySyms, modMap); - InitKeyboardDeviceStruct(pDev, &keySyms, modMap, - (BellProcPtr)NoopDDA, (KbdCtrlProcPtr)NoopDDA); - break; - case DEVICE_ON: + case DEVICE_INIT: + InitKeyboardDeviceStruct(pDevice, NULL, NULL, NULL); + break; + case DEVICE_ON: pDev->on = TRUE; break; - case DEVICE_OFF: + case DEVICE_OFF: pDev->on = FALSE; break; case DEVICE_CLOSE: @@ -286,8 +89,13 @@ vfbKeybdProc(DeviceIntPtr pDevice, int onoff) static int vfbMouseProc(DeviceIntPtr pDevice, int onoff) { - BYTE map[4]; +#define NBUTTONS 3 +#define NAXES 2 + + BYTE map[NBUTTONS + 1]; DevicePtr pDev = (DevicePtr)pDevice; + Atom btn_labels[NBUTTONS] = {0}; + Atom axes_labels[NAXES] = {0}; switch (onoff) { @@ -295,8 +103,16 @@ vfbMouseProc(DeviceIntPtr pDevice, int onoff) map[1] = 1; map[2] = 2; map[3] = 3; - InitPointerDeviceStruct(pDev, map, 3, - (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); + + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + + InitPointerDeviceStruct(pDev, map, NBUTTONS, btn_labels, + (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), NAXES, axes_labels); break; case DEVICE_ON: @@ -311,6 +127,9 @@ vfbMouseProc(DeviceIntPtr pDevice, int onoff) break; } return Success; + +#undef NBUTTONS +#undef NAXES } void diff --git a/xorg-server/hw/vfb/InitOutput.c b/xorg-server/hw/vfb/InitOutput.c index fd383e1c2..e7dd1d95f 100644 --- a/xorg-server/hw/vfb/InitOutput.c +++ b/xorg-server/hw/vfb/InitOutput.c @@ -35,7 +35,6 @@ from The Open Group. #endif #include #include -#define NEED_EVENTS #include #include #include "scrnintstr.h" @@ -164,7 +163,7 @@ vfbBitsPerPixel(int depth) } void -ddxGiveUp() +ddxGiveUp(void) { int i; @@ -215,7 +214,7 @@ ddxGiveUp() } void -AbortDDX() +AbortDDX(void) { ddxGiveUp(); } @@ -228,12 +227,12 @@ DarwinHandleGUI(int argc, char *argv[]) #endif void -OsVendorInit() +OsVendorInit(void) { } void -OsVendorFatalError() +OsVendorFatalError(void) { } @@ -245,7 +244,7 @@ void ddxBeforeReset(void) #endif void -ddxUseMsg() +ddxUseMsg(void) { ErrorF("-screen scrn WxHxD set screen's width, height, depth\n"); ErrorF("-pixdepths list-of-int support given pixmap depths\n"); @@ -509,8 +508,10 @@ vfbUninstallColormap(ColormapPtr pmap) { if (pmap->mid != pmap->pScreen->defColormap) { - curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&curpmap, + pmap->pScreen->defColormap, + RT_COLORMAP, serverClient, + DixInstallAccess); (*pmap->pScreen->InstallColormap)(curpmap); } } @@ -891,6 +892,12 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) (1 << DirectColor)), 8, TrueColor, 0xff0000, 0x00ff00, 0x0000ff); break; + case 30: + miSetVisualTypesAndMasks (30, + ((1 << TrueColor) | + (1 << DirectColor)), + 10, TrueColor, 0x3ff00000, 0x000ffc00, 0x000003ff); + break; } miSetPixmapDepths (); diff --git a/xorg-server/hw/vfb/Makefile.am b/xorg-server/hw/vfb/Makefile.am index a4a120a05..c5b49a37d 100644 --- a/xorg-server/hw/vfb/Makefile.am +++ b/xorg-server/hw/vfb/Makefile.am @@ -22,6 +22,7 @@ Xvfb_SOURCES = $(SRCS) XVFB_LIBS = \ @XVFB_LIBS@ \ libfbcmap.a \ + $(MAIN_LIB) \ $(XSERVER_LIBS) Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS) diff --git a/xorg-server/hw/vfb/Makefile.in b/xorg-server/hw/vfb/Makefile.in index fb4733903..7a4cf8d94 100644 --- a/xorg-server/hw/vfb/Makefile.in +++ b/xorg-server/hw/vfb/Makefile.in @@ -45,8 +45,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/vfb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -56,7 +59,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) @@ -72,7 +76,8 @@ am__objects_1 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \ am_Xvfb_OBJECTS = $(am__objects_1) Xvfb_OBJECTS = $(am_Xvfb_OBJECTS) am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = libfbcmap.a $(am__DEPENDENCIES_1) +am__DEPENDENCIES_2 = libfbcmap.a $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) Xvfb_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(Xvfb_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -118,6 +123,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -138,9 +144,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -169,7 +178,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -178,9 +189,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -219,12 +234,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -244,7 +260,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -254,6 +269,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -267,11 +283,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -307,6 +322,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -322,6 +338,7 @@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = \ @XVFB_LIBS@ \ libfbcmap.a \ + $(MAIN_LIB) \ $(XSERVER_LIBS) XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ @@ -335,7 +352,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -358,6 +374,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -389,7 +406,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am index 98d7ec806..b97ebd79f 100644 --- a/xorg-server/hw/xfree86/Makefile.am +++ b/xorg-server/hw/xfree86/Makefile.am @@ -12,56 +12,67 @@ if XF86UTILS XF86UTILS_SUBDIR = utils endif +if XAA +XAA_SUBDIR = xaa +endif + +if VGAHW +VGAHW_SUBDIR = vgahw +endif + +if VBE +VBE_SUBDIR = vbe +endif + +if INT10MODULE +INT10_SUBDIR = int10 +endif + DOC_SUBDIR = doc -SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser \ - ramdac shadowfb vbe vgahw xaa \ +SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \ + ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \ xf8_16bpp loader dixmods exa modes \ $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) -DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ +DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vbe vgahw xaa \ xf8_16bpp loader dixmods dri dri2 exa modes \ utils doc bin_PROGRAMS = Xorg +Xorg_SOURCES = xorg.c AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ -Xorg_SOURCES = xorg.c - -# libxorgos and libcommon need symbols from each other -noinst_LTLIBRARIES = libosandcommon.la -libosandcommon_la_SOURCES = osandcommon.c -libosandcommon_la_LIBADD = \ +noinst_LTLIBRARIES = libxorg.la +libxorg_la_SOURCES = libxorg.c +libxorg_la_LIBADD = \ + $(XSERVER_LIBS) \ + loader/libloader.la \ os-support/libxorgos.la \ - common/libcommon.la - -osandcommon.c xorg.c: + common/libcommon.la \ + parser/libxf86config_internal.la \ + dixmods/libdixmods.la \ + modes/libxf86modes.la \ + ramdac/libramdac.la \ + ddc/libddc.la \ + i2c/libi2c.la \ + dixmods/libxorgxkb.la \ + $(top_builddir)/mi/libmi.la \ + $(top_builddir)/os/libos.la \ + @XORG_LIBS@ + +libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD) + +libxorg.c xorg.c: touch $@ -DISTCLEANFILES = osandcommon.c xorg.c +DISTCLEANFILES = libxorg.c xorg.c -XORG_LIBS = \ - $(XSERVER_LIBS) \ - common/libinit.a \ - loader/libloader.a \ - libosandcommon.la \ - parser/libxf86config.a \ - dixmods/libdixmods.la \ - modes/libxf86modes.a \ - ramdac/libramdac.a \ - ddc/libddc.a \ - i2c/libi2c.a \ - dixmods/libxorgxkb.la \ - $(top_builddir)/mi/libmi.la \ - $(top_builddir)/os/libos.la \ - @XORG_LIBS@ \ - dixmods/libxorgxkb.la - -Xorg_DEPENDENCIES = $(XORG_LIBS) -Xorg_LDADD = $(XORG_LIBS) $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) +Xorg_DEPENDENCIES = libxorg.la +Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) @@ -69,6 +80,11 @@ BUILT_SOURCES = xorg.conf.example DISTCLEANFILES += xorg.conf.example xorg.conf.example.pre EXTRA_DIST = xorgconf.cpp +if XSERVER_DTRACE +# Re-add dtrace object code that gets lost when building static libraries +Xorg_LDADD += $(XSERVER_LIBS) +endif + if SOLARIS_ASM_INLINE # Needs to be built before any files are compiled when using Sun compilers # so in*/out* inline definitions are properly processed. @@ -91,10 +107,8 @@ if INSTALL_SETUID chmod u+s $(DESTDIR)$(bindir)/Xorg endif -optionsdir = $(libdir)/X11 -dist_options_DATA = Options - CPP_FILES_FLAGS = \ + $(MANDEFS) \ -DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \ -DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \ -DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \ diff --git a/xorg-server/hw/xfree86/Makefile.in b/xorg-server/hw/xfree86/Makefile.in index bf14751d7..32e339b6d 100644 --- a/xorg-server/hw/xfree86/Makefile.in +++ b/xorg-server/hw/xfree86/Makefile.in @@ -20,7 +20,6 @@ # (Replaces CppFileTarget from Imake) - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -40,17 +39,23 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(dist_options_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/cpprules.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in bin_PROGRAMS = Xorg$(EXEEXT) +# Re-add dtrace object code that gets lost when building static libraries +@XSERVER_DTRACE_TRUE@am__append_1 = $(XSERVER_LIBS) + # Needs to be built before any files are compiled when using Sun compilers # so in*/out* inline definitions are properly processed. -@SOLARIS_ASM_INLINE_TRUE@am__append_1 = os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il +@SOLARIS_ASM_INLINE_TRUE@am__append_2 = os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il subdir = hw/xfree86 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -60,25 +65,19 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -libosandcommon_la_DEPENDENCIES = os-support/libxorgos.la \ - common/libcommon.la -am_libosandcommon_la_OBJECTS = osandcommon.lo -libosandcommon_la_OBJECTS = $(am_libosandcommon_la_OBJECTS) -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(optionsdir)" +am__DEPENDENCIES_1 = +am_libxorg_la_OBJECTS = libxorg.lo +libxorg_la_OBJECTS = $(am_libxorg_la_OBJECTS) +am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_Xorg_OBJECTS = xorg.$(OBJEXT) Xorg_OBJECTS = $(am_Xorg_OBJECTS) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) common/libinit.a \ - loader/libloader.a libosandcommon.la parser/libxf86config.a \ - dixmods/libdixmods.la modes/libxf86modes.a ramdac/libramdac.a \ - ddc/libddc.a i2c/libi2c.a dixmods/libxorgxkb.la \ - $(top_builddir)/mi/libmi.la $(top_builddir)/os/libos.la \ - dixmods/libxorgxkb.la +@XSERVER_DTRACE_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) Xorg_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(Xorg_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -92,8 +91,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libosandcommon_la_SOURCES) $(Xorg_SOURCES) -DIST_SOURCES = $(libosandcommon_la_SOURCES) $(Xorg_SOURCES) +SOURCES = $(libxorg_la_SOURCES) $(Xorg_SOURCES) +DIST_SOURCES = $(libxorg_la_SOURCES) $(Xorg_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -101,28 +100,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -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 = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -DATA = $(dist_options_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -161,6 +138,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -181,9 +159,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -212,7 +193,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -221,9 +204,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -262,12 +249,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -287,7 +275,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -297,6 +284,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -310,11 +298,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -342,23 +329,7 @@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ -XORG_LIBS = \ - $(XSERVER_LIBS) \ - common/libinit.a \ - loader/libloader.a \ - libosandcommon.la \ - parser/libxf86config.a \ - dixmods/libdixmods.la \ - modes/libxf86modes.a \ - ramdac/libramdac.a \ - ddc/libddc.a \ - i2c/libi2c.a \ - dixmods/libxorgxkb.la \ - $(top_builddir)/mi/libmi.la \ - $(top_builddir)/os/libos.la \ - @XORG_LIBS@ \ - dixmods/libxorgxkb.la - +XORG_LIBS = @XORG_LIBS@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ @@ -366,6 +337,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -390,7 +362,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -413,6 +384,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -444,7 +416,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -487,38 +461,53 @@ MANDEFS = \ @DRI_TRUE@DRI_SUBDIR = dri @DRI2_TRUE@DRI2_SUBDIR = dri2 @XF86UTILS_TRUE@XF86UTILS_SUBDIR = utils +@XAA_TRUE@XAA_SUBDIR = xaa +@VGAHW_TRUE@VGAHW_SUBDIR = vgahw +@VBE_TRUE@VBE_SUBDIR = vbe +@INT10MODULE_TRUE@INT10_SUBDIR = int10 DOC_SUBDIR = doc -SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser \ - ramdac shadowfb vbe vgahw xaa \ +SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \ + ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \ xf8_16bpp loader dixmods exa modes \ $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) -DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ +DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vbe vgahw xaa \ xf8_16bpp loader dixmods dri dri2 exa modes \ utils doc +Xorg_SOURCES = xorg.c AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ -Xorg_SOURCES = xorg.c - -# libxorgos and libcommon need symbols from each other -noinst_LTLIBRARIES = libosandcommon.la -libosandcommon_la_SOURCES = osandcommon.c -libosandcommon_la_LIBADD = \ +noinst_LTLIBRARIES = libxorg.la +libxorg_la_SOURCES = libxorg.c +libxorg_la_LIBADD = \ + $(XSERVER_LIBS) \ + loader/libloader.la \ os-support/libxorgos.la \ - common/libcommon.la - -DISTCLEANFILES = osandcommon.c xorg.c xorg.conf.example \ + common/libcommon.la \ + parser/libxf86config_internal.la \ + dixmods/libdixmods.la \ + modes/libxf86modes.la \ + ramdac/libramdac.la \ + ddc/libddc.la \ + i2c/libi2c.la \ + dixmods/libxorgxkb.la \ + $(top_builddir)/mi/libmi.la \ + $(top_builddir)/os/libos.la \ + @XORG_LIBS@ + +libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD) +DISTCLEANFILES = libxorg.c xorg.c xorg.conf.example \ xorg.conf.example.pre -Xorg_DEPENDENCIES = $(XORG_LIBS) -Xorg_LDADD = $(XORG_LIBS) $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) +Xorg_DEPENDENCIES = libxorg.la +Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) \ + $(XSERVER_SYS_LIBS) $(am__append_1) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -BUILT_SOURCES = xorg.conf.example $(am__append_1) +BUILT_SOURCES = xorg.conf.example $(am__append_2) EXTRA_DIST = xorgconf.cpp -optionsdir = $(libdir)/X11 -dist_options_DATA = Options CPP_FILES_FLAGS = \ + $(MANDEFS) \ -DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \ -DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \ -DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \ @@ -571,8 +560,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libosandcommon.la: $(libosandcommon_la_OBJECTS) $(libosandcommon_la_DEPENDENCIES) - $(LINK) $(libosandcommon_la_OBJECTS) $(libosandcommon_la_LIBADD) $(LIBS) +libxorg.la: $(libxorg_la_OBJECTS) $(libxorg_la_DEPENDENCIES) + $(LINK) $(libxorg_la_OBJECTS) $(libxorg_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @@ -626,7 +615,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osandcommon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxorg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorg.Po@am__quote@ .c.o: @@ -655,26 +644,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-dist_optionsDATA: $(dist_options_DATA) - @$(NORMAL_INSTALL) - test -z "$(optionsdir)" || $(MKDIR_P) "$(DESTDIR)$(optionsdir)" - @list='$(dist_options_DATA)'; test -n "$(optionsdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(optionsdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(optionsdir)" || exit $$?; \ - done - -uninstall-dist_optionsDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_options_DATA)'; test -n "$(optionsdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(optionsdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(optionsdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -872,10 +841,10 @@ distdir: $(DISTFILES) check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(optionsdir)"; do \ + for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -929,7 +898,7 @@ info: info-recursive info-am: -install-data-am: install-data-local install-dist_optionsDATA +install-data-am: install-data-local install-dvi: install-dvi-recursive @@ -975,7 +944,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-dist_optionsDATA +uninstall-am: uninstall-binPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ @@ -987,17 +956,16 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_optionsDATA ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-local \ - install-dist_optionsDATA install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-local install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-dist_optionsDATA + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-local \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS .pre: @@ -1006,7 +974,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_optionsDATA .man.pre.man: $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ -osandcommon.c xorg.c: +libxorg.c xorg.c: touch $@ @SOLARIS_ASM_INLINE_TRUE@os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il: diff --git a/xorg-server/hw/xfree86/common/Makefile.am b/xorg-server/hw/xfree86/common/Makefile.am index b38c14a7d..ad27210cd 100644 --- a/xorg-server/hw/xfree86/common/Makefile.am +++ b/xorg-server/hw/xfree86/common/Makefile.am @@ -1,4 +1,3 @@ -noinst_LIBRARIES = libinit.a noinst_LTLIBRARIES = libcommon.la if XORG_BUS_SPARC @@ -7,7 +6,15 @@ endif if XV XVSOURCES = xf86xv.c xf86xvmc.c -XVSDKINCS = xf86xv.h xf86xvmc.h +XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h +endif + +if XF86VIDMODE +XF86VMODE_SDK = vidmodeproc.h +endif + +if DGA +DGASOURCES = xf86DGA.c endif XISOURCES = xf86Xinput.c xisb.c @@ -26,28 +33,26 @@ BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r libcommon_la_SOURCES = xf86Configure.c xf86ShowOpts.c xf86Bus.c xf86Config.c \ - xf86Cursor.c xf86DGA.c xf86DPMS.c \ + xf86Cursor.c $(DGASOURCES) xf86DPMS.c \ xf86Events.c xf86Globals.c xf86AutoConfig.c \ - xf86Option.c \ + xf86Option.c xf86Init.c xf86VGAarbiter.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ - xf86Helper.c xf86PM.c xf86RAC.c xf86Xinput.c xisb.c \ + xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ xf86Mode.c xorgHelper.c \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) -nodist_libcommon_la_SOURCES = xf86DefModeSet.c -libinit_a_SOURCES = xf86Init.c -nodist_libinit_a_SOURCES = xf86Build.h +nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ - -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ + -I$(srcdir)/../loader -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ - -I$(srcdir)/../modes + -I$(srcdir)/../modes -I$(srcdir)/../ramdac sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ - xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \ - xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \ - $(XVSDKINCS) xorgVersion.h \ - xf86sbusBus.h xf86xvpriv.h + xf86PciInfo.h xf86Priv.h xf86Privstr.h \ + xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h xisb.h \ + $(XVSDKINCS) $(XF86VMODE_SDK) xorgVersion.h \ + xf86sbusBus.h xf86VGAarbiter.h DISTCLEANFILES = xf86Build.h CLEANFILES = $(BUILT_SOURCES) @@ -56,6 +61,7 @@ EXTRA_DIST = \ compiler.h \ fourcc.h \ scoasm.h \ + vidmodeproc.h \ xf86.h \ xf86Bus.h \ xf86Config.h \ @@ -65,7 +71,6 @@ EXTRA_DIST = \ xf86PciInfo.h \ xf86Priv.h \ xf86Privstr.h \ - xf86Resources.h \ xf86Xinput.h \ xf86cmap.h \ xf86fbman.h \ @@ -76,9 +81,10 @@ EXTRA_DIST = \ xf86xvpriv.h \ xisb.h \ xorgVersion.h \ - xf86Date.h \ $(MODEDEFSOURCES) \ modeline2c.awk \ + xf86VGAarbiter.h \ + xf86VGAarbiterPriv.h \ $(DISTKBDSOURCES) if LNXACPI diff --git a/xorg-server/hw/xfree86/common/Makefile.in b/xorg-server/hw/xfree86/common/Makefile.in index f4ec5a585..9c300e4c5 100644 --- a/xorg-server/hw/xfree86/common/Makefile.in +++ b/xorg-server/hw/xfree86/common/Makefile.in @@ -16,7 +16,6 @@ @SET_MAKE@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -41,8 +40,11 @@ subdir = hw/xfree86/common DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/xf86Build.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -52,38 +54,32 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = xf86Build.h CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libinit_a_AR = $(AR) $(ARFLAGS) -libinit_a_LIBADD = -am_libinit_a_OBJECTS = xf86Init.$(OBJEXT) -nodist_libinit_a_OBJECTS = -libinit_a_OBJECTS = $(am_libinit_a_OBJECTS) \ - $(nodist_libinit_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_LIBADD = am__libcommon_la_SOURCES_DIST = xf86Configure.c xf86ShowOpts.c \ xf86Bus.c xf86Config.c xf86Cursor.c xf86DGA.c xf86DPMS.c \ xf86Events.c xf86Globals.c xf86AutoConfig.c xf86Option.c \ - xf86VidMode.c xf86fbman.c xf86cmap.c xf86Helper.c xf86PM.c \ - xf86RAC.c xf86Xinput.c xisb.c xf86Mode.c xorgHelper.c xf86xv.c \ - xf86xvmc.c xf86pciBus.c xf86fbBus.c xf86noBus.c xf86sbusBus.c \ - xf86RandR.c -@XV_TRUE@am__objects_1 = xf86xv.lo xf86xvmc.lo -@XORG_BUS_SPARC_TRUE@am__objects_2 = xf86sbusBus.lo -am__objects_3 = xf86pciBus.lo xf86fbBus.lo xf86noBus.lo \ - $(am__objects_2) -am__objects_4 = xf86RandR.lo + xf86Init.c xf86VGAarbiter.c xf86VidMode.c xf86fbman.c \ + xf86cmap.c xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ + xf86Mode.c xorgHelper.c xf86xv.c xf86xvmc.c xf86pciBus.c \ + xf86fbBus.c xf86noBus.c xf86sbusBus.c xf86RandR.c +@DGA_TRUE@am__objects_1 = xf86DGA.lo +@XV_TRUE@am__objects_2 = xf86xv.lo xf86xvmc.lo +@XORG_BUS_SPARC_TRUE@am__objects_3 = xf86sbusBus.lo +am__objects_4 = xf86pciBus.lo xf86fbBus.lo xf86noBus.lo \ + $(am__objects_3) +am__objects_5 = xf86RandR.lo am_libcommon_la_OBJECTS = xf86Configure.lo xf86ShowOpts.lo xf86Bus.lo \ - xf86Config.lo xf86Cursor.lo xf86DGA.lo xf86DPMS.lo \ + xf86Config.lo xf86Cursor.lo $(am__objects_1) xf86DPMS.lo \ xf86Events.lo xf86Globals.lo xf86AutoConfig.lo xf86Option.lo \ - xf86VidMode.lo xf86fbman.lo xf86cmap.lo xf86Helper.lo \ - xf86PM.lo xf86RAC.lo xf86Xinput.lo xisb.lo xf86Mode.lo \ - xorgHelper.lo $(am__objects_1) $(am__objects_3) \ - $(am__objects_4) + xf86Init.lo xf86VGAarbiter.lo xf86VidMode.lo xf86fbman.lo \ + xf86cmap.lo xf86Helper.lo xf86PM.lo xf86Xinput.lo xisb.lo \ + xf86Mode.lo xorgHelper.lo $(am__objects_2) $(am__objects_4) \ + $(am__objects_5) nodist_libcommon_la_OBJECTS = xf86DefModeSet.lo libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) \ $(nodist_libcommon_la_OBJECTS) @@ -97,14 +93,13 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libinit_a_SOURCES) $(nodist_libinit_a_SOURCES) \ - $(libcommon_la_SOURCES) $(nodist_libcommon_la_SOURCES) -DIST_SOURCES = $(libinit_a_SOURCES) $(am__libcommon_la_SOURCES_DIST) +SOURCES = $(libcommon_la_SOURCES) $(nodist_libcommon_la_SOURCES) +DIST_SOURCES = $(am__libcommon_la_SOURCES_DIST) am__sdk_HEADERS_DIST = compiler.h fourcc.h xf86.h xf86Module.h \ - xf86Opt.h xf86PciInfo.h xf86Priv.h xf86Privstr.h \ - xf86Resources.h xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h \ - xf86Xinput.h xisb.h xf86xv.h xf86xvmc.h xorgVersion.h \ - xf86sbusBus.h xf86xvpriv.h + xf86Opt.h xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86cmap.h \ + xf86fbman.h xf86str.h xf86Xinput.h xisb.h xf86xv.h xf86xvmc.h \ + xf86xvpriv.h vidmodeproc.h xorgVersion.h xf86sbusBus.h \ + xf86VGAarbiter.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -136,6 +131,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -156,9 +152,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -187,7 +186,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -196,9 +197,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -237,12 +242,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -262,7 +268,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -272,6 +277,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -285,11 +291,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -325,6 +330,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -349,7 +355,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -372,6 +377,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -403,17 +409,20 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libinit.a noinst_LTLIBRARIES = libcommon.la @XORG_BUS_SPARC_TRUE@SBUS_SOURCES = xf86sbusBus.c @XV_TRUE@XVSOURCES = xf86xv.c xf86xvmc.c -@XV_TRUE@XVSDKINCS = xf86xv.h xf86xvmc.h +@XV_TRUE@XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h +@XF86VIDMODE_TRUE@XF86VMODE_SDK = vidmodeproc.h +@DGA_TRUE@DGASOURCES = xf86DGA.c XISOURCES = xf86Xinput.c xisb.c XISDKINCS = xf86Xinput.h xisb.h RANDRSOURCES = xf86RandR.c @@ -422,28 +431,26 @@ MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r libcommon_la_SOURCES = xf86Configure.c xf86ShowOpts.c xf86Bus.c xf86Config.c \ - xf86Cursor.c xf86DGA.c xf86DPMS.c \ + xf86Cursor.c $(DGASOURCES) xf86DPMS.c \ xf86Events.c xf86Globals.c xf86AutoConfig.c \ - xf86Option.c \ + xf86Option.c xf86Init.c xf86VGAarbiter.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ - xf86Helper.c xf86PM.c xf86RAC.c xf86Xinput.c xisb.c \ + xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ xf86Mode.c xorgHelper.c \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) -nodist_libcommon_la_SOURCES = xf86DefModeSet.c -libinit_a_SOURCES = xf86Init.c -nodist_libinit_a_SOURCES = xf86Build.h +nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ - -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ + -I$(srcdir)/../loader -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ - -I$(srcdir)/../modes + -I$(srcdir)/../modes -I$(srcdir)/../ramdac sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ - xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \ - xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \ - $(XVSDKINCS) xorgVersion.h \ - xf86sbusBus.h xf86xvpriv.h + xf86PciInfo.h xf86Priv.h xf86Privstr.h \ + xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h xisb.h \ + $(XVSDKINCS) $(XF86VMODE_SDK) xorgVersion.h \ + xf86sbusBus.h xf86VGAarbiter.h DISTCLEANFILES = xf86Build.h CLEANFILES = $(BUILT_SOURCES) @@ -451,6 +458,7 @@ EXTRA_DIST = \ compiler.h \ fourcc.h \ scoasm.h \ + vidmodeproc.h \ xf86.h \ xf86Bus.h \ xf86Config.h \ @@ -460,7 +468,6 @@ EXTRA_DIST = \ xf86PciInfo.h \ xf86Priv.h \ xf86Privstr.h \ - xf86Resources.h \ xf86Xinput.h \ xf86cmap.h \ xf86fbman.h \ @@ -471,9 +478,10 @@ EXTRA_DIST = \ xf86xvpriv.h \ xisb.h \ xorgVersion.h \ - xf86Date.h \ $(MODEDEFSOURCES) \ modeline2c.awk \ + xf86VGAarbiter.h \ + xf86VGAarbiterPriv.h \ $(DISTKBDSOURCES) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) @@ -515,13 +523,6 @@ $(am__aclocal_m4_deps): xf86Build.h: $(top_builddir)/config.status $(srcdir)/xf86Build.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libinit.a: $(libinit_a_OBJECTS) $(libinit_a_DEPENDENCIES) - -rm -f libinit.a - $(libinit_a_AR) libinit.a $(libinit_a_OBJECTS) $(libinit_a_LIBADD) - $(RANLIB) libinit.a - clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ @@ -550,13 +551,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Events.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Globals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Helper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Mode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Option.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86PM.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RAC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86ShowOpts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86VGAarbiter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86VidMode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Xinput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cmap.Plo@am__quote@ @@ -702,7 +703,7 @@ distdir: $(DISTFILES) check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -738,8 +739,8 @@ maintainer-clean-generic: -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - clean-noinstLTLIBRARIES mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -810,18 +811,18 @@ uninstall-am: uninstall-sdkHEADERS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir 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-pdf install-pdf-am \ - install-ps install-ps-am install-sdkHEADERS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-sdkHEADERS + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir 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-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES) diff --git a/xorg-server/hw/xfree86/common/compiler.h b/xorg-server/hw/xfree86/common/compiler.h index 285d9a3f6..95ef72c39 100644 --- a/xorg-server/hw/xfree86/common/compiler.h +++ b/xorg-server/hw/xfree86/common/compiler.h @@ -55,6 +55,12 @@ # define DO_PROTOTYPES #endif +#ifndef _X_EXPORT +# include +#endif + +# include /* for uint*_t types */ + /* Allow drivers to use the GCC-supported __inline__ and/or __inline. */ # ifndef __inline__ # if defined(__GNUC__) @@ -87,25 +93,26 @@ && !(defined(__alpha__) && defined(linux)) \ && !(defined(__ia64__) && defined(linux)) \ -extern void outb(unsigned short, unsigned char); -extern void outw(unsigned short, unsigned short); -extern void outl(unsigned short, unsigned int); -extern unsigned int inb(unsigned short); -extern unsigned int inw(unsigned short); -extern unsigned int inl(unsigned short); +extern _X_EXPORT void outb(unsigned short, unsigned char); +extern _X_EXPORT void outw(unsigned short, unsigned short); +extern _X_EXPORT void outl(unsigned short, unsigned int); +extern _X_EXPORT unsigned int inb(unsigned short); +extern _X_EXPORT unsigned int inw(unsigned short); +extern _X_EXPORT unsigned int inl(unsigned short); # else /* __sparc__, __arm32__, __alpha__*/ -extern void outb(unsigned long, unsigned char); -extern void outw(unsigned long, unsigned short); -extern void outl(unsigned long, unsigned int); -extern unsigned int inb(unsigned long); -extern unsigned int inw(unsigned long); -extern unsigned int inl(unsigned long); +extern _X_EXPORT void outb(unsigned long, unsigned char); +extern _X_EXPORT void outw(unsigned long, unsigned short); +extern _X_EXPORT void outl(unsigned long, unsigned int); +extern _X_EXPORT unsigned int inb(unsigned long); +extern _X_EXPORT unsigned int inw(unsigned long); +extern _X_EXPORT unsigned int inl(unsigned long); # endif /* __sparc__, __arm32__, __alpha__ */ # endif /* __arm__ */ +# if defined(__powerpc__) && !defined(__OpenBSD__) extern unsigned long ldq_u(unsigned long *); extern unsigned long ldl_u(unsigned int *); extern unsigned long ldw_u(unsigned short *); @@ -118,9 +125,186 @@ extern void stl_brx(unsigned long, volatile unsigned char *, int); extern void stw_brx(unsigned short, volatile unsigned char *, int); extern unsigned long ldl_brx(volatile unsigned char *, int); extern unsigned short ldw_brx(volatile unsigned char *, int); +# endif /* __powerpc__ && !__OpenBSD */ + +# endif /* NO_INLINE || DO_PROTOTYPES */ + +# ifndef NO_INLINE +# ifdef __GNUC__ +# ifdef __i386__ + +# ifdef __SSE__ +# define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory") +# else +# define write_mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") +# endif + +# ifdef __SSE2__ +# define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory") +# else +# define mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") +# endif + +# elif defined __alpha__ + +# define mem_barrier() __asm__ __volatile__ ("mb" : : : "memory") +# define write_mem_barrier() __asm__ __volatile__ ("wmb" : : : "memory") + +# elif defined __amd64__ + +# define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory") +# define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory") + +# elif defined __ia64__ + +# ifndef __INTEL_COMPILER +# define mem_barrier() __asm__ __volatile__ ("mf" : : : "memory") +# define write_mem_barrier() __asm__ __volatile__ ("mf" : : : "memory") +# else +# include "ia64intrin.h" +# define mem_barrier() __mf() +# define write_mem_barrier() __mf() +# endif + +# elif defined __mips__ + /* Note: sync instruction requires MIPS II instruction set */ +# define mem_barrier() \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + ".set mips2\n\t" \ + "sync\n\t" \ + ".set pop" \ + : /* no output */ \ + : /* no input */ \ + : "memory") +# define write_mem_barrier() mem_barrier() + +# elif defined __powerpc__ + +# if defined(linux) && defined(__powerpc64__) +# include +# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) +# include +# endif +# endif /* defined(linux) && defined(__powerpc64__) */ + +# ifndef eieio /* We deal with arch-specific eieio() routines above... */ +# define eieio() __asm__ __volatile__ ("eieio" ::: "memory") +# endif /* eieio */ +# define mem_barrier() eieio() +# define write_mem_barrier() eieio() +# elif defined __sparc__ + +# define barrier() __asm__ __volatile__ (".word 0x8143e00a" : : : "memory") +# define mem_barrier() /* XXX: nop for now */ +# define write_mem_barrier() /* XXX: nop for now */ +# endif +# endif /* __GNUC__ */ +# endif /* NO_INLINE */ + +# ifndef mem_barrier +# define mem_barrier() /* NOP */ +# endif + +# ifndef write_mem_barrier +# define write_mem_barrier() /* NOP */ # endif + +# ifndef NO_INLINE +# ifdef __GNUC__ + +/* Define some packed structures to use with unaligned accesses */ + +struct __una_u64 { uint64_t x __attribute__((packed)); }; +struct __una_u32 { uint32_t x __attribute__((packed)); }; +struct __una_u16 { uint16_t x __attribute__((packed)); }; + +/* Elemental unaligned loads */ + +static __inline__ uint64_t ldq_u(uint64_t *p) +{ + const struct __una_u64 *ptr = (const struct __una_u64 *) p; + return ptr->x; +} + +static __inline__ uint32_t ldl_u(uint32_t *p) +{ + const struct __una_u32 *ptr = (const struct __una_u32 *) p; + return ptr->x; +} + +static __inline__ uint16_t ldw_u(uint16_t *p) +{ + const struct __una_u16 *ptr = (const struct __una_u16 *) p; + return ptr->x; +} + +/* Elemental unaligned stores */ + +static __inline__ void stq_u(uint64_t val, uint64_t *p) +{ + struct __una_u64 *ptr = (struct __una_u64 *) p; + ptr->x = val; +} + +static __inline__ void stl_u(uint32_t val, uint32_t *p) +{ + struct __una_u32 *ptr = (struct __una_u32 *) p; + ptr->x = val; +} + +static __inline__ void stw_u(uint16_t val, uint16_t *p) +{ + struct __una_u16 *ptr = (struct __una_u16 *) p; + ptr->x = val; +} +# else /* !__GNUC__ */ + +static __inline__ uint64_t ldq_u(uint64_t *p) +{ + uint64_t ret; + memmove(&ret, p, sizeof(*p)); + return ret; +} + +static __inline__ uint32_t ldl_u(uint32_t *p) +{ + uint32_t ret; + memmove(&ret, p, sizeof(*p)); + return ret; +} + +static __inline__ uint16_t ldw_u(uint16_t *p) +{ + uint16_t ret; + memmove(&ret, p, sizeof(*p)); + return ret; +} + +static __inline__ void stq_u(uint64_t val, uint64_t *p) +{ + uint64_t tmp = val; + memmove(p, &tmp, sizeof(*p)); +} + +static __inline__ void stl_u(uint32_t val, uint32_t *p) +{ + uint32_t tmp = val; + memmove(p, &tmp, sizeof(*p)); +} + +static __inline__ void stw_u(uint16_t val, uint16_t *p) +{ + uint16_t tmp = val; + memmove(p, &tmp, sizeof(*p)); +} + +# endif /* __GNUC__ */ +# endif /* NO_INLINE */ + # ifndef NO_INLINE # ifdef __GNUC__ # if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && (defined(__alpha__)) @@ -130,42 +314,42 @@ extern unsigned short ldw_brx(volatile unsigned char *, int); /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ -extern void (*_alpha_outb)(char val, unsigned long port); +extern _X_EXPORT void (*_alpha_outb)(char val, unsigned long port); static __inline__ void outb(unsigned long port, unsigned char val) { _alpha_outb(val, port); } -extern void (*_alpha_outw)(short val, unsigned long port); +extern _X_EXPORT void (*_alpha_outw)(short val, unsigned long port); static __inline__ void outw(unsigned long port, unsigned short val) { _alpha_outw(val, port); } -extern void (*_alpha_outl)(int val, unsigned long port); +extern _X_EXPORT void (*_alpha_outl)(int val, unsigned long port); static __inline__ void outl(unsigned long port, unsigned int val) { _alpha_outl(val, port); } -extern unsigned int (*_alpha_inb)(unsigned long port); +extern _X_EXPORT unsigned int (*_alpha_inb)(unsigned long port); static __inline__ unsigned int inb(unsigned long port) { return _alpha_inb(port); } -extern unsigned int (*_alpha_inw)(unsigned long port); +extern _X_EXPORT unsigned int (*_alpha_inw)(unsigned long port); static __inline__ unsigned int inw(unsigned long port) { return _alpha_inw(port); } -extern unsigned int (*_alpha_inl)(unsigned long port); +extern _X_EXPORT unsigned int (*_alpha_inl)(unsigned long port); static __inline__ unsigned int inl(unsigned long port) { @@ -182,12 +366,12 @@ inl(unsigned long port) /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ -extern void outb(unsigned int port, unsigned char val); -extern void outw(unsigned int port, unsigned short val); -extern void outl(unsigned int port, unsigned int val); -extern unsigned char inb(unsigned int port); -extern unsigned short inw(unsigned int port); -extern unsigned int inl(unsigned int port); +extern _X_EXPORT void outb(unsigned int port, unsigned char val); +extern _X_EXPORT void outw(unsigned int port, unsigned short val); +extern _X_EXPORT void outl(unsigned int port, unsigned int val); +extern _X_EXPORT unsigned char inb(unsigned int port); +extern _X_EXPORT unsigned short inw(unsigned int port); +extern _X_EXPORT unsigned int inl(unsigned int port); # endif /* (__FreeBSD__ || __OpenBSD__ ) && !DO_PROTOTYPES */ @@ -196,292 +380,29 @@ extern unsigned int inl(unsigned int port); #include #endif /* __NetBSD__ */ -/* - * inline functions to do unaligned accesses - * from linux/include/asm-alpha/unaligned.h - */ - -/* - * EGCS 1.1 knows about arbitrary unaligned loads. Define some - * packed structures to talk about such things with. - */ - -struct __una_u64 { unsigned long x __attribute__((packed)); }; -struct __una_u32 { unsigned int x __attribute__((packed)); }; -struct __una_u16 { unsigned short x __attribute__((packed)); }; - -/* - * Elemental unaligned loads - */ -/* let's try making these things static */ - -static __inline__ unsigned long ldq_u(unsigned long * r11) -{ -# if defined(__GNUC__) - const struct __una_u64 *ptr = (const struct __una_u64 *) r11; - return ptr->x; -# else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extql %0,%2,%0\n\t" - "extqh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(7+(char *) r11))); - return r1 | r2; -# endif -} - -static __inline__ unsigned long ldl_u(unsigned int * r11) -{ -# if defined(__GNUC__) - const struct __una_u32 *ptr = (const struct __una_u32 *) r11; - return ptr->x; -# else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extll %0,%2,%0\n\t" - "extlh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(3+(char *) r11))); - return r1 | r2; -# endif -} - -static __inline__ unsigned long ldw_u(unsigned short * r11) -{ -# if defined(__GNUC__) - const struct __una_u16 *ptr = (const struct __una_u16 *) r11; - return ptr->x; -# else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extwl %0,%2,%0\n\t" - "extwh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(1+(char *) r11))); - return r1 | r2; -# endif -} - -/* - * Elemental unaligned stores - */ - -static __inline__ void stq_u(unsigned long r5, unsigned long * r11) -{ -# if defined(__GNUC__) - struct __una_u64 *ptr = (struct __una_u64 *) r11; - ptr->x = r5; -# else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "insqh %6,%7,%5\n\t" - "insql %6,%7,%4\n\t" - "mskqh %3,%7,%3\n\t" - "mskql %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(7+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -# endif -} - -static __inline__ void stl_u(unsigned long r5, unsigned int * r11) -{ -# if defined(__GNUC__) - struct __una_u32 *ptr = (struct __una_u32 *) r11; - ptr->x = r5; -# else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "inslh %6,%7,%5\n\t" - "insll %6,%7,%4\n\t" - "msklh %3,%7,%3\n\t" - "mskll %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(3+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -# endif -} - -static __inline__ void stw_u(unsigned long r5, unsigned short * r11) -{ -# if defined(__GNUC__) - struct __una_u16 *ptr = (struct __una_u16 *) r11; - ptr->x = r5; -# else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "inswh %6,%7,%5\n\t" - "inswl %6,%7,%4\n\t" - "mskwh %3,%7,%3\n\t" - "mskwl %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(1+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -# endif -} - -/* to flush the I-cache before jumping to code which just got loaded */ -# define PAL_imb 134 -# define istream_mem_barrier() \ - __asm__ __volatile__("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") -# define mem_barrier() __asm__ __volatile__("mb" : : : "memory") -# ifdef __ELF__ -# define write_mem_barrier() __asm__ __volatile__("wmb" : : : "memory") -# else /* ECOFF gas 2.6 doesn't know "wmb" :-( */ -# define write_mem_barrier() mem_barrier() -# endif - - # elif defined(linux) && defined(__ia64__) # include # include -struct __una_u64 { uint64_t x __attribute__((packed)); }; -struct __una_u32 { uint32_t x __attribute__((packed)); }; -struct __una_u16 { uint16_t x __attribute__((packed)); }; - -static __inline__ unsigned long -__uldq (const unsigned long * r11) -{ - const struct __una_u64 *ptr = (const struct __una_u64 *) r11; - return ptr->x; -} - -static __inline__ unsigned long -__uldl (const unsigned int * r11) -{ - const struct __una_u32 *ptr = (const struct __una_u32 *) r11; - return ptr->x; -} - -static __inline__ unsigned long -__uldw (const unsigned short * r11) -{ - const struct __una_u16 *ptr = (const struct __una_u16 *) r11; - return ptr->x; -} - -static __inline__ void -__ustq (unsigned long r5, unsigned long * r11) -{ - struct __una_u64 *ptr = (struct __una_u64 *) r11; - ptr->x = r5; -} - -static __inline__ void -__ustl (unsigned long r5, unsigned int * r11) -{ - struct __una_u32 *ptr = (struct __una_u32 *) r11; - ptr->x = r5; -} - -static __inline__ void -__ustw (unsigned long r5, unsigned short * r11) -{ - struct __una_u16 *ptr = (struct __una_u16 *) r11; - ptr->x = r5; -} - -# define ldq_u(p) __uldq(p) -# define ldl_u(p) __uldl(p) -# define ldw_u(p) __uldw(p) -# define stq_u(v,p) __ustq(v,p) -# define stl_u(v,p) __ustl(v,p) -# define stw_u(v,p) __ustw(v,p) - -# ifndef __INTEL_COMPILER -# define mem_barrier() __asm__ __volatile__ ("mf" ::: "memory") -# define write_mem_barrier() __asm__ __volatile__ ("mf" ::: "memory") -# else -# include "ia64intrin.h" -# define mem_barrier() __mf() -# define write_mem_barrier() __mf() -# endif - -/* - * This is overkill, but for different reasons depending on where it is used. - * This is thus general enough to be used everywhere cache flushes are needed. - * It doesn't handle memory access serialisation by other processors, though. - */ -# ifndef __INTEL_COMPILER -# define ia64_flush_cache(Addr) \ - __asm__ __volatile__ ( \ - "fc.i %0;;;" \ - "sync.i;;;" \ - "mf;;;" \ - "srlz.i;;;" \ - :: "r"(Addr) : "memory") -# else -# define ia64_flush_cache(Addr) { \ - __fc(Addr);\ - __synci();\ - __mf();\ - __isrlz();\ - } -# endif # undef outb # undef outw # undef outl # undef inb # undef inw # undef inl -extern void outb(unsigned long port, unsigned char val); -extern void outw(unsigned long port, unsigned short val); -extern void outl(unsigned long port, unsigned int val); -extern unsigned int inb(unsigned long port); -extern unsigned int inw(unsigned long port); -extern unsigned int inl(unsigned long port); +extern _X_EXPORT void outb(unsigned long port, unsigned char val); +extern _X_EXPORT void outw(unsigned long port, unsigned short val); +extern _X_EXPORT void outl(unsigned long port, unsigned int val); +extern _X_EXPORT unsigned int inb(unsigned long port); +extern _X_EXPORT unsigned int inw(unsigned long port); +extern _X_EXPORT unsigned int inl(unsigned long port); -# elif defined(linux) && defined(__amd64__) +# elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__) # include -# define ldq_u(p) (*((unsigned long *)(p))) -# define ldl_u(p) (*((unsigned int *)(p))) -# define ldw_u(p) (*((unsigned short *)(p))) -# define stq_u(v,p) (*(unsigned long *)(p)) = (v) -# define stl_u(v,p) (*(unsigned int *)(p)) = (v) -# define stw_u(v,p) (*(unsigned short *)(p)) = (v) - -# define mem_barrier() \ - __asm__ __volatile__ ("lock; addl $0,0(%%rsp)": : :"memory") -# define write_mem_barrier() \ - __asm__ __volatile__ ("": : :"memory") - - static __inline__ void outb(unsigned short port, unsigned char val) { @@ -537,8 +458,6 @@ inl(unsigned short port) # define ASI_PL 0x88 # endif -# define barrier() __asm__ __volatile__(".word 0x8143e00a": : :"memory") - static __inline__ void outb(unsigned long port, unsigned char val) { @@ -771,98 +690,6 @@ xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset, : "r" (val), "r" (addr), "i" (ASI_PL)); } - -/* - * EGCS 1.1 knows about arbitrary unaligned loads. Define some - * packed structures to talk about such things with. - */ - -# if defined(__arch64__) || defined(__sparcv9) -struct __una_u64 { unsigned long x __attribute__((packed)); }; -# endif -struct __una_u32 { unsigned int x __attribute__((packed)); }; -struct __una_u16 { unsigned short x __attribute__((packed)); }; - -static __inline__ unsigned long ldq_u(unsigned long *p) -{ -# if defined(__GNUC__) -# if defined(__arch64__) || defined(__sparcv9) - const struct __una_u64 *ptr = (const struct __una_u64 *) p; -# else - const struct __una_u32 *ptr = (const struct __una_u32 *) p; -# endif - return ptr->x; -# else - unsigned long ret; - memmove(&ret, p, sizeof(*p)); - return ret; -# endif -} - -static __inline__ unsigned long ldl_u(unsigned int *p) -{ -# if defined(__GNUC__) - const struct __una_u32 *ptr = (const struct __una_u32 *) p; - return ptr->x; -# else - unsigned int ret; - memmove(&ret, p, sizeof(*p)); - return ret; -# endif -} - -static __inline__ unsigned long ldw_u(unsigned short *p) -{ -# if defined(__GNUC__) - const struct __una_u16 *ptr = (const struct __una_u16 *) p; - return ptr->x; -# else - unsigned short ret; - memmove(&ret, p, sizeof(*p)); - return ret; -# endif -} - -static __inline__ void stq_u(unsigned long val, unsigned long *p) -{ -# if defined(__GNUC__) -# if defined(__arch64__) || defined(__sparcv9) - struct __una_u64 *ptr = (struct __una_u64 *) p; -# else - struct __una_u32 *ptr = (struct __una_u32 *) p; -# endif - ptr->x = val; -# else - unsigned long tmp = val; - memmove(p, &tmp, sizeof(*p)); -# endif -} - -static __inline__ void stl_u(unsigned long val, unsigned int *p) -{ -# if defined(__GNUC__) - struct __una_u32 *ptr = (struct __una_u32 *) p; - ptr->x = val; -# else - unsigned int tmp = val; - memmove(p, &tmp, sizeof(*p)); -# endif -} - -static __inline__ void stw_u(unsigned long val, unsigned short *p) -{ -# if defined(__GNUC__) - struct __una_u16 *ptr = (struct __una_u16 *) p; - ptr->x = val; -# else - unsigned short tmp = val; - memmove(p, &tmp, sizeof(*p)); -# endif -} - -# define mem_barrier() /* XXX: nop for now */ -# define write_mem_barrier() /* XXX: nop for now */ - # elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__)) # ifdef __arm32__ # define PORT_SIZE long @@ -870,7 +697,7 @@ static __inline__ void stw_u(unsigned long val, unsigned short *p) # define PORT_SIZE short # endif -unsigned int IOPortBase; /* Memory mapped I/O port area */ +_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */ static __inline__ void outb(unsigned PORT_SIZE port, unsigned char val) @@ -910,65 +737,7 @@ inl(unsigned PORT_SIZE port) # if defined(__mips__) -static __inline__ unsigned long ldq_u(unsigned long * r11) -{ - unsigned long r1; - __asm__("lwr %0,%2\n\t" - "lwl %0,%3\n\t" - :"=&r" (r1) - :"r" (r11), - "m" (*r11), - "m" (*(unsigned long *)(3+(char *) r11))); - return r1; -} - -static __inline__ unsigned long ldl_u(unsigned int * r11) -{ - unsigned long r1; - __asm__("lwr %0,%2\n\t" - "lwl %0,%3\n\t" - :"=&r" (r1) - :"r" (r11), - "m" (*r11), - "m" (*(unsigned long *)(3+(char *) r11))); - return r1; -} - -static __inline__ unsigned long ldw_u(unsigned short * r11) -{ - unsigned long r1; - __asm__("lwr %0,%2\n\t" - "lwl %0,%3\n\t" - :"=&r" (r1) - :"r" (r11), - "m" (*r11), - "m" (*(unsigned long *)(1+(char *) r11))); - return r1; -} - # ifdef linux /* don't mess with other OSs */ - -/* - * EGCS 1.1 knows about arbitrary unaligned loads (and we don't support older - * versions anyway. Define some packed structures to talk about such things - * with. - */ - -struct __una_u32 { unsigned int x __attribute__((packed)); }; -struct __una_u16 { unsigned short x __attribute__((packed)); }; - -static __inline__ void stw_u(unsigned long val, unsigned short *p) -{ - struct __una_u16 *ptr = (struct __una_u16 *) p; - ptr->x = val; -} - -static __inline__ void stl_u(unsigned long val, unsigned int *p) -{ - struct __una_u32 *ptr = (struct __una_u32 *) p; - ptr->x = val; -} - # if X_BYTE_ORDER == X_BIG_ENDIAN static __inline__ unsigned int xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset) @@ -993,62 +762,16 @@ xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, : "r" (val), "r" (addr)); } # endif - -# define mem_barrier() \ - __asm__ __volatile__( \ - "# prevent instructions being moved around\n\t" \ - ".set\tnoreorder\n\t" \ - "# 8 nops to fool the R4400 pipeline\n\t" \ - "nop;nop;nop;nop;nop;nop;nop;nop\n\t" \ - ".set\treorder" \ - : /* no output */ \ - : /* no input */ \ - : "memory") -# define write_mem_barrier() mem_barrier() - -# else /* !linux */ - -# define stq_u(v,p) stl_u(v,p) -# define stl_u(v,p) (*(unsigned char *)(p)) = (v); \ - (*(unsigned char *)(p)+1) = ((v) >> 8); \ - (*(unsigned char *)(p)+2) = ((v) >> 16); \ - (*(unsigned char *)(p)+3) = ((v) >> 24) - -# define stw_u(v,p) (*(unsigned char *)(p)) = (v); \ - (*(unsigned char *)(p)+1) = ((v) >> 8) - -# define mem_barrier() /* NOP */ # endif /* !linux */ # endif /* __mips__ */ -# if defined(__arm32__) -# define ldq_u(p) (*((unsigned long *)(p))) -# define ldl_u(p) (*((unsigned int *)(p))) -# define ldw_u(p) (*((unsigned short *)(p))) -# define stq_u(v,p) (*(unsigned long *)(p)) = (v) -# define stl_u(v,p) (*(unsigned int *)(p)) = (v) -# define stw_u(v,p) (*(unsigned short *)(p)) = (v) -# define mem_barrier() /* NOP */ -# define write_mem_barrier() /* NOP */ -# endif /* __arm32__ */ - # elif (defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__) # ifndef MAP_FAILED # define MAP_FAILED ((void *)-1) # endif -extern volatile unsigned char *ioBase; - -#if defined(linux) && defined(__powerpc64__) -# include -# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) -# include -# endif -#endif /* defined(linux) && defined(__powerpc64__) */ -#ifndef eieio /* We deal with arch-specific eieio() routines above... */ -# define eieio() __asm__ __volatile__ ("eieio" ::: "memory") -#endif /* eieio */ +extern _X_EXPORT volatile unsigned char *ioBase; static __inline__ unsigned char xf86ReadMmio8(__volatile__ void *base, const unsigned long offset) @@ -1248,36 +971,8 @@ inl(unsigned short port) return xf86ReadMmio32Le((void *)ioBase, port); } -# define ldq_u(p) ldl_u(p) -# define ldl_u(p) ((*(unsigned char *)(p)) | \ - (*((unsigned char *)(p)+1)<<8) | \ - (*((unsigned char *)(p)+2)<<16) | \ - (*((unsigned char *)(p)+3)<<24)) -# define ldw_u(p) ((*(unsigned char *)(p)) | \ - (*((unsigned char *)(p)+1)<<8)) - -# define stq_u(v,p) stl_u(v,p) -# define stl_u(v,p) (*(unsigned char *)(p)) = (v); \ - (*((unsigned char *)(p)+1)) = ((v) >> 8); \ - (*((unsigned char *)(p)+2)) = ((v) >> 16); \ - (*((unsigned char *)(p)+3)) = ((v) >> 24) -# define stw_u(v,p) (*(unsigned char *)(p)) = (v); \ - (*((unsigned char *)(p)+1)) = ((v) >> 8) - -# define mem_barrier() eieio() -# define write_mem_barrier() eieio() - #elif defined(__arm__) && defined(__linux__) -#define ldq_u(p) (*((unsigned long *)(p))) -#define ldl_u(p) (*((unsigned int *)(p))) -#define ldw_u(p) (*((unsigned short *)(p))) -#define stq_u(v,p) (*(unsigned long *)(p)) = (v) -#define stl_u(v,p) (*(unsigned int *)(p)) = (v) -#define stw_u(v,p) (*(unsigned short *)(p)) = (v) -#define mem_barrier() /* NOP */ -#define write_mem_barrier() /* NOP */ - /* for Linux on ARM, we use the LIBC inx/outx routines */ /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ @@ -1306,27 +1001,8 @@ xf_outl(unsigned short port, unsigned int val) #define outw xf_outw #define outl xf_outl -#define arm_flush_cache(addr) \ -do { \ - register unsigned long _beg __asm ("a1") = (unsigned long) (addr); \ - register unsigned long _end __asm ("a2") = (unsigned long) (addr) + 4;\ - register unsigned long _flg __asm ("a3") = 0; \ - __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ - : "=r" (_beg) \ - : "0" (_beg), "r" (_end), "r" (_flg)); \ -} while (0) - # else /* ix86 */ -# define ldq_u(p) (*((unsigned long *)(p))) -# define ldl_u(p) (*((unsigned int *)(p))) -# define ldw_u(p) (*((unsigned short *)(p))) -# define stq_u(v,p) (*(unsigned long *)(p)) = (v) -# define stl_u(v,p) (*(unsigned int *)(p)) = (v) -# define stw_u(v,p) (*(unsigned short *)(p)) = (v) -# define mem_barrier() /* NOP */ -# define write_mem_barrier() /* NOP */ - # if !defined(__SUNPRO_C) # if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) # ifdef GCCUSESGAS @@ -1508,41 +1184,31 @@ inl(unsigned short port) # pragma asm partial_optimization inw # pragma asm partial_optimization inb # endif -# define ldq_u(p) (*((unsigned long *)(p))) -# define ldl_u(p) (*((unsigned int *)(p))) -# define ldw_u(p) (*((unsigned short *)(p))) -# define stq_u(v,p) (*(unsigned long *)(p)) = (v) -# define stl_u(v,p) (*(unsigned int *)(p)) = (v) -# define stw_u(v,p) (*(unsigned short *)(p)) = (v) -# define mem_barrier() /* NOP */ -# define write_mem_barrier() /* NOP */ # endif /* __GNUC__ */ # endif /* NO_INLINE */ # ifdef __alpha__ /* entry points for Mmio memory access routines */ -extern int (*xf86ReadMmio8)(void *, unsigned long); -extern int (*xf86ReadMmio16)(void *, unsigned long); +extern _X_EXPORT int (*xf86ReadMmio8)(void *, unsigned long); +extern _X_EXPORT int (*xf86ReadMmio16)(void *, unsigned long); # ifndef STANDALONE_MMIO -extern int (*xf86ReadMmio32)(void *, unsigned long); +extern _X_EXPORT int (*xf86ReadMmio32)(void *, unsigned long); # else /* Some DRI 3D drivers need MMIO_IN32. */ static __inline__ int xf86ReadMmio32(void *Base, unsigned long Offset) { - __asm__ __volatile__("mb" : : : "memory"); + mem_barrier(); return *(volatile unsigned int*)((unsigned long)Base+(Offset)); } # endif -extern void (*xf86WriteMmio8)(int, void *, unsigned long); -extern void (*xf86WriteMmio16)(int, void *, unsigned long); -extern void (*xf86WriteMmio32)(int, void *, unsigned long); -extern void (*xf86WriteMmioNB8)(int, void *, unsigned long); -extern void (*xf86WriteMmioNB16)(int, void *, unsigned long); -extern void (*xf86WriteMmioNB32)(int, void *, unsigned long); -extern void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int); -extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); +extern _X_EXPORT void (*xf86WriteMmio8)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmio16)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmio32)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmioNB8)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmioNB16)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmioNB32)(int, void *, unsigned long); /* Some macros to hide the system dependencies for MMIO accesses */ /* Changed to kill noise generated by gcc's -Wcast-align */ @@ -1612,17 +1278,6 @@ extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); # define MMIO_MOVE32(base, offset, val) \ xf86WriteMmio32Be(base, offset, (CARD32)(val)) -static __inline__ void ppc_flush_icache(char *addr) -{ - __asm__ volatile ( - "dcbf 0,%0;" - "sync;" - "icbi 0,%0;" - "sync;" - "isync;" - : : "r"(addr) : "memory"); -} - # elif defined(__sparc__) || defined(sparc) || defined(__sparc) /* * Like powerpc, we provide byteswapping and no byteswapping functions @@ -1685,18 +1340,4 @@ static __inline__ void ppc_flush_icache(char *addr) # define MMIO_MOVE32(base, offset, val) MMIO_OUT32(base, offset, val) # endif /* __alpha__ */ - -/* - * With Intel, the version in os-support/misc/SlowBcopy.s is used. - * This avoids port I/O during the copy (which causes problems with - * some hardware). - */ -# ifdef __alpha__ -# define slowbcopy_tobus(src,dst,count) xf86SlowBCopyToBus(src,dst,count) -# define slowbcopy_frombus(src,dst,count) xf86SlowBCopyFromBus(src,dst,count) -# else /* __alpha__ */ -# define slowbcopy_tobus(src,dst,count) xf86SlowBcopy(src,dst,count) -# define slowbcopy_frombus(src,dst,count) xf86SlowBcopy(src,dst,count) -# endif /* __alpha__ */ - #endif /* _COMPILER_H */ diff --git a/xorg-server/hw/xfree86/common/modeline2c.awk b/xorg-server/hw/xfree86/common/modeline2c.awk index 71a956e05..038e7e935 100644 --- a/xorg-server/hw/xfree86/common/modeline2c.awk +++ b/xorg-server/hw/xfree86/common/modeline2c.awk @@ -56,9 +56,6 @@ BEGIN { print "#include " print "#endif" print "" - print "#ifdef __UNIXOS2__" - print "#define I_NEED_OS2_H" - print "#endif" print "#include \"xf86.h\"" print "#include \"xf86Config.h\"" print "#include \"xf86Priv.h\"" diff --git a/xorg-server/hw/xfree86/common/vidmodeproc.h b/xorg-server/hw/xfree86/common/vidmodeproc.h new file mode 100644 index 000000000..da4d05e1c --- /dev/null +++ b/xorg-server/hw/xfree86/common/vidmodeproc.h @@ -0,0 +1,77 @@ + +/* Prototypes for DGA functions that the DDX must provide */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _VIDMODEPROC_H_ +#define _VIDMODEPROC_H_ + + +typedef enum { + VIDMODE_H_DISPLAY, + VIDMODE_H_SYNCSTART, + VIDMODE_H_SYNCEND, + VIDMODE_H_TOTAL, + VIDMODE_H_SKEW, + VIDMODE_V_DISPLAY, + VIDMODE_V_SYNCSTART, + VIDMODE_V_SYNCEND, + VIDMODE_V_TOTAL, + VIDMODE_FLAGS, + VIDMODE_CLOCK +} VidModeSelectMode; + +typedef enum { + VIDMODE_MON_VENDOR, + VIDMODE_MON_MODEL, + VIDMODE_MON_NHSYNC, + VIDMODE_MON_NVREFRESH, + VIDMODE_MON_HSYNC_LO, + VIDMODE_MON_HSYNC_HI, + VIDMODE_MON_VREFRESH_LO, + VIDMODE_MON_VREFRESH_HI +} VidModeSelectMonitor; + +typedef union { + pointer ptr; + int i; + float f; +} vidMonitorValue; + +extern _X_EXPORT void XFree86VidModeExtensionInit(void); + +extern _X_EXPORT Bool VidModeAvailable(int scrnIndex); +extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock); +extern _X_EXPORT Bool VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock); +extern _X_EXPORT Bool VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock); +extern _X_EXPORT Bool VidModeDeleteModeline(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeZoomViewport(int scrnIndex, int zoom); +extern _X_EXPORT Bool VidModeGetViewPort(int scrnIndex, int *x, int *y); +extern _X_EXPORT Bool VidModeSetViewPort(int scrnIndex, int x, int y); +extern _X_EXPORT Bool VidModeSwitchMode(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeLockZoom(int scrnIndex, Bool lock); +extern _X_EXPORT Bool VidModeGetMonitor(int scrnIndex, pointer *monitor); +extern _X_EXPORT int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock); +extern _X_EXPORT Bool VidModeGetClocks(int scrnIndex, int *Clocks); +extern _X_EXPORT ModeStatus VidModeCheckModeForMonitor(int scrnIndex, pointer mode); +extern _X_EXPORT ModeStatus VidModeCheckModeForDriver(int scrnIndex, pointer mode); +extern _X_EXPORT void VidModeSetCrtcForMode(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeAddModeline(int scrnIndex, pointer mode); +extern _X_EXPORT int VidModeGetDotClock(int scrnIndex, int Clock); +extern _X_EXPORT int VidModeGetNumOfModes(int scrnIndex); +extern _X_EXPORT Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue); +extern _X_EXPORT Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue); +extern _X_EXPORT pointer VidModeCreateMode(void); +extern _X_EXPORT void VidModeCopyMode(pointer modefrom, pointer modeto); +extern _X_EXPORT int VidModeGetModeValue(pointer mode, int valtyp); +extern _X_EXPORT void VidModeSetModeValue(pointer mode, int valtyp, int val); +extern _X_EXPORT vidMonitorValue VidModeGetMonitorValue(pointer monitor, int valtyp, int indx); +extern _X_EXPORT Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); +extern _X_EXPORT Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); +extern _X_EXPORT int VidModeGetGammaRampSize(int scrnIndex); + +#endif + + diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h index a32aa9bcc..e9266abd4 100644 --- a/xorg-server/hw/xfree86/common/xf86.h +++ b/xorg-server/hw/xfree86/common/xf86.h @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * @@ -55,24 +54,24 @@ #include "propertyst.h" /* General parameters */ -extern int xf86DoConfigure; -extern int xf86DoShowOptions; -extern Bool xf86DoModalias; -extern Bool xf86DoConfigurePass1; -extern DevPrivateKey xf86ScreenKey; -extern DevPrivateKey xf86CreateRootWindowKey; -extern DevPrivateKey xf86PixmapKey; -extern ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ -extern const unsigned char byte_reversed[256]; -extern ScrnInfoPtr xf86CurrentScreen; -extern Bool pciSlotClaimed; -extern Bool fbSlotClaimed; +extern _X_EXPORT int xf86DoConfigure; +extern _X_EXPORT int xf86DoShowOptions; +extern _X_EXPORT Bool xf86DoConfigurePass1; +extern _X_EXPORT DevPrivateKey xf86ScreenKey; +extern _X_EXPORT DevPrivateKey xf86CreateRootWindowKey; +extern _X_EXPORT DevPrivateKey xf86PixmapKey; +extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ +extern _X_EXPORT const unsigned char byte_reversed[256]; +extern _X_EXPORT Bool pciSlotClaimed; +extern _X_EXPORT Bool fbSlotClaimed; #if defined(__sparc__) || defined(__sparc) -extern Bool sbusSlotClaimed; +extern _X_EXPORT Bool sbusSlotClaimed; #endif -extern confDRIRec xf86ConfigDRI; -extern Bool xf86inSuspend; -extern Bool xf86DRI2Enabled(void); +extern _X_EXPORT confDRIRec xf86ConfigDRI; +extern _X_EXPORT Bool xf86inSuspend; +extern _X_EXPORT Bool xf86DRI2Enabled(void); + +extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */ #define XF86SCRNINFO(p) ((ScrnInfoPtr)dixLookupPrivate(&(p)->devPrivates, \ xf86ScreenKey)) @@ -94,285 +93,261 @@ extern Bool xf86DRI2Enabled(void); /* xf86Bus.c */ -Bool xf86CheckPciSlot( const struct pci_device * ); -int xf86ClaimPciSlot( struct pci_device *, DriverPtr drvp, +extern _X_EXPORT Bool xf86CheckPciSlot( const struct pci_device * ); +extern _X_EXPORT int xf86ClaimPciSlot( struct pci_device *, DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, +extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *); +extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func); -Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func); -void xf86FormatPciBusNumber(int busnum, char *buffer); -resPtr xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex); -int xf86GetFbInfoForScreen(int scrnIndex); -int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -void xf86EnableAccess(ScrnInfoPtr pScrn); -void xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn); -Bool xf86IsPrimaryPci(struct pci_device * pPci); +extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func); +extern _X_EXPORT void xf86FormatPciBusNumber(int busnum, char *buffer); +extern _X_EXPORT int xf86GetFbInfoForScreen(int scrnIndex); +extern _X_EXPORT int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); +extern _X_EXPORT int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); +extern _X_EXPORT void xf86EnableAccess(ScrnInfoPtr pScrn); +extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device * pPci); /* new RAC */ -resPtr xf86AddResToList(resPtr rlist, resRange *Range, int entityIndex); -void xf86FreeResList(resPtr rlist); -void xf86ClaimFixedResources(resList list, int entityIndex); -Bool xf86DriverHasEntities(DriverPtr drvp); -void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); -void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, +extern _X_EXPORT Bool xf86DriverHasEntities(DriverPtr drvp); +extern _X_EXPORT void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); +extern _X_EXPORT void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance); -int xf86GetNumEntityInstances(int entityIndex); -GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); -void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); -EntityInfoPtr xf86GetEntityInfo(int entityIndex); -struct pci_device * xf86GetPciInfoForEntity(int entityIndex); -Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, +extern _X_EXPORT int xf86GetNumEntityInstances(int entityIndex); +extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); +extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); +extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex); +extern _X_EXPORT struct pci_device * xf86GetPciInfoForEntity(int entityIndex); +extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer); -void xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type); -resPtr xf86RegisterResources(int entityIndex, resList list, - unsigned long Access); -Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base); -void xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs, - xf86SetAccessFuncPtr oldFuncs); -Bool xf86IsEntityPrimary(int entityIndex); -resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes); -resPtr xf86SetOperatingState(resList list, int entityIndex, int mask); -void xf86EnterServerState(xf86State state); -ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); -Bool xf86NoSharedResources(int screenIndex, resType res); -resPtr xf86FindIntersectOfLists(resPtr l1, resPtr l2); -void xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg); -Bool xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func); - -int xf86GetLastScrnFlag(int entityIndex); -void xf86SetLastScrnFlag(int entityIndex, int scrnIndex); -Bool xf86IsEntityShared(int entityIndex); -void xf86SetEntityShared(int entityIndex); -Bool xf86IsEntitySharable(int entityIndex); -void xf86SetEntitySharable(int entityIndex); -Bool xf86IsPrimInitDone(int entityIndex); -void xf86SetPrimInitDone(int entityIndex); -void xf86ClearPrimInitDone(int entityIndex); -int xf86AllocateEntityPrivateIndex(void); -DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex); +extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base); +extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex); +extern _X_EXPORT void xf86EnterServerState(xf86State state); +extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); + +extern _X_EXPORT int xf86GetLastScrnFlag(int entityIndex); +extern _X_EXPORT void xf86SetLastScrnFlag(int entityIndex, int scrnIndex); +extern _X_EXPORT Bool xf86IsEntityShared(int entityIndex); +extern _X_EXPORT void xf86SetEntityShared(int entityIndex); +extern _X_EXPORT Bool xf86IsEntitySharable(int entityIndex); +extern _X_EXPORT void xf86SetEntitySharable(int entityIndex); +extern _X_EXPORT Bool xf86IsPrimInitDone(int entityIndex); +extern _X_EXPORT void xf86SetPrimInitDone(int entityIndex); +extern _X_EXPORT void xf86ClearPrimInitDone(int entityIndex); +extern _X_EXPORT int xf86AllocateEntityPrivateIndex(void); +extern _X_EXPORT DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex); /* xf86Configure.c */ -GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, +extern _X_EXPORT GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset); /* xf86Cursor.c */ -void xf86LockZoom(ScreenPtr pScreen, int lock); -void xf86InitViewport(ScrnInfoPtr pScr); -void xf86SetViewport(ScreenPtr pScreen, int x, int y); -void xf86ZoomViewport(ScreenPtr pScreen, int zoom); -Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode); -void *xf86GetPointerScreenFuncs(void); -void xf86InitOrigins(void); -void xf86ReconfigureLayout(void); +extern _X_EXPORT void xf86LockZoom(ScreenPtr pScreen, int lock); +extern _X_EXPORT void xf86InitViewport(ScrnInfoPtr pScr); +extern _X_EXPORT void xf86SetViewport(ScreenPtr pScreen, int x, int y); +extern _X_EXPORT void xf86ZoomViewport(ScreenPtr pScreen, int zoom); +extern _X_EXPORT Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode); +extern _X_EXPORT void *xf86GetPointerScreenFuncs(void); +extern _X_EXPORT void xf86InitOrigins(void); +extern _X_EXPORT void xf86ReconfigureLayout(void); /* xf86cvt.c */ -DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, +extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced); /* xf86DPMS.c */ -Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags); +extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags); + +#ifdef DPMSExtension +extern _X_EXPORT int DPMSSet(ClientPtr client, int level); +extern _X_EXPORT Bool DPMSSupported(void); +#endif + /* xf86DGA.c */ -Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, +#ifdef XFreeXDGA +extern _X_EXPORT Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, int num); -Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num); -xf86SetDGAModeProc xf86SetDGAMode; +extern _X_EXPORT Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num); +extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode; +#endif /* xf86Events.c */ -void SetTimeSinceLastInputEvent(void); -pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data); -int xf86RemoveInputHandler(pointer handler); -void xf86DisableInputHandler(pointer handler); -void xf86EnableInputHandler(pointer handler); -pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data); -int xf86RemoveGeneralHandler(pointer handler); -void xf86DisableGeneralHandler(pointer handler); -void xf86EnableGeneralHandler(pointer handler); -void xf86InterceptSignals(int *signo); -void xf86InterceptSigIll(void (*sigillhandler)(void)); -Bool xf86EnableVTSwitch(Bool new); -void xf86ProcessActionEvent(ActionEvent action, void *arg); -void xf86PrintBacktrace(void); +extern _X_EXPORT void SetTimeSinceLastInputEvent(void); +extern _X_EXPORT pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data); +extern _X_EXPORT int xf86RemoveInputHandler(pointer handler); +extern _X_EXPORT void xf86DisableInputHandler(pointer handler); +extern _X_EXPORT void xf86EnableInputHandler(pointer handler); +extern _X_EXPORT pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data); +extern _X_EXPORT int xf86RemoveGeneralHandler(pointer handler); +extern _X_EXPORT void xf86DisableGeneralHandler(pointer handler); +extern _X_EXPORT void xf86EnableGeneralHandler(pointer handler); +extern _X_EXPORT void xf86InterceptSignals(int *signo); +extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler)(void)); +extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new); +extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg); +extern _X_EXPORT void xf86PrintBacktrace(void); /* xf86Helper.c */ -void xf86AddDriver(DriverPtr driver, pointer module, int flags); -void xf86DeleteDriver(int drvIndex); -ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags); -void xf86DeleteScreen(int scrnIndex, int flags); -int xf86AllocateScrnInfoPrivateIndex(void); -Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad); -Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp, +extern _X_EXPORT void xf86AddDriver(DriverPtr driver, pointer module, int flags); +extern _X_EXPORT void xf86DeleteDriver(int drvIndex); +extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags); +extern _X_EXPORT void xf86DeleteScreen(int scrnIndex, int flags); +extern _X_EXPORT int xf86AllocateScrnInfoPrivateIndex(void); +extern _X_EXPORT Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad); +extern _X_EXPORT Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp, int depth24flags); -void xf86PrintDepthBpp(ScrnInfoPtr scrp); -Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask); -Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual); -Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma); -void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y); -void xf86SetBlackWhitePixels(ScreenPtr pScreen); -void xf86EnableDisableFBAccess(int scrnIndex, Bool enable); -void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, +extern _X_EXPORT void xf86PrintDepthBpp(ScrnInfoPtr scrp); +extern _X_EXPORT Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask); +extern _X_EXPORT Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual); +extern _X_EXPORT Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma); +extern _X_EXPORT void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y); +extern _X_EXPORT void xf86SetBlackWhitePixels(ScreenPtr pScreen); +extern _X_EXPORT void xf86EnableDisableFBAccess(int scrnIndex, Bool enable); +extern _X_EXPORT void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, va_list args); -void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, +extern _X_EXPORT void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) _printf_attribute(4,5); -void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) +extern _X_EXPORT void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) _printf_attribute(3,4); -void xf86MsgVerb(MessageType type, int verb, const char *format, ...) +extern _X_EXPORT void xf86MsgVerb(MessageType type, int verb, const char *format, ...) _printf_attribute(3,4); -void xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3); -void xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3); -void xf86ErrorF(const char *format, ...) _printf_attribute(1,2); -const char *xf86TokenToString(SymTabPtr table, int token); -int xf86StringToToken(SymTabPtr table, const char *string); -void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from); -void xf86PrintChipsets(const char *drvname, const char *drvmsg, +extern _X_EXPORT void xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3); +extern _X_EXPORT void xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3); +extern _X_EXPORT void xf86ErrorF(const char *format, ...) _printf_attribute(1,2); +extern _X_EXPORT const char *xf86TokenToString(SymTabPtr table, int token); +extern _X_EXPORT int xf86StringToToken(SymTabPtr table, const char *string); +extern _X_EXPORT void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from); +extern _X_EXPORT void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips); -int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist); -int xf86MatchPciInstances(const char *driverName, int vendorID, +extern _X_EXPORT int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist); +extern _X_EXPORT int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities); -void xf86GetClocks(ScrnInfoPtr pScrn, int num, +extern _X_EXPORT void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), void (*ProtectRegs)(ScrnInfoPtr, Bool), void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg, int maskval, int knownclkindex, int knownclkvalue); -void xf86SetPriority(Bool up); -const char *xf86GetVisualName(int visual); -int xf86GetVerbosity(void); -Pix24Flags xf86GetPix24(void); -int xf86GetDepth(void); -rgb xf86GetWeight(void); -Gamma xf86GetGamma(void); -Bool xf86GetFlipPixels(void); -const char *xf86GetServerName(void); -Bool xf86ServerIsExiting(void); -Bool xf86ServerIsResetting(void); -Bool xf86ServerIsInitialising(void); -Bool xf86ServerIsOnlyDetecting(void); -Bool xf86ServerIsOnlyProbing(void); -Bool xf86CaughtSignal(void); -Bool xf86GetVidModeAllowNonLocal(void); -Bool xf86GetVidModeEnabled(void); -Bool xf86GetModInDevAllowNonLocal(void); -Bool xf86GetModInDevEnabled(void); -Bool xf86GetAllowMouseOpenFail(void); -Bool xf86IsPc98(void); -void xf86DisableRandR(void); -CARD32 xorgGetVersion(void); -CARD32 xf86GetModuleVersion(pointer module); -pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name); -pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); -pointer xf86LoadOneModule(char *name, pointer optlist); -void xf86UnloadSubModule(pointer mod); -Bool xf86LoaderCheckSymbol(const char *name); -void xf86LoaderReqSymLists(const char **, ...); -void xf86LoaderReqSymbols(const char *, ...); -void xf86LoaderRefSymLists(const char **, ...); -void xf86LoaderRefSymbols(const char *, ...); -void xf86SetBackingStore(ScreenPtr pScreen); -void xf86SetSilkenMouse(ScreenPtr pScreen); -int xf86NewSerialNumber(WindowPtr p, pointer unused); -pointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name, +extern _X_EXPORT const char *xf86GetVisualName(int visual); +extern _X_EXPORT int xf86GetVerbosity(void); +extern _X_EXPORT Pix24Flags xf86GetPix24(void); +extern _X_EXPORT int xf86GetDepth(void); +extern _X_EXPORT rgb xf86GetWeight(void); +extern _X_EXPORT Gamma xf86GetGamma(void); +extern _X_EXPORT Bool xf86GetFlipPixels(void); +extern _X_EXPORT const char *xf86GetServerName(void); +extern _X_EXPORT Bool xf86ServerIsExiting(void); +extern _X_EXPORT Bool xf86ServerIsResetting(void); +extern _X_EXPORT Bool xf86ServerIsInitialising(void); +extern _X_EXPORT Bool xf86ServerIsOnlyDetecting(void); +extern _X_EXPORT Bool xf86CaughtSignal(void); +extern _X_EXPORT Bool xf86GetVidModeAllowNonLocal(void); +extern _X_EXPORT Bool xf86GetVidModeEnabled(void); +extern _X_EXPORT Bool xf86GetModInDevAllowNonLocal(void); +extern _X_EXPORT Bool xf86GetModInDevEnabled(void); +extern _X_EXPORT Bool xf86GetAllowMouseOpenFail(void); +extern _X_EXPORT Bool xf86IsPc98(void); +extern _X_EXPORT void xf86DisableRandR(void); +extern _X_EXPORT CARD32 xorgGetVersion(void); +extern _X_EXPORT CARD32 xf86GetModuleVersion(pointer module); +extern _X_EXPORT pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name); +extern _X_EXPORT pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); +extern _X_EXPORT pointer xf86LoadOneModule(char *name, pointer optlist); +extern _X_EXPORT void xf86UnloadSubModule(pointer mod); +extern _X_EXPORT Bool xf86LoaderCheckSymbol(const char *name); +extern _X_EXPORT void xf86SetBackingStore(ScreenPtr pScreen); +extern _X_EXPORT void xf86SetSilkenMouse(ScreenPtr pScreen); +extern _X_EXPORT pointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name, char **adaptor_name, pointer *adaptor_options); -void xf86GetOS(const char **name, int *major, int *minor, int *teeny); -ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, +extern _X_EXPORT void xf86GetOS(const char **name, int *major, int *minor, int *teeny); +extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,PciChipsets *p_chip, - resList res, EntityProc init, + void *dummy, EntityProc init, EntityProc enter, EntityProc leave, pointer private); -ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, +extern _X_EXPORT ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer private); + /* Obsolete! don't use */ -Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, - int entityIndex,PciChipsets *p_chip, - resList res, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); -/* Obsolete! don't use */ -void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, - resList res, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); -void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); -Bool xf86IsScreenPrimary(int scrnIndex); -int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, +extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, + int entityIndex,PciChipsets *p_chip, + void *dummy, EntityProc init, + EntityProc enter, EntityProc leave, + pointer private); + +extern _X_EXPORT Bool xf86IsScreenPrimary(int scrnIndex); +extern _X_EXPORT int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, int format, unsigned long len, pointer value); -Bool xf86IsUnblank(int mode); - -_X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module); -_X_DEPRECATED void xf86DeleteModuleInfo(int idx); +extern _X_EXPORT Bool xf86IsUnblank(int mode); /* xf86Init.c */ -PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth); -int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth); +extern _X_EXPORT PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth); +extern _X_EXPORT int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth); /* xf86Mode.c */ -int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, +extern _X_EXPORT int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, int DivFactor, int MulFactor, int *divider); -const char *xf86ModeStatusToString(ModeStatus status); -ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, +extern _X_EXPORT const char *xf86ModeStatusToString(ModeStatus status); +extern _X_EXPORT ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, ClockRangePtr clockRanges, LookupModeFlags strategy); -ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor); -ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, +extern _X_EXPORT ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor); +extern _X_EXPORT ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, ClockRangePtr clockRanges, LookupModeFlags strategy, int maxPitch, int virtualX, int virtualY); -ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, +extern _X_EXPORT ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags); -int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, +extern _X_EXPORT int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int minHeight, int maxHeight, int pitchInc, int virtualX, int virtualY, int apertureSize, LookupModeFlags strategy); -void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode); -void xf86PruneDriverModes(ScrnInfoPtr scrp); -void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags); -void xf86PrintModes(ScrnInfoPtr scrp); -void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges); -double xf86ModeHSync(const DisplayModeRec *mode); -double xf86ModeVRefresh(const DisplayModeRec *mode); -void xf86SetModeDefaultName(DisplayModePtr mode); -void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); -DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); -DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); -Bool xf86ModesEqual(const DisplayModeRec *pMode1, +extern _X_EXPORT void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode); +extern _X_EXPORT void xf86PruneDriverModes(ScrnInfoPtr scrp); +extern _X_EXPORT void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags); +extern _X_EXPORT void xf86PrintModes(ScrnInfoPtr scrp); +extern _X_EXPORT void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges); +extern _X_EXPORT double xf86ModeHSync(const DisplayModeRec *mode); +extern _X_EXPORT double xf86ModeVRefresh(const DisplayModeRec *mode); +extern _X_EXPORT void xf86SetModeDefaultName(DisplayModePtr mode); +extern _X_EXPORT void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); +extern _X_EXPORT DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); +extern _X_EXPORT DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); +extern _X_EXPORT Bool xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2); -void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); -DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); +extern _X_EXPORT void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); +extern _X_EXPORT DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); /* xf86Option.c */ -void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts); +extern _X_EXPORT void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts); /* xf86RandR.c */ #ifdef RANDR -Bool xf86RandRInit (ScreenPtr pScreen); -void xf86RandRSetInitialMode (ScreenPtr pScreen); -Rotation xf86GetRotation(ScreenPtr pScreen); -Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, +extern _X_EXPORT Bool xf86RandRInit (ScreenPtr pScreen); +extern _X_EXPORT Rotation xf86GetRotation(ScreenPtr pScreen); +extern _X_EXPORT Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, int newvirtX, int newvirtY, int newmmWidth, int newmmHeight, Bool resetMode); #endif /* xf86VidModeExtentionInit.c */ -Bool VidModeExtensionInit(ScreenPtr pScreen); +extern _X_EXPORT Bool VidModeExtensionInit(ScreenPtr pScreen); #endif /* _NO_XF86_PROTOTYPES */ diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c index a9a1fd207..b3c31fd70 100644 --- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c +++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c @@ -144,11 +144,6 @@ static int videoPtrToDriverList(struct pci_device *dev, char *returnList[], int returnListMax) { - /* - * things not handled yet: - * cyrix/nsc. should be merged into geode anyway. - * xgi. - */ int i; /* Add more entries here if we ever return more than 4 drivers for any device */ @@ -156,11 +151,27 @@ videoPtrToDriverList(struct pci_device *dev, switch (dev->vendor_id) { + /* AMD Geode LX */ case 0x1022: - if (dev->device_id == 0x2081) { + if (dev->device_id == 0x2081) driverList[0] = "geode"; - driverList[1] = "amd"; - } + break; + /* older Geode products acquired by AMD still carry an NSC vendor_id */ + case 0x100B: + if (dev->device_id == 0x0030) { + /* NSC Geode GX2 specifically ... */ + driverList[0] = "geode"; + /* GX2 support started its life in the NSC tree and was later + forked by AMD for GEODE so we keep it as a backup */ + driverList[1] = "nsc"; + } else + /* ... or any other NSC Geode e.g. SC series */ + driverList[0] = "nsc"; + break; + /* Cyrix Geode GX1 */ + case 0x1078: + if (dev->device_id == 0x0104) + driverList[0] = "cyrix"; break; case 0x1142: driverList[0] = "apm"; break; case 0xedd8: driverList[0] = "ark"; break; @@ -168,18 +179,21 @@ videoPtrToDriverList(struct pci_device *dev, case 0x1002: driverList[0] = "ati"; break; case 0x102c: driverList[0] = "chips"; break; case 0x1013: driverList[0] = "cirrus"; break; + case 0x3d3d: driverList[0] = "glint"; break; + case 0x105d: driverList[0] = "i128"; break; case 0x8086: if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) { driverList[0] = "i740"; + } else if (dev->device_id == 0x8108) { + break; /* "hooray" for poulsbo */ } else { driverList[0] = "intel"; - driverList[1] = "i810"; } break; case 0x102b: driverList[0] = "mga"; break; case 0x10c8: driverList[0] = "neomagic"; break; - case 0x105d: driverList[0] = "i128"; break; case 0x10de: case 0x12d2: driverList[0] = "nv"; break; + case 0x1106: driverList[0] = "openchrome"; break; case 0x1163: driverList[0] = "rendition"; break; case 0x5333: switch (dev->device_id) @@ -202,11 +216,11 @@ videoPtrToDriverList(struct pci_device *dev, else driverList[0] = "tdfx"; break; - case 0x3d3d: driverList[0] = "glint"; break; + case 0x1011: driverList[0] = "tga"; break; case 0x1023: driverList[0] = "trident"; break; - case 0x100c: driverList[0] = "tseng"; break; - case 0x1106: driverList[0] = "openchrome"; break; - case 0x15ad: driverList[0] = "vmware"; break; + case 0x100c: driverList[0] = "tseng"; break; + case 0x80ee: driverList[0] = "vboxvideo"; break; + case 0x15ad: driverList[0] = "vmware"; break; case 0x18ca: if (dev->device_id == 0x47) driverList[0] = "xgixp"; @@ -269,7 +283,7 @@ xf86AutoConfig(void) return (ret == CONFIG_OK); } -int +static int xchomp(char *line) { size_t len = 0; @@ -285,46 +299,6 @@ xchomp(char *line) return 0; } -GDevPtr -autoConfigDevice(GDevPtr preconf_device) -{ - GDevPtr ptr = NULL; - - if (!xf86configptr) { - return NULL; - } - - /* If there's a configured section with no driver chosen, use it */ - if (preconf_device) { - ptr = preconf_device; - } else { - ptr = xcalloc(1, sizeof(GDevRec)); - if (!ptr) { - return NULL; - } - ptr->chipID = -1; - ptr->chipRev = -1; - ptr->irq = -1; - - ptr->active = TRUE; - ptr->claimed = FALSE; - ptr->identifier = "Autoconfigured Video Device"; - ptr->driver = NULL; - } - if (!ptr->driver) { - ptr->driver = chooseVideoDriver(); - } - - /* TODO Handle multiple screen sections */ - if (xf86ConfigLayout.screens && !xf86ConfigLayout.screens->screen->device) { - xf86ConfigLayout.screens->screen->device = ptr; - ptr->myScreenSection = xf86ConfigLayout.screens->screen; - } - xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n"); - - return ptr; -} - #ifdef __linux__ /* This function is used to provide a workaround for binary drivers that * don't export their PCI ID's properly. If distros don't end up using this @@ -448,8 +422,25 @@ listPossibleVideoDrivers(char *matches[], int nmatches) if (xf86Info.consoleFd >= 0) { struct vis_identifier visid; const char *cp; + extern char xf86SolarisFbDev[PATH_MAX]; + int iret; + + SYSCALL(iret = ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid)); + if (iret < 0) { + int fbfd; + + fbfd = open(xf86SolarisFbDev, O_RDONLY); + if (fbfd >= 0) { + SYSCALL(iret = ioctl(fbfd, VIS_GETIDENTIFIER, &visid)); + close(fbfd); + } + } - if (ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid) >= 0) { + if (iret < 0) { + xf86Msg(X_WARNING, + "could not get frame buffer identifier from %s\n", + xf86SolarisFbDev); + } else { xf86Msg(X_PROBED, "console driver: %s\n", visid.name); /* Special case from before the general case was set */ @@ -529,7 +520,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches) } } -char* +static char* chooseVideoDriver(void) { char *chosen_driver = NULL; @@ -552,3 +543,43 @@ chooseVideoDriver(void) return chosen_driver; } + +GDevPtr +autoConfigDevice(GDevPtr preconf_device) +{ + GDevPtr ptr = NULL; + + if (!xf86configptr) { + return NULL; + } + + /* If there's a configured section with no driver chosen, use it */ + if (preconf_device) { + ptr = preconf_device; + } else { + ptr = xcalloc(1, sizeof(GDevRec)); + if (!ptr) { + return NULL; + } + ptr->chipID = -1; + ptr->chipRev = -1; + ptr->irq = -1; + + ptr->active = TRUE; + ptr->claimed = FALSE; + ptr->identifier = "Autoconfigured Video Device"; + ptr->driver = NULL; + } + if (!ptr->driver) { + ptr->driver = chooseVideoDriver(); + } + + /* TODO Handle multiple screen sections */ + if (xf86ConfigLayout.screens && !xf86ConfigLayout.screens->screen->device) { + xf86ConfigLayout.screens->screen->device = ptr; + ptr->myScreenSection = xf86ConfigLayout.screens->screen; + } + xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n"); + + return ptr; +} diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c index b94d500f0..f0a0723f9 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.c +++ b/xorg-server/hw/xfree86/common/xf86Bus.c @@ -40,60 +40,28 @@ #include "os.h" #include "xf86.h" #include "xf86Priv.h" -#include "xf86Resources.h" /* Bus-specific headers */ #include "xf86Bus.h" #define XF86_OS_PRIVS -#define NEED_OS_RAC_PROTOS #include "xf86_OSproc.h" +#include "xf86VGAarbiter.h" -#include "xf86RAC.h" #include "Pci.h" /* Entity data */ EntityPtr *xf86Entities = NULL; /* Bus slots claimed by drivers */ int xf86NumEntities = 0; static int xf86EntityPrivateCount = 0; -BusAccPtr xf86BusAccInfo = NULL; -static void -noopEnableDisable(void *arg) { } - -xf86AccessRec AccessNULL = { noopEnableDisable, noopEnableDisable, NULL }; - -xf86CurrentAccessRec xf86CurrentAccess = {NULL,NULL}; - -BusRec primaryBus = { BUS_NONE, {{0}}}; +BusRec primaryBus = { BUS_NONE, { 0 } }; static Bool xf86ResAccessEnter = FALSE; - -/* resource lists */ -resPtr Acc = NULL; - -/* predefined special resources */ -_X_EXPORT resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END}; -_X_EXPORT resRange resVgaShared[] = {_VGA_SHARED, _END}; -_X_EXPORT resRange resVgaMemShared[] = {_VGA_SHARED_MEM,_END}; -_X_EXPORT resRange resVgaIoShared[] = {_VGA_SHARED_IO,_END}; -_X_EXPORT resRange resVgaUnusedExclusive[] = {_VGA_EXCLUSIVE_UNUSED, _END}; -_X_EXPORT resRange resVgaUnusedShared[] = {_VGA_SHARED_UNUSED, _END}; -_X_EXPORT resRange resVgaSparseExclusive[] = {_VGA_EXCLUSIVE_SPARSE, _END}; -_X_EXPORT resRange resVgaSparseShared[] = {_VGA_SHARED_SPARSE, _END}; -_X_EXPORT resRange res8514Exclusive[] = {_8514_EXCLUSIVE, _END}; -_X_EXPORT resRange res8514Shared[] = {_8514_SHARED, _END}; - -/* Flag: do we need RAC ? */ -static Bool needRAC = FALSE; static Bool doFramebufferMode = FALSE; -/* state change notification callback list */ -static StateChangeNotificationPtr StateChangeNotificationList; -static void notifyStateChange(xf86NotifyState state); - /* * Call the bus probes relevant to the architecture. * @@ -152,17 +120,10 @@ void xf86EntityInit(void) { int i; - xf86AccessPtr pacc; for (i = 0; i < xf86NumEntities; i++) if (xf86Entities[i]->entityInit) { - if (xf86Entities[i]->access->busAcc) - ((BusAccPtr)xf86Entities[i]->access->busAcc)->set_f - (xf86Entities[i]->access->busAcc); - pacc = xf86Entities[i]->access->fallback; - pacc->AccessEnable(pacc->arg); xf86Entities[i]->entityInit(i,xf86Entities[i]->private); - pacc->AccessDisable(pacc->arg); } } @@ -182,17 +143,10 @@ static void EntityEnter(void) { int i; - xf86AccessPtr pacc; for (i = 0; i < xf86NumEntities; i++) if (xf86Entities[i]->entityEnter) { - if (xf86Entities[i]->access->busAcc) - ((BusAccPtr)xf86Entities[i]->access->busAcc)->set_f - (xf86Entities[i]->access->busAcc); - pacc = xf86Entities[i]->access->fallback; - pacc->AccessEnable(pacc->arg); xf86Entities[i]->entityEnter(i,xf86Entities[i]->private); - pacc->AccessDisable(pacc->arg); } } @@ -200,32 +154,25 @@ static void EntityLeave(void) { int i; - xf86AccessPtr pacc; for (i = 0; i < xf86NumEntities; i++) if (xf86Entities[i]->entityLeave) { - if (xf86Entities[i]->access->busAcc) - ((BusAccPtr)xf86Entities[i]->access->busAcc)->set_f - (xf86Entities[i]->access->busAcc); - pacc = xf86Entities[i]->access->fallback; - pacc->AccessEnable(pacc->arg); xf86Entities[i]->entityLeave(i,xf86Entities[i]->private); - pacc->AccessDisable(pacc->arg); } } -_X_EXPORT Bool +Bool xf86IsEntityPrimary(int entityIndex) { EntityPtr pEnt = xf86Entities[entityIndex]; - if (primaryBus.type != pEnt->busType) return FALSE; + if (primaryBus.type != pEnt->bus.type) return FALSE; - switch (pEnt->busType) { + switch (pEnt->bus.type) { case BUS_PCI: return (pEnt->bus.id.pci == primaryBus.id.pci); case BUS_SBUS: - return (pEnt->sbusBusId.fbNum == primaryBus.id.sbus.fbNum); + return (pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum); default: return FALSE; } @@ -255,7 +202,7 @@ xf86DriverHasEntities(DriverPtr drvp) return FALSE; } -_X_EXPORT void +void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) { if (entityIndex == -1) @@ -270,8 +217,6 @@ xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) pScrn->entityList = xnfrealloc(pScrn->entityList, pScrn->numEntities * sizeof(int)); pScrn->entityList[pScrn->numEntities - 1] = entityIndex; - xf86Entities[entityIndex]->access->next = pScrn->access; - pScrn->access = xf86Entities[entityIndex]->access; xf86Entities[entityIndex]->inUse = TRUE; pScrn->entityInstanceList = xnfrealloc(pScrn->entityInstanceList, pScrn->numEntities * sizeof(int)); @@ -279,7 +224,7 @@ xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) pScrn->domainIOBase = xf86Entities[entityIndex]->domainIO; } -_X_EXPORT void +void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance) { int i; @@ -299,7 +244,7 @@ xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance) * XXX This needs to be updated for the case where a single entity may have * instances associated with more than one screen. */ -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86FindScreenForEntity(int entityIndex) { int i,j; @@ -317,30 +262,19 @@ xf86FindScreenForEntity(int entityIndex) return NULL; } -_X_EXPORT void +void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex) { int i; - EntityAccessPtr *ptr = (EntityAccessPtr *)&pScrn->access; - EntityAccessPtr peacc; for (i = 0; i < pScrn->numEntities; i++) { if (pScrn->entityList[i] == entityIndex) { - peacc = xf86Entities[pScrn->entityList[i]]->access; - (*ptr) = peacc->next; - /* disable entity: call disable func */ - if (peacc->pAccess) - peacc->pAccess->AccessDisable(peacc->pAccess->arg); - /* also disable fallback - just in case */ - if (peacc->fallback) - peacc->fallback->AccessDisable(peacc->fallback->arg); for (i++; i < pScrn->numEntities; i++) pScrn->entityList[i-1] = pScrn->entityList[i]; pScrn->numEntities--; xf86Entities[entityIndex]->inUse = FALSE; break; } - ptr = &(xf86Entities[pScrn->entityList[i]]->access->next); } } @@ -352,7 +286,6 @@ void xf86ClearEntityListForScreen(int scrnIndex) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; - EntityAccessPtr peacc; int i, entityIndex; if (pScrn->entityList == NULL || pScrn->numEntities == 0) return; @@ -361,43 +294,13 @@ xf86ClearEntityListForScreen(int scrnIndex) entityIndex = pScrn->entityList[i]; xf86Entities[entityIndex]->inUse = FALSE; /* disable resource: call the disable function */ - peacc = xf86Entities[entityIndex]->access; - if (peacc->pAccess) - peacc->pAccess->AccessDisable(peacc->pAccess->arg); - /* and the fallback function */ - if (peacc->fallback) - peacc->fallback->AccessDisable(peacc->fallback->arg); - /* shared resources are only needed when entity is active: remove */ - xf86DeallocateResourcesForEntity(entityIndex, ResShared); } xfree(pScrn->entityList); xfree(pScrn->entityInstanceList); - if (pScrn->CurrentAccess->pIoAccess == (EntityAccessPtr)pScrn->access) - pScrn->CurrentAccess->pIoAccess = NULL; - if (pScrn->CurrentAccess->pMemAccess == (EntityAccessPtr)pScrn->access) - pScrn->CurrentAccess->pMemAccess = NULL; pScrn->entityList = NULL; pScrn->entityInstanceList = NULL; } -void -xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type) -{ - resPtr *pprev_next = &Acc; - resPtr res = Acc; - - while (res) { - if (res->entityIndex == entityIndex && - (type & ResAccMask & res->res_type)) - { - (*pprev_next) = res->next; - xfree(res); - } else - pprev_next = &(res->next); - res = (*pprev_next); - } -} - /* * Add an extra device section (GDevPtr) to an entity. */ @@ -423,12 +326,15 @@ xf86AddDevToEntity(int entityIndex, GDevPtr dev) * EntityRec struct to the drivers. The EntityRec structure itself * remains invisible to the driver. */ -_X_EXPORT EntityInfoPtr +EntityInfoPtr xf86GetEntityInfo(int entityIndex) { EntityInfoPtr pEnt; int i; + if (entityIndex == -1) + return NULL; + if (entityIndex >= xf86NumEntities) return NULL; @@ -437,7 +343,6 @@ xf86GetEntityInfo(int entityIndex) pEnt->location = xf86Entities[entityIndex]->bus; pEnt->active = xf86Entities[entityIndex]->active; pEnt->chipset = xf86Entities[entityIndex]->chipset; - pEnt->resources = xf86Entities[entityIndex]->resources; pEnt->driver = xf86Entities[entityIndex]->driver; if ( (xf86Entities[entityIndex]->devices) && (xf86Entities[entityIndex]->devices[0]) ) { @@ -451,7 +356,7 @@ xf86GetEntityInfo(int entityIndex) return pEnt; } -_X_EXPORT int +int xf86GetNumEntityInstances(int entityIndex) { if (entityIndex >= xf86NumEntities) @@ -460,7 +365,7 @@ xf86GetNumEntityInstances(int entityIndex) return xf86Entities[entityIndex]->numInstances; } -_X_EXPORT GDevPtr +GDevPtr xf86GetDevFromEntity(int entityIndex, int instance) { int i; @@ -480,61 +385,6 @@ xf86GetDevFromEntity(int entityIndex, int instance) return xf86Entities[entityIndex]->devices[i]; } -/* - * general generic disable function. - */ -static void -disableAccess(void) -{ - int i; - xf86AccessPtr pacc; - EntityAccessPtr peacc; - - /* call disable funcs and reset current access pointer */ - /* the entity specific access funcs are in an enabled */ - /* state - driver must restore their state explicitely */ - for (i = 0; i < xf86NumScreens; i++) { - peacc = xf86Screens[i]->CurrentAccess->pIoAccess; - while (peacc) { - if (peacc->pAccess) - peacc->pAccess->AccessDisable(peacc->pAccess->arg); - peacc = peacc->next; - } - xf86Screens[i]->CurrentAccess->pIoAccess = NULL; - peacc = xf86Screens[i]->CurrentAccess->pMemAccess; - while (peacc) { - if (peacc->pAccess) - peacc->pAccess->AccessDisable(peacc->pAccess->arg); - peacc = peacc->next; - } - xf86Screens[i]->CurrentAccess->pMemAccess = NULL; - } - /* then call the generic entity disable funcs */ - for (i = 0; i < xf86NumEntities; i++) { - pacc = xf86Entities[i]->access->fallback; - pacc->AccessDisable(pacc->arg); - } -} - -static void -clearAccess(void) -{ - int i; - - /* call disable funcs and reset current access pointer */ - /* the entity specific access funcs are in an enabled */ - /* state - driver must restore their state explicitely */ - for (i = 0; i < xf86NumScreens; i++) { - xf86Screens[i]->CurrentAccess->pIoAccess = NULL; - xf86Screens[i]->CurrentAccess->pMemAccess = NULL; - } - -} - -/* - * Generic interface to bus specific code - add other buses here - */ - /* * xf86AccessInit() - set up everything needed for access control * called only once on first server generation. @@ -542,11 +392,6 @@ clearAccess(void) void xf86AccessInit(void) { - initPciState(); - initPciBusState(); - DisablePciBusAccess(); - DisablePciAccess(); - xf86ResAccessEnter = TRUE; } @@ -564,12 +409,7 @@ xf86AccessEnter(void) * on enter we simply disable routing of special resources * to any bus and let the RAC code to "open" the right bridges. */ - PciBusStateEnter(); - DisablePciBusAccess(); - PciStateEnter(); - disableAccess(); EntityEnter(); - notifyStateChange(NOTIFY_ENTER); xf86EnterServerState(SETUP); xf86ResAccessEnter = TRUE; } @@ -588,35 +428,9 @@ xf86AccessLeave(void) { if (!xf86ResAccessEnter) return; - notifyStateChange(NOTIFY_LEAVE); - disableAccess(); - DisablePciBusAccess(); EntityLeave(); } -void -xf86AccessLeaveState(void) -{ - if (!xf86ResAccessEnter) - return; - xf86ResAccessEnter = FALSE; - PciStateLeave(); - PciBusStateLeave(); -} - -/* - * xf86AccessRestoreState() - Restore the access registers to the - * state before X was started. This is handy for framebuffers. - */ -static void -xf86AccessRestoreState(void) -{ - if (!xf86ResAccessEnter) - return; - PciStateLeave(); - PciBusStateLeave(); -} - /* * xf86EnableAccess() -- enable access to controlled resources. * To reduce latency when switching access the ScrnInfoRec has @@ -632,1876 +446,170 @@ xf86AccessRestoreState(void) * by other resources! */ -_X_EXPORT void +void xf86EnableAccess(ScrnInfoPtr pScrn) { - register EntityAccessPtr peAcc = (EntityAccessPtr) pScrn->access; - register EntityAccessPtr pceAcc; - register xf86AccessPtr pAcc; - EntityAccessPtr tmp; + DebugF("Enable access %i\n",pScrn->scrnIndex); -#ifdef DEBUG - ErrorF("Enable access %i\n",pScrn->scrnIndex); -#endif + return; +} - /* Entity is not under access control or currently enabled */ - if (!pScrn->access) { - if (pScrn->busAccess) { - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - } - return; - } - - switch (pScrn->resourceType) { - case IO: - pceAcc = pScrn->CurrentAccess->pIoAccess; - if (peAcc == pceAcc) { - return; - } - if (pScrn->CurrentAccess->pMemAccess == pceAcc) - pScrn->CurrentAccess->pMemAccess = NULL; - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - if (pScrn->busAccess) - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - while (peAcc) { - pAcc = peAcc->pAccess; - if (pAcc) - pAcc->AccessEnable(pAcc->arg); - peAcc = peAcc->next; - } - pScrn->CurrentAccess->pIoAccess = (EntityAccessPtr) pScrn->access; - return; - - case MEM_IO: - pceAcc = pScrn->CurrentAccess->pIoAccess; - if (peAcc != pceAcc) { /* current Io != pAccess */ - tmp = pceAcc; - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - pceAcc = pScrn->CurrentAccess->pMemAccess; - if (peAcc != pceAcc /* current Mem != pAccess */ - && tmp !=pceAcc) { - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - } - } else { /* current Io == pAccess */ - pceAcc = pScrn->CurrentAccess->pMemAccess; - if (pceAcc == peAcc) { /* current Mem == pAccess */ - return; - } - while (pceAcc) { /* current Mem != pAccess */ - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - } - if (pScrn->busAccess) - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - while (peAcc) { - pAcc = peAcc->pAccess; - if (pAcc) - pAcc->AccessEnable(pAcc->arg); - peAcc = peAcc->next; - } - pScrn->CurrentAccess->pMemAccess = - pScrn->CurrentAccess->pIoAccess = (EntityAccessPtr) pScrn->access; - return; - - case MEM: - pceAcc = pScrn->CurrentAccess->pMemAccess; - if (peAcc == pceAcc) { - return; - } - if (pScrn->CurrentAccess->pIoAccess == pceAcc) - pScrn->CurrentAccess->pIoAccess = NULL; - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - if (pScrn->busAccess) - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - while (peAcc) { - pAcc = peAcc->pAccess; - if (pAcc) - pAcc->AccessEnable(pAcc->arg); - peAcc = peAcc->next; - } - pScrn->CurrentAccess->pMemAccess = (EntityAccessPtr) pScrn->access; - return; +/* + * xf86EnterServerState() -- set state the server is in. + */ - case NONE: - if (pScrn->busAccess) { - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - } - return; - } -} +typedef enum { TRI_UNSET, TRI_TRUE, TRI_FALSE } TriState; -_X_EXPORT void -xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn) +static void +SetSIGIOForState(xf86State state) { - EntityAccessPtr pceAcc2 = NULL; - register EntityAccessPtr pceAcc = NULL; - register xf86AccessPtr pAcc; - - - switch(pScrn->resourceType) { - case IO: - pceAcc = pScrn->CurrentAccess->pIoAccess; - break; - case MEM: - pceAcc = pScrn->CurrentAccess->pMemAccess; - break; - case MEM_IO: - pceAcc = pScrn->CurrentAccess->pMemAccess; - pceAcc2 = pScrn->CurrentAccess->pIoAccess; - break; - default: - break; - } + static int sigio_state; + static TriState sigio_blocked = TRI_UNSET; - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) { - if (Enable) { - pAcc->AccessEnable(pAcc->arg); - } else { - pAcc->AccessDisable(pAcc->arg); - } - } - pceAcc = pceAcc->next; - if (!pceAcc) { - pceAcc = pceAcc2; - pceAcc2 = NULL; - } + if ((state == SETUP) && (sigio_blocked != TRI_TRUE)) { + sigio_state = xf86BlockSIGIO(); + sigio_blocked = TRI_TRUE; + } else if ((state == OPERATING) && (sigio_blocked != TRI_UNSET)) { + xf86UnblockSIGIO(sigio_state); + sigio_blocked = TRI_FALSE; } } -_X_EXPORT void -xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs, - xf86SetAccessFuncPtr oldFuncs) +void +xf86EnterServerState(xf86State state) { - AccessFuncPtr rac; - - if (!xf86Entities[pEnt->index]->rac) - xf86Entities[pEnt->index]->rac = xnfcalloc(1,sizeof(AccessFuncRec)); - - rac = xf86Entities[pEnt->index]->rac; - - rac->mem_new = funcs->mem; - rac->io_new = funcs->io; - rac->io_mem_new = funcs->io_mem; - - rac->old = oldFuncs; -} - -/* - * Conflict checking - */ + /* + * This is a good place to block SIGIO during SETUP state. + * SIGIO should be blocked in SETUP state otherwise (u)sleep() + * might get interrupted early. + * We take care not to call xf86BlockSIGIO() twice. + */ + SetSIGIOForState(state); + if (state == SETUP) + DebugF("Entering SETUP state\n"); + else + DebugF("Entering OPERATING state\n"); -static memType -getMask(memType val) -{ - memType mask = 0; - memType tmp = 0; - - mask=~mask; - tmp = ~((~tmp) >> 1); - - while (!(val & tmp)) { - mask = mask >> 1; - val = val << 1; - } - return mask; + return; } /* - * checkConflictBlock() -- check for conflicts of a block resource range. - * If conflict is found return end of conflicting range. Else return 0. + * xf86PostProbe() -- Allocate all non conflicting resources + * This function gets called by xf86Init(). */ -static memType -checkConflictBlock(resRange *range, resPtr pRes) +void +xf86PostProbe(void) { - memType val,tmp,prev; - int i; - - switch (pRes->res_type & ResExtMask) { - case ResBlock: - if (range->rBegin < pRes->block_end && - range->rEnd > pRes->block_begin) { -#ifdef DEBUG - ErrorF("b-b conflict w: %lx %lx\n", - pRes->block_begin,pRes->block_end); -#endif - return pRes->block_end < range->rEnd ? - pRes->block_end : range->rEnd; - } - return 0; - case ResSparse: - if (pRes->sparse_base > range->rEnd) return 0; - - val = (~pRes->sparse_mask | pRes->sparse_base) & getMask(range->rEnd); -#ifdef DEBUG - ErrorF("base = 0x%lx, mask = 0x%lx, begin = 0x%lx, end = 0x%lx ," - "val = 0x%lx\n", - pRes->sparse_base, pRes->sparse_mask, range->rBegin, - range->rEnd, val); -#endif - i = sizeof(memType) * 8; - tmp = prev = pRes->sparse_base; - - while (i) { - tmp |= 1<< (--i) & val; - if (tmp > range->rEnd) - tmp = prev; - else - prev = tmp; - } - if (tmp >= range->rBegin) { -#ifdef DEBUG - ErrorF("conflict found at: 0x%lx\n",tmp); - ErrorF("b-d conflict w: %lx %lx\n", - pRes->sparse_base,pRes->sparse_mask); + if (fbSlotClaimed) { + if (pciSlotClaimed +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) + || sbusSlotClaimed #endif - return tmp; + ) { + FatalError("Cannot run in framebuffer mode. Please specify busIDs " + " for all framebuffer devices\n"); + return; + } else { + xf86Msg(X_INFO,"Running in FRAMEBUFFER Mode\n"); + doFramebufferMode = TRUE; + + return; } - else - return 0; } - return 0; } -/* - * checkConflictSparse() -- check for conflicts of a sparse resource range. - * If conflict is found return base of conflicting region. Else return 0. - */ -#define mt_max ~(memType)0 -#define length sizeof(memType) * 8 -static memType -checkConflictSparse(resRange *range, resPtr pRes) +void +xf86PostScreenInit(void) { - memType val, tmp, prev; - int i; - - switch (pRes->res_type & ResExtMask) { - case ResSparse: - tmp = pRes->sparse_mask & range->rMask; - if ((tmp & pRes->sparse_base) == (tmp & range->rBase)) { -#ifdef DEBUG - ErrorF("s-b conflict w: %lx %lx\n", - pRes->sparse_base,pRes->sparse_mask); -#endif - return pRes->sparse_mask; - } - return 0; - - case ResBlock: - if (pRes->block_end < range->rBase) return 0; - - val = (~range->rMask | range->rBase) & getMask(pRes->block_end); - i = length; - tmp = prev = range->rBase; - - while (i) { -#ifdef DEBUG - ErrorF("tmp = 0x%lx\n",tmp); +#ifdef HAVE_PCI_DEVICE_VGAARB_INIT + int vga_count; #endif - tmp |= 1<< (--i) & val; - if (tmp > pRes->block_end) - tmp = prev; - else - prev = tmp; - } - if (tmp < pRes->block_begin) - return 0; - else { - /* - * now we subdivide the block region in sparse regions - * with base values = 2^n and find the smallest mask. - * This might be done in a simpler way.... - */ - memType mask, m_mask = 0, base = pRes->block_begin; - int i; - while (base < pRes->block_end) { - for (i = 1; i < length; i++) - if ( base != (base & (mt_max << i))) break; - mask = mt_max >> (length - i); - do mask >>= 1; - while ((mask + base + 1) > pRes->block_end); - /* m_mask and are _inverted_ sparse masks */ - m_mask = mask > m_mask ? mask : m_mask; - base = base + mask + 1; - } -#ifdef DEBUG - ErrorF("conflict found at: 0x%lx\n",tmp); - ErrorF("b-b conflict w: %lx %lx\n", - pRes->block_begin,pRes->block_end); -#endif - return ~m_mask; - } + if (doFramebufferMode) { + SetSIGIOForState(OPERATING); + return; } - return 0; -} -#undef mt_max -#undef length - -/* - * needCheck() -- this function decides whether to check for conflicts - * depending on the types of the resource ranges and their locations - */ -static Bool -needCheck(resPtr pRes, unsigned long type, int entityIndex, xf86State state) -{ - /* the same entity shouldn't conflict with itself */ - ScrnInfoPtr pScrn; - int i; - BusType loc = BUS_NONE; - BusType r_loc = BUS_NONE; - - if ((pRes->res_type & ResTypeMask) != (type & ResTypeMask)) - return FALSE; /* - * Resources set by BIOS (ResBios) are allowed to conflict - * with resources marked (ResBios). + * we need to wrap the arbiter if we have more than + * one VGA card - hotplug cries. */ - if (pRes->res_type & type & ResBios) - return FALSE; - - if (type & pRes->res_type & ResUnused) - return FALSE; - - if (state == OPERATING) { - if (type & ResDisableOpr || pRes->res_type & ResDisableOpr) - return FALSE; - if (type & pRes->res_type & ResUnusedOpr) return FALSE; - /* - * Maybe we should have ResUnused set The resUnusedOpr - * bit, too. This way we could avoid this confusion - */ - if ((type & ResUnusedOpr && pRes->res_type & ResUnused) || - (type & ResUnused && pRes->res_type & ResUnusedOpr)) - return FALSE; +#ifdef HAVE_PCI_DEVICE_VGAARB_INIT + pci_device_vgaarb_get_info(NULL, &vga_count, NULL); + if (vga_count > 1 && xf86Screens) { + int i; + xf86Msg(X_INFO,"Number of VGA devices: %d: arbiter wrapping enabled\n", vga_count); + for (i = 0; i < xf86NumScreens; i++) + xf86VGAarbiterWrapFunctions(xf86Screens[i]->pScreen); } +#endif + DebugF("PostScreenInit generation: %i\n",serverGeneration); + xf86EnterServerState(OPERATING); - if (entityIndex > -1) - loc = xf86Entities[entityIndex]->busType; - if (pRes->entityIndex > -1) - r_loc = xf86Entities[pRes->entityIndex]->busType; - - if ((type & ResAccMask) == ResShared && - (pRes->res_type & ResAccMask) == ResShared) - return FALSE; - - if (pRes->entityIndex == entityIndex) return FALSE; - - if (pRes->entityIndex > -1 && - (pScrn = xf86FindScreenForEntity(entityIndex))) { - for (i = 0; i < pScrn->numEntities; i++) - if (pScrn->entityList[i] == pRes->entityIndex) return FALSE; - } - return TRUE; } /* - * checkConflict() - main conflict checking function which all other - * function call. + * xf86FindPrimaryDevice() - Find the display device which + * was active when the server was started. */ -static memType -checkConflict(resRange *rgp, resPtr pRes, int entityIndex, - xf86State state, Bool ignoreIdentical) +void +xf86FindPrimaryDevice(void) { - memType ret; - - while(pRes) { - if (!needCheck(pRes,rgp->type, entityIndex ,state)) { - pRes = pRes->next; - continue; - } - switch (rgp->type & ResExtMask) { - case ResBlock: - if (rgp->rEnd < rgp->rBegin) { - xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", - (long)rgp->rEnd, (long)rgp->rBegin); - return 0; - } - if ((ret = checkConflictBlock(rgp, pRes))) { - if (!ignoreIdentical || (rgp->rBegin != pRes->block_begin) - || (rgp->rEnd != pRes->block_end)) - return ret; - } - break; - case ResSparse: - if ((rgp->rBase & rgp->rMask) != rgp->rBase) { - xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" - "doesn't satisfy (base & mask = mask)\n", - (long)rgp->rBase, (long)rgp->rMask); - return 0; - } - if ((ret = checkConflictSparse(rgp, pRes))) { - if (!ignoreIdentical || (rgp->rBase != pRes->sparse_base) - || (rgp->rMask != pRes->sparse_mask)) - return ret; - } + if (primaryBus.type != BUS_NONE) { + char *bus; + char loc[16]; + + switch (primaryBus.type) { + case BUS_PCI: + bus = "PCI"; + snprintf(loc, sizeof(loc), " %2.2x@%2.2x:%2.2x:%1.1x", + primaryBus.id.pci->bus, + primaryBus.id.pci->domain, + primaryBus.id.pci->dev, + primaryBus.id.pci->func); + break; + case BUS_SBUS: + bus = "SBUS"; + snprintf(loc, sizeof(loc), " %2.2x", primaryBus.id.sbus.fbNum); break; + default: + bus = ""; + loc[0] = '\0'; } - pRes = pRes->next; + + xf86MsgVerb(X_INFO, 2, "Primary Device is: %s%s\n",bus,loc); } - return 0; } -/* - * xf86ChkConflict() - This function is the low level interface to - * the resource broker that gets exported. Tests all resources ie. - * performs test with SETUP flag. - */ -static memType -xf86ChkConflict(resRange *rgp, int entityIndex) +int +xf86GetLastScrnFlag(int entityIndex) { - return checkConflict(rgp, Acc, entityIndex, SETUP, FALSE); + if(entityIndex < xf86NumEntities) { + return(xf86Entities[entityIndex]->lastScrnFlag); + } else { + return -1; + } } -/* - * Resources List handling - */ - -static resPtr -xf86JoinResLists(resPtr rlist1, resPtr rlist2) +void +xf86SetLastScrnFlag(int entityIndex, int scrnIndex) { - resPtr pRes; - - if (!rlist1) - return rlist2; - - if (!rlist2) - return rlist1; - - for (pRes = rlist1; pRes->next; pRes = pRes->next) - ; - pRes->next = rlist2; - return rlist1; + if(entityIndex < xf86NumEntities) { + xf86Entities[entityIndex]->lastScrnFlag = scrnIndex; + } } -resPtr -xf86AddResToList(resPtr rlist, resRange *range, int entityIndex) +Bool +xf86IsEntityShared(int entityIndex) { - resPtr new; - - switch (range->type & ResExtMask) { - case ResBlock: - if (range->rEnd < range->rBegin) { - xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", - (long)range->rEnd, (long)range->rBegin); - return rlist; - } - break; - case ResSparse: - if ((range->rBase & range->rMask) != range->rBase) { - xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" - "doesn't satisfy (base & mask = mask)\n", - (long)range->rBase, (long)range->rMask); - return rlist; + if(entityIndex < xf86NumEntities) { + if(xf86Entities[entityIndex]->entityProp & IS_SHARED_ACCEL) { + return TRUE; } - break; } - - new = xnfalloc(sizeof(resRec)); - /* - * Only background resources may be registered with ResBios - * and ResEstimated set. Other resources only set it for - * testing. - */ - if (entityIndex != (-1)) - range->type &= ~(ResBios | ResEstimated); - new->val = *range; - new->entityIndex = entityIndex; - new->next = rlist; - return new; -} - -_X_EXPORT void -xf86FreeResList(resPtr rlist) -{ - resPtr pRes; - - if (!rlist) - return; - - for (pRes = rlist->next; pRes; rlist = pRes, pRes = pRes->next) - xfree(rlist); - xfree(rlist); -} - -static resPtr -xf86DupResList(const resPtr rlist) -{ - resPtr pRes, ret, prev, new; - - if (!rlist) - return NULL; - - ret = xnfalloc(sizeof(resRec)); - *ret = *rlist; - prev = ret; - for (pRes = rlist->next; pRes; pRes = pRes->next) { - new = xnfalloc(sizeof(resRec)); - *new = *pRes; - prev->next = new; - prev = new; - } - return ret; -} - -static void -xf86PrintResList(int verb, resPtr list) -{ - int i = 0; - const char *s, *r; - resPtr tmp = list; - unsigned long type; - - if (!list) - return; - - type = ResMem; - r = "M"; - while (1) { - while (list) { - if ((list->res_type & ResPhysMask) == type) { - switch (list->res_type & ResExtMask) { - case ResBlock: - xf86ErrorFVerb(verb, - "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx (0x%lx)", - i, list->entityIndex, - (list->res_type & ResDomain) >> 24, - (long)list->block_begin, - (long)list->block_end, - (long)(list->block_end - - list->block_begin + 1)); - break; - case ResSparse: - xf86ErrorFVerb(verb, "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx ", - i, list->entityIndex, - (list->res_type & ResDomain) >> 24, - (long)list->sparse_base, - (long)list->sparse_mask); - break; - default: - list = list->next; - continue; - } - xf86ErrorFVerb(verb, " %s", r); - switch (list->res_type & ResAccMask) { - case ResExclusive: - if (list->res_type & ResUnused) - s = "x"; - else - s = "X"; - break; - case ResShared: - if (list->res_type & ResUnused) - s = "s"; - else - s = "S"; - break; - default: - s = "?"; - } - xf86ErrorFVerb(verb, "%s", s); - switch (list->res_type & ResExtMask) { - case ResBlock: - s = "[B]"; - break; - case ResSparse: - s = "[S]"; - break; - default: - s = "[?]"; - } - xf86ErrorFVerb(verb, "%s", s); - if (list->res_type & ResInit) - xf86ErrorFVerb(verb, "t"); - if (list->res_type & ResBios) - xf86ErrorFVerb(verb, "(B)"); - if (list->res_type & ResBus) - xf86ErrorFVerb(verb, "(b)"); - if (list->res_type & ResOprMask) { - switch (list->res_type & ResOprMask) { - case ResUnusedOpr: - s = "(OprU)"; - break; - case ResDisableOpr: - s = "(OprD)"; - break; - default: - s = "(Opr?)"; - break; - } - xf86ErrorFVerb(verb, "%s", s); - } - xf86ErrorFVerb(verb, "\n"); - i++; - } - list = list->next; - } - if (type == ResIo) break; - type = ResIo; - r = "I"; - list = tmp; - } -} - -resPtr -xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex) -{ - while(pRange && pRange->type != ResEnd) { - list = xf86AddResToList(list,pRange,entityIndex); - pRange++; - } - return list; -} - -void -xf86ResourceBrokerInit(void) -{ - Acc = NULL; - - /* Get the ranges used exclusively by the system */ - Acc = xf86AccResFromOS(Acc); - xf86MsgVerb(X_INFO, 3, "System resource ranges:\n"); - xf86PrintResList(3, Acc); -} - -/* - * Resource registration - */ - -static void -convertRange2Host(int entityIndex, resRange *pRange) -{ - if (pRange->type & ResBus) { - switch (xf86Entities[entityIndex]->busType) { - case BUS_PCI: - pciConvertRange2Host(entityIndex,pRange); - break; - default: - break; - } - - pRange->type &= ~ResBus; - } -} - -static void -xf86ConvertListToHost(int entityIndex, resPtr list) -{ - while (list) { - convertRange2Host(entityIndex, &list->val); - list = list->next; - } -} - -/* - * xf86RegisterResources() -- attempts to register listed resources. - * Returns a resPtr listing all resources not successfully registered, by - * which we mean, NULL. - */ - -_X_EXPORT resPtr -xf86RegisterResources(int entityIndex, resList list, unsigned long access) -{ - resRange range; - resList list_f = NULL; - - if (!list) - return NULL; - - while(list->type != ResEnd) { - range = *list; - - convertRange2Host(entityIndex,&range); - - if ((access != ResNone) && (access & ResAccMask)) { - range.type = (range.type & ~ResAccMask) | (access & ResAccMask); - } - range.type &= ~ResEstimated; /* Not allowed for drivers */ - Acc = xf86AddResToList(Acc,&range,entityIndex); - list++; - } - if (list_f) - xfree(list_f); - -#ifdef DEBUG - xf86MsgVerb(X_INFO, 3,"Resources after driver initialization\n"); - xf86PrintResList(3, Acc); -#endif - return NULL; - -} - -static void -busTypeSpecific(EntityPtr pEnt, xf86AccessPtr *acc_mem, - xf86AccessPtr *acc_io, xf86AccessPtr *acc_mem_io) -{ - switch (pEnt->bus.type) { - case BUS_SBUS: - *acc_mem = *acc_io = *acc_mem_io = &AccessNULL; - break; - case BUS_PCI: { - struct pci_device *const dev = pEnt->bus.id.pci; - - if ((dev != NULL) && ((void *)dev->user_data != NULL)) { - pciAccPtr const paccp = (pciAccPtr) dev->user_data; - - *acc_io = & paccp->ioAccess; - *acc_mem = & paccp->memAccess; - *acc_mem_io = & paccp->io_memAccess; - } - else { - /* FIXME: This is an error path. We should probably have an - * FIXME: assertion here or something. - */ - *acc_io = NULL; - *acc_mem = NULL; - *acc_mem_io = NULL; - } - break; - } - default: - *acc_mem = *acc_io = *acc_mem_io = NULL; - break; - } - return; -} - -static void -setAccess(EntityPtr pEnt, xf86State state) -{ - - xf86AccessPtr acc_mem, acc_io, acc_mem_io; - xf86AccessPtr org_mem = NULL, org_io = NULL, org_mem_io = NULL; - int prop; - - busTypeSpecific(pEnt, &acc_mem, &acc_io, &acc_mem_io); - - /* The replacement function needs to handle _all_ shared resources */ - /* unless they are handeled locally and disabled otherwise */ - if (pEnt->rac) { - if (pEnt->rac->io_new) { - org_io = acc_io; - acc_io = pEnt->rac->io_new; - } - if (pEnt->rac->mem_new) { - org_mem = acc_mem; - acc_mem = pEnt->rac->mem_new; - } - if (pEnt->rac->io_mem_new) { - org_mem_io = acc_mem_io; - acc_mem_io = pEnt->rac->io_mem_new; - } - } - - if (state == OPERATING) { - prop = pEnt->entityProp; - switch(pEnt->entityProp & NEED_SHARED) { - case NEED_SHARED: - pEnt->access->rt = MEM_IO; - break; - case NEED_IO_SHARED: - pEnt->access->rt = IO; - break; - case NEED_MEM_SHARED: - pEnt->access->rt = MEM; - break; - default: - pEnt->access->rt = NONE; - } - } else { - prop = NEED_SHARED | NEED_MEM | NEED_IO; - pEnt->access->rt = MEM_IO; - } - - switch(pEnt->access->rt) { - case IO: - pEnt->access->pAccess = acc_io; - break; - case MEM: - pEnt->access->pAccess = acc_mem; - break; - case MEM_IO: - pEnt->access->pAccess = acc_mem_io; - break; - default: /* no conflicts at all */ - pEnt->access->pAccess = NULL; /* remove from RAC */ - break; - } - - if (org_io) { - /* does the driver want the old access func? */ - if (pEnt->rac->old) { - /* give it to the driver, leave state disabled */ - pEnt->rac->old->io = org_io; - } else { - /* driver doesn't want it - enable generic access */ - org_io->AccessEnable(org_io->arg); - } - } - - if (org_mem_io) { - /* does the driver want the old access func? */ - if (pEnt->rac->old) { - /* give it to the driver, leave state disabled */ - pEnt->rac->old->io_mem = org_mem_io; - } else { - /* driver doesn't want it - enable generic access */ - org_mem_io->AccessEnable(org_mem_io->arg); - } - } - - if (org_mem) { - /* does the driver want the old access func? */ - if (pEnt->rac->old) { - /* give it to the driver, leave state disabled */ - pEnt->rac->old->mem = org_mem; - } else { - /* driver doesn't want it - enable generic access */ - org_mem->AccessEnable(org_mem->arg); - } - } - - if (!(prop & NEED_MEM_SHARED)){ - if (prop & NEED_MEM) { - if (acc_mem) - acc_mem->AccessEnable(acc_mem->arg); - } else { - if (acc_mem) - acc_mem->AccessDisable(acc_mem->arg); - } - } - - if (!(prop & NEED_IO_SHARED)) { - if (prop & NEED_IO) { - if (acc_io) - acc_io->AccessEnable(acc_io->arg); - } else { - if (acc_io) - acc_io->AccessDisable(acc_io->arg); - } - } - - /* disable shared resources */ - if (pEnt->access->pAccess) - pEnt->access->pAccess->AccessDisable(pEnt->access->pAccess->arg); - - /* - * If device is not under access control it is enabled. - * If it needs bus routing do it here as it isn't bus - * type specific. Any conflicts should be checked at this - * stage - */ - if (!pEnt->access->pAccess - && (pEnt->entityProp & (state == SETUP ? NEED_VGA_ROUTED_SETUP : - NEED_VGA_ROUTED))) - ((BusAccPtr)pEnt->busAcc)->set_f(pEnt->busAcc); -} - - -/* - * xf86EnterServerState() -- set state the server is in. - */ - -typedef enum { TRI_UNSET, TRI_TRUE, TRI_FALSE } TriState; - -static void -SetSIGIOForState(xf86State state) -{ - static int sigio_state; - static TriState sigio_blocked = TRI_UNSET; - - if ((state == SETUP) && (sigio_blocked != TRI_TRUE)) { - sigio_state = xf86BlockSIGIO(); - sigio_blocked = TRI_TRUE; - } else if ((state == OPERATING) && (sigio_blocked != TRI_UNSET)) { - xf86UnblockSIGIO(sigio_state); - sigio_blocked = TRI_FALSE; - } -} - -void -xf86EnterServerState(xf86State state) -{ - EntityPtr pEnt; - ScrnInfoPtr pScrn; - int i,j; - int needVGA = 0; - resType rt; - /* - * This is a good place to block SIGIO during SETUP state. - * SIGIO should be blocked in SETUP state otherwise (u)sleep() - * might get interrupted early. - * We take care not to call xf86BlockSIGIO() twice. - */ - SetSIGIOForState(state); -#ifdef DEBUG - if (state == SETUP) - ErrorF("Entering SETUP state\n"); - else - ErrorF("Entering OPERATING state\n"); -#endif - - /* When servicing a dumb framebuffer we don't need to do anything */ - if (doFramebufferMode) return; - - for (i=0; ientityList[pScrn->numEntities - 1]; - pScrn->access = xf86Entities[j]->access; - - for (j = 0; jnumEntities; j++) { - pEnt = xf86Entities[xf86Screens[i]->entityList[j]]; - if (pEnt->entityProp & (state == SETUP ? NEED_VGA_ROUTED_SETUP - : NEED_VGA_ROUTED)) - xf86Screens[i]->busAccess = pEnt->busAcc; - } - if (xf86Screens[i]->busAccess) - needVGA ++; - } - - /* - * if we just have one screen we don't have RAC. - * Therefore just enable the screen and return. - */ - if (!needRAC) { - xf86EnableAccess(xf86Screens[0]); - notifyStateChange(NOTIFY_ENABLE); - return; - } - - if (state == SETUP) - notifyStateChange(NOTIFY_SETUP_TRANSITION); - else - notifyStateChange(NOTIFY_OPERATING_TRANSITION); - - clearAccess(); - for (i=0; inumEntities; j++) { - pEnt = xf86Entities[xf86Screens[i]->entityList[j]]; - setAccess(pEnt,state); - - if (pEnt->access->rt != NONE) { - if (rt != NONE && rt != pEnt->access->rt) - rt = MEM_IO; - else - rt = pEnt->access->rt; - } - } - xf86Screens[i]->resourceType = rt; - if (rt == NONE) { - xf86Screens[i]->access = NULL; - if (needVGA < 2) - xf86Screens[i]->busAccess = NULL; - } - -#ifdef DEBUG - if (xf86Screens[i]->busAccess) - ErrorF("Screen %i setting vga route\n",i); -#endif - switch (rt) { - case MEM_IO: - xf86MsgVerb(X_INFO, 3, "Screen %i shares mem & io resources\n",i); - break; - case IO: - xf86MsgVerb(X_INFO, 3, "Screen %i shares io resources\n",i); - break; - case MEM: - xf86MsgVerb(X_INFO, 3, "Screen %i shares mem resources\n",i); - break; - default: - xf86MsgVerb(X_INFO, 3, "Entity %i shares no resources\n",i); - break; - } - } - if (state == SETUP) - notifyStateChange(NOTIFY_SETUP); - else - notifyStateChange(NOTIFY_OPERATING); -} - -/* - * xf86SetOperatingState() -- Set ResOperMask for resources listed. - */ -_X_EXPORT resPtr -xf86SetOperatingState(resList list, int entityIndex, int mask) -{ - resPtr acc; - resPtr r_fail = NULL; - resRange range; - - while (list->type != ResEnd) { - range = *list; - convertRange2Host(entityIndex,&range); - - acc = Acc; - while (acc) { -#define MASK (ResTypeMask | ResExtMask) - if ((acc->entityIndex == entityIndex) - && (acc->val.a == range.a) && (acc->val.b == range.b) - && ((acc->val.type & MASK) == (range.type & MASK))) - break; -#undef MASK - acc = acc->next; - } - if (acc) - acc->val.type = (acc->val.type & ~ResOprMask) - | (mask & ResOprMask); - else { - r_fail = xf86AddResToList(r_fail,&range,entityIndex); - } - list ++; - } - - return r_fail; -} - -/* - * Stage specific code - */ - -/* - * xf86ClaimFixedResources() is used to allocate non-relocatable resources. - * This should only be done by a driver's Probe() function. - */ -_X_EXPORT void -xf86ClaimFixedResources(resList list, int entityIndex) -{ - resPtr ptr = NULL; - resRange range; - - if (!list) return; - - while (list->type !=ResEnd) { - range = *list; - - convertRange2Host(entityIndex,&range); - - range.type &= ~ResEstimated; /* Not allowed for drivers */ - switch (range.type & ResAccMask) { - case ResExclusive: - if (!xf86ChkConflict(&range, entityIndex)) { - Acc = xf86AddResToList(Acc, &range, entityIndex); - } else FatalError("xf86ClaimFixedResources conflict\n"); - break; - case ResShared: - /* at this stage the resources are just added to the - * EntityRec. After the Probe() phase this list is checked by - * xf86PostProbe(). All resources which don't - * conflict with already allocated ones are allocated - * and removed from the EntityRec. Thus a non-empty resource - * list in the EntityRec indicates resource conflicts the - * driver should either handle or fail. - */ - if (xf86Entities[entityIndex]->active) - ptr = xf86AddResToList(ptr,&range,entityIndex); - break; - } - list++; - } - xf86Entities[entityIndex]->resources = - xf86JoinResLists(xf86Entities[entityIndex]->resources,ptr); - xf86MsgVerb(X_INFO, 3, - "resource ranges after xf86ClaimFixedResources() call:\n"); - xf86PrintResList(3,Acc); -#ifdef DEBUG - if (ptr) { - xf86MsgVerb(X_INFO, 3, "to be registered later:\n"); - xf86PrintResList(3,ptr); - } -#endif -} - -static void -checkRoutingForScreens(xf86State state) -{ - resList list = resVgaUnusedExclusive; - resPtr pResVGA = NULL; - resPtr pResVGAHost; - pointer vga = NULL; - int i,j; - int entityIndex; - EntityPtr pEnt; - resPtr pAcc; - resRange range; - - /* - * find devices that need VGA routed: ie the ones that have - * registered VGA resources without ResUnused. ResUnused - * doesn't conflict with itself therefore use it here. - */ - while (list->type != ResEnd) { /* create resPtr from resList for VGA */ - range = *list; - range.type &= ~(ResBios | ResEstimated); /* if set remove them */ - pResVGA = xf86AddResToList(pResVGA, &range, -1); - list++; - } - - for (i = 0; i < xf86NumScreens; i++) { - for (j = 0; j < xf86Screens[i]->numEntities; j++) { - entityIndex = xf86Screens[i]->entityList[j]; - pEnt = xf86Entities[entityIndex]; - pAcc = Acc; - vga = NULL; - pResVGAHost = xf86DupResList(pResVGA); - xf86ConvertListToHost(entityIndex,pResVGAHost); - while (pAcc) { - if (pAcc->entityIndex == entityIndex) - if (checkConflict(&pAcc->val, pResVGAHost, - entityIndex, state, FALSE)) { - if (vga && vga != pEnt->busAcc) { - xf86Msg(X_ERROR, "Screen %i needs vga routed to" - "different buses - deleting\n",i); - xf86DeleteScreen(i--,0); - } -#ifdef DEBUG - { - resPtr rlist = xf86AddResToList(NULL,&pAcc->val, - pAcc->entityIndex); - xf86MsgVerb(X_INFO,3,"====== %s\n", - state == OPERATING ? "OPERATING" - : "SETUP"); - xf86MsgVerb(X_INFO,3,"%s Resource:\n", - (pAcc->val.type) & ResMem ? "Mem" :"Io"); - xf86PrintResList(3,rlist); - xf86FreeResList(rlist); - xf86MsgVerb(X_INFO,3,"Conflicts with:\n"); - xf86PrintResList(3,pResVGAHost); - xf86MsgVerb(X_INFO,3,"=====\n"); - } -#endif - vga = pEnt->busAcc; - pEnt->entityProp |= (state == SETUP - ? NEED_VGA_ROUTED_SETUP : NEED_VGA_ROUTED); - if (state == OPERATING) { - if (pAcc->val.type & ResMem) - pEnt->entityProp |= NEED_VGA_MEM; - else - pEnt->entityProp |= NEED_VGA_IO; - } - } - pAcc = pAcc->next; - } - if (vga) - xf86MsgVerb(X_INFO, 3,"Setting vga for screen %i.\n",i); - xf86FreeResList(pResVGAHost); - } - } - xf86FreeResList(pResVGA); -} - -/* - * xf86PostProbe() -- Allocate all non conflicting resources - * This function gets called by xf86Init(). - */ -void -xf86PostProbe(void) -{ - memType val; - int i,j; - resPtr resp, acc, tmp, resp_x; - - if (fbSlotClaimed) { - if (pciSlotClaimed -#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) - || sbusSlotClaimed -#endif - ) { - FatalError("Cannot run in framebuffer mode. Please specify busIDs " - " for all framebuffer devices\n"); - return; - } else { - xf86Msg(X_INFO,"Running in FRAMEBUFFER Mode\n"); - xf86AccessRestoreState(); - notifyStateChange(NOTIFY_ENABLE); - doFramebufferMode = TRUE; - - return; - } - } - acc = tmp = xf86DupResList(Acc); - - for (i=0; iresources; - xf86Entities[i]->resources = NULL; - resp_x = NULL; - while (resp) { - if (! (val = checkConflict(&resp->val,acc,i,SETUP,FALSE))) { - resp->res_type &= ~(ResBios); /* just used for chkConflict() */ - tmp = resp_x; - resp_x = resp; - resp = resp->next; - resp_x->next = tmp; - } else { - xf86MsgVerb(X_INFO, 3, "Found conflict at: 0x%lx\n", - (long)val); - resp->res_type &= ~ResEstimated; - tmp = xf86Entities[i]->resources; - xf86Entities[i]->resources = resp; - resp = resp->next; - xf86Entities[i]->resources->next = tmp; - } - } - xf86JoinResLists(Acc,resp_x); - } - xf86FreeResList(acc); - - xf86MsgVerb(X_INFO, 3, "resource ranges after probing:\n"); - xf86PrintResList(3, Acc); - checkRoutingForScreens(SETUP); - - for (i = 0; i < xf86NumScreens; i++) { - for (j = 0; jnumEntities; j++) { - EntityPtr pEnt = xf86Entities[xf86Screens[i]->entityList[j]]; - if ((pEnt->entityProp & NEED_VGA_ROUTED_SETUP) && - ((xf86Screens[i]->busAccess = pEnt->busAcc))) - break; - } - } -} - -static void -checkRequiredResources(int entityIndex) -{ - resRange range; - resPtr pAcc = Acc; - const EntityPtr pEnt = xf86Entities[entityIndex]; - while (pAcc) { - if (pAcc->entityIndex == entityIndex) { - range = pAcc->val; - /* ResAny to find conflicts with anything. */ - range.type = (range.type & ~ResAccMask) | ResAny | ResBios; - if (checkConflict(&range,Acc,entityIndex,OPERATING,FALSE)) - switch (pAcc->res_type & ResPhysMask) { - case ResMem: - pEnt->entityProp |= NEED_MEM_SHARED; - break; - case ResIo: - pEnt->entityProp |= NEED_IO_SHARED; - break; - } - if (!(pAcc->res_type & ResOprMask)) { - switch (pAcc->res_type & ResPhysMask) { - case ResMem: - pEnt->entityProp |= NEED_MEM; - break; - case ResIo: - pEnt->entityProp |= NEED_IO; - break; - } - } - } - pAcc = pAcc->next; - } - - /* - * After we have checked all resources of an entity agains any - * other resource we know if the entity need this resource type - * (ie. mem/io) at all. if not we can disable this type completely, - * so no need to share it either. - */ - if ((pEnt->entityProp & NEED_MEM_SHARED) - && (!(pEnt->entityProp & NEED_MEM))) - pEnt->entityProp &= ~(unsigned long)NEED_MEM_SHARED; - - if ((pEnt->entityProp & NEED_IO_SHARED) - && (!(pEnt->entityProp & NEED_IO))) - pEnt->entityProp &= ~(unsigned long)NEED_IO_SHARED; + return FALSE; } void -xf86PostPreInit() -{ - if (doFramebufferMode) return; - - if (xf86NumScreens > 1) - needRAC = TRUE; - - xf86MsgVerb(X_INFO, 3, "do I need RAC?"); - - if (needRAC) { - xf86ErrorFVerb(3, " Yes, I do.\n"); - } else { - xf86ErrorFVerb(3, " No, I don't.\n"); - } - - xf86MsgVerb(X_INFO, 3, "resource ranges after preInit:\n"); - xf86PrintResList(3, Acc); -} - -void -xf86PostScreenInit(void) -{ - int i,j; - ScreenPtr pScreen; - unsigned int flags; - int nummem = 0, numio = 0; - - if (doFramebufferMode) { - SetSIGIOForState(OPERATING); - return; - } - -#ifdef DEBUG - ErrorF("PostScreenInit generation: %i\n",serverGeneration); -#endif - if (serverGeneration == 1) { - checkRoutingForScreens(OPERATING); - for (i=0; ientityProp & NEED_MEM_SHARED) - nummem++; - if (xf86Entities[i]->entityProp & NEED_IO_SHARED) - numio++; - } - for (i = 0; i < xf86NumEntities; i++) { - if (nummem < 2) - xf86Entities[i]->entityProp &= ~NEED_MEM_SHARED; - if (numio < 2) - xf86Entities[i]->entityProp &= ~NEED_IO_SHARED; - } - } - - if (xf86Screens && needRAC) { - int needRACforVga = 0; - - for (i = 0; i < xf86NumScreens; i++) { - for (j = 0; j < xf86Screens[i]->numEntities; j++) { - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_VGA_ROUTED) { - needRACforVga ++; - break; /* only count each screen once */ - } - } - } - - for (i = 0; i < xf86NumScreens; i++) { - Bool needRACforMem = FALSE, needRACforIo = FALSE; - - for (j = 0; j < xf86Screens[i]->numEntities; j++) { - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_MEM_SHARED) - needRACforMem = TRUE; - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_IO_SHARED) - needRACforIo = TRUE; - /* - * We may need RAC although we don't share any resources - * as we need to route VGA to the correct bus. This can - * only be done simultaniously for MEM and IO. - */ - if (needRACforVga > 1) { - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_VGA_MEM) - needRACforMem = TRUE; - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_VGA_IO) - needRACforIo = TRUE; - } - } - - pScreen = xf86Screens[i]->pScreen; - flags = 0; - if (needRACforMem) { - flags |= xf86Screens[i]->racMemFlags; - xf86ErrorFVerb(3, "Screen %d is using RAC for mem\n", i); - } - if (needRACforIo) { - flags |= xf86Screens[i]->racIoFlags; - xf86ErrorFVerb(3, "Screen %d is using RAC for io\n", i); - } - - xf86RACInit(pScreen,flags); - } - } - - xf86EnterServerState(OPERATING); - -} - -/* - * Sets - */ - - -static resPtr -decomposeSparse(resRange range) -{ - resRange new; - resPtr ret = NULL; - memType val = range.rBegin; - int i = 0; - - new.type = (range.type & ~ResExtMask) | ResSparse; - - while (1) { - if (val & 0x01) { - new.rBase = (val << i); - new.rMask = ~((1 << i) - 1); - ret = xf86AddResToList(ret,&new,-1); - val ++; - } - i++; - val >>= 1; - if ((((val + 1) << i) - 1) > range.rEnd) - break; - } - i--; - val <<= 1; - - while (1) { - if((((val + 1) << i) - 1)> range.rEnd) { - if (--i < 0) break; - val <<= 1; - } else { - new.rBase = (val << i); - new.rMask = ~((1 << i) - 1); - val++; - ret = xf86AddResToList(ret,&new,-1); - } - } - return ret; -} - -static Bool -x_isSubsetOf(resRange range, resPtr list1, resPtr list2) -{ - resRange range1, range2; - memType m1_A_m2; - Bool ret; - resPtr list; - - if (list1) { - list = list1; - if ((range.type & ResTypeMask) == (list->res_type & ResTypeMask)) { - switch (range.type & ResExtMask) { - case ResBlock: - if ((list->res_type & ResExtMask) == ResBlock) { - if (range.rBegin >= list->block_begin - && range.rEnd <= list->block_end) - return TRUE; - else if (range.rBegin < list->block_begin - && range.rEnd > list->block_end) { - RANGE(range1, range.rBegin, list->block_begin - 1, - range.type); - RANGE(range2, list->block_end + 1, range.rEnd, - range.type); - return (x_isSubsetOf(range1,list->next,list2) && - x_isSubsetOf(range2,list->next,list2)); - } - else if (range.rBegin >= list->block_begin - && range.rBegin <= list->block_end) { - RANGE(range1, list->block_end + 1, range.rEnd, - range.type); - return (x_isSubsetOf(range1,list->next,list2)); - } else if (range.rEnd >= list->block_begin - && range.rEnd <= list->block_end) { - RANGE(range1,range.rBegin, list->block_begin - 1, - range.type); - return (x_isSubsetOf(range1,list->next,list2)); - } - } - break; - case ResSparse: - if ((list->res_type & ResExtMask) == ResSparse) { - memType test; - int i; - - m1_A_m2 = range.rMask & list->sparse_mask; - if ((range.rBase ^ list->sparse_base) & m1_A_m2) - break; - /* - * We use the following system: - * let 0 ^= mask:1 base:0, 1 ^= mask:1 base:1, - * X mask:0 ; S: set TSS: test set for subset - * NTSS: new test set after test - * S: 1 0 1 0 X X 0 1 X - * TSS: 1 0 0 1 1 0 X X X - * T: 0 0 1 1 0 0 0 0 0 - * NTSS: 1 0 0/X 1/X 1 0 1 0 X - * R: 0 0 0 0 0 0 1 1 0 - * If R != 0 TSS and S are disjunct - * If R == 0 TSS is subset of S - * If R != 0 NTSS contains elements from TSS - * which are not also members of S. - * If a T is set one of the correspondig bits - * in NTSS must be set to the specified value - * all other are X - */ - test = list->sparse_mask & ~range.rMask; - if (test == 0) - return TRUE; - for (i = 0; i < sizeof(memType); i++) { - if ((test >> i) & 0x1) { - RANGE(range1, ((range.rBase & list->sparse_base) - | (range.rBase & ~list->sparse_mask) - | ((~list->sparse_base & list->sparse_mask) - & ~range.rMask)) & range1.rMask, - ((range.rMask | list->sparse_mask) & ~test) - | (1 << i), range.type); - return (x_isSubsetOf(range1,list->next,list2)); - } - } - } - break; - } - } - return (x_isSubsetOf(range,list->next,list2)); - } else if (list2) { - resPtr tmpList = NULL; - switch (range.type & ResExtMask) { - case ResBlock: - tmpList = decomposeSparse(range); - while (tmpList) { - if (!x_isSubsetOf(tmpList->val,list2,NULL)) { - xf86FreeResList(tmpList); - return FALSE; - } - tmpList = tmpList->next; - } - xf86FreeResList(tmpList); - return TRUE; - break; - case ResSparse: - while (list2) { - tmpList = xf86JoinResLists(tmpList,decomposeSparse(list2->val)); - list2 = list2->next; - } - ret = x_isSubsetOf(range,tmpList,NULL); - xf86FreeResList(tmpList); - return ret; - break; - } - } else - return FALSE; - - return FALSE; -} - -Bool -xf86IsSubsetOf(resRange range, resPtr list) -{ - resPtr dup = xf86DupResList(list); - resPtr r_sp = NULL, r = NULL, tmp = NULL; - Bool ret = FALSE; - - while (dup) { - tmp = dup; - dup = dup->next; - switch (tmp->res_type & ResExtMask) { - case ResBlock: - tmp->next = r; - r = tmp; - break; - case ResSparse: - tmp->next = r_sp; - r_sp = tmp; - break; - } - } - - switch (range.type & ResExtMask) { - case ResBlock: - ret = x_isSubsetOf(range,r,r_sp); - break; - case ResSparse: - ret = x_isSubsetOf(range,r_sp,r); - break; - } - xf86FreeResList(r); - xf86FreeResList(r_sp); - - return ret; -} - -static resPtr -findIntersect(resRange Range, resPtr list) -{ - resRange range; - resPtr new = NULL; - - while (list) { - if ((Range.type & ResTypeMask) == (list->res_type & ResTypeMask)) { - switch (Range.type & ResExtMask) { - case ResBlock: - switch (list->res_type & ResExtMask) { - case ResBlock: - if (Range.rBegin >= list->block_begin) - range.rBegin = Range.rBegin; - else - range.rBegin = list->block_begin; - if (Range.rEnd <= list->block_end) - range.rEnd = Range.rEnd; - else - range.rEnd = list->block_end; - if (range.rEnd > range.rBegin) { - range.type = Range.type; - new = xf86AddResToList(new,&range,-1); - } - break; - case ResSparse: - new = xf86JoinResLists(new,xf86FindIntersectOfLists(new,decomposeSparse(list->val))); - break; - } - break; - case ResSparse: - switch (list->res_type & ResExtMask) { - case ResSparse: - if (!((~(range.rBase ^ list->sparse_base) - & (range.rMask & list->sparse_mask)))) { - RANGE(range, (range.rBase & list->sparse_base) - | (~range.rMask & list->sparse_base) - | (~list->sparse_mask & range.rBase), - range.rMask | list->sparse_mask, - Range.type); - new = xf86AddResToList(new,&range,-1); - } - break; - case ResBlock: - new = xf86JoinResLists(new,xf86FindIntersectOfLists( - decomposeSparse(range),list)); - break; - } - } - } - list = list->next; - } - return new; -} - -resPtr -xf86FindIntersectOfLists(resPtr l1, resPtr l2) -{ - resPtr ret = NULL; - - while (l1) { - ret = xf86JoinResLists(ret,findIntersect(l1->val,l2)); - l1 = l1->next; - } - return ret; -} - -#if 0 /* Not used */ -static resPtr -xf86FindComplement(resRange Range) -{ - resRange range; - memType tmp; - resPtr new = NULL; - int i; - - switch (Range.type & ResExtMask) { - case ResBlock: - if (Range.rBegin > 0) { - RANGE(range, 0, Range.rBegin - 1, Range.type); - new = xf86AddResToList(new,&range,-1); - } - if (Range.rEnd < (memType)~0) { - RANGE(range,Range.rEnd + 1, (memType)~0, Range.type); - new = xf86AddResToList(new,&range,-1); - } - break; - case ResSparse: - tmp = Range.rMask; - for (i = 0; i < sizeof(memType); i++) { - if (tmp & 0x1) { - RANGE(range,(~Range.rMask & range.rMask),(1 << i), Range.type); - new = xf86AddResToList(new,&range,-1); - } - } - break; - default: - break; - } - return new; -} -#endif - -resPtr -xf86ExtractTypeFromList(resPtr list, unsigned long type) -{ - resPtr ret = NULL; - - while (list) { - if ((list->res_type & ResTypeMask) == type) - ret = xf86AddResToList(ret,&(list->val),list->entityIndex); - list = list->next; - } - return ret; -} - -/* - * xf86FindPrimaryDevice() - Find the display device which - * was active when the server was started. - */ -void -xf86FindPrimaryDevice() -{ - if (primaryBus.type != BUS_NONE) { - char *bus; - char loc[16]; - - switch (primaryBus.type) { - case BUS_PCI: - bus = "PCI"; - snprintf(loc, sizeof(loc), " %2.2x@%2.2x:%2.2x:%1.1x", - primaryBus.id.pci->bus, - primaryBus.id.pci->domain, - primaryBus.id.pci->dev, - primaryBus.id.pci->func); - break; - case BUS_SBUS: - bus = "SBUS"; - snprintf(loc, sizeof(loc), " %2.2x", primaryBus.id.sbus.fbNum); - break; - default: - bus = ""; - loc[0] = '\0'; - } - - xf86MsgVerb(X_INFO, 2, "Primary Device is: %s%s\n",bus,loc); - } -} - -Bool -xf86NoSharedResources(int screenIndex,resType res) -{ - int j; - - if (screenIndex > xf86NumScreens) - return TRUE; - - for (j = 0; j < xf86Screens[screenIndex]->numEntities; j++) { - switch (res) { - case IO: - if ( xf86Entities[xf86Screens[screenIndex]->entityList[j]]->entityProp - & NEED_IO_SHARED) - return FALSE; - break; - case MEM: - if ( xf86Entities[xf86Screens[screenIndex]->entityList[j]]->entityProp - & NEED_MEM_SHARED) - return FALSE; - break; - case MEM_IO: - if ( xf86Entities[xf86Screens[screenIndex]->entityList[j]]->entityProp - & NEED_SHARED) - return FALSE; - break; - case NONE: - break; - } - } - return TRUE; -} - -_X_EXPORT void -xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg) -{ - StateChangeNotificationPtr ptr = - (StateChangeNotificationPtr)xnfalloc(sizeof(StateChangeNotificationRec)); - - ptr->func = func; - ptr->arg = arg; - ptr->next = StateChangeNotificationList; - StateChangeNotificationList = ptr; -} - -_X_EXPORT Bool -xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func) -{ - StateChangeNotificationPtr *ptr = &StateChangeNotificationList; - StateChangeNotificationPtr tmp; - - while (*ptr) { - if ((*ptr)->func == func) { - tmp = (*ptr); - (*ptr) = (*ptr)->next; - xfree(tmp); - return TRUE; - } - ptr = &((*ptr)->next); - } - return FALSE; -} - -static void -notifyStateChange(xf86NotifyState state) -{ - StateChangeNotificationPtr ptr = StateChangeNotificationList; - while (ptr) { - ptr->func(state,ptr->arg); - ptr = ptr->next; - } -} - -/* Multihead accel sharing accessor functions and entity Private handling */ - -_X_EXPORT int -xf86GetLastScrnFlag(int entityIndex) -{ - if(entityIndex < xf86NumEntities) { - return(xf86Entities[entityIndex]->lastScrnFlag); - } else { - return -1; - } -} - -_X_EXPORT void -xf86SetLastScrnFlag(int entityIndex, int scrnIndex) -{ - if(entityIndex < xf86NumEntities) { - xf86Entities[entityIndex]->lastScrnFlag = scrnIndex; - } -} - -_X_EXPORT Bool -xf86IsEntityShared(int entityIndex) -{ - if(entityIndex < xf86NumEntities) { - if(xf86Entities[entityIndex]->entityProp & IS_SHARED_ACCEL) { - return TRUE; - } - } - return FALSE; -} - -_X_EXPORT void xf86SetEntityShared(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2509,7 +617,7 @@ xf86SetEntityShared(int entityIndex) } } -_X_EXPORT Bool +Bool xf86IsEntitySharable(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2520,7 +628,7 @@ xf86IsEntitySharable(int entityIndex) return FALSE; } -_X_EXPORT void +void xf86SetEntitySharable(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2528,7 +636,7 @@ xf86SetEntitySharable(int entityIndex) } } -_X_EXPORT Bool +Bool xf86IsPrimInitDone(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2539,7 +647,7 @@ xf86IsPrimInitDone(int entityIndex) return FALSE; } -_X_EXPORT void +void xf86SetPrimInitDone(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2547,7 +655,7 @@ xf86SetPrimInitDone(int entityIndex) } } -_X_EXPORT void +void xf86ClearPrimInitDone(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2560,7 +668,7 @@ xf86ClearPrimInitDone(int entityIndex) * Allocate a private in the entities. */ -_X_EXPORT int +int xf86AllocateEntityPrivateIndex(void) { int idx, i; @@ -2579,7 +687,7 @@ xf86AllocateEntityPrivateIndex(void) return idx; } -_X_EXPORT DevUnion * +DevUnion * xf86GetEntityPrivate(int entityIndex, int privIndex) { if (entityIndex >= xf86NumEntities || privIndex >= xf86EntityPrivateCount) diff --git a/xorg-server/hw/xfree86/common/xf86Bus.h b/xorg-server/hw/xfree86/common/xf86Bus.h index c2d5bb7d4..b22e2e772 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.h +++ b/xorg-server/hw/xfree86/common/xf86Bus.h @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * @@ -44,14 +43,6 @@ #include "xf86sbusBus.h" #endif -typedef struct racInfo { - xf86AccessPtr mem_new; - xf86AccessPtr io_new; - xf86AccessPtr io_mem_new; - xf86SetAccessFuncPtr old; -} AccessFuncRec, *AccessFuncPtr; - - typedef struct { DriverPtr driver; int chipset; @@ -60,12 +51,9 @@ typedef struct { EntityProc entityEnter; EntityProc entityLeave; pointer private; - resPtr resources; Bool active; Bool inUse; BusRec bus; - EntityAccessPtr access; - AccessFuncPtr rac; pointer busAcc; int lastScrnFlag; DevUnion * entityPrivates; @@ -74,71 +62,15 @@ typedef struct { IOADDRESS domainIO; } EntityRec, *EntityPtr; -#define NO_SEPARATE_IO_FROM_MEM 0x0001 -#define NO_SEPARATE_MEM_FROM_IO 0x0002 -#define NEED_VGA_ROUTED 0x0004 -#define NEED_VGA_ROUTED_SETUP 0x0008 -#define NEED_MEM 0x0010 -#define NEED_IO 0x0020 -#define NEED_MEM_SHARED 0x0040 -#define NEED_IO_SHARED 0x0080 -#define ACCEL_IS_SHARABLE 0x0100 -#define IS_SHARED_ACCEL 0x0200 -#define SA_PRIM_INIT_DONE 0x0400 -#define NEED_VGA_MEM 0x1000 -#define NEED_VGA_IO 0x2000 - -#define NEED_SHARED (NEED_MEM_SHARED | NEED_IO_SHARED) - -#define busType bus.type -#define isaBusId bus.id.isa -#define sbusBusId bus.id.sbus - -struct x_BusAccRec; -typedef void (*BusAccProcPtr)(struct x_BusAccRec *ptr); - -typedef struct x_BusAccRec { - BusAccProcPtr set_f; - BusAccProcPtr enable_f; - BusAccProcPtr disable_f; - BusAccProcPtr save_f; - BusAccProcPtr restore_f; - struct x_BusAccRec *current; /* pointer to bridge open on this bus */ - struct x_BusAccRec *primary; /* pointer to the bus connecting to this */ - struct x_BusAccRec *next; /* this links the different buses together */ - BusType type; - BusType busdep_type; - /* Bus-specific fields */ - union { - struct { - int bus; - int primary_bus; - struct pci_device * dev; - pciBridgesSave save; - } pci; - } busdep; -} BusAccRec, *BusAccPtr; - -/* state change notification callback */ -typedef struct _stateChange { - xf86StateChangeNotificationCallbackFunc func; - pointer arg; - struct _stateChange *next; -} StateChangeNotificationRec, *StateChangeNotificationPtr; - +#define ACCEL_IS_SHARABLE 0x100 +#define IS_SHARED_ACCEL 0x200 +#define SA_PRIM_INIT_DONE 0x400 extern EntityPtr *xf86Entities; extern int xf86NumEntities; -extern xf86AccessRec AccessNULL; extern BusRec primaryBus; -extern resPtr Acc; -extern resPtr ResRange; -extern BusAccPtr xf86BusAccInfo; int xf86AllocateEntity(void); BusType StringToBusType(const char* busID, const char **retID); -Bool xf86IsSubsetOf(resRange range, resPtr list); -resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type); -resPtr xf86FindIntersect(resRange Range, resPtr list); #endif /* _XF86_BUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index 93761193e..e81eb0f63 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -65,11 +65,7 @@ #include "xf86Xinput.h" extern DeviceAssocRec mouse_assoc; -#ifdef XKB -#undef XKB_IN_SERVER -#define XKB_IN_SERVER -#include -#endif +#include "xkbsrv.h" #ifdef RENDER #include "picture.h" @@ -112,12 +108,18 @@ extern DeviceAssocRec mouse_assoc; static ModuleDefault ModuleDefaults[] = { {.name = "extmod", .toLoad = TRUE, .load_opt=NULL}, +#ifdef DBE {.name = "dbe", .toLoad = TRUE, .load_opt=NULL}, +#endif +#ifdef GLXEXT {.name = "glx", .toLoad = TRUE, .load_opt=NULL}, +#endif #ifdef XRECORD {.name = "record", .toLoad = TRUE, .load_opt=NULL}, #endif +#ifdef XF86DRI {.name = "dri", .toLoad = TRUE, .load_opt=NULL}, +#endif #ifdef DRI2 {.name = "dri2", .toLoad = TRUE, .load_opt=NULL}, #endif @@ -362,7 +364,7 @@ xf86ModulelistFromConfig(pointer **optlist) char ** -xf86DriverlistFromConfig() +xf86DriverlistFromConfig(void) { int count = 0; int j; @@ -434,7 +436,7 @@ xf86DriverlistFromConfig() } char ** -xf86InputDriverlistFromConfig() +xf86InputDriverlistFromConfig(void) { int count = 0; char **modulearray; @@ -629,9 +631,9 @@ configFiles(XF86ConfFilesPtr fileconf) } } /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ - temp_path = must_copy ? XNFstrdup(defaultFontPath) : defaultFontPath; + temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath; defaultFontPath = xf86ValidateFontPath(temp_path); - free(temp_path); + xfree(temp_path); /* make fontpath more readable in the logfiles */ countDirs = 1; @@ -657,14 +659,6 @@ configFiles(XF86ConfFilesPtr fileconf) strcpy(temp_path, start); xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf); xfree(log_buf); - - - if (fileconf && fileconf->file_inputdevs) { - xf86InputDeviceList = fileconf->file_inputdevs; - xf86Msg(X_CONFIG, "Input device list set to \"%s\"\n", - xf86InputDeviceList); - } - /* ModulePath */ @@ -709,11 +703,8 @@ typedef enum { FLAG_DONTZOOM, FLAG_DISABLEVIDMODE, FLAG_ALLOWNONLOCAL, - FLAG_DISABLEMODINDEV, - FLAG_MODINDEVALLOWNONLOCAL, FLAG_ALLOWMOUSEOPENFAIL, FLAG_VTSYSREQ, - FLAG_XKBDISABLE, FLAG_SAVER_BLANKTIME, FLAG_DPMS_STANDBYTIME, FLAG_DPMS_SUSPENDTIME, @@ -724,7 +715,6 @@ typedef enum { FLAG_XINERAMA, FLAG_LOG, FLAG_RENDER_COLORMAP_MODE, - FLAG_HANDLE_SPECIAL_KEYS, FLAG_RANDR, FLAG_AIGLX, FLAG_IGNORE_ABI, @@ -749,16 +739,10 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_ALLOWNONLOCAL, "AllowNonLocalXvidtune", OPTV_BOOLEAN, {0}, FALSE }, - { FLAG_DISABLEMODINDEV, "DisableModInDev", OPTV_BOOLEAN, - {0}, FALSE }, - { FLAG_MODINDEVALLOWNONLOCAL, "AllowNonLocalModInDev", OPTV_BOOLEAN, - {0}, FALSE }, { FLAG_ALLOWMOUSEOPENFAIL, "AllowMouseOpenFail", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_VTSYSREQ, "VTSysReq", OPTV_BOOLEAN, {0}, FALSE }, - { FLAG_XKBDISABLE, "XkbDisable", OPTV_BOOLEAN, - {0}, FALSE }, { FLAG_SAVER_BLANKTIME, "BlankTime" , OPTV_INTEGER, {0}, FALSE }, { FLAG_DPMS_STANDBYTIME, "StandbyTime", OPTV_INTEGER, @@ -779,8 +763,6 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_RENDER_COLORMAP_MODE, "RenderColormapMode", OPTV_STRING, {0}, FALSE }, - { FLAG_HANDLE_SPECIAL_KEYS, "HandleSpecialKeys", OPTV_STRING, - {0}, FALSE }, { FLAG_RANDR, "RandR", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_AIGLX, "AIGLX", OPTV_BOOLEAN, @@ -831,9 +813,13 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) Bool value; MessageType from; const char *s; -#ifdef XKB - char *rules = "base"; -#endif + XkbRMLVOSet set; + /* Default options. */ + set.rules = "base"; + set.model = "pc105"; + set.layout = "us"; + set.variant = NULL; + set.options = NULL; /* * Merge the ServerLayout and ServerFlags options. The former have @@ -909,16 +895,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) #endif } - if (xf86GetOptValBool(FlagOptions, FLAG_XKBDISABLE, &value)) { -#ifdef XKB - noXkbExtension = value; - xf86Msg(X_CONFIG, "Xkb %s\n", value ? "disabled" : "enabled"); -#else - if (!value) - xf86Msg(X_WARNING, "Xserver doesn't support XKB\n"); -#endif - } - xf86Info.pmFlag = TRUE; if (xf86GetOptValBool(FlagOptions, FLAG_NOPM, &value)) xf86Info.pmFlag = !value; @@ -953,22 +929,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) } } #endif - { - if ((s = xf86GetOptValString(FlagOptions, FLAG_HANDLE_SPECIAL_KEYS))) { - if (!xf86NameCmp(s,"always")) { - xf86Msg(X_CONFIG, "Always handling special keys in DDX\n"); - xf86Info.ddxSpecialKeys = SKAlways; - } else if (!xf86NameCmp(s,"whenneeded")) { - xf86Msg(X_CONFIG, "Special keys handled in DDX only if needed\n"); - xf86Info.ddxSpecialKeys = SKWhenNeeded; - } else if (!xf86NameCmp(s,"never")) { - xf86Msg(X_CONFIG, "Never handling special keys in DDX\n"); - xf86Info.ddxSpecialKeys = SKNever; - } else { - xf86Msg(X_WARNING,"Unknown HandleSpecialKeys option\n"); - } - } - } + #ifdef RANDR xf86Info.disableRandR = FALSE; xf86Info.randRFrom = X_DEFAULT; @@ -1011,13 +972,11 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput); /* AEI on? Then we're not using kbd, so use the evdev rules set. */ -#ifdef XKB #if defined(linux) if (xf86Info.allowEmptyInput) - rules = "evdev"; -#endif - XkbSetRulesDflts(rules, "pc105", "us", NULL, NULL); + set.rules = "evdev"; #endif + XkbSetRulesDflts(&set); xf86Info.useDefaultFontPath = TRUE; xf86Info.useDefaultFontPathFrom = X_DEFAULT; @@ -1041,21 +1000,21 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_STANDBYTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) - DPMSStandbyTime = defaultDPMSStandbyTime = i * MILLI_PER_MIN; + DPMSStandbyTime = i * MILLI_PER_MIN; else if (i != -1) xf86ConfigError("StandbyTime value %d outside legal range of 0 - %d minutes", i, MAX_TIME_IN_MIN); i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_SUSPENDTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) - DPMSSuspendTime = defaultDPMSSuspendTime = i * MILLI_PER_MIN; + DPMSSuspendTime = i * MILLI_PER_MIN; else if (i != -1) xf86ConfigError("SuspendTime value %d outside legal range of 0 - %d minutes", i, MAX_TIME_IN_MIN); i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_OFFTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) - DPMSOffTime = defaultDPMSOffTime = i * MILLI_PER_MIN; + DPMSOffTime = i * MILLI_PER_MIN; else if (i != -1) xf86ConfigError("OffTime value %d outside legal range of 0 - %d minutes", i, MAX_TIME_IN_MIN); @@ -1137,8 +1096,8 @@ Bool xf86DRI2Enabled(void) * 2. The "CorePointer" and "CoreKeyboard" InputDevices referred to by * the active ServerLayout. * 3. The first InputDevices marked as "CorePointer" and "CoreKeyboard". - * 4. The first InputDevices that use the 'mouse' and 'keyboard' or 'kbd' - * drivers. + * 4. The first InputDevices that use 'keyboard' or 'kbd' and a valid mouse + * driver (mouse, synaptics, evdev, vmmouse, void) * 5. Default devices with an empty (default) configuration. These defaults * will reference the 'mouse' and 'keyboard' drivers. */ @@ -1157,6 +1116,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) int count = 0; MessageType from = X_DEFAULT; int found = 0; + const char *mousedrivers[] = { "mouse", "synaptics", "evdev", "vmmouse", + "void", NULL }; /* * First check if a core pointer or core keyboard have been specified @@ -1266,13 +1227,15 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) } } - /* 4. First pointer with 'mouse' as the driver. */ + /* 4. First pointer with an allowed mouse driver. */ if (!foundPointer && !xf86Info.allowEmptyInput) { + const char **driver = mousedrivers; confInput = xf86findInput(CONF_IMPLICIT_POINTER, xf86configptr->conf_input_lst); - if (!confInput) { - confInput = xf86findInputByDriver("mouse", + while (*driver && !confInput) { + confInput = xf86findInputByDriver(*driver, xf86configptr->conf_input_lst); + driver++; } if (confInput) { foundPointer = TRUE; @@ -1327,9 +1290,13 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) * section ... deal. */ for (devs = servlayoutp->inputs; devs && *devs; devs++) { - if (!strcmp((*devs)->driver, "void") || !strcmp((*devs)->driver, "mouse") || - !strcmp((*devs)->driver, "vmmouse") || !strcmp((*devs)->driver, "evdev")) { - found = 1; break; + const char **driver = mousedrivers; + while(*driver) { + if (!strcmp((*devs)->driver, *driver)) { + found = 1; + break; + } + driver++; } } if (!found && !xf86Info.allowEmptyInput) { @@ -1564,10 +1531,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, adjp = (XF86ConfAdjacencyPtr)adjp->list.next; } -#ifdef DEBUG - ErrorF("Found %d screens in the layout section %s", + DebugF("Found %d screens in the layout section %s", count, conf_layout->lay_identifier); -#endif if (!count) /* alloc enough storage even if no screen is specified */ count = 1; @@ -1724,10 +1689,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, count++; idp = (XF86ConfInactivePtr)idp->list.next; } -#ifdef DEBUG - ErrorF("Found %d inactive devices in the layout section %s", + DebugF("Found %d inactive devices in the layout section %s\n", count, conf_layout->lay_identifier); -#endif gdp = xnfalloc((count + 1) * sizeof(GDevRec)); gdp[count].identifier = NULL; idp = conf_layout->lay_inactive_lst; @@ -1749,10 +1712,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, count++; irp = (XF86ConfInputrefPtr)irp->list.next; } -#ifdef DEBUG - ErrorF("Found %d input devices in the layout section %s", + DebugF("Found %d input devices in the layout section %s\n", count, conf_layout->lay_identifier); -#endif indp = xnfcalloc((count + 1), sizeof(IDevPtr)); indp[count] = NULL; irp = conf_layout->lay_input_lst; @@ -1902,16 +1863,6 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, bzero(&defMon, sizeof(defMon)); defMon.mon_identifier = ""; - /* - * TARGET_REFRESH_RATE may be defined to effectively limit the - * default resolution to the largest that has a "good" refresh - * rate. - */ -#ifdef TARGET_REFRESH_RATE - defMon.mon_option_lst = xf86ReplaceRealOption(defMon.mon_option_lst, - "TargetRefresh", - TARGET_REFRESH_RATE); -#endif if (!configMonitor(screenp->monitor, &defMon)) return FALSE; defaultMonitor = TRUE; diff --git a/xorg-server/hw/xfree86/common/xf86Config.h b/xorg-server/hw/xfree86/common/xf86Config.h index a174e463b..de287041a 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.h +++ b/xorg-server/hw/xfree86/common/xf86Config.h @@ -41,7 +41,7 @@ /* * global structure that holds the result of parsing the config file */ -extern XF86ConfigPtr xf86configptr; +extern _X_EXPORT XF86ConfigPtr xf86configptr; #endif typedef enum _ConfigStatus { @@ -68,7 +68,5 @@ ConfigStatus xf86HandleConfigFile(Bool); Bool xf86AutoConfig(void); GDevPtr autoConfigDevice(GDevPtr preconf_device); -char* chooseVideoDriver(void); -int xchomp(char *line); #endif /* _xf86_config_h */ diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c index 77326b6d4..bce5aae58 100644 --- a/xorg-server/hw/xfree86/common/xf86Configure.c +++ b/xorg-server/hw/xfree86/common/xf86Configure.c @@ -27,33 +27,17 @@ #include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "Pci.h" -#include "os.h" -#include "loaderProcs.h" #include "xf86.h" #include "xf86Config.h" #include "xf86_OSlib.h" #include "xf86Priv.h" #define IN_XSERVER -#include "xf86Parser.h" -#include "xf86tokens.h" #include "Configint.h" -#include "vbe.h" #include "xf86DDC.h" #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) #include "xf86Bus.h" #include "xf86Sbus.h" #endif -#include "globals.h" typedef struct _DevToConfig { GDevRec GDev; @@ -67,7 +51,7 @@ typedef struct _DevToConfig { static DevToConfigPtr DevToConfig = NULL; static int nDevToConfig = 0, CurrentDriver; -_X_EXPORT xf86MonPtr ConfiguredMonitor; +xf86MonPtr ConfiguredMonitor; Bool xf86DoConfigurePass1 = TRUE; static Bool foundMouse = FALSE; @@ -87,24 +71,12 @@ static char *DFLT_MOUSE_DEV = "/dev/mouse"; static char *DFLT_MOUSE_PROTO = "auto"; #endif -/* - * This is called by the driver, either through xf86Match???Instances() or - * directly. We allocate a GDevRec and fill it in as much as we can, letting - * the caller fill in the rest and/or change it as it sees fit. - */ -GDevPtr -xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset) +static Bool +bus_pci_configure(void *busData) { - int i, j; + int i; struct pci_device * pVideo = NULL; - Bool isPrimary = FALSE; - if (xf86DoProbe || !xf86DoConfigure || !xf86DoConfigurePass1) - return NULL; - - /* Check for duplicates */ - switch (bus) { - case BUS_PCI: pVideo = (struct pci_device *) busData; for (i = 0; i < nDevToConfig; i++) if (DevToConfig[i].pVideo && @@ -112,51 +84,37 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int (DevToConfig[i].pVideo->bus == pVideo->bus) && (DevToConfig[i].pVideo->dev == pVideo->dev) && (DevToConfig[i].pVideo->func == pVideo->func)) - return NULL; - isPrimary = xf86IsPrimaryPci(pVideo); - break; -#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) - case BUS_SBUS: - for (i = 0; i < nDevToConfig; i++) - if (DevToConfig[i].sVideo && - DevToConfig[i].sVideo->fbNum == ((sbusDevicePtr) busData)->fbNum) - return NULL; - break; -#endif - default: - return NULL; - } + return 0; - /* Allocate new structure occurrence */ - i = nDevToConfig++; - DevToConfig = - xnfrealloc(DevToConfig, nDevToConfig * sizeof(DevToConfigRec)); -#if 1 /* Doesn't work when a driver detects more than one adapter */ - if ((i > 0) && isPrimary) { - memmove(DevToConfig + 1,DevToConfig, - (nDevToConfig - 1) * sizeof(DevToConfigRec)); - i = 0; - } -#endif - memset(DevToConfig + i, 0, sizeof(DevToConfigRec)); - -# define NewDevice DevToConfig[i] + return 1; +} - NewDevice.GDev.chipID = NewDevice.GDev.chipRev = NewDevice.GDev.irq = -1; +static Bool +bus_sbus_configure(void *busData) +{ +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) + int i; - NewDevice.iDriver = CurrentDriver; + for (i = 0; i < nDevToConfig; i++) + if (DevToConfig[i].sVideo && + DevToConfig[i].sVideo->fbNum == ((sbusDevicePtr) busData)->fbNum) + return 0; - /* Fill in what we know, converting the driver name to lower case */ - NewDevice.GDev.driver = xnfalloc(strlen(driver) + 1); - for (j = 0; (NewDevice.GDev.driver[j] = tolower(driver[j])); j++); +#endif + return 1; +} - switch (bus) { - case BUS_PCI: { +static void +bus_pci_newdev_configure(void *busData, int i, int *chipset) +{ const char *VendorName; const char *CardName; char busnum[8]; + struct pci_device * pVideo = NULL; + + pVideo = (struct pci_device *) busData; - NewDevice.pVideo = pVideo; + DevToConfig[i].pVideo = pVideo; VendorName = pci_device_get_vendor_name( pVideo ); CardName = pci_device_get_device_name( pVideo ); @@ -171,58 +129,113 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int sprintf((char*)CardName, "Unknown Board"); } - NewDevice.GDev.identifier = + DevToConfig[i].GDev.identifier = xnfalloc(strlen(VendorName) + strlen(CardName) + 2); - sprintf(NewDevice.GDev.identifier, "%s %s", VendorName, CardName); + sprintf(DevToConfig[i].GDev.identifier, "%s %s", VendorName, CardName); - NewDevice.GDev.vendor = (char *)VendorName; - NewDevice.GDev.board = (char *)CardName; + DevToConfig[i].GDev.vendor = (char *)VendorName; + DevToConfig[i].GDev.board = (char *)CardName; - NewDevice.GDev.busID = xnfalloc(16); + DevToConfig[i].GDev.busID = xnfalloc(16); xf86FormatPciBusNumber(pVideo->bus, busnum); - sprintf(NewDevice.GDev.busID, "PCI:%s:%d:%d", + sprintf(DevToConfig[i].GDev.busID, "PCI:%s:%d:%d", busnum, pVideo->dev, pVideo->func); - NewDevice.GDev.chipID = pVideo->device_id; - NewDevice.GDev.chipRev = pVideo->revision; + DevToConfig[i].GDev.chipID = pVideo->device_id; + DevToConfig[i].GDev.chipRev = pVideo->revision; - if (chipset < 0) - chipset = (pVideo->vendor_id << 16) | pVideo->device_id; + if (*chipset < 0) { + *chipset = (pVideo->vendor_id << 16) | pVideo->device_id; } - break; +} + +static void +bus_sbus_newdev_configure(void *busData, int i) +{ #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) - case BUS_SBUS: { char *promPath = NULL; - NewDevice.sVideo = (sbusDevicePtr) busData; - NewDevice.GDev.identifier = NewDevice.sVideo->descr; + DevToConfig[i].sVideo = (sbusDevicePtr) busData; + DevToConfig[i].GDev.identifier = DevToConfig[i].sVideo->descr; if (sparcPromInit() >= 0) { - promPath = sparcPromNode2Pathname(&NewDevice.sVideo->node); + promPath = sparcPromNode2Pathname(&DevToConfig[i].sVideo->node); sparcPromClose(); } if (promPath) { - NewDevice.GDev.busID = xnfalloc(strlen(promPath) + 6); - sprintf(NewDevice.GDev.busID, "SBUS:%s", promPath); + DevToConfig[i].GDev.busID = xnfalloc(strlen(promPath) + 6); + sprintf(DevToConfig[i].GDev.busID, "SBUS:%s", promPath); xfree(promPath); } else { - NewDevice.GDev.busID = xnfalloc(12); - sprintf(NewDevice.GDev.busID, "SBUS:fb%d", NewDevice.sVideo->fbNum); + DevToConfig[i].GDev.busID = xnfalloc(12); + sprintf(DevToConfig[i].GDev.busID, "SBUS:fb%d", + DevToConfig[i].sVideo->fbNum); } - } - break; #endif - default: - break; +} + +/* + * This is called by the driver, either through xf86Match???Instances() or + * directly. We allocate a GDevRec and fill it in as much as we can, letting + * the caller fill in the rest and/or change it as it sees fit. + */ +GDevPtr +xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset) +{ + int ret, i, j; + + if (!xf86DoConfigure || !xf86DoConfigurePass1) + return NULL; + + /* Check for duplicates */ + switch (bus) { + case BUS_PCI: + ret = bus_pci_configure(busData); + break; + case BUS_SBUS: + ret = bus_sbus_configure(busData); + break; + default: + return NULL; + } + + if (ret == 0) + goto out; + + /* Allocate new structure occurrence */ + i = nDevToConfig++; + DevToConfig = + xnfrealloc(DevToConfig, nDevToConfig * sizeof(DevToConfigRec)); + memset(DevToConfig + i, 0, sizeof(DevToConfigRec)); + + DevToConfig[i].GDev.chipID = + DevToConfig[i].GDev.chipRev = DevToConfig[i].GDev.irq = -1; + + DevToConfig[i].iDriver = CurrentDriver; + + /* Fill in what we know, converting the driver name to lower case */ + DevToConfig[i].GDev.driver = xnfalloc(strlen(driver) + 1); + for (j = 0; (DevToConfig[i].GDev.driver[j] = tolower(driver[j])); j++); + + switch (bus) { + case BUS_PCI: + bus_pci_newdev_configure(busData, i, &chipset); + break; + case BUS_SBUS: + bus_sbus_newdev_configure(busData, i); + break; + default: + break; } /* Get driver's available options */ if (xf86DriverList[CurrentDriver]->AvailableOptions) - NewDevice.GDev.options = (OptionInfoPtr) + DevToConfig[i].GDev.options = (OptionInfoPtr) (*xf86DriverList[CurrentDriver]->AvailableOptions)(chipset, bus); - return &NewDevice.GDev; + return &DevToConfig[i].GDev; -# undef NewDevice +out: + return NULL; } static XF86ConfInputPtr @@ -260,7 +273,7 @@ configureInputSection (void) #endif } - mouse = xf86confcalloc(1, sizeof(XF86ConfInputRec)); + mouse = calloc(1, sizeof(XF86ConfInputRec)); mouse->inp_identifier = "Mouse0"; mouse->inp_driver = "mouse"; mouse->inp_option_lst = @@ -285,18 +298,18 @@ configureScreenSection (int screennum) int depths[] = { 1, 4, 8, 15, 16, 24/*, 32*/ }; parsePrologue (XF86ConfScreenPtr, XF86ConfScreenRec) - ptr->scrn_identifier = xf86confmalloc(18); + ptr->scrn_identifier = malloc(18); sprintf(ptr->scrn_identifier, "Screen%d", screennum); - ptr->scrn_monitor_str = xf86confmalloc(19); + ptr->scrn_monitor_str = malloc(19); sprintf(ptr->scrn_monitor_str, "Monitor%d", screennum); - ptr->scrn_device_str = xf86confmalloc(16); + ptr->scrn_device_str = malloc(16); sprintf(ptr->scrn_device_str, "Card%d", screennum); for (i=0; idisp_depth = depths[i]; display->disp_black.red = display->disp_white.red = -1; display->disp_black.green = display->disp_white.green = -1; @@ -419,7 +432,7 @@ configureLayoutSection (void) { XF86ConfInputrefPtr iptr; - iptr = xf86confmalloc (sizeof (XF86ConfInputrefRec)); + iptr = malloc (sizeof (XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; iptr->iref_inputdev_str = "Mouse0"; @@ -432,7 +445,7 @@ configureLayoutSection (void) { XF86ConfInputrefPtr iptr; - iptr = xf86confmalloc (sizeof (XF86ConfInputrefRec)); + iptr = malloc (sizeof (XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; iptr->iref_inputdev_str = "Keyboard0"; @@ -445,7 +458,7 @@ configureLayoutSection (void) for (scrnum = 0; scrnum < nDevToConfig; scrnum++) { XF86ConfAdjacencyPtr aptr; - aptr = xf86confmalloc (sizeof (XF86ConfAdjacencyRec)); + aptr = malloc (sizeof (XF86ConfAdjacencyRec)); aptr->list.next = NULL; aptr->adj_x = 0; aptr->adj_y = 0; @@ -481,12 +494,9 @@ static XF86ConfModulePtr configureModuleSection (void) { char **elist, **el; - /* Find the list of extension modules. */ + /* Find the list of extension & font modules. */ const char *esubdirs[] = { "extensions", - NULL - }; - const char *fsubdirs[] = { "fonts", NULL }; @@ -497,7 +507,7 @@ configureModuleSection (void) for (el = elist; *el; el++) { XF86LoadPtr module; - module = xf86confcalloc(1, sizeof(XF86LoadRec)); + module = calloc(1, sizeof(XF86LoadRec)); module->load_name = *el; ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem( (glp)ptr->mod_load_lst, (glp)module); @@ -505,28 +515,6 @@ configureModuleSection (void) xfree(elist); } - /* Process list of font backends separately to include only required ones */ - elist = LoaderListDirs(fsubdirs, NULL); - if (elist) { - for (el = elist; *el; el++) { - XF86LoadPtr module; - - module = xf86confcalloc(1, sizeof(XF86LoadRec)); - module->load_name = *el; - - /* Add only those font backends which are referenced by fontpath */ - /* 'strstr(dFP,"/dir")' is meant as 'dFP =~ m(/dir\W)' */ - if (defaultFontPath && ( - (strcmp(*el, "freetype") == 0 && - strstr(defaultFontPath, "/TTF")) || - (strcmp(*el, "type1") == 0 && - strstr(defaultFontPath, "/Type1")))) - ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem( - (glp)ptr->mod_load_lst, (glp)module); - } - xfree(elist); - } - return ptr; } @@ -548,7 +536,7 @@ configureMonitorSection (int screennum) { parsePrologue (XF86ConfMonitorPtr, XF86ConfMonitorRec) - ptr->mon_identifier = xf86confmalloc(19); + ptr->mon_identifier = malloc(19); sprintf(ptr->mon_identifier, "Monitor%d", screennum); ptr->mon_vendor = strdup("Monitor Vendor"); ptr->mon_modelname = strdup("Monitor Model"); @@ -567,10 +555,10 @@ configureDDCMonitorSection (int screennum) parsePrologue (XF86ConfMonitorPtr, XF86ConfMonitorRec) - ptr->mon_identifier = xf86confmalloc(19); + ptr->mon_identifier = malloc(19); sprintf(ptr->mon_identifier, "Monitor%d", screennum); ptr->mon_vendor = strdup(ConfiguredMonitor->vendor.name); - ptr->mon_modelname = xf86confmalloc(12); + ptr->mon_modelname = malloc(12); sprintf(ptr->mon_modelname, "%x", ConfiguredMonitor->vendor.prod_id); /* features in centimetres, we want millimetres */ @@ -595,8 +583,7 @@ configureDDCMonitorSection (int screennum) len = 0; } if ((ptr->mon_comment = - xf86confrealloc(ptr->mon_comment, - len+strlen(displaySize_string)))) { + realloc(ptr->mon_comment, len+strlen(displaySize_string)))) { strcpy(ptr->mon_comment + len, displaySize_string); } } @@ -606,7 +593,7 @@ configureDDCMonitorSection (int screennum) for (i=0;i<4;i++) { switch (ConfiguredMonitor->det_mon[i].type) { case DS_NAME: - ptr->mon_modelname = xf86confrealloc(ptr->mon_modelname, + ptr->mon_modelname = realloc(ptr->mon_modelname, strlen((char*)(ConfiguredMonitor->det_mon[i].section.name)) + 1); strcpy(ptr->mon_modelname, @@ -684,9 +671,6 @@ DoConfigure(void) xorgHWAccess = FALSE; } - /* Disable PCI devices */ - xf86ResourceBrokerInit(); - xf86AccessInit(); xf86FindPrimaryDevice(); /* Create XF86Config file structure */ diff --git a/xorg-server/hw/xfree86/common/xf86Cursor.c b/xorg-server/hw/xfree86/common/xf86Cursor.c index c6f603959..6740faf65 100644 --- a/xorg-server/hw/xfree86/common/xf86Cursor.c +++ b/xorg-server/hw/xfree86/common/xf86Cursor.c @@ -25,7 +25,6 @@ * authorization from the copyright holder(s) and author(s). */ -#define NEED_EVENTS #ifdef HAVE_XORG_CONFIG_H #include #endif @@ -228,8 +227,6 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) break; } - if (!dev) - dev = inputInfo.pointer; pCursorScreen = miPointerGetScreen(dev); if (pScreen == pCursorScreen) @@ -480,7 +477,7 @@ xf86WarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) } -_X_EXPORT void * +void * xf86GetPointerScreenFuncs(void) { return (void *)&xf86PointerScreenFuncs; diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c index a06f285f1..8328f5875 100644 --- a/xorg-server/hw/xfree86/common/xf86DGA.c +++ b/xorg-server/hw/xfree86/common/xf86DGA.c @@ -35,19 +35,19 @@ #include "xf86str.h" #include "xf86Priv.h" #include "dgaproc.h" -#include +#include #include "colormapst.h" #include "pixmapstr.h" #include "inputstr.h" #include "globals.h" #include "servermd.h" #include "micmap.h" -#ifdef XKB -#include -#endif +#include "xkbsrv.h" #include "xf86Xinput.h" #include "exglobals.h" #include "exevents.h" +#include "eventstr.h" +#include "eventconvert.h" #include "mi.h" @@ -59,8 +59,8 @@ static Bool DGACloseScreen(int i, ScreenPtr pScreen); static void DGADestroyColormap(ColormapPtr pmap); static void DGAInstallColormap(ColormapPtr pmap); static void DGAUninstallColormap(ColormapPtr pmap); -static void DGAHandleEvent(int screen_num, xEvent *event, - DeviceIntPtr device, int nevents); +static void DGAHandleEvent(int screen_num, InternalEvent *event, + DeviceIntPtr device); static void DGACopyModeInfo( @@ -68,7 +68,7 @@ DGACopyModeInfo( XDGAModePtr xmode ); -_X_EXPORT int *XDGAEventBase = NULL; +int *XDGAEventBase = NULL; #define DGA_GET_SCREEN_PRIV(pScreen) ((DGAScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, DGAScreenKey)) @@ -101,7 +101,7 @@ typedef struct { Bool grabKeyboard; } DGAScreenRec, *DGAScreenPtr; -_X_EXPORT Bool +Bool DGAInit( ScreenPtr pScreen, DGAFunctionPtr funcs, @@ -164,7 +164,7 @@ DGAInit( * the DGA mode list. */ -_X_EXPORT Bool +Bool DGAReInitModes( ScreenPtr pScreen, DGAModePtr modes, @@ -247,11 +247,7 @@ DGACloseScreen(int i, ScreenPtr pScreen) DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (XDGAEventBase) { - mieqSetHandler(*XDGAEventBase + MotionNotify, NULL); - mieqSetHandler(*XDGAEventBase + ButtonPress, NULL); - mieqSetHandler(*XDGAEventBase + ButtonRelease, NULL); - mieqSetHandler(*XDGAEventBase + KeyPress, NULL); - mieqSetHandler(*XDGAEventBase + KeyRelease, NULL); + mieqSetHandler(ET_DGAEvent, NULL); } FreeMarkedVisuals(pScreen); @@ -453,7 +449,7 @@ xf86SetDGAMode( /*********** exported ones ***************/ -_X_EXPORT void +void DGASetInputMode(int index, Bool keyboard, Bool mouse) { ScreenPtr pScreen = screenInfo.screens[index]; @@ -465,17 +461,13 @@ DGASetInputMode(int index, Bool keyboard, Bool mouse) pScreenPriv->grabKeyboard = keyboard; if (!mieq_installed) { - mieqSetHandler(*XDGAEventBase + MotionNotify, DGAHandleEvent); - mieqSetHandler(*XDGAEventBase + ButtonPress, DGAHandleEvent); - mieqSetHandler(*XDGAEventBase + ButtonRelease, DGAHandleEvent); - mieqSetHandler(*XDGAEventBase + KeyPress, DGAHandleEvent); - mieqSetHandler(*XDGAEventBase + KeyRelease, DGAHandleEvent); + mieqSetHandler(ET_DGAEvent, DGAHandleEvent); mieq_installed = 1; } } } -_X_EXPORT Bool +Bool DGAChangePixmapMode(int index, int *x, int *y, int mode) { DGAScreenPtr pScreenPriv; @@ -530,24 +522,19 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode) return TRUE; } -_X_EXPORT Bool +Bool DGAAvailable(int index) { if(DGAScreenKey == NULL) return FALSE; - if (!xf86NoSharedResources(((ScrnInfoPtr)dixLookupPrivate( - &screenInfo.screens[index]->devPrivates, - xf86ScreenKey))->scrnIndex, MEM)) - return FALSE; - if(DGA_GET_SCREEN_PRIV(screenInfo.screens[index])) return TRUE; return FALSE; } -_X_EXPORT Bool +Bool DGAActive(int index) { DGAScreenPtr pScreenPriv; @@ -567,8 +554,8 @@ DGAActive(int index) /* Called by the event code in case the server is abruptly terminated */ -void -DGAShutdown() +void +DGAShutdown(void) { ScrnInfoPtr pScrn; int i; @@ -585,7 +572,7 @@ DGAShutdown() /* Called by the extension to initialize a mode */ -_X_EXPORT int +int DGASetMode( int index, int num, @@ -609,7 +596,7 @@ DGASetMode( /* Called from the extension to let the DDX know which events are requested */ -_X_EXPORT void +void DGASelectInput( int index, ClientPtr client, @@ -622,7 +609,7 @@ DGASelectInput( pScreenPriv->input = mask; } -_X_EXPORT int +int DGAGetViewportStatus(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -635,7 +622,7 @@ DGAGetViewportStatus(int index) return (*pScreenPriv->funcs->GetViewport)(pScreenPriv->pScrn); } -_X_EXPORT int +int DGASetViewport( int index, int x, int y, @@ -663,7 +650,7 @@ BitsClear(CARD32 data) return bits; } -_X_EXPORT int +int DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) { ScreenPtr pScreen = screenInfo.screens[index]; @@ -732,7 +719,7 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) /* Called by the extension to install a colormap on DGA active screens */ -_X_EXPORT void +void DGAInstallCmap(ColormapPtr cmap) { ScreenPtr pScreen = cmap->pScreen; @@ -748,7 +735,7 @@ DGAInstallCmap(ColormapPtr cmap) (*pScreen->InstallColormap)(cmap); } -_X_EXPORT int +int DGASync(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -761,7 +748,7 @@ DGASync(int index) return Success; } -_X_EXPORT int +int DGAFillRect( int index, int x, int y, int w, int h, @@ -780,7 +767,7 @@ DGAFillRect( return BadMatch; } -_X_EXPORT int +int DGABlitRect( int index, int srcx, int srcy, @@ -801,7 +788,7 @@ DGABlitRect( return BadMatch; } -_X_EXPORT int +int DGABlitTransRect( int index, int srcx, int srcy, @@ -824,7 +811,7 @@ DGABlitTransRect( } -_X_EXPORT int +int DGAGetModes(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -834,7 +821,7 @@ DGAGetModes(int index) } -_X_EXPORT int +int DGAGetModeInfo( int index, XDGAModePtr mode, @@ -892,7 +879,7 @@ DGACopyModeInfo( } -Bool +Bool DGAVTSwitch(void) { ScreenPtr pScreen; @@ -918,8 +905,8 @@ Bool DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) { DGAScreenPtr pScreenPriv; - dgaEvent de; - + DGAEvent event; + if(DGAScreenKey == NULL) /* no DGA */ return FALSE; @@ -931,10 +918,16 @@ DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) if(!pScreenPriv || !pScreenPriv->grabKeyboard) /* no direct mode */ return FALSE; - de.u.u.type = *XDGAEventBase + (is_down ? KeyPress : KeyRelease); - de.u.u.detail = key_code; - de.u.event.time = GetTimeInMillis(); - mieqEnqueue (dev, (xEvent *) &de); + memset(&event, 0, sizeof(event)); + event.header = ET_Internal; + event.type = ET_DGAEvent; + event.length = sizeof(event); + event.time = GetTimeInMillis(); + event.subtype = (is_down ? ET_KeyPress : ET_KeyRelease); + event.detail = key_code; + event.dx = 0; + event.dy = 0; + mieqEnqueue (dev, (InternalEvent*)&event); return TRUE; } @@ -945,7 +938,7 @@ Bool DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) { DGAScreenPtr pScreenPriv; - dgaEvent de; + DGAEvent event; if(DGAScreenKey == NULL) /* no DGA */ return FALSE; @@ -965,14 +958,17 @@ DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) DGAMouseY = 0; else if (DGAMouseY > screenInfo.screens[index]->height) DGAMouseY = screenInfo.screens[index]->height; - de.u.u.type = *XDGAEventBase + MotionNotify; - de.u.u.detail = 0; - de.u.event.time = GetTimeInMillis(); - de.u.event.dx = dx; - de.u.event.dy = dy; - de.u.event.pad1 = DGAMouseX; - de.u.event.pad2 = DGAMouseY; - mieqEnqueue (dev, (xEvent *) &de); + + memset(&event, 0, sizeof(event)); + event.header = ET_Internal; + event.type = ET_DGAEvent; + event.length = sizeof(event); + event.time = GetTimeInMillis(); + event.subtype = ET_Motion; + event.detail = 0; + event.dx = dx; + event.dy = dy; + mieqEnqueue (dev, (InternalEvent*)&event); return TRUE; } @@ -980,7 +976,7 @@ Bool DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) { DGAScreenPtr pScreenPriv; - dgaEvent de; + DGAEvent event; if (DGAScreenKey == NULL) return FALSE; @@ -990,14 +986,16 @@ DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) if (!pScreenPriv || !pScreenPriv->grabMouse) return FALSE; - de.u.u.type = *XDGAEventBase + (is_down ? ButtonPress : ButtonRelease); - de.u.u.detail = button; - de.u.event.time = GetTimeInMillis(); - de.u.event.dx = 0; - de.u.event.dy = 0; - de.u.event.pad1 = DGAMouseX; - de.u.event.pad2 = DGAMouseY; - mieqEnqueue (dev, (xEvent *) &de); + memset(&event, 0, sizeof(event)); + event.header = ET_Internal; + event.type = ET_DGAEvent; + event.length = sizeof(event); + event.time = GetTimeInMillis(); + event.subtype = (is_down ? ET_ButtonPress : ET_ButtonRelease); + event.detail = button; + event.dx = 0; + event.dy = 0; + mieqEnqueue (dev, (InternalEvent*)&event); return TRUE; } @@ -1029,82 +1027,94 @@ static Mask filters[] = }; static void -DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) +DGAProcessKeyboardEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr keybd) { - int coreEquiv; - xEvent xi; KeyClassPtr keyc = keybd->key; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); DeviceIntPtr pointer = GetPairedDevice(keybd); + DeviceEvent ev; - coreEquiv = de->u.u.type - *XDGAEventBase; - - /* - * Fill in remaining event state - */ - de->u.event.dx = 0; - de->u.event.dy = 0; - de->u.event.screen = pScreen->myNum; - de->u.event.state = keyc->state | pointer->button->state; + memset(&ev, 0, sizeof(ev)); + ev.length = sizeof(ev); + ev.detail.key = event->detail; + ev.type = event->subtype; + ev.root_x = 0; + ev.root_y = 0; + ev.corestate = XkbStateFieldFromRec(&keyc->xkbInfo->state); + ev.corestate |= pointer->button->state; - de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ - UpdateDeviceState(keybd, (xEvent*)de, 1); - de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ + UpdateDeviceState(keybd, &ev); /* * Deliver the DGA event */ if (pScreenPriv->client) { + dgaEvent de; + de.u.u.type = *XDGAEventBase + GetCoreType((InternalEvent*)&ev); + de.u.u.detail = event->detail; + de.u.event.time = event->time; + de.u.event.dx = 0; + de.u.event.dy = 0; + de.u.event.screen = pScreen->myNum; + de.u.event.state = ev.corestate; + /* If the DGA client has selected input, then deliver based on the usual filter */ - TryClientEvents (pScreenPriv->client, keybd, (xEvent *) de, 1, - filters[coreEquiv], pScreenPriv->input, 0); + TryClientEvents (pScreenPriv->client, keybd, (xEvent *)&de, 1, + filters[ev.type], pScreenPriv->input, 0); } else { /* If the keyboard is actively grabbed, deliver a grabbed core event */ if (keybd->deviceGrab.grab && !keybd->deviceGrab.fromPassiveGrab) { - xi.u.u.type = (IEventBase - 1) + coreEquiv; - xi.u.u.detail = de->u.u.detail; - xi.u.keyButtonPointer.time = de->u.event.time; - xi.u.keyButtonPointer.eventX = de->u.event.dx; - xi.u.keyButtonPointer.eventY = de->u.event.dy; - xi.u.keyButtonPointer.rootX = de->u.event.dx; - xi.u.keyButtonPointer.rootY = de->u.event.dy; - xi.u.keyButtonPointer.state = de->u.event.state; - ((deviceKeyButtonPointer*)&xi)->deviceid = keybd->id; - DeliverGrabbedEvent (&xi, keybd, FALSE, 1); + ev.detail.key = event->detail; + ev.time = event->time; + ev.root_x = event->dx; + ev.root_y = event->dy; + ev.corestate = event->state; + ev.deviceid = keybd->id; + DeliverGrabbedEvent ((InternalEvent*)&ev, keybd, FALSE); } } } static void -DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) +DGAProcessPointerEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr mouse) { ButtonClassPtr butc = mouse->button; - int coreEquiv; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); - xEvent xi; + DeviceEvent ev; - coreEquiv = de->u.u.type - *XDGAEventBase; - /* - * Fill in remaining event state - */ - de->u.event.screen = pScreen->myNum; - de->u.event.state = butc->state | GetPairedDevice(mouse)->key->state; + memset(&ev, 0, sizeof(ev)); + ev.header = ET_Internal; + ev.length = sizeof(ev); + ev.type = event->subtype; + ev.corestate = butc->state; + ev.corestate |= XkbStateFieldFromRec(&GetPairedDevice(mouse)->key->xkbInfo->state); - de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ - UpdateDeviceState(mouse, (xEvent*)de, 1); - de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ + UpdateDeviceState(mouse, &ev); /* * Deliver the DGA event */ if (pScreenPriv->client) { + dgaEvent de; + int coreEquiv; + + coreEquiv = GetCoreType((InternalEvent*)&ev); + + de.u.u.type = *XDGAEventBase + coreEquiv; + de.u.u.detail = event->detail; + de.u.event.time = event->time; + de.u.event.dx = 0; + de.u.event.dy = 0; + de.u.event.screen = pScreen->myNum; + de.u.event.state = ev.corestate; + /* If the DGA client has selected input, then deliver based on the usual filter */ - TryClientEvents (pScreenPriv->client, mouse, (xEvent *) de, 1, + TryClientEvents (pScreenPriv->client, mouse, (xEvent *)&de, 1, filters[coreEquiv], pScreenPriv->input, 0); } else @@ -1112,20 +1122,17 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) /* If the pointer is actively grabbed, deliver a grabbed core event */ if (mouse->deviceGrab.grab && !mouse->deviceGrab.fromPassiveGrab) { - xi.u.u.type = (IEventBase - 1 ) + coreEquiv; - xi.u.u.detail = de->u.u.detail; - xi.u.keyButtonPointer.time = de->u.event.time; - xi.u.keyButtonPointer.eventX = de->u.event.dx; - xi.u.keyButtonPointer.eventY = de->u.event.dy; - xi.u.keyButtonPointer.rootX = de->u.event.dx; - xi.u.keyButtonPointer.rootY = de->u.event.dy; - xi.u.keyButtonPointer.state = de->u.event.state; - DeliverGrabbedEvent (&xi, mouse, FALSE, 1); + ev.detail.button = event->detail; + ev.time = event->time; + ev.root_x = event->dx; + ev.root_y = event->dy; + ev.corestate = event->state; + DeliverGrabbedEvent ((InternalEvent*)&ev, mouse, FALSE); } } } -_X_EXPORT Bool +Bool DGAOpenFramebuffer( int index, char **name, @@ -1142,7 +1149,7 @@ DGAOpenFramebuffer( name, mem, size, offset, flags); } -_X_EXPORT void +void DGACloseFramebuffer(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -1154,7 +1161,7 @@ DGACloseFramebuffer(int index) /* For DGA 1.0 backwards compatibility only */ -_X_EXPORT int +int DGAGetOldDGAMode(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -1166,7 +1173,7 @@ DGAGetOldDGAMode(int index) w = pScrn->currentMode->HDisplay; h = pScrn->currentMode->VDisplay; - p = ((pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)) + 3) & ~3L; + p = pad_to_int32(pScrn->displayWidth * bits_to_bytes(pScrn->bitsPerPixel)); for(i = 0; i < pScreenPriv->numModes; i++) { mode = &(pScreenPriv->modes[i]); @@ -1184,34 +1191,32 @@ DGAGetOldDGAMode(int index) } static void -DGAHandleEvent(int screen_num, xEvent *event, DeviceIntPtr device, int nevents) +DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device) { - dgaEvent *de = (dgaEvent *) event; + DGAEvent *event= (DGAEvent*)ev; ScreenPtr pScreen = screenInfo.screens[screen_num]; DGAScreenPtr pScreenPriv; - int coreEquiv; /* no DGA */ if (DGAScreenKey == NULL || XDGAEventBase == 0) return; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); - + /* DGA not initialized on this screen */ if (!pScreenPriv) return; - - coreEquiv = de->u.u.type - *XDGAEventBase; - /* Not a DGA event; shouldn't happen, but you never know. */ - if (coreEquiv < KeyPress || coreEquiv > MotionNotify) - return; - - switch (coreEquiv) { + + switch (event->subtype) { case KeyPress: case KeyRelease: - DGAProcessKeyboardEvent (pScreen, de, device); + DGAProcessKeyboardEvent (pScreen, event, device); break; + case MotionNotify: + case ButtonPress: + case ButtonRelease: + DGAProcessPointerEvent (pScreen, event, device); + break; default: - DGAProcessPointerEvent (pScreen, de, device); break; } } diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c index 5ee5e2451..22174c74e 100644 --- a/xorg-server/hw/xfree86/common/xf86DPMS.c +++ b/xorg-server/hw/xfree86/common/xf86DPMS.c @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * @@ -40,10 +39,10 @@ #include "xf86.h" #include "xf86Priv.h" #ifdef DPMSExtension -#define DPMS_SERVER -#include +#include #include "dpmsproc.h" #endif +#include "xf86VGAarbiter.h" #ifdef DPMSExtension @@ -54,44 +53,41 @@ static int DPMSCount = 0; #endif -_X_EXPORT Bool +Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) { #ifdef DPMSExtension ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; DPMSPtr pDPMS; pointer DPMSOpt; - MessageType enabled_from = X_INFO; + MessageType enabled_from; DPMSKey = &DPMSKeyIndex; - if (DPMSDisabledSwitch) - DPMSEnabled = FALSE; if (!dixSetPrivate(&pScreen->devPrivates, DPMSKey, xcalloc(sizeof(DPMSRec), 1))) return FALSE; - pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey); + pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); pScrn->DPMSSet = set; pDPMS->Flags = flags; DPMSOpt = xf86FindOption(pScrn->options, "dpms"); - if (DPMSOpt) { - if ((pDPMS->Enabled - = xf86SetBoolOption(pScrn->options, "dpms", FALSE)) - && !DPMSDisabledSwitch) - DPMSEnabled = TRUE; - enabled_from = X_CONFIG; + if (DPMSDisabledSwitch) { + enabled_from = X_CMDLINE; + DPMSEnabled = FALSE; + } + else if (DPMSOpt) { + enabled_from = X_CONFIG; + DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE); xf86MarkOptionUsed(DPMSOpt); - } else if (DPMSEnabledSwitch) { - if (!DPMSDisabledSwitch) - DPMSEnabled = TRUE; - pDPMS->Enabled = TRUE; - } + } else { - pDPMS->Enabled = defaultDPMSEnabled; + enabled_from = X_DEFAULT; + DPMSEnabled = TRUE; } - if (pDPMS->Enabled) + if (DPMSEnabled) xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n"); + pDPMS->Enabled = DPMSEnabled; pDPMS->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = DPMSClose; DPMSCount++; @@ -113,7 +109,7 @@ DPMSClose(int i, ScreenPtr pScreen) if (DPMSKey == NULL) return FALSE; - pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey); + pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); /* This shouldn't happen */ if (!pDPMS) @@ -131,7 +127,7 @@ DPMSClose(int i, ScreenPtr pScreen) xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0); } - xfree((pointer)pDPMS); + xfree(pDPMS); dixSetPrivate(&pScreen->devPrivates, DPMSKey, NULL); if (--DPMSCount == 0) DPMSKey = NULL; @@ -144,7 +140,7 @@ DPMSClose(int i, ScreenPtr pScreen) * Device dependent DPMS mode setting hook. This is called whenever * the DPMS mode is to be changed. */ -_X_EXPORT int +int DPMSSet(ClientPtr client, int level) { int rc, i; @@ -165,11 +161,11 @@ DPMSSet(ClientPtr client, int level) /* For each screen, set the DPMS level */ for (i = 0; i < xf86NumScreens; i++) { pScrn = xf86Screens[i]; - pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates, - DPMSKey); + pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { - xf86EnableAccess(pScrn); + xf86VGAarbiterLock(pScrn); pScrn->DPMSSet(pScrn, level, 0); + xf86VGAarbiterUnlock(pScrn); } } return Success; @@ -180,7 +176,7 @@ DPMSSet(ClientPtr client, int level) * DPMSSupported -- * Return TRUE if any screen supports DPMS. */ -_X_EXPORT Bool +Bool DPMSSupported(void) { int i; @@ -194,33 +190,11 @@ DPMSSupported(void) /* For each screen, check if DPMS is supported */ for (i = 0; i < xf86NumScreens; i++) { pScrn = xf86Screens[i]; - pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates, - DPMSKey); + pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); if (pDPMS && pScrn->DPMSSet) return TRUE; } return FALSE; } - -/* - * DPMSGet -- - * Device dependent DPMS mode getting hook. This returns the current - * DPMS mode, or -1 if DPMS is not supported. - * - * This should hook in to the appropriate driver-level function, which - * will be added to the ScrnInfoRec. - * - * NOTES: - * 1. the calling interface should be changed to specify which - * screen to check. - * 2. It isn't clear that this function is ever used or what it should - * return. - */ -_X_EXPORT int -DPMSGet(int *level) -{ - return DPMSPowerLevel; -} - #endif /* DPMSExtension */ diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c index d6ef93a1b..9487fe7b2 100644 --- a/xorg-server/hw/xfree86/common/xf86Events.c +++ b/xorg-server/hw/xfree86/common/xf86Events.c @@ -76,24 +76,15 @@ #include "mi.h" #include "mipointer.h" -#ifdef XF86BIGFONT -#define _XF86BIGFONT_SERVER_ -#include -#endif +#include "xkbsrv.h" +#include "xkbstr.h" #ifdef DPMSExtension -#define DPMS_SERVER -#include +#include #include "dpmsproc.h" #endif /* - * The first of many hacks to get VT switching to work under - * Solaris 2.1 for x86. The basic problem is that Solaris is supposed - * to be SVR4. It is for the most part, except where the video interface - * is concerned. These hacks work around those problems. - * See the comments for Linux, and SCO. - * * This is a toggling variable: * FALSE = No VT switching keys have been pressed last time around * TRUE = Possible VT switch Pending @@ -102,7 +93,7 @@ * This has been generalised to work with Linux and *BSD+syscons (DHD) */ -_X_EXPORT Bool VTSwitchEnabled = TRUE; /* Allows run-time disabling for +Bool VTSwitchEnabled = TRUE; /* Allows run-time disabling for *BSD and for avoiding VT switches when using the DRI automatic full screen mode.*/ @@ -142,7 +133,7 @@ LegalModifier(unsigned int key, DeviceIntPtr pDev) * time in milliseconds since there last was any input. */ int -TimeSinceLastInputEvent() +TimeSinceLastInputEvent(void) { if (xf86Info.lastEventTime == 0) { xf86Info.lastEventTime = GetTimeInMillis(); @@ -154,8 +145,8 @@ TimeSinceLastInputEvent() * SetTimeSinceLastInputEvent -- * Set the lastEventTime to now. */ -_X_EXPORT void -SetTimeSinceLastInputEvent() +void +SetTimeSinceLastInputEvent(void) { xf86Info.lastEventTime = GetTimeInMillis(); } @@ -167,7 +158,7 @@ SetTimeSinceLastInputEvent() * and keyboard. */ void -ProcessInputEvents () +ProcessInputEvents (void) { int x, y; @@ -185,9 +176,7 @@ ProcessInputEvents () void xf86ProcessActionEvent(ActionEvent action, void *arg) { -#ifdef DEBUG - ErrorF("ProcessActionEvent(%d,%x)\n", (int) action, arg); -#endif + DebugF("ProcessActionEvent(%d,%x)\n", (int) action, arg); switch (action) { case ACTION_TERMINATE: if (!xf86Info.dontZap) { @@ -205,21 +194,27 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) if (!xf86Info.dontZoom) xf86ZoomViewport(xf86Info.currentScreen, -1); break; -#if !defined(__SOL8__) && \ - (!defined(sun) || defined(__i386__)) && defined(VT_ACTIVATE) +#if defined(VT_ACTIVATE) case ACTION_SWITCHSCREEN: if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) { int vtno = *((int *) arg); #if defined(__SCO__) || defined(__UNIXWARE__) vtno--; #endif +#if defined(sun) + if (vtno == xf86Info.vtno) + break; + + xf86Info.vtRequestsPending = TRUE; + xf86Info.vtPendingNum = vtno; +#else if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) ErrorF("Failed to switch consoles (%s)\n", strerror(errno)); +#endif } break; case ACTION_SWITCHSCREEN_NEXT: if (VTSwitchEnabled && !xf86Info.dontVTSwitch) { -/* Shouldn't this be true for (sun) && (i386) && (SVR4) ? */ #if defined(__SCO__) || defined(__UNIXWARE__) if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0) #else @@ -301,16 +296,13 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask) * signal handler for the SIGIO signal. */ static void -xf86SigioReadInput(int fd, - void *closure) +xf86SigioReadInput(int fd, void *closure) { int errno_save = errno; - int sigstate = xf86BlockSIGIO(); - InputInfoPtr pInfo = (InputInfoPtr) closure; + InputInfoPtr pInfo = closure; pInfo->read_input(pInfo); - xf86UnblockSIGIO(sigstate); errno = errno_save; } @@ -318,7 +310,7 @@ xf86SigioReadInput(int fd, * xf86AddEnabledDevice -- * */ -_X_EXPORT void +void xf86AddEnabledDevice(InputInfoPtr pInfo) { if (!xf86InstallSIGIOHandler (pInfo->fd, xf86SigioReadInput, pInfo)) { @@ -330,7 +322,7 @@ xf86AddEnabledDevice(InputInfoPtr pInfo) * xf86RemoveEnabledDevice -- * */ -_X_EXPORT void +void xf86RemoveEnabledDevice(InputInfoPtr pInfo) { if (!xf86RemoveSIGIOHandler (pInfo->fd)) { @@ -340,7 +332,7 @@ xf86RemoveEnabledDevice(InputInfoPtr pInfo) static int *xf86SignalIntercept = NULL; -_X_EXPORT void +void xf86InterceptSignals(int *signo) { if ((xf86SignalIntercept = signo)) @@ -349,70 +341,55 @@ xf86InterceptSignals(int *signo) static void (*xf86SigIllHandler)(void) = NULL; -_X_EXPORT void +void xf86InterceptSigIll(void (*sigillhandler)(void)) { xf86SigIllHandler = sigillhandler; } /* - * xf86SigHandler -- + * xf86SigWrapper -- * Catch unexpected signals and exit or continue cleanly. */ -void -xf86SigHandler(int signo) +int +xf86SigWrapper(int signo) { if ((signo == SIGILL) && xf86SigIllHandler) { (*xf86SigIllHandler)(); - /* Re-arm handler just in case we unexpectedly return here */ - (void) signal(signo, xf86SigHandler); - return; + return 0; /* continue */ } if (xf86SignalIntercept && (*xf86SignalIntercept < 0)) { *xf86SignalIntercept = signo; - /* Re-arm handler just in case */ - (void) signal(signo, xf86SigHandler); - return; + return 0; /* continue */ } - signal(signo,SIG_IGN); xf86Info.caughtSignal = TRUE; -#ifdef XF86BIGFONT - XF86BigfontCleanup(); -#endif - - xorg_backtrace(); - - FatalError("Caught signal %d. Server aborting\n", signo); + return 1; /* abort */ } /* * xf86PrintBacktrace -- * Print a stack backtrace for debugging purposes. */ -_X_EXPORT void +void xf86PrintBacktrace(void) { xorg_backtrace(); } #define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7))) -#define ModifierDown(k) ((keyc->state & (k)) == (k)) static void xf86ReleaseKeys(DeviceIntPtr pDev) { - KeyClassPtr keyc = NULL; - KeySym *map = NULL; - xEvent ke; - int i = 0, j = 0, nevents = 0; + KeyClassPtr keyc; + int i, j, nevents, sigstate; if (!pDev || !pDev->key) return; keyc = pDev->key; - map = keyc->curKeySyms.map; /* * Hmm... here is the biggest hack of every time ! @@ -425,36 +402,15 @@ xf86ReleaseKeys(DeviceIntPtr pDev) * are reenabled. */ - for (i = keyc->curKeySyms.minKeyCode, map = keyc->curKeySyms.map; - i < keyc->curKeySyms.maxKeyCode; - i++, map += keyc->curKeySyms.mapWidth) { + for (i = keyc->xkbInfo->desc->min_key_code; + i < keyc->xkbInfo->desc->max_key_code; + i++) { if (KeyPressed(i)) { - switch (*map) { - /* Don't release the lock keys */ - case XK_Caps_Lock: - case XK_Shift_Lock: - case XK_Num_Lock: - case XK_Scroll_Lock: - case XK_Kana_Lock: - break; - default: - if (pDev == inputInfo.keyboard) { - ke.u.keyButtonPointer.time = GetTimeInMillis(); - ke.u.keyButtonPointer.rootX = 0; - ke.u.keyButtonPointer.rootY = 0; - ke.u.u.type = KeyRelease; - ke.u.u.detail = i; - (*pDev->public.processInputProc) (&ke, pDev, 1); - } - else { - int sigstate = xf86BlockSIGIO (); - nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i); - for (j = 0; j < nevents; j++) - mieqEnqueue(pDev, (xf86Events + j)->event); - xf86UnblockSIGIO(sigstate); - } - break; - } + sigstate = xf86BlockSIGIO (); + nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i); + for (j = 0; j < nevents; j++) + mieqEnqueue(pDev, (InternalEvent*)(xf86Events + j)->event); + xf86UnblockSIGIO(sigstate); } } } @@ -464,15 +420,13 @@ xf86ReleaseKeys(DeviceIntPtr pDev) * Handle requests for switching the vt. */ static void -xf86VTSwitch() +xf86VTSwitch(void) { int i, prevSIGIO; InputInfoPtr pInfo; IHPtr ih; -#ifdef DEBUG - ErrorF("xf86VTSwitch()\n"); -#endif + DebugF("xf86VTSwitch()\n"); #ifdef XFreeXDGA if(!DGAVTSwitch()) @@ -485,10 +439,8 @@ xf86VTSwitch() */ if (xf86Screens[0]->vtSema) { -#ifdef DEBUG - ErrorF("xf86VTSwitch: Leaving, xf86Exiting is %s\n", + DebugF("xf86VTSwitch: Leaving, xf86Exiting is %s\n", BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE)); -#endif #ifdef DPMSExtension if (DPMSPowerLevel != DPMSModeOn) DPMSSet(serverClient, DPMSModeOn); @@ -503,29 +455,27 @@ xf86VTSwitch() * Keep the order: Disable Device > LeaveVT * EnterVT > EnableDevice */ - pInfo = xf86InputDevs; - while (pInfo) { - if (pInfo->dev) - DisableDevice(pInfo->dev); - pInfo = pInfo->next; + for (ih = InputHandlers; ih; ih = ih->next) + xf86DisableInputHandler(ih); + for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) { + if (pInfo->dev) { + xf86ReleaseKeys(pInfo->dev); + ProcessInputEvents(); + DisableDevice(pInfo->dev, TRUE); + } } xf86EnterServerState(SETUP); for (i = 0; i < xf86NumScreens; i++) xf86Screens[i]->LeaveVT(i, 0); - for (ih = InputHandlers; ih; ih = ih->next) - xf86DisableInputHandler(ih); xf86AccessLeave(); /* We need this here, otherwise */ - xf86AccessLeaveState(); /* console won't be restored */ if (!xf86VTSwitchAway()) { /* * switch failed */ -#ifdef DEBUG - ErrorF("xf86VTSwitch: Leave failed\n"); -#endif + DebugF("xf86VTSwitch: Leave failed\n"); prevSIGIO = xf86BlockSIGIO(); xf86AccessEnter(); xf86EnterServerState(SETUP); @@ -544,14 +494,10 @@ xf86VTSwitch() pInfo = xf86InputDevs; while (pInfo) { - if (pInfo->dev) { - xf86ReleaseKeys(pInfo->dev); - EnableDevice(pInfo->dev); - } + if (pInfo->dev) + EnableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } - /* XXX HACK */ - xf86ReleaseKeys(inputInfo.keyboard); for (ih = InputHandlers; ih; ih = ih->next) xf86EnableInputHandler(ih); @@ -570,17 +516,13 @@ xf86VTSwitch() * trap calls when switched away. */ xf86Screens[i]->vtSema = FALSE; - xf86Screens[i]->access = NULL; - xf86Screens[i]->busAccess = NULL; } if (xorgHWAccess) xf86DisableIO(); } } else { -#ifdef DEBUG - ErrorF("xf86VTSwitch: Entering\n"); -#endif + DebugF("xf86VTSwitch: Entering\n"); if (!xf86VTSwitchTo()) return; prevSIGIO = xf86BlockSIGIO(); @@ -608,14 +550,10 @@ xf86VTSwitch() pInfo = xf86InputDevs; while (pInfo) { - if (pInfo->dev) { - xf86ReleaseKeys(pInfo->dev); - EnableDevice(pInfo->dev); - } + if (pInfo->dev) + EnableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } - /* XXX HACK */ - xf86ReleaseKeys(inputInfo.keyboard); for (ih = InputHandlers; ih; ih = ih->next) xf86EnableInputHandler(ih); @@ -650,7 +588,7 @@ addInputHandler(int fd, InputHandlerProc proc, pointer data) return ih; } -_X_EXPORT pointer +pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data) { IHPtr ih = addInputHandler(fd, proc, data); @@ -660,7 +598,7 @@ xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data) return ih; } -_X_EXPORT pointer +pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data) { IHPtr ih = addInputHandler(fd, proc, data); @@ -687,7 +625,7 @@ removeInputHandler(IHPtr ih) xfree(ih); } -_X_EXPORT int +int xf86RemoveInputHandler(pointer handler) { IHPtr ih; @@ -706,7 +644,7 @@ xf86RemoveInputHandler(pointer handler) return fd; } -_X_EXPORT int +int xf86RemoveGeneralHandler(pointer handler) { IHPtr ih; @@ -725,7 +663,7 @@ xf86RemoveGeneralHandler(pointer handler) return fd; } -_X_EXPORT void +void xf86DisableInputHandler(pointer handler) { IHPtr ih; @@ -739,7 +677,7 @@ xf86DisableInputHandler(pointer handler) RemoveEnabledDevice(ih->fd); } -_X_EXPORT void +void xf86DisableGeneralHandler(pointer handler) { IHPtr ih; @@ -753,7 +691,7 @@ xf86DisableGeneralHandler(pointer handler) RemoveGeneralSocket(ih->fd); } -_X_EXPORT void +void xf86EnableInputHandler(pointer handler) { IHPtr ih; @@ -767,7 +705,7 @@ xf86EnableInputHandler(pointer handler) AddEnabledDevice(ih->fd); } -_X_EXPORT void +void xf86EnableGeneralHandler(pointer handler) { IHPtr ih; @@ -784,7 +722,7 @@ xf86EnableGeneralHandler(pointer handler) /* * As used currently by the DRI, the return value is ignored. */ -_X_EXPORT Bool +Bool xf86EnableVTSwitch(Bool new) { static Bool def = TRUE; @@ -803,23 +741,6 @@ xf86EnableVTSwitch(Bool new) } void -xf86ReloadInputDevs(int sig) -{ - InputInfoPtr pInfo; - - signal(sig, (void(*)(int))xf86ReloadInputDevs); - - pInfo = xf86InputDevs; - while (pInfo) { - DisableDevice(pInfo->dev); - EnableDevice(pInfo->dev); - pInfo = pInfo->next; - } - - return; -} - -_X_EXPORT void DDXRingBell(int volume, int pitch, int duration) { xf86OSRingBell(volume, pitch, duration); } diff --git a/xorg-server/hw/xfree86/common/xf86Globals.c b/xorg-server/hw/xfree86/common/xf86Globals.c index 04a96cbdc..d8f7f7f27 100644 --- a/xorg-server/hw/xfree86/common/xf86Globals.c +++ b/xorg-server/hw/xfree86/common/xf86Globals.c @@ -43,6 +43,7 @@ #include "xf86Parser.h" #include "xf86Xinput.h" #include "xf86InPriv.h" +#include "xf86Config.h" /* Globals that video drivers may access */ @@ -51,11 +52,11 @@ static int xf86CreateRootWindowKeyIndex; DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKeyIndex; /* Index of ScrnInfo in pScreen.devPrivates */ static int xf86ScreenKeyIndex; -_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex; +DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex; static int xf86PixmapKeyIndex; -_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex; -_X_EXPORT ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ -_X_EXPORT const unsigned char byte_reversed[256] = +DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex; +ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ +const unsigned char byte_reversed[256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, @@ -101,9 +102,11 @@ xf86InfoRec xf86Info = { .consoleFd = -1, .vtno = -1, .vtSysreq = FALSE, - .ddxSpecialKeys = SKWhenNeeded, .lastEventTime = -1, .vtRequestsPending = FALSE, +#ifdef sun + .vtPendingNum = -1, +#endif .dontVTSwitch = FALSE, .dontZap = FALSE, .dontZoom = FALSE, @@ -140,21 +143,18 @@ xf86InfoRec xf86Info = { #endif }; const char *xf86ConfigFile = NULL; -const char *xf86InputDeviceList = NULL; const char *xf86ModulePath = DEFAULT_MODULE_PATH; MessageType xf86ModPathFrom = X_DEFAULT; const char *xf86LogFile = DEFAULT_LOGPREFIX; MessageType xf86LogFileFrom = X_DEFAULT; Bool xf86LogFileWasOpened = FALSE; serverLayoutRec xf86ConfigLayout = {NULL, }; -_X_EXPORT confDRIRec xf86ConfigDRI = {0, }; +confDRIRec xf86ConfigDRI = {0, }; XF86ConfigPtr xf86configptr = NULL; Bool xf86Resetting = FALSE; Bool xf86Initialising = FALSE; -Bool xf86DoProbe = FALSE; Bool xf86DoConfigure = FALSE; Bool xf86DoShowOptions = FALSE; -Bool xf86DoModalias = FALSE; DriverPtr *xf86DriverList = NULL; int xf86NumDrivers = 0; InputDriverPtr *xf86InputDriverList = NULL; @@ -185,7 +185,6 @@ char *xf86LayoutName = NULL; char *xf86ScreenName = NULL; char *xf86PointerName = NULL; char *xf86KeyboardName = NULL; -Bool xf86ProbeOnly = FALSE; int xf86Verbose = DEFAULT_VERBOSE; int xf86LogVerbose = DEFAULT_LOG_VERBOSE; int xf86FbBpp = -1; @@ -200,7 +199,7 @@ Bool xf86VidModeDisabled = FALSE; Bool xf86VidModeAllowNonLocal = FALSE; #endif RootWinPropPtr *xf86RegisteredPropertiesTable = NULL; -_X_EXPORT Bool xf86inSuspend = FALSE; +Bool xf86inSuspend = FALSE; Bool xorgHWAccess = FALSE; struct pci_slot_match xf86IsolateDevice = { diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c index 00df10574..9a2468dd3 100644 --- a/xorg-server/hw/xfree86/common/xf86Helper.c +++ b/xorg-server/hw/xfree86/common/xf86Helper.c @@ -53,13 +53,12 @@ #include "xf86Priv.h" #include "xf86_OSlib.h" #include "micmap.h" -#include "xf86PciInfo.h" #include "xf86DDC.h" #include "xf86Xinput.h" #include "xf86InPriv.h" #include "mivalidate.h" -#include "xf86RAC.h" #include "xf86Bus.h" +#include "xf86Crtc.h" /* For xf86GetClocks */ #if defined(CSRG_BASED) || defined(__GNU__) @@ -72,7 +71,7 @@ static int xf86ScrnInfoPrivateCount = 0; /* Add a pointer to a new DriverRec to xf86DriverList */ -_X_EXPORT void +void xf86AddDriver(DriverPtr driver, pointer module, int flags) { /* Don't add null entries */ @@ -99,7 +98,7 @@ xf86AddDriver(DriverPtr driver, pointer module, int flags) xf86DriverList[xf86NumDrivers - 1]->refCount = 0; } -_X_EXPORT void +void xf86DeleteDriver(int drvIndex) { if (xf86DriverList[drvIndex] @@ -113,7 +112,7 @@ xf86DeleteDriver(int drvIndex) /* Add a pointer to a new InputDriverRec to xf86InputDriverList */ -_X_EXPORT void +void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags) { /* Don't add null entries */ @@ -168,20 +167,9 @@ xf86LookupInput(const char *name) return NULL; } -/* ABI stubs of despair */ -_X_EXPORT void -xf86AddModuleInfo(pointer info, pointer module) -{ -} - -_X_EXPORT void -xf86DeleteModuleInfo(int idx) -{ -} - /* Allocate a new ScrnInfoRec in xf86Screens */ -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags) { int i; @@ -204,22 +192,6 @@ xf86AllocateScreen(DriverPtr drv, int flags) xf86Screens[i]->drv = drv; drv->refCount++; xf86Screens[i]->module = DuplicateModule(drv->module, NULL); - /* - * set the initial access state. This will be modified after PreInit. - * XXX Or should we do it some other place? - */ - xf86Screens[i]->CurrentAccess = &xf86CurrentAccess; - xf86Screens[i]->resourceType = MEM_IO; - -#ifdef DEBUG - /* OOps -- What's this ? */ - ErrorF("xf86AllocateScreen - xf86Screens[%d]->pScreen = %p\n", - i, xf86Screens[i]->pScreen ); - if ( NULL != xf86Screens[i]->pScreen ) { - ErrorF("xf86Screens[%d]->pScreen->CreateWindow = %p\n", - i, xf86Screens[i]->pScreen->CreateWindow ); - } -#endif xf86Screens[i]->DriverFunc = drv->driverFunc; @@ -232,7 +204,7 @@ xf86AllocateScreen(DriverPtr drv, int flags) * data. To do this properly may require a driver hook. */ -_X_EXPORT void +void xf86DeleteScreen(int scrnIndex, int flags) { ScrnInfoPtr pScrn; @@ -288,7 +260,7 @@ xf86DeleteScreen(int scrnIndex, int flags) * Allocate a private in ScrnInfoRec. */ -_X_EXPORT int +int xf86AllocateScrnInfoPrivateIndex(void) { int idx, i; @@ -308,7 +280,7 @@ xf86AllocateScrnInfoPrivateIndex(void) } /* Allocate a new InputInfoRec and append it to the tail of xf86InputDevs. */ -_X_EXPORT InputInfoPtr +InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags) { InputInfoPtr new, *prev = NULL; @@ -335,7 +307,7 @@ xf86AllocateInput(InputDriverPtr drv, int flags) * data. To do this properly may require a driver hook. */ -_X_EXPORT void +void xf86DeleteInput(InputInfoPtr pInp, int flags) { InputInfoPtr p; @@ -376,7 +348,7 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) xfree(pInp); } -_X_EXPORT Bool +Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad) { int i; @@ -447,7 +419,7 @@ xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad) #define GLOBAL_DEFAULT_DEPTH 24 #endif -_X_EXPORT Bool +Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, int depth24flags) { @@ -764,7 +736,7 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, /* * Print out the selected depth and bpp. */ -_X_EXPORT void +void xf86PrintDepthBpp(ScrnInfoPtr scrp) { xf86DrvMsg(scrp->scrnIndex, scrp->depthFrom, "Depth %d, ", scrp->depth); @@ -775,7 +747,7 @@ xf86PrintDepthBpp(ScrnInfoPtr scrp) * xf86SetWeight sets scrp->weight, scrp->mask, scrp->offset, and for depths * greater than MAX_PSEUDO_DEPTH also scrp->rgbBits. */ -_X_EXPORT Bool +Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask) { MessageType weightFrom = X_DEFAULT; @@ -867,7 +839,7 @@ xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask) return TRUE; } -_X_EXPORT Bool +Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual) { MessageType visualFrom = X_DEFAULT; @@ -914,7 +886,7 @@ xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual) #define SET_GAMMA(g) \ (g) > GAMMA_ZERO ? (g) : 1.0 -_X_EXPORT Bool +Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma) { MessageType from = X_DEFAULT; @@ -949,6 +921,11 @@ xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma) scrp->gamma.green = 1.0; scrp->gamma.blue = 1.0; } + /* Pretend we succeeded if we support better a gamma system. + * This avoids a confusing message. + */ + if (xf86_crtc_supports_gamma(scrp)) + return TRUE; xf86DrvMsg(scrp->scrnIndex, from, "Using gamma correction (%.1f, %.1f, %.1f)\n", scrp->gamma.red, scrp->gamma.green, scrp->gamma.blue); @@ -968,7 +945,7 @@ xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma) #undef MMPERINCH #define MMPERINCH 25.4 -_X_EXPORT void +void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y) { MessageType from = X_DEFAULT; @@ -1065,7 +1042,7 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y) #undef MMPERINCH -_X_EXPORT void +void xf86SetBlackWhitePixels(ScreenPtr pScreen) { if (xf86FlipPixels) { @@ -1196,7 +1173,7 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) * whether they are switched in or out by keeping track of the root pixmap's * private data, and therefore don't need to access pScrnInfo->vtSema. */ -_X_EXPORT void +void xf86EnableDisableFBAccess(int scrnIndex, Bool enable) { ScrnInfoPtr pScrnInfo = xf86Screens[scrnIndex]; @@ -1238,7 +1215,7 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable) #undef PREFIX_SIZE #define PREFIX_SIZE 14 -_X_EXPORT void +void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, va_list args) { @@ -1265,7 +1242,7 @@ xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, #undef PREFIX_SIZE /* Print driver messages, with verbose level specified directly */ -_X_EXPORT void +void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) { @@ -1277,7 +1254,7 @@ xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, } /* Print driver messages, with verbose level of 1 (default) */ -_X_EXPORT void +void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) { va_list ap; @@ -1288,7 +1265,7 @@ xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) } /* Print non-driver messages with verbose level specified directly */ -_X_EXPORT void +void xf86MsgVerb(MessageType type, int verb, const char *format, ...) { va_list ap; @@ -1299,7 +1276,7 @@ xf86MsgVerb(MessageType type, int verb, const char *format, ...) } /* Print non-driver messages with verbose level of 1 (default) */ -_X_EXPORT void +void xf86Msg(MessageType type, const char *format, ...) { va_list ap; @@ -1310,7 +1287,7 @@ xf86Msg(MessageType type, const char *format, ...) } /* Just like ErrorF, but with the verbose level checked */ -_X_EXPORT void +void xf86ErrorFVerb(int verb, const char *format, ...) { va_list ap; @@ -1322,7 +1299,7 @@ xf86ErrorFVerb(int verb, const char *format, ...) } /* Like xf86ErrorFVerb, but with an implied verbose level of 1 */ -_X_EXPORT void +void xf86ErrorF(const char *format, ...) { va_list ap; @@ -1335,7 +1312,7 @@ xf86ErrorF(const char *format, ...) void -xf86LogInit() +xf86LogInit(void) { char *lf = NULL; @@ -1366,7 +1343,7 @@ xf86LogInit() } void -xf86CloseLog() +xf86CloseLog(void) { LogClose(); } @@ -1376,7 +1353,7 @@ xf86CloseLog() * Drivers can use these for using their own SymTabRecs. */ -_X_EXPORT const char * +const char * xf86TokenToString(SymTabPtr table, int token) { int i; @@ -1390,7 +1367,7 @@ xf86TokenToString(SymTabPtr table, int token) return(table[i].name); } -_X_EXPORT int +int xf86StringToToken(SymTabPtr table, const char *string) { int i; @@ -1407,7 +1384,7 @@ xf86StringToToken(SymTabPtr table, const char *string) /* * helper to display the clocks found on a card */ -_X_EXPORT void +void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from) { int j; @@ -1431,7 +1408,7 @@ xf86ShowClocks(ScrnInfoPtr scrp, MessageType from) * XXX This makes assumptions about the line width, etc. Maybe we could * use a more general "pretty print" function for messages. */ -_X_EXPORT void +void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips) { int len, i; @@ -1457,7 +1434,7 @@ xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips) } -_X_EXPORT int +int xf86MatchDevice(const char *drivername, GDevPtr **sectlist) { GDevPtr gdp, *pgdp = NULL; @@ -1467,10 +1444,6 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist) if (sectlist) *sectlist = NULL; - if (xf86DoModalias) return 0; - - if (xf86DoProbe) return 1; - if (xf86DoConfigure && xf86DoConfigurePass1) return 1; /* @@ -1590,7 +1563,7 @@ struct Inst { * \c DriverRec::driverName. In a future version of this function, remove * that parameter. */ -_X_EXPORT int +int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, GDevPtr *devList, int numDevs, DriverPtr drvp, @@ -1616,7 +1589,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, * Do this calculation and memory allocation once now to eliminate the * need for realloc calls inside the loop. */ - if ( !xf86DoProbe && !(xf86DoConfigure && xf86DoConfigurePass1) ) { + if (!(xf86DoConfigure && xf86DoConfigurePass1)) { unsigned max_entries = numDevs; iter = pci_slot_match_iterator_create(NULL); @@ -1729,9 +1702,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, } -#ifdef DEBUG - ErrorF("%s instances found: %d\n", driverName, allocatedInstances); -#endif + DebugF("%s instances found: %d\n", driverName, allocatedInstances); /* * Check for devices that need duplicated instances. This is required @@ -1814,9 +1785,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, instances[i].dev = dev; } } -#ifdef DEBUG - ErrorF("%s instances found: %d\n", driverName, numClaimedInstances); -#endif + DebugF("%s instances found: %d\n", driverName, numClaimedInstances); /* * Now check that a chipset or chipID override in the device section * is valid. Chipset has precedence over chipID. @@ -1920,11 +1889,9 @@ xf86MatchPciInstances(const char *driverName, int vendorID, if (instances[i].screen == 0 && !xf86CheckPciSlot( pPci )) continue; -#ifdef DEBUG - ErrorF("%s: card at %d:%d:%d is claimed by a Device section\n", + DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", driverName, pPci->bus, pPci->dev, pPci->func); -#endif - + /* Allocate an entry in the lists to be returned */ numFound++; retEntities = xnfrealloc(retEntities, numFound * sizeof(int)); @@ -1956,7 +1923,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, /* * xf86GetClocks -- get the dot-clocks via a BIG BAD hack ... */ -_X_EXPORT void +void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), void (*ProtectRegs)(ScrnInfoPtr, Bool), void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg, @@ -1968,8 +1935,6 @@ xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), /* First save registers that get written on */ (*ClockFunc)(pScrn, CLK_REG_SAVE); - xf86SetPriority(TRUE); - if (num > MAXCLOCKS) num = MAXCLOCKS; @@ -2017,8 +1982,6 @@ finish: (*BlankScreen)(pScrn, TRUE); } - xf86SetPriority(FALSE); - for (i = 0; i < num; i++) { if (i != knownclkindex) @@ -2047,31 +2010,7 @@ finish: (*ClockFunc)(pScrn, CLK_REG_RESTORE); } -_X_EXPORT void -xf86SetPriority(Bool up) -{ - static int saved_nice; - - if (up) { -#ifdef HAS_SETPRIORITY - saved_nice = getpriority(PRIO_PROCESS, 0); - setpriority(PRIO_PROCESS, 0, -20); -#endif -#if defined(SYSV) || defined(SVR4) || defined(linux) - saved_nice = nice(0); - nice(-20 - saved_nice); -#endif - } else { -#ifdef HAS_SETPRIORITY - setpriority(PRIO_PROCESS, 0, saved_nice); -#endif -#if defined(SYSV) || defined(SVR4) || defined(linux) - nice(20 + saved_nice); -#endif - } -} - -_X_EXPORT const char * +const char * xf86GetVisualName(int visual) { if (visual < 0 || visual > DirectColor) @@ -2081,132 +2020,125 @@ xf86GetVisualName(int visual) } -_X_EXPORT int -xf86GetVerbosity() +int +xf86GetVerbosity(void) { return max(xf86Verbose, xf86LogVerbose); } -_X_EXPORT Pix24Flags -xf86GetPix24() +Pix24Flags +xf86GetPix24(void) { return xf86Info.pixmap24; } -_X_EXPORT int -xf86GetDepth() +int +xf86GetDepth(void) { return xf86Depth; } -_X_EXPORT rgb -xf86GetWeight() +rgb +xf86GetWeight(void) { return xf86Weight; } -_X_EXPORT Gamma -xf86GetGamma() +Gamma +xf86GetGamma(void) { return xf86Gamma; } -_X_EXPORT Bool -xf86GetFlipPixels() +Bool +xf86GetFlipPixels(void) { return xf86FlipPixels; } -_X_EXPORT const char * -xf86GetServerName() +const char * +xf86GetServerName(void) { return xf86ServerName; } -_X_EXPORT Bool -xf86ServerIsExiting() +Bool +xf86ServerIsExiting(void) { return (dispatchException & DE_TERMINATE) == DE_TERMINATE; } -_X_EXPORT Bool -xf86ServerIsResetting() +Bool +xf86ServerIsResetting(void) { return xf86Resetting; } Bool -xf86ServerIsInitialising() +xf86ServerIsInitialising(void) { return xf86Initialising; } -_X_EXPORT Bool +Bool xf86ServerIsOnlyDetecting(void) { - return xf86DoProbe || xf86DoConfigure; -} - - -_X_EXPORT Bool -xf86ServerIsOnlyProbing(void) -{ - return xf86ProbeOnly; + return xf86DoConfigure; } -_X_EXPORT Bool -xf86CaughtSignal() +Bool +xf86CaughtSignal(void) { return xf86Info.caughtSignal; } -_X_EXPORT Bool -xf86GetVidModeAllowNonLocal() +Bool +xf86GetVidModeAllowNonLocal(void) { return xf86Info.vidModeAllowNonLocal; } -_X_EXPORT Bool -xf86GetVidModeEnabled() +Bool +xf86GetVidModeEnabled(void) { return xf86Info.vidModeEnabled; } -_X_EXPORT Bool -xf86GetModInDevAllowNonLocal() +Bool +xf86GetModInDevAllowNonLocal(void) { return xf86Info.miscModInDevAllowNonLocal; } -_X_EXPORT Bool -xf86GetModInDevEnabled() +Bool +xf86GetModInDevEnabled(void) { return xf86Info.miscModInDevEnabled; } -_X_EXPORT Bool -xf86GetAllowMouseOpenFail() +Bool +xf86GetAllowMouseOpenFail(void) { return xf86Info.allowMouseOpenFail; } -_X_EXPORT Bool -xf86IsPc98() +Bool +xf86IsPc98(void) { #ifdef __i386__ return xf86Info.pc98; @@ -2215,20 +2147,20 @@ xf86IsPc98() #endif } -_X_EXPORT void -xf86DisableRandR() +void +xf86DisableRandR(void) { xf86Info.disableRandR = TRUE; xf86Info.randRFrom = X_PROBED; } -_X_EXPORT CARD32 +CARD32 xf86GetModuleVersion(pointer module) { return (CARD32)LoaderGetModuleVersion(module); } -_X_EXPORT pointer +pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name) { pointer ret; @@ -2241,7 +2173,7 @@ xf86LoadDrvSubModule(DriverPtr drv, const char *name) return ret; } -_X_EXPORT pointer +pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) { pointer ret; @@ -2257,7 +2189,7 @@ xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) /* * xf86LoadOneModule loads a single module. */ -_X_EXPORT pointer +pointer xf86LoadOneModule(char *name, pointer opt) { int errmaj, errmin; @@ -2285,7 +2217,7 @@ xf86LoadOneModule(char *name, pointer opt) return mod; } -_X_EXPORT void +void xf86UnloadSubModule(pointer mod) { /* @@ -2297,34 +2229,12 @@ xf86UnloadSubModule(pointer mod) #endif } -_X_EXPORT Bool +Bool xf86LoaderCheckSymbol(const char *name) { return LoaderSymbol(name) != NULL; } -/* These two are just ABI stubs, they don't do anything in dlloader world */ -_X_EXPORT void -xf86LoaderReqSymLists(const char **list0, ...) -{ -} - -_X_EXPORT void -xf86LoaderReqSymbols(const char *sym0, ...) -{ -} - -_X_EXPORT void -xf86LoaderRefSymLists(const char **list0, ...) -{ -} - -_X_EXPORT void -xf86LoaderRefSymbols(const char *sym0, ...) -{ -} - - typedef enum { OPTION_BACKING_STORE } BSOpts; @@ -2334,7 +2244,7 @@ static const OptionInfoRec BSOptions[] = { { -1, NULL, OPTV_NONE, {0}, FALSE } }; -_X_EXPORT void +void xf86SetBackingStore(ScreenPtr pScreen) { Bool useBS = FALSE; @@ -2374,7 +2284,7 @@ static const OptionInfoRec SMOptions[] = { { -1, NULL, OPTV_NONE, {0}, FALSE } }; -_X_EXPORT void +void xf86SetSilkenMouse (ScreenPtr pScreen) { Bool useSM = TRUE; @@ -2388,13 +2298,8 @@ xf86SetSilkenMouse (ScreenPtr pScreen) /* check for commandline option here */ /* disable if screen shares resources */ - if (((pScrn->racMemFlags & RAC_CURSOR) && - !xf86NoSharedResources(pScrn->scrnIndex,MEM)) || - ((pScrn->racIoFlags & RAC_CURSOR) && - !xf86NoSharedResources(pScrn->scrnIndex,IO))) { - useSM = FALSE; - from = X_PROBED; - } else if (xf86silkenMouseDisableFlag) { + /* TODO VGA arb disable silken mouse */ + if (xf86silkenMouseDisableFlag) { from = X_CMDLINE; useSM = FALSE; } else { @@ -2415,7 +2320,7 @@ xf86SetSilkenMouse (ScreenPtr pScreen) /* Wrote this function for the PM2 Xv driver, preliminary. */ -_X_EXPORT pointer +pointer xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name, char **adaptor_name, pointer *adaptor_options) { @@ -2445,13 +2350,43 @@ xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name, #include "loader/os.c" /* new RAC */ +/* + * xf86ConfigPciEntityInactive() -- This function can be used + * to configure an inactive entity as well as to reconfigure an + * previously active entity inactive. If the entity has been + * assigned to a screen before it will be removed. If p_chip is + * non-NULL all static resources listed there will be registered. + */ +static void +xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, + EntityProc init, EntityProc enter, + EntityProc leave, pointer private) +{ + ScrnInfoPtr pScrn; + + if ((pScrn = xf86FindScreenForEntity(pEnt->index))) + xf86RemoveEntityFromScreen(pScrn,pEnt->index); -_X_EXPORT ScrnInfoPtr + /* shared resources are only needed when entity is active: remove */ + xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); +} + +static void +xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, + EntityProc enter, EntityProc leave, pointer private) +{ + ScrnInfoPtr pScrn; + + if ((pScrn = xf86FindScreenForEntity(pEnt->index))) + xf86RemoveEntityFromScreen(pScrn,pEnt->index); + xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); +} + +ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, - PciChipsets *p_chip, resList res, EntityProc init, + PciChipsets *p_chip, void *dummy, EntityProc init, EntityProc enter, EntityProc leave, pointer private) { - PciChipsets *p_id; EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); if (!pEnt) return pScrn; @@ -2461,7 +2396,7 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, return pScrn; } if (!pEnt->active) { - xf86ConfigPciEntityInactive(pEnt, p_chip, res, init, enter, + xf86ConfigPciEntityInactive(pEnt, p_chip, init, enter, leave, private); xfree(pEnt); return pScrn; @@ -2476,21 +2411,14 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, if (xf86IsEntityShared(entityIndex)) { return pScrn; } - if (p_chip) { - for (p_id = p_chip; p_id->numChipset != -1; p_id++) { - if (pEnt->chipset == p_id->numChipset) break; - } - xf86ClaimFixedResources(p_id->resList,entityIndex); - } xfree(pEnt); - xf86ClaimFixedResources(res,entityIndex); xf86SetEntityFuncs(entityIndex,init,enter,leave,private); return pScrn; } -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer private) @@ -2520,16 +2448,15 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, /* * - * OBSOLETE ! xf86ConfigActivePciEntity() is an obsolete functions. - * They the are likely to be removed. Don't use! + * OBSOLETE ! xf86ConfigActivePciEntity() is an obsolete function. + * It is likely to be removed. Don't use! */ -_X_EXPORT Bool +Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, - PciChipsets *p_chip, resList res, EntityProc init, + PciChipsets *p_chip, void *dummy, EntityProc init, EntityProc enter, EntityProc leave, pointer private) { - PciChipsets *p_id; EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); if (!pEnt) return FALSE; @@ -2539,62 +2466,14 @@ xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, } xf86AddEntityToScreen(pScrn,entityIndex); - if (p_chip) { - for (p_id = p_chip; p_id->numChipset != -1; p_id++) { - if (pEnt->chipset == p_id->numChipset) break; - } - xf86ClaimFixedResources(p_id->resList,entityIndex); - } xfree(pEnt); - - xf86ClaimFixedResources(res,entityIndex); if (!xf86SetEntityFuncs(entityIndex,init,enter,leave,private)) return FALSE; return TRUE; } -/* - * xf86ConfigPciEntityInactive() -- This functions can be used - * to configure an inactive entity as well as to reconfigure an - * previously active entity inactive. If the entity has been - * assigned to a screen before it will be removed. If p_pci is - * non-NULL all static resources listed there will be registered. - */ -_X_EXPORT void -xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, - resList res, EntityProc init, EntityProc enter, - EntityProc leave, pointer private) -{ - PciChipsets *p_id; - ScrnInfoPtr pScrn; - - if ((pScrn = xf86FindScreenForEntity(pEnt->index))) - xf86RemoveEntityFromScreen(pScrn,pEnt->index); - else if (p_chip) { - for (p_id = p_chip; p_id->numChipset != -1; p_id++) { - if (pEnt->chipset == p_id->numChipset) break; - } - xf86ClaimFixedResources(p_id->resList,pEnt->index); - } - xf86ClaimFixedResources(res,pEnt->index); - /* shared resources are only needed when entity is active: remove */ - xf86DeallocateResourcesForEntity(pEnt->index, ResShared); - xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); -} - -void -xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, - EntityProc enter, EntityProc leave, pointer private) -{ - ScrnInfoPtr pScrn; - - if ((pScrn = xf86FindScreenForEntity(pEnt->index))) - xf86RemoveEntityFromScreen(pScrn,pEnt->index); - xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); -} - -_X_EXPORT Bool +Bool xf86IsScreenPrimary(int scrnIndex) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; @@ -2607,7 +2486,7 @@ xf86IsScreenPrimary(int scrnIndex) return FALSE; } -_X_EXPORT int +int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, int format, unsigned long len, pointer value ) { @@ -2615,10 +2494,8 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, int i; Bool existing = FALSE; -#ifdef DEBUG - ErrorF("xf86RegisterRootWindowProperty(%d, %ld, %ld, %d, %ld, %p)\n", + DebugF("xf86RegisterRootWindowProperty(%d, %ld, %ld, %d, %ld, %p)\n", ScrnIndex, property, type, format, len, value); -#endif if (ScrnIndex<0 || ScrnIndex>=xf86NumScreens) { return(BadMatch); @@ -2654,15 +2531,11 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, pNewProp->size = len; pNewProp->data = value; -#ifdef DEBUG - ErrorF("new property filled\n"); -#endif + DebugF("new property filled\n"); if (NULL==xf86RegisteredPropertiesTable) { -#ifdef DEBUG - ErrorF("creating xf86RegisteredPropertiesTable[] size %d\n", + DebugF("creating xf86RegisteredPropertiesTable[] size %d\n", xf86NumScreens); -#endif if ( NULL==(xf86RegisteredPropertiesTable=(RootWinPropPtr*)xnfcalloc(sizeof(RootWinProp),xf86NumScreens) )) { return(BadAlloc); } @@ -2671,12 +2544,10 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, } } -#ifdef DEBUG - ErrorF("xf86RegisteredPropertiesTable %p\n", + DebugF("xf86RegisteredPropertiesTable %p\n", (void *)xf86RegisteredPropertiesTable); - ErrorF("xf86RegisteredPropertiesTable[%d] %p\n", + DebugF("xf86RegisteredPropertiesTable[%d] %p\n", ScrnIndex, (void *)xf86RegisteredPropertiesTable[ScrnIndex]); -#endif if (!existing) { if ( xf86RegisteredPropertiesTable[ScrnIndex] == NULL) { @@ -2684,21 +2555,17 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, } else { pRegProp = xf86RegisteredPropertiesTable[ScrnIndex]; while (pRegProp->next != NULL) { -#ifdef DEBUG - ErrorF("- next %p\n", (void *)pRegProp); -#endif + DebugF("- next %p\n", (void *)pRegProp); pRegProp = pRegProp->next; } pRegProp->next = pNewProp; } } -#ifdef DEBUG - ErrorF("xf86RegisterRootWindowProperty succeeded\n"); -#endif + DebugF("xf86RegisterRootWindowProperty succeeded\n"); return(Success); } -_X_EXPORT Bool +Bool xf86IsUnblank(int mode) { switch(mode) { @@ -2714,15 +2581,8 @@ xf86IsUnblank(int mode) } } -_X_EXPORT void +void xf86MotionHistoryAllocate(LocalDevicePtr local) { AllocateMotionHistory(local->dev); } - -_X_EXPORT int -xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, - unsigned long stop, ScreenPtr pScreen, BOOL core) -{ - return GetMotionHistory(pDev, buff, start, stop, pScreen, core); -} diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c index f029915c6..f9224b1a6 100644 --- a/xorg-server/hw/xfree86/common/xf86Init.c +++ b/xorg-server/hw/xfree86/common/xf86Init.c @@ -43,7 +43,6 @@ #include #endif -#define NEED_EVENTS #include #include #include @@ -68,7 +67,6 @@ #include "xf86Config.h" #include "xf86_OSlib.h" #include "xorgVersion.h" -#include "xf86Date.h" #include "xf86Build.h" #include "mipointer.h" #include @@ -80,11 +78,11 @@ #include "picturestr.h" #endif +#include "xf86VGAarbiter.h" #include "globals.h" #ifdef DPMSExtension -#define DPMS_SERVER -#include +#include #include "dpmsproc.h" #endif @@ -95,7 +93,6 @@ /* forward declarations */ static Bool probe_devices_from_device_sections(DriverPtr drvp); static Bool add_matching_devices_to_configure_list(DriverPtr drvp); -static Bool check_for_matching_devices(DriverPtr drvp); #ifdef XF86PM void (*xf86OSPMClose)(void) = NULL; @@ -175,7 +172,7 @@ xf86PrintBanner(void) ErrorF(" (%s)", XORG_CUSTOM_VERSION); #endif #ifndef XORG_DATE -#define XORG_DATE XF86_DATE +# define XORG_DATE "Unknown" #endif ErrorF("\nRelease Date: %s\n", XORG_DATE); ErrorF("X Protocol Version %d, Revision %d\n", @@ -192,6 +189,21 @@ xf86PrintBanner(void) if (uname(&name) >= 0) { ErrorF("Current Operating System: %s %s %s %s %s\n", name.sysname, name.nodename, name.release, name.version, name.machine); +#ifdef linux + do { + char buf[80]; + int fd = open("/proc/cmdline", O_RDONLY); + if (fd != -1) { + ErrorF("Kernel command line: "); + memset(buf, 0, 80); + while (read(fd, buf, 80) > 0) { + ErrorF("%.80s", buf); + memset(buf, 0, 80); + } + close(fd); + } + } while (0); +#endif } } #endif @@ -217,23 +229,10 @@ xf86PrintBanner(void) #endif } #endif -#if defined(CLOG_DATE) && (CLOG_DATE > 19000000) - { - struct tm t; - char buf[100]; - - bzero(&t, sizeof(t)); - bzero(buf, sizeof(buf)); - t.tm_mday = CLOG_DATE % 100; - t.tm_mon = (CLOG_DATE / 100) % 100 - 1; - t.tm_year = CLOG_DATE / 10000 - 1900; - if (strftime(buf, sizeof(buf), "%d %B %Y", &t)) - ErrorF("Changelog Date: %s\n", buf); - } -#endif #if defined(BUILDERSTRING) ErrorF("%s \n",BUILDERSTRING); #endif + ErrorF("Current version of pixman: %s\n", pixman_version_string()); ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n" "\tto make sure that you have the latest version.\n"); } @@ -244,84 +243,6 @@ xf86PrintMarkers(void) LogPrintMarkers(); } -static void -DoModalias(void) -{ - int i = -1; - char **vlist; - - /* Get all the drivers */ - vlist = xf86DriverlistFromCompile(); - if (!vlist) { - ErrorF("Missing output drivers. PCI Access dump failed.\n"); - goto bail; - } - - /* Load all the drivers that were found. */ - xf86LoadModules(vlist, NULL); - - xfree(vlist); - - /* Iterate through each driver */ - for (i = 0; i < xf86NumDrivers; i++) { - struct pci_id_match *match; - - /* Iterate through each pci id match data, dumping it to the screen */ - for (match = (struct pci_id_match *) xf86DriverList[i]->supported_devices ; - match && !(!match->vendor_id && !match->device_id) ; match++) { - /* Prefix */ - ErrorF("alias pci:"); - - /* Vendor */ - if (match->vendor_id == ~0) - ErrorF("v*"); - else - ErrorF("v%08X", match->vendor_id); - - /* Device */ - if (match->device_id == ~0) - ErrorF("d*"); - else - ErrorF("d%08X", match->device_id); - - /* Subvendor */ - if (match->subvendor_id == ~0) - ErrorF("sv*"); - else - ErrorF("sv%08X", match->subvendor_id); - - /* Subdevice */ - if (match->subdevice_id == ~0) - ErrorF("sd*"); - else - ErrorF("sd%08X", match->subdevice_id); - - /* Class */ - if ((match->device_class_mask >> 16 & 0xFF) == 0xFF) - ErrorF("bc%02X", match->device_class >> 16 & 0xFF); - else - ErrorF("bc*"); - if ((match->device_class_mask >> 8 & 0xFF) == 0xFF) - ErrorF("sc%02X", match->device_class >> 8 & 0xFF); - else - ErrorF("sc*"); - if ((match->device_class_mask & 0xFF) == 0xFF) - ErrorF("i%02X*", match->device_class & 0xFF); - else - ErrorF("i*"); - - /* Suffix (driver) */ - ErrorF(" %s\n", xf86DriverList[i]->driverName); - } - } - -bail: - OsCleanup(TRUE); - AbortDDX(); - fflush(stderr); - exit(0); -} - static Bool xf86CreateRootWindow(WindowPtr pWin) { @@ -332,9 +253,7 @@ xf86CreateRootWindow(WindowPtr pWin) CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey); -#ifdef DEBUG - ErrorF("xf86CreateRootWindow(%p)\n", pWin); -#endif + DebugF("xf86CreateRootWindow(%p)\n", pWin); if ( pScreen->CreateWindow != xf86CreateRootWindow ) { /* Can't find hook we are hung on */ @@ -381,9 +300,7 @@ xf86CreateRootWindow(WindowPtr pWin) } } -#ifdef DEBUG - ErrorF("xf86CreateRootWindow() returns %d\n", ret); -#endif + DebugF("xf86CreateRootWindow() returns %d\n", ret); return (ret); } @@ -396,23 +313,25 @@ InstallSignalHandlers(void) */ xf86Info.caughtSignal=FALSE; if (!xf86Info.notrapSignals) { - signal(SIGSEGV,xf86SigHandler); - signal(SIGILL,xf86SigHandler); + OsRegisterSigWrapper(xf86SigWrapper); + } else { + signal(SIGSEGV, SIG_DFL); + signal(SIGILL, SIG_DFL); #ifdef SIGEMT - signal(SIGEMT,xf86SigHandler); + signal(SIGEMT, SIG_DFL); #endif - signal(SIGFPE,xf86SigHandler); + signal(SIGFPE, SIG_DFL); #ifdef SIGBUS - signal(SIGBUS,xf86SigHandler); + signal(SIGBUS, SIG_DFL); #endif #ifdef SIGSYS - signal(SIGSYS,xf86SigHandler); + signal(SIGSYS, SIG_DFL); #endif #ifdef SIGXCPU - signal(SIGXCPU,xf86SigHandler); + signal(SIGXCPU, SIG_DFL); #endif #ifdef SIGXFSZ - signal(SIGXFSZ,xf86SigHandler); + signal(SIGXFSZ, SIG_DFL); #endif } } @@ -485,10 +404,8 @@ probe_devices_from_device_sections(DriverPtr drvp) if ( (devList[i]->screen == 0) && !xf86CheckPciSlot( pPci ) ) continue; -#ifdef DEBUG - ErrorF("%s: card at %d:%d:%d is claimed by a Device section\n", + DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", drvp->driverName, pPci->bus, pPci->dev, pPci->func); -#endif /* Allocate an entry in the lists to be returned */ entry = xf86ClaimPciSlot(pPci, drvp, device_id, @@ -499,7 +416,7 @@ probe_devices_from_device_sections(DriverPtr drvp) for ( k = 0; k < xf86NumEntities; k++ ) { EntityPtr pEnt = xf86Entities[k]; - if (pEnt->busType != BUS_PCI) + if (pEnt->bus.type != BUS_PCI) continue; if (pEnt->bus.id.pci == pPci) { @@ -514,7 +431,8 @@ probe_devices_from_device_sections(DriverPtr drvp) if ((*drvp->PciProbe)(drvp, entry, pPci, devices[j].match_data)) { foundScreen = TRUE; - } + } else + xf86UnclaimPciSlot(pPci); } break; @@ -572,32 +490,6 @@ add_matching_devices_to_configure_list(DriverPtr drvp) return (numFound != 0); } - -Bool -check_for_matching_devices(DriverPtr drvp) -{ - const struct pci_id_match * const devices = drvp->supported_devices; - int j; - - - for (j = 0; ! END_OF_MATCHES(devices[j]); j++) { - struct pci_device_iterator *iter; - struct pci_device *dev; - - iter = pci_id_match_iterator_create(& devices[j]); - dev = pci_device_next(iter); - pci_iterator_destroy(iter); - - if (dev != NULL) { - return TRUE; - } - } - - - return FALSE; -} - - /** * Call the driver's correct probe function. * @@ -619,11 +511,7 @@ xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) Bool foundScreen = FALSE; if ( drv->PciProbe != NULL ) { - if ( xf86DoProbe ) { - assert( detect_only ); - foundScreen = check_for_matching_devices( drv ); - } - else if ( xf86DoConfigure && xf86DoConfigurePass1 ) { + if ( xf86DoConfigure && xf86DoConfigurePass1 ) { assert( detect_only ); foundScreen = add_matching_devices_to_configure_list( drv ); } @@ -643,76 +531,6 @@ xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) return foundScreen; } -static void -DoProbe(void) -{ - int i; - Bool probeResult; - Bool ioEnableFailed = FALSE; - - /* Find the list of video driver modules. */ - char **list = xf86DriverlistFromCompile(); - char **l; - - if (list) { - ErrorF("List of video driver modules:\n"); - for (l = list; *l; l++) - ErrorF("\t%s\n", *l); - } else { - ErrorF("No video driver modules found\n"); - } - - /* Load all the drivers that were found. */ - xf86LoadModules(list, NULL); - - /* Disable PCI devices */ - xf86AccessInit(); - - /* Call all of the probe functions, reporting the results. */ - for (i = 0; i < xf86NumDrivers; i++) { - DriverRec * const drv = xf86DriverList[i]; - - if (!xorgHWAccess) { - xorgHWFlags flags; - if (!drv->driverFunc - || !drv->driverFunc( NULL, GET_REQUIRED_HW_INTERFACES, &flags ) - || NEED_IO_ENABLED(flags)) { - if (ioEnableFailed) - continue; - if (!xf86EnableIO()) { - ioEnableFailed = TRUE; - continue; - } - xorgHWAccess = TRUE; - } - } - - - xf86MsgVerb(X_INFO, 3, "Probing in driver %s\n", drv->driverName); - - probeResult = xf86CallDriverProbe( drv, TRUE ); - if (!probeResult) { - xf86ErrorF("Probe in driver `%s' returns FALSE\n", - drv->driverName); - } else { - xf86ErrorF("Probe in driver `%s' returns TRUE\n", - drv->driverName); - - /* If we have a result, then call driver's Identify function */ - if (drv->Identify != NULL) { - const int verbose = xf86SetVerbosity(1); - (*drv->Identify)(0); - xf86SetVerbosity(verbose); - } - } - } - - OsCleanup(TRUE); - AbortDDX(); - fflush(stderr); - exit(0); -} - /* * InitOutput -- * Initialize screenInfo for all actually accessible framebuffers. @@ -743,7 +561,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) else xf86ServerName = argv[0]; - if (!xf86DoModalias) { xf86PrintBanner(); xf86PrintMarkers(); if (xf86LogFile) { @@ -754,10 +571,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86MsgVerb(xf86LogFileFrom, 0, "Log file: \"%s\", Time: %s", xf86LogFile, ct); } - } /* Read and parse the config file */ - if (!xf86DoProbe && !xf86DoConfigure && !xf86DoModalias && !xf86DoShowOptions) { + if (!xf86DoConfigure && !xf86DoShowOptions) { switch (xf86HandleConfigFile(FALSE)) { case CONFIG_OK: break; @@ -790,16 +606,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* Do a general bus probe. This will be a PCI probe for x86 platforms */ xf86BusProbe(); - if (xf86DoProbe) - DoProbe(); - if (xf86DoConfigure) DoConfigure(); - /* Do the PCI Access dump */ - if (xf86DoModalias) - DoModalias(); - if (autoconfig) { if (!xf86AutoConfig()) { xf86Msg(X_ERROR, "Auto configuration failed\n"); @@ -811,9 +620,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86OSPMClose = xf86OSPMOpen(); #endif - /* Initialise the resource broker */ - xf86ResourceBrokerInit(); - /* Load all modules specified explicitly in the config file */ if ((modulelist = xf86ModulelistFromConfig(&optionlist))) { xf86LoadModules(modulelist, optionlist); @@ -924,6 +730,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) return; } + xf86VGAarbiterInit(); + /* * Match up the screens found by the probes against those specified * in the config file. Remove the ones that won't be used. Sort @@ -1004,10 +812,12 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) */ for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); + xf86VGAarbiterScrnInit(xf86Screens[i]); + xf86VGAarbiterLock(xf86Screens[i]); if (xf86Screens[i]->PreInit && xf86Screens[i]->PreInit(xf86Screens[i], 0)) xf86Screens[i]->configured = TRUE; + xf86VGAarbiterUnlock(xf86Screens[i]); } for (i = 0; i < xf86NumScreens; i++) if (!xf86Screens[i]->configured) @@ -1033,15 +843,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } } - /* XXX Should this be before or after loading dependent modules? */ - if (xf86ProbeOnly) - { - OsCleanup(TRUE); - AbortDDX(); - fflush(stderr); - exit(0); - } - /* Remove (unload) drivers that are not required */ for (i = 0; i < xf86NumDrivers; i++) if (xf86DriverList[i] && xf86DriverList[i]->refCount <= 0) @@ -1057,7 +858,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* * Collect all pixmap formats and check for conflicts at the display * level. Should we die here? Or just delete the offending screens? - * Also, should this be done for -probeonly? */ screenpix24 = Pix24DontCare; for (i = 0; i < xf86NumScreens; i++) { @@ -1162,10 +962,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) break; } } - - /* set up the proper access funcs */ - xf86PostPreInit(); - } else { /* * serverGeneration != 1; some OSs have to do things here, too. @@ -1230,19 +1026,22 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) #endif /* SCO325 */ for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); + xf86VGAarbiterLock(xf86Screens[i]); /* * Almost everything uses these defaults, and many of those that * don't, will wrap them. */ xf86Screens[i]->EnableDisableFBAccess = xf86EnableDisableFBAccess; +#ifdef XFreeXDGA xf86Screens[i]->SetDGAMode = xf86SetDGAMode; +#endif xf86Screens[i]->DPMSSet = NULL; xf86Screens[i]->LoadPalette = NULL; xf86Screens[i]->SetOverscan = NULL; xf86Screens[i]->DriverFunc = NULL; xf86Screens[i]->pScreen = NULL; scr_index = AddScreen(xf86Screens[i]->ScreenInit, argc, argv); + xf86VGAarbiterUnlock(xf86Screens[i]); if (scr_index == i) { /* * Hook in our ScrnInfoRec, and initialise some other pScreen @@ -1258,12 +1057,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) FatalError("AddScreen/ScreenInit failed for driver %d\n", i); } -#ifdef DEBUG - ErrorF("InitOutput - xf86Screens[%d]->pScreen = %p\n", + DebugF("InitOutput - xf86Screens[%d]->pScreen = %p\n", i, xf86Screens[i]->pScreen ); - ErrorF("xf86Screens[%d]->pScreen->CreateWindow = %p\n", + DebugF("xf86Screens[%d]->pScreen->CreateWindow = %p\n", i, xf86Screens[i]->pScreen->CreateWindow ); -#endif dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates, xf86CreateRootWindowKey, @@ -1306,9 +1103,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) */ void -InitInput(argc, argv) - int argc; - char **argv; +InitInput(int argc, char **argv) { IDevPtr* pDev; DeviceIntPtr dev; @@ -1337,7 +1132,7 @@ InitInput(argc, argv) */ void -OsVendorInit() +OsVendorInit(void) { static Bool beenHere = FALSE; @@ -1382,7 +1177,7 @@ OsVendorInit() */ void -ddxGiveUp() +ddxGiveUp(void) { int i; @@ -1392,16 +1187,12 @@ ddxGiveUp() xf86OSPMClose = NULL; #endif - xf86AccessLeaveState(); - for (i = 0; i < xf86NumScreens; i++) { /* * zero all access functions to * trap calls when switched away. */ xf86Screens[i]->vtSema = FALSE; - xf86Screens[i]->access = NULL; - xf86Screens[i]->busAccess = NULL; } #ifdef XFreeXDGA @@ -1427,7 +1218,7 @@ ddxGiveUp() */ void -AbortDDX() +AbortDDX(void) { int i; @@ -1448,7 +1239,6 @@ AbortDDX() * we might not have been wrapped yet. Therefore enable * screen explicitely. */ - xf86EnableAccess(xf86Screens[i]); (xf86Screens[i]->LeaveVT)(i, 0); } } @@ -1463,7 +1253,7 @@ AbortDDX() } void -OsVendorFatalError() +OsVendorFatalError(void) { #ifdef VENDORSUPPORT ErrorF("\nPlease refer to your Operating System Vendor support pages\n" @@ -1535,9 +1325,11 @@ ddxProcessArgument(int argc, char **argv, int i) } /* First the options that are only allowed for root */ - if (getuid() == 0 || geteuid() != 0) - { - if (!strcmp(argv[i], "-modulepath")) + if (!strcmp(argv[i], "-modulepath") || !strcmp(argv[i], "-logfile")) { + if ( (geteuid() == 0) && (getuid() != 0) ) { + FatalError("The '%s' option can only be used by root.\n", argv[i]); + } + else if (!strcmp(argv[i], "-modulepath")) { char *mp; CHECK_FOR_REQUIRED_ARGUMENT(); @@ -1561,8 +1353,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86LogFileFrom = X_CMDLINE; return 2; } - } else if (!strcmp(argv[i], "-modulepath") || !strcmp(argv[i], "-logfile")) { - FatalError("The '%s' option can only be used by root.\n", argv[i]); } if (!strcmp(argv[i], "-config") || !strcmp(argv[i], "-xf86config")) { @@ -1577,11 +1367,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86ConfigFile = argv[i + 1]; return 2; } - if (!strcmp(argv[i],"-probeonly")) - { - xf86ProbeOnly = TRUE; - return 1; - } if (!strcmp(argv[i],"-flipPixels")) { xf86FlipPixels = TRUE; @@ -1797,11 +1582,6 @@ ddxProcessArgument(int argc, char **argv, int i) return 1; } #endif - if (!strcmp(argv[i], "-probe")) - { - xf86DoProbe = TRUE; - return 1; - } if (!strcmp(argv[i], "-configure")) { if (getuid() != 0 && geteuid() == 0) { @@ -1812,12 +1592,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86AllowMouseOpenFail = TRUE; return 1; } - if (!strcmp(argv[i], "-modalias")) - { - xf86DoModalias = TRUE; - xf86AllowMouseOpenFail = TRUE; - return 1; - } if (!strcmp(argv[i], "-showopts")) { if (getuid() != 0 && geteuid() == 0) { @@ -1862,7 +1636,7 @@ ddxProcessArgument(int argc, char **argv, int i) */ void -ddxUseMsg() +ddxUseMsg(void) { ErrorF("\n"); ErrorF("\n"); @@ -1874,10 +1648,8 @@ ddxUseMsg() ErrorF("-configure probe for devices and write an "__XCONFIGFILE__"\n"); ErrorF("-showopts print available options for all installed drivers\n"); } - ErrorF("-modalias output a modalias-style filter for each driver installed\n"); ErrorF("-config file specify a configuration file, relative to the\n"); ErrorF(" "__XCONFIGFILE__" search path, only root can use absolute\n"); - ErrorF("-probeonly probe for devices, then exit\n"); ErrorF("-verbose [n] verbose startup messages\n"); ErrorF("-logverbose [n] verbose log messages\n"); ErrorF("-quiet minimal startup messages\n"); @@ -1957,7 +1729,7 @@ xf86LoadModules(char **list, pointer *optlist) /* Pixmap format stuff */ -_X_EXPORT PixmapFormatPtr +PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth) { int i; @@ -2002,7 +1774,7 @@ xf86GetPixFormat(ScrnInfoPtr pScrn, int depth) return NULL; } -_X_EXPORT int +int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth) { PixmapFormatPtr format; diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c index 24a431dc5..0e43946c5 100644 --- a/xorg-server/hw/xfree86/common/xf86Mode.c +++ b/xorg-server/hw/xfree86/common/xf86Mode.c @@ -71,7 +71,7 @@ printModeRejectMessage(int index, DisplayModePtr p, int status) * Find closest clock to given frequency (in kHz). This assumes the * number of clocks is greater than zero. */ -_X_EXPORT int +int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, int DivFactor, int MulFactor, int *divider) { @@ -110,7 +110,7 @@ xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, * Convert a ModeStatus value to a printable message */ -_X_EXPORT const char * +const char * xf86ModeStatusToString(ModeStatus status) { switch (status) { @@ -199,7 +199,7 @@ xf86ModeStatusToString(ModeStatus status) * xf86ShowClockRanges() -- Print the clock ranges allowed * and the clock values scaled by ClockMulFactor and ClockDivFactor */ -_X_EXPORT void +void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges) { ClockRangePtr cp; @@ -399,7 +399,7 @@ xf86HandleBuiltinMode(ScrnInfoPtr scrp, * reason. */ -_X_EXPORT ModeStatus +ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, ClockRangePtr clockRanges, LookupModeFlags strategy) { @@ -643,7 +643,7 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, * This function takes a mode and monitor description, and determines * if the mode is valid for the monitor. */ -_X_EXPORT ModeStatus +ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor) { int i; @@ -654,10 +654,8 @@ xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor) return MODE_ERROR; } -#ifdef DEBUG - ErrorF("xf86CheckModeForMonitor(%p %s, %p %s)\n", + DebugF("xf86CheckModeForMonitor(%p %s, %p %s)\n", mode, mode->name, monitor, monitor->id); -#endif /* Some basic mode validity checks */ if (0 >= mode->HDisplay || mode->HDisplay > mode->HSyncStart || @@ -790,7 +788,7 @@ xf86CheckModeSize(ScrnInfoPtr scrp, int w, int x, int y) * maxVValue maximum vertical timing value */ -_X_EXPORT ModeStatus +ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, ClockRangePtr clockRanges, LookupModeFlags strategy, @@ -808,10 +806,8 @@ xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, return MODE_ERROR; } -#ifdef DEBUG - ErrorF("xf86InitialCheckModeForDriver(%p, %p %s, %p, 0x%x, %d, %d, %d)\n", + DebugF("xf86InitialCheckModeForDriver(%p, %p %s, %p, 0x%x, %d, %d, %d)\n", scrp, mode, mode->name , clockRanges, strategy, maxPitch, virtualX, virtualY); -#endif /* Some basic mode validity checks */ if (0 >= mode->HDisplay || mode->HDisplay > mode->HSyncStart || @@ -938,7 +934,7 @@ xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, * clockRanges allowable clock ranges */ -_X_EXPORT ModeStatus +ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags) { ClockRangesPtr cp; @@ -1185,7 +1181,7 @@ found: * if an unrecoverable error was encountered. */ -_X_EXPORT int +int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, @@ -1204,20 +1200,17 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, PixmapFormatRec *BankFormat; ClockRangePtr cp; ClockRangesPtr storeClockRanges; - double targetRefresh = 0.0; int numTimings = 0; range hsync[MAX_HSYNC]; range vrefresh[MAX_VREFRESH]; Bool inferred_virtual = FALSE; -#ifdef DEBUG - ErrorF("xf86ValidateModes(%p, %p, %p, %p,\n\t\t %p, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x)\n", + DebugF("xf86ValidateModes(%p, %p, %p, %p,\n\t\t %p, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x)\n", scrp, availModes, modeNames, clockRanges, linePitches, minPitch, maxPitch, pitchInc, minHeight, maxHeight, virtualX, virtualY, apertureSize, strategy ); -#endif /* Some sanity checking */ if (scrp == NULL || scrp->name == NULL || !scrp->monitor || @@ -1465,26 +1458,6 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, } } - /* - * Go through the mode pool and see if any modes match the target - * refresh rate, (if specified). If no modes match, abandon the target. - */ - targetRefresh = xf86SetRealOption(scrp->options, - "TargetRefresh", 0.0); - if (targetRefresh > 0.0) { - for (p = scrp->modePool; p != NULL; p = p->next) { - if (xf86ModeVRefresh(p) > targetRefresh * (1.0 - SYNC_TOLERANCE)) - break; - } - if (!p) - targetRefresh = 0.0; - } - - if (targetRefresh > 0.0) { - xf86DrvMsg(scrp->scrnIndex, X_CONFIG, - "Target refresh rate is %.1f Hz\n", targetRefresh); - } - /* * Allocate one entry in scrp->modes for each named mode. */ @@ -1558,14 +1531,6 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, ((double)q->HTotal / (double)q->HDisplay) < 1.15) continue; - /* - * If there is a target refresh rate, skip modes that - * don't match up. - */ - if (xf86ModeVRefresh(q) < - (1.0 - SYNC_TOLERANCE) * targetRefresh) - continue; - if (modeSize < (q->HDisplay * q->VDisplay)) { r = q; modeSize = q->HDisplay * q->VDisplay; @@ -1771,7 +1736,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, * */ -_X_EXPORT void +void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode) { /* Catch the easy/insane cases */ @@ -1803,7 +1768,7 @@ xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode) * invalid. */ -_X_EXPORT void +void xf86PruneDriverModes(ScrnInfoPtr scrp) { DisplayModePtr first, p, n; @@ -1843,7 +1808,7 @@ xf86PruneDriverModes(ScrnInfoPtr scrp) * parameters for each mode. The initialisation includes adjustments * for interlaced and double scan modes. */ -_X_EXPORT void +void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags) { DisplayModePtr p; @@ -1860,67 +1825,18 @@ xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags) do { xf86SetModeCrtc(p, adjustFlags); -#ifdef DEBUG - ErrorF("%sMode %s: %d (%d) %d %d (%d) %d %d (%d) %d %d (%d) %d\n", + DebugF("%sMode %s: %d (%d) %d %d (%d) %d %d (%d) %d %d (%d) %d\n", (p->type & M_T_DEFAULT) ? "Default " : "", p->name, p->CrtcHDisplay, p->CrtcHBlankStart, p->CrtcHSyncStart, p->CrtcHSyncEnd, p->CrtcHBlankEnd, p->CrtcHTotal, p->CrtcVDisplay, p->CrtcVBlankStart, p->CrtcVSyncStart, p->CrtcVSyncEnd, p->CrtcVBlankEnd, p->CrtcVTotal); -#endif p = p->next; } while (p != NULL && p != scrp->modes); } - -#if 0 -static void -add(char **p, char *new) -{ - *p = xnfrealloc(*p, strlen(*p) + strlen(new) + 2); - strcat(*p, " "); - strcat(*p, new); -} - -_X_EXPORT void -xf86PrintModeline(int scrnIndex,DisplayModePtr mode) -{ - char tmp[256]; - char *flags = xnfcalloc(1, 1); - - if (mode->HSkew) { - snprintf(tmp, 256, "hskew %i", mode->HSkew); - add(&flags, tmp); - } - if (mode->VScan) { - snprintf(tmp, 256, "vscan %i", mode->VScan); - add(&flags, tmp); - } - if (mode->Flags & V_INTERLACE) add(&flags, "interlace"); - if (mode->Flags & V_CSYNC) add(&flags, "composite"); - if (mode->Flags & V_DBLSCAN) add(&flags, "doublescan"); - if (mode->Flags & V_BCAST) add(&flags, "bcast"); - if (mode->Flags & V_PHSYNC) add(&flags, "+hsync"); - if (mode->Flags & V_NHSYNC) add(&flags, "-hsync"); - if (mode->Flags & V_PVSYNC) add(&flags, "+vsync"); - if (mode->Flags & V_NVSYNC) add(&flags, "-vsync"); - if (mode->Flags & V_PCSYNC) add(&flags, "+csync"); - if (mode->Flags & V_NCSYNC) add(&flags, "-csync"); -#if 0 - if (mode->Flags & V_CLKDIV2) add(&flags, "vclk/2"); -#endif - xf86DrvMsgVerb(scrnIndex, X_INFO, 3, - "Modeline \"%s\" %6.2f %i %i %i %i %i %i %i %i%s\n", - mode->name, mode->Clock/1000., mode->HDisplay, - mode->HSyncStart, mode->HSyncEnd, mode->HTotal, - mode->VDisplay, mode->VSyncStart, mode->VSyncEnd, - mode->VTotal, flags); - xfree(flags); -} -#endif - -_X_EXPORT void +void xf86PrintModes(ScrnInfoPtr scrp) { DisplayModePtr p; @@ -1988,29 +1904,3 @@ xf86PrintModes(ScrnInfoPtr scrp) p = p->next; } while (p != NULL && p != scrp->modes); } - -#if 0 -/** - * Adds the new mode into the mode list, and returns the new list - * - * \param modes doubly-linked mode list. - */ -_X_EXPORT DisplayModePtr -xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new) -{ - if (modes == NULL) - return new; - - if (new) { - DisplayModePtr mode = modes; - - while (mode->next) - mode = mode->next; - - mode->next = new; - new->prev = mode; - } - - return modes; -} -#endif diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h index 81011e163..28da22b40 100644 --- a/xorg-server/hw/xfree86/common/xf86Module.h +++ b/xorg-server/hw/xfree86/common/xf86Module.h @@ -82,8 +82,8 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(5, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(4, 0) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(6, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(7, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(2, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) @@ -181,34 +181,22 @@ typedef struct { const char ** initDependencies; } ExtensionModule; -extern ExtensionModule *ExtensionModuleList; +extern _X_EXPORT ExtensionModule *ExtensionModuleList; /* Prototypes for Loader functions that are exported to modules */ -#ifndef IN_LOADER -/* Prototypes with opaque pointers for use by modules */ -pointer LoadSubModule(pointer, const char *, const char **, +extern _X_EXPORT pointer LoadSubModule(pointer, const char *, const char **, const char **, pointer, const XF86ModReqInfo *, int *, int *); -pointer LoadSubModuleLocal(pointer, const char *, const char **, - const char **, pointer, const XF86ModReqInfo *, - int *, int *); -void UnloadSubModule(pointer); -void UnloadModule (pointer); -#endif -pointer LoaderSymbol(const char *); -pointer LoaderSymbolLocal(pointer module, const char *); -char **LoaderListDirs(const char **, const char **); -void LoaderFreeDirList(char **); -void LoaderErrorMsg(const char *, const char *, int, int); -void LoadExtension(ExtensionModule *, Bool); -void LoaderRefSymLists(const char **, ...); -void LoaderRefSymbols(const char *, ...); -void LoaderReqSymLists(const char **, ...); -void LoaderReqSymbols(const char *, ...); -int LoaderCheckUnresolved(int); -void LoaderGetOS(const char **name, int *major, int *minor, int *teeny); -Bool LoaderShouldIgnoreABI(void); -int LoaderGetABIVersion(const char *abiclass); +extern _X_EXPORT void UnloadSubModule(pointer); +extern _X_EXPORT void UnloadModule (pointer); +extern _X_EXPORT pointer LoaderSymbol(const char *); +extern _X_EXPORT char **LoaderListDirs(const char **, const char **); +extern _X_EXPORT void LoaderFreeDirList(char **); +extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int); +extern _X_EXPORT void LoadExtension(ExtensionModule *, Bool); +extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor, int *teeny); +extern _X_EXPORT Bool LoaderShouldIgnoreABI(void); +extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass); typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *); typedef void (*ModuleTearDownProc)(pointer); diff --git a/xorg-server/hw/xfree86/common/xf86Opt.h b/xorg-server/hw/xfree86/common/xf86Opt.h index dbb98da03..ce3d76724 100644 --- a/xorg-server/hw/xfree86/common/xf86Opt.h +++ b/xorg-server/hw/xfree86/common/xf86Opt.h @@ -68,46 +68,46 @@ typedef struct { Bool found; } OptionInfoRec, *OptionInfoPtr; -int xf86SetIntOption(pointer optlist, const char *name, int deflt); -double xf86SetRealOption(pointer optlist, const char *name, double deflt); -char *xf86SetStrOption(pointer optlist, const char *name, char *deflt); -int xf86SetBoolOption(pointer list, const char *name, int deflt ); -int xf86CheckIntOption(pointer optlist, const char *name, int deflt); -double xf86CheckRealOption(pointer optlist, const char *name, double deflt); -char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt); -int xf86CheckBoolOption(pointer list, const char *name, int deflt ); -pointer xf86AddNewOption(pointer head, const char *name, const char *val ); -pointer xf86NewOption(char *name, char *value ); -pointer xf86NextOption(pointer list ); -pointer xf86OptionListCreate(const char **options, int count, int used); -pointer xf86OptionListMerge(pointer head, pointer tail); -void xf86OptionListFree(pointer opt); -char *xf86OptionName(pointer opt); -char *xf86OptionValue(pointer opt); -void xf86OptionListReport(pointer parm); -pointer xf86FindOption(pointer options, const char *name); -char *xf86FindOptionValue(pointer options, const char *name); -void xf86MarkOptionUsed(pointer option); -void xf86MarkOptionUsedByName(pointer options, const char *name); -Bool xf86CheckIfOptionUsed(pointer option); -Bool xf86CheckIfOptionUsedByName(pointer options, const char *name); -void xf86ShowUnusedOptions(int scrnIndex, pointer options); -void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo); -OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token); -const char *xf86TokenToOptName(const OptionInfoRec *table, int token); -Bool xf86IsOptionSet(const OptionInfoRec *table, int token); -char *xf86GetOptValString(const OptionInfoRec *table, int token); -Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value); -Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value); -Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value); -Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, +extern _X_EXPORT int xf86SetIntOption(pointer optlist, const char *name, int deflt); +extern _X_EXPORT double xf86SetRealOption(pointer optlist, const char *name, double deflt); +extern _X_EXPORT char *xf86SetStrOption(pointer optlist, const char *name, char *deflt); +extern _X_EXPORT int xf86SetBoolOption(pointer list, const char *name, int deflt ); +extern _X_EXPORT int xf86CheckIntOption(pointer optlist, const char *name, int deflt); +extern _X_EXPORT double xf86CheckRealOption(pointer optlist, const char *name, double deflt); +extern _X_EXPORT char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt); +extern _X_EXPORT int xf86CheckBoolOption(pointer list, const char *name, int deflt ); +extern _X_EXPORT pointer xf86AddNewOption(pointer head, const char *name, const char *val ); +extern _X_EXPORT pointer xf86NewOption(char *name, char *value ); +extern _X_EXPORT pointer xf86NextOption(pointer list ); +extern _X_EXPORT pointer xf86OptionListCreate(const char **options, int count, int used); +extern _X_EXPORT pointer xf86OptionListMerge(pointer head, pointer tail); +extern _X_EXPORT void xf86OptionListFree(pointer opt); +extern _X_EXPORT char *xf86OptionName(pointer opt); +extern _X_EXPORT char *xf86OptionValue(pointer opt); +extern _X_EXPORT void xf86OptionListReport(pointer parm); +extern _X_EXPORT pointer xf86FindOption(pointer options, const char *name); +extern _X_EXPORT char *xf86FindOptionValue(pointer options, const char *name); +extern _X_EXPORT void xf86MarkOptionUsed(pointer option); +extern _X_EXPORT void xf86MarkOptionUsedByName(pointer options, const char *name); +extern _X_EXPORT Bool xf86CheckIfOptionUsed(pointer option); +extern _X_EXPORT Bool xf86CheckIfOptionUsedByName(pointer options, const char *name); +extern _X_EXPORT void xf86ShowUnusedOptions(int scrnIndex, pointer options); +extern _X_EXPORT void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo); +extern _X_EXPORT OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token); +extern _X_EXPORT const char *xf86TokenToOptName(const OptionInfoRec *table, int token); +extern _X_EXPORT Bool xf86IsOptionSet(const OptionInfoRec *table, int token); +extern _X_EXPORT char *xf86GetOptValString(const OptionInfoRec *table, int token); +extern _X_EXPORT Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value); +extern _X_EXPORT Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value); +extern _X_EXPORT Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value); +extern _X_EXPORT Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, OptFreqUnits expectedUnits, double *value); -Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value); -Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def); -int xf86NameCmp(const char *s1, const char *s2); -char *xf86NormalizeName(const char *s); -pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val); -pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val); -pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val); -pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val); +extern _X_EXPORT Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value); +extern _X_EXPORT Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def); +extern _X_EXPORT int xf86NameCmp(const char *s1, const char *s2); +extern _X_EXPORT char *xf86NormalizeName(const char *s); +extern _X_EXPORT pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val); +extern _X_EXPORT pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val); +extern _X_EXPORT pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val); +extern _X_EXPORT pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val); #endif diff --git a/xorg-server/hw/xfree86/common/xf86Option.c b/xorg-server/hw/xfree86/common/xf86Option.c index 50a7d9cb9..ad8d1c426 100644 --- a/xorg-server/hw/xfree86/common/xf86Option.c +++ b/xorg-server/hw/xfree86/common/xf86Option.c @@ -64,7 +64,7 @@ static Bool ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, * extraOpts, display, confScreen, monitor, device */ -_X_EXPORT void +void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts) { XF86OptionPtr tmp; @@ -131,7 +131,7 @@ xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts) * pInfo->conf_idev->commonOptions, defaultOpts */ -_X_EXPORT void +void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, pointer extraOpts) { @@ -224,28 +224,28 @@ LookupBoolOption(pointer optlist, const char *name, int deflt, Bool markUsed) /* These xf86Set* functions are intended for use by non-screen specific code */ -_X_EXPORT int +int xf86SetIntOption(pointer optlist, const char *name, int deflt) { return LookupIntOption(optlist, name, deflt, TRUE); } -_X_EXPORT double +double xf86SetRealOption(pointer optlist, const char *name, double deflt) { return LookupRealOption(optlist, name, deflt, TRUE); } -_X_EXPORT char * +char * xf86SetStrOption(pointer optlist, const char *name, char *deflt) { return LookupStrOption(optlist, name, deflt, TRUE); } -_X_EXPORT int +int xf86SetBoolOption(pointer optlist, const char *name, int deflt) { return LookupBoolOption(optlist, name, deflt, TRUE); @@ -255,28 +255,28 @@ xf86SetBoolOption(pointer optlist, const char *name, int deflt) * These are like the Set*Option functions, but they don't mark the options * as used. */ -_X_EXPORT int +int xf86CheckIntOption(pointer optlist, const char *name, int deflt) { return LookupIntOption(optlist, name, deflt, FALSE); } -_X_EXPORT double +double xf86CheckRealOption(pointer optlist, const char *name, double deflt) { return LookupRealOption(optlist, name, deflt, FALSE); } -_X_EXPORT char * +char * xf86CheckStrOption(pointer optlist, const char *name, char *deflt) { return LookupStrOption(optlist, name, deflt, FALSE); } -_X_EXPORT int +int xf86CheckBoolOption(pointer optlist, const char *name, int deflt) { return LookupBoolOption(optlist, name, deflt, FALSE); @@ -286,7 +286,7 @@ xf86CheckBoolOption(pointer optlist, const char *name, int deflt) * addNewOption() has the required property of replacing the option value * if the option is already present. */ -_X_EXPORT pointer +pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val) { char tmp[16]; @@ -294,7 +294,7 @@ xf86ReplaceIntOption(pointer optlist, const char *name, const int val) return xf86AddNewOption(optlist,name,tmp); } -_X_EXPORT pointer +pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val) { char tmp[32]; @@ -302,19 +302,19 @@ xf86ReplaceRealOption(pointer optlist, const char *name, const double val) return xf86AddNewOption(optlist,name,tmp); } -_X_EXPORT pointer +pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val) { return xf86AddNewOption(optlist,name,val?"True":"False"); } -_X_EXPORT pointer +pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val) { return xf86AddNewOption(optlist,name,val); } -_X_EXPORT pointer +pointer xf86AddNewOption(pointer head, const char *name, const char *val) { /* XXX These should actually be allocated in the parser library. */ @@ -325,50 +325,50 @@ xf86AddNewOption(pointer head, const char *name, const char *val) } -_X_EXPORT pointer +pointer xf86NewOption(char *name, char *value) { return xf86newOption(name, value); } -_X_EXPORT pointer +pointer xf86NextOption(pointer list) { return xf86nextOption(list); } -_X_EXPORT pointer +pointer xf86OptionListCreate(const char **options, int count, int used) { return xf86optionListCreate(options, count, used); } -_X_EXPORT pointer +pointer xf86OptionListMerge(pointer head, pointer tail) { return xf86optionListMerge(head, tail); } -_X_EXPORT void +void xf86OptionListFree(pointer opt) { xf86optionListFree(opt); } -_X_EXPORT char * +char * xf86OptionName(pointer opt) { return xf86optionName(opt); } -_X_EXPORT char * +char * xf86OptionValue(pointer opt) { return xf86optionValue(opt); } -_X_EXPORT void +void xf86OptionListReport(pointer parm) { XF86OptionPtr opts = parm; @@ -385,21 +385,21 @@ xf86OptionListReport(pointer parm) /* End of XInput-caused section */ -_X_EXPORT pointer +pointer xf86FindOption(pointer options, const char *name) { return xf86findOption(options, name); } -_X_EXPORT char * +char * xf86FindOptionValue(pointer options, const char *name) { return xf86findOptionValue(options, name); } -_X_EXPORT void +void xf86MarkOptionUsed(pointer option) { if (option != NULL) @@ -407,7 +407,7 @@ xf86MarkOptionUsed(pointer option) } -_X_EXPORT void +void xf86MarkOptionUsedByName(pointer options, const char *name) { XF86OptionPtr opt; @@ -417,7 +417,7 @@ xf86MarkOptionUsedByName(pointer options, const char *name) opt->opt_used = TRUE; } -_X_EXPORT Bool +Bool xf86CheckIfOptionUsed(pointer option) { if (option != NULL) @@ -426,7 +426,7 @@ xf86CheckIfOptionUsed(pointer option) return FALSE; } -_X_EXPORT Bool +Bool xf86CheckIfOptionUsedByName(pointer options, const char *name) { XF86OptionPtr opt; @@ -438,7 +438,7 @@ xf86CheckIfOptionUsedByName(pointer options, const char *name) return FALSE; } -_X_EXPORT void +void xf86ShowUnusedOptions(int scrnIndex, pointer options) { XF86OptionPtr opt = options; @@ -661,7 +661,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, } -_X_EXPORT void +void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo) { OptionInfoPtr p; @@ -672,7 +672,7 @@ xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo) } -_X_EXPORT OptionInfoPtr +OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token) { const OptionInfoRec *p, *match = NULL, *set = NULL; @@ -699,7 +699,7 @@ xf86TokenToOptinfo(const OptionInfoRec *table, int token) } -_X_EXPORT const char * +const char * xf86TokenToOptName(const OptionInfoRec *table, int token) { const OptionInfoRec *p; @@ -709,7 +709,7 @@ xf86TokenToOptName(const OptionInfoRec *table, int token) } -_X_EXPORT Bool +Bool xf86IsOptionSet(const OptionInfoRec *table, int token) { OptionInfoPtr p; @@ -719,7 +719,7 @@ xf86IsOptionSet(const OptionInfoRec *table, int token) } -_X_EXPORT char * +char * xf86GetOptValString(const OptionInfoRec *table, int token) { OptionInfoPtr p; @@ -732,7 +732,7 @@ xf86GetOptValString(const OptionInfoRec *table, int token) } -_X_EXPORT Bool +Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value) { OptionInfoPtr p; @@ -746,7 +746,7 @@ xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value) } -_X_EXPORT Bool +Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value) { OptionInfoPtr p; @@ -760,7 +760,7 @@ xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value) } -_X_EXPORT Bool +Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value) { OptionInfoPtr p; @@ -774,7 +774,7 @@ xf86GetOptValReal(const OptionInfoRec *table, int token, double *value) } -_X_EXPORT Bool +Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, OptFreqUnits expectedUnits, double *value) { @@ -822,7 +822,7 @@ xf86GetOptValFreq(const OptionInfoRec *table, int token, } -_X_EXPORT Bool +Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value) { OptionInfoPtr p; @@ -836,7 +836,7 @@ xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value) } -_X_EXPORT Bool +Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def) { OptionInfoPtr p; @@ -849,7 +849,7 @@ xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def) } -_X_EXPORT int +int xf86NameCmp(const char *s1, const char *s2) { return xf86nameCompare(s1, s2); diff --git a/xorg-server/hw/xfree86/common/xf86PM.c b/xorg-server/hw/xfree86/common/xf86PM.c index 7c8320dee..7af89b5b4 100644 --- a/xorg-server/hw/xfree86/common/xf86PM.c +++ b/xorg-server/hw/xfree86/common/xf86PM.c @@ -70,18 +70,16 @@ suspend (pmEvent event, Bool undo) xf86inSuspend = TRUE; for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (i, FALSE); } pInfo = xf86InputDevs; while (pInfo) { - DisableDevice(pInfo->dev); + DisableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } xf86EnterServerState(SETUP); for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); if (xf86Screens[i]->PMEvent) xf86Screens[i]->PMEvent(i,event,undo); else { @@ -90,7 +88,7 @@ suspend (pmEvent event, Bool undo) } } xf86AccessLeave(); - xf86AccessLeaveState(); + } static void @@ -102,7 +100,6 @@ resume(pmEvent event, Bool undo) xf86AccessEnter(); xf86EnterServerState(SETUP); for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); if (xf86Screens[i]->PMEvent) xf86Screens[i]->PMEvent(i,event,undo); else { @@ -112,14 +109,13 @@ resume(pmEvent event, Bool undo) } xf86EnterServerState(OPERATING); for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE); } dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); pInfo = xf86InputDevs; while (pInfo) { - EnableDevice(pInfo->dev); + EnableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } xf86inSuspend = FALSE; @@ -167,7 +163,6 @@ DoApmEvent(pmEvent event, Bool undo) if (xf86Screens[i]->PMEvent) { if (!setup) xf86EnterServerState(SETUP); setup = 1; - xf86EnableAccess(xf86Screens[i]); xf86Screens[i]->PMEvent(i,event,undo); } } diff --git a/xorg-server/hw/xfree86/common/xf86Priv.h b/xorg-server/hw/xfree86/common/xf86Priv.h index 41ca8f531..3bb15718c 100644 --- a/xorg-server/hw/xfree86/common/xf86Priv.h +++ b/xorg-server/hw/xfree86/common/xf86Priv.h @@ -45,65 +45,55 @@ * Parameters set ONLY from the command line options * The global state of these things is held in xf86InfoRec (when appropriate). */ -extern const char *xf86ConfigFile; -extern Bool xf86AllowMouseOpenFail; +extern _X_EXPORT const char *xf86ConfigFile; +extern _X_EXPORT Bool xf86AllowMouseOpenFail; #ifdef XF86VIDMODE -extern Bool xf86VidModeDisabled; -extern Bool xf86VidModeAllowNonLocal; +extern _X_EXPORT Bool xf86VidModeDisabled; +extern _X_EXPORT Bool xf86VidModeAllowNonLocal; #endif -extern Bool xf86fpFlag; -extern Bool xf86sFlag; -extern Bool xf86bsEnableFlag; -extern Bool xf86bsDisableFlag; -extern Bool xf86silkenMouseDisableFlag; -extern Bool xf86xkbdirFlag; -extern Bool xf86acpiDisableFlag; -extern char *xf86LayoutName; -extern char *xf86ScreenName; -extern char *xf86PointerName; -extern char *xf86KeyboardName; -#ifdef KEEPBPP -extern int xf86Bpp; +extern _X_EXPORT Bool xf86fpFlag; +extern _X_EXPORT Bool xf86sFlag; +extern _X_EXPORT Bool xf86bsEnableFlag; +extern _X_EXPORT Bool xf86bsDisableFlag; +extern _X_EXPORT Bool xf86silkenMouseDisableFlag; +extern _X_EXPORT Bool xf86xkbdirFlag; +#ifdef HAVE_ACPI +extern _X_EXPORT Bool xf86acpiDisableFlag; #endif -extern int xf86FbBpp; -extern int xf86Depth; -extern Pix24Flags xf86Pix24; -extern rgb xf86Weight; -extern Bool xf86FlipPixels; -extern Gamma xf86Gamma; -extern char *xf86ServerName; -extern struct pci_slot_match xf86IsolateDevice; +extern _X_EXPORT char *xf86LayoutName; +extern _X_EXPORT char *xf86ScreenName; +extern _X_EXPORT char *xf86PointerName; +extern _X_EXPORT char *xf86KeyboardName; +extern _X_EXPORT int xf86FbBpp; +extern _X_EXPORT int xf86Depth; +extern _X_EXPORT Pix24Flags xf86Pix24; +extern _X_EXPORT rgb xf86Weight; +extern _X_EXPORT Bool xf86FlipPixels; +extern _X_EXPORT Gamma xf86Gamma; +extern _X_EXPORT char *xf86ServerName; +extern _X_EXPORT struct pci_slot_match xf86IsolateDevice; /* Other parameters */ -extern xf86InfoRec xf86Info; -extern const char *xf86InputDeviceList; -extern const char *xf86ModulePath; -extern MessageType xf86ModPathFrom; -extern const char *xf86LogFile; -extern MessageType xf86LogFileFrom; -extern Bool xf86LogFileWasOpened; -extern serverLayoutRec xf86ConfigLayout; -extern Pix24Flags xf86ConfigPix24; - -extern unsigned short xf86MouseCflags[]; -extern Bool xf86SupportedMouseTypes[]; -extern int xf86NumMouseTypes; - -extern DriverPtr *xf86DriverList; -extern int xf86NumDrivers; -extern Bool xf86Resetting; -extern Bool xf86Initialising; -extern int xf86NumScreens; -extern xf86CurrentAccessRec xf86CurrentAccess; -extern const char *xf86VisualNames[]; -extern int xf86Verbose; /* verbosity level */ -extern int xf86LogVerbose; /* log file verbosity level */ -extern Bool xf86ProbeOnly; -extern Bool xf86DoProbe; -extern Bool xorgHWAccess; - -extern RootWinPropPtr *xf86RegisteredPropertiesTable; +extern _X_EXPORT xf86InfoRec xf86Info; +extern _X_EXPORT const char *xf86ModulePath; +extern _X_EXPORT MessageType xf86ModPathFrom; +extern _X_EXPORT const char *xf86LogFile; +extern _X_EXPORT MessageType xf86LogFileFrom; +extern _X_EXPORT Bool xf86LogFileWasOpened; +extern _X_EXPORT serverLayoutRec xf86ConfigLayout; + +extern _X_EXPORT DriverPtr *xf86DriverList; +extern _X_EXPORT int xf86NumDrivers; +extern _X_EXPORT Bool xf86Resetting; +extern _X_EXPORT Bool xf86Initialising; +extern _X_EXPORT int xf86NumScreens; +extern _X_EXPORT const char *xf86VisualNames[]; +extern _X_EXPORT int xf86Verbose; /* verbosity level */ +extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */ +extern _X_EXPORT Bool xorgHWAccess; + +extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable; #ifndef DEFAULT_VERBOSE #define DEFAULT_VERBOSE 0 @@ -115,68 +105,59 @@ extern RootWinPropPtr *xf86RegisteredPropertiesTable; #define DEFAULT_DPI 96 #endif -#define DEFAULT_UNRESOLVED TRUE -#define DEFAULT_BEST_REFRESH FALSE - /* Function Prototypes */ #ifndef _NO_XF86_PROTOTYPES /* xf86Bus.c */ -void xf86BusProbe(void); -void xf86ChangeBusIndex(int oldIndex, int newIndex); -void xf86AccessInit(void); -void xf86AccessEnter(void); -void xf86AccessLeave(void); -void xf86EntityInit(void); -void xf86EntityEnter(void); -void xf86EntityLeave(void); -void xf86AccessLeaveState(void); - -void xf86FindPrimaryDevice(void); +extern _X_EXPORT void xf86BusProbe(void); +extern _X_EXPORT void xf86AccessInit(void); +extern _X_EXPORT void xf86AccessEnter(void); +extern _X_EXPORT void xf86AccessLeave(void); +extern _X_EXPORT void xf86EntityInit(void); + +extern _X_EXPORT void xf86FindPrimaryDevice(void); /* new RAC */ -void xf86ResourceBrokerInit(void); -void xf86PostProbe(void); -void xf86ClearEntityListForScreen(int scrnIndex); -void xf86AddDevToEntity(int entityIndex, GDevPtr dev); -extern void xf86PostPreInit(void); -extern void xf86PostScreenInit(void); +extern _X_EXPORT void xf86PostProbe(void); +extern _X_EXPORT void xf86ClearEntityListForScreen(int scrnIndex); +extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev); +extern _X_EXPORT void xf86PostScreenInit(void); /* xf86Config.c */ -Bool xf86PathIsSafe(const char *path); +extern _X_EXPORT Bool xf86PathIsSafe(const char *path); /* xf86DefaultModes */ -extern const DisplayModeRec xf86DefaultModes[]; -extern const int xf86NumDefaultModes; +extern _X_EXPORT const DisplayModeRec xf86DefaultModes[]; +extern _X_EXPORT const int xf86NumDefaultModes; /* xf86Configure.c */ -void DoConfigure(void); +extern _X_EXPORT void DoConfigure(void); /* xf86ShowOpts.c */ -void DoShowOptions(void); +extern _X_EXPORT void DoShowOptions(void); /* xf86Events.c */ -void xf86Wakeup(pointer blockData, int err, pointer pReadmask); -void xf86SigHandler(int signo); -void xf86HandlePMEvents(int fd, pointer data); -extern int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num); -extern pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event); +extern _X_EXPORT void xf86Wakeup(pointer blockData, int err, pointer pReadmask); +extern _X_HIDDEN int xf86SigWrapper(int signo); +extern _X_EXPORT void xf86HandlePMEvents(int fd, pointer data); +extern _X_EXPORT int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num); +extern _X_EXPORT pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event); /* xf86Helper.c */ -void xf86LogInit(void); -void xf86CloseLog(void); +extern _X_EXPORT void xf86LogInit(void); +extern _X_EXPORT void xf86CloseLog(void); /* xf86Init.c */ -Bool xf86LoadModules(char **list, pointer *optlist); -int xf86SetVerbosity(int verb); -int xf86SetLogVerbosity(int verb); -Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only ); +extern _X_EXPORT Bool xf86LoadModules(char **list, pointer *optlist); +extern _X_EXPORT int xf86SetVerbosity(int verb); +extern _X_EXPORT int xf86SetLogVerbosity(int verb); +extern _X_EXPORT Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only ); /* xf86Xinput.c */ -extern EventList *xf86Events; +extern _X_EXPORT EventList *xf86Events; #endif /* _NO_XF86_PROTOTYPES */ diff --git a/xorg-server/hw/xfree86/common/xf86Privstr.h b/xorg-server/hw/xfree86/common/xf86Privstr.h index 6a7a6dc86..26f822dc4 100644 --- a/xorg-server/hw/xfree86/common/xf86Privstr.h +++ b/xorg-server/hw/xfree86/common/xf86Privstr.h @@ -34,7 +34,6 @@ #ifndef _XF86PRIVSTR_H #define _XF86PRIVSTR_H -#include "xf86Pci.h" #include "xf86str.h" typedef enum { @@ -43,12 +42,6 @@ typedef enum { LogSync } Log; -typedef enum { - SKNever, - SKWhenNeeded, - SKAlways -} SpecialKeysInDDX; - typedef enum { XF86_GlxVisualsMinimal, XF86_GlxVisualsTypical, @@ -65,11 +58,13 @@ typedef struct { int consoleFd; int vtno; Bool vtSysreq; - SpecialKeysInDDX ddxSpecialKeys; /* event handler part */ int lastEventTime; Bool vtRequestsPending; +#ifdef sun + int vtPendingNum; +#endif Bool dontVTSwitch; Bool dontZap; Bool dontZoom; diff --git a/xorg-server/hw/xfree86/common/xf86RandR.c b/xorg-server/hw/xfree86/common/xf86RandR.c index de2f78c5f..02dcc34b4 100644 --- a/xorg-server/hw/xfree86/common/xf86RandR.c +++ b/xorg-server/hw/xfree86/common/xf86RandR.c @@ -30,6 +30,7 @@ #include "mibank.h" #include "globals.h" #include "xf86.h" +#include "xf86str.h" #include "xf86Priv.h" #include "xf86DDC.h" #include "mipointer.h" @@ -364,7 +365,7 @@ xf86RandRCloseScreen (int index, ScreenPtr pScreen) return (*pScreen->CloseScreen) (index, pScreen); } -_X_EXPORT Rotation +Rotation xf86GetRotation(ScreenPtr pScreen) { if (xf86RandRKey == NULL) @@ -374,7 +375,7 @@ xf86GetRotation(ScreenPtr pScreen) } /* Function to change RandR's idea of the virtual screen size */ -_X_EXPORT Bool +Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, int newvirtX, int newvirtY, int newmmWidth, int newmmHeight, Bool resetMode) diff --git a/xorg-server/hw/xfree86/common/xf86ShowOpts.c b/xorg-server/hw/xfree86/common/xf86ShowOpts.c index b8efa73c2..04a9a8b1c 100644 --- a/xorg-server/hw/xfree86/common/xf86ShowOpts.c +++ b/xorg-server/hw/xfree86/common/xf86ShowOpts.c @@ -45,7 +45,6 @@ #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" -#include "vbe.h" #include "xf86DDC.h" #if defined(__sparc__) && !defined(__OpenBSD__) #include "xf86Bus.h" @@ -104,10 +103,10 @@ void DoShowOptions (void) { initData = LoaderSymbol (pSymbol); if (initData) { XF86ModuleVersionInfo *vers = initData->vers; + OptionInfoPtr p; ErrorF ("Driver[%d]:%s[%s] {\n", i,xf86DriverList[i]->driverName,vers->vendor ); - OptionInfoPtr p; for (p = pOption; p->name != NULL; p++) { const char *opttype = optionTypeToSting(p->type); char *optname = xalloc(strlen(p->name) + 2 + 1); diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c new file mode 100644 index 000000000..c38973933 --- /dev/null +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c @@ -0,0 +1,1157 @@ +/* + * This code was stolen from RAC and adapted to control the legacy vga + * interface. + * + * + * Copyright (c) 2007 Paulo R. Zanoni, Tiago Vignatti + * + * 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 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. + * + */ + +#include "xorg-config.h" + +#include "xf86VGAarbiter.h" + +#ifdef HAVE_PCI_DEVICE_VGAARB_INIT +#include "xf86VGAarbiterPriv.h" +#include "xf86Bus.h" +#include "pciaccess.h" + +#ifdef DEBUG +#error "no, really, you dont want to do this" +#define DPRINT_S(x,y) ErrorF(x ": %i\n",y); +#define DPRINT(x) ErrorF(x "\n"); +#else +#define DPRINT_S(x,y) +#define DPRINT(x) +#endif + +static GCFuncs VGAarbiterGCFuncs = { + VGAarbiterValidateGC, VGAarbiterChangeGC, VGAarbiterCopyGC, + VGAarbiterDestroyGC, VGAarbiterChangeClip, VGAarbiterDestroyClip, + VGAarbiterCopyClip +}; + +static GCOps VGAarbiterGCOps = { + VGAarbiterFillSpans, VGAarbiterSetSpans, VGAarbiterPutImage, + VGAarbiterCopyArea, VGAarbiterCopyPlane, VGAarbiterPolyPoint, + VGAarbiterPolylines, VGAarbiterPolySegment, VGAarbiterPolyRectangle, + VGAarbiterPolyArc, VGAarbiterFillPolygon, VGAarbiterPolyFillRect, + VGAarbiterPolyFillArc, VGAarbiterPolyText8, VGAarbiterPolyText16, + VGAarbiterImageText8, VGAarbiterImageText16, VGAarbiterImageGlyphBlt, + VGAarbiterPolyGlyphBlt, VGAarbiterPushPixels, + {NULL} /* devPrivate */ +}; + +static miPointerSpriteFuncRec VGAarbiterSpriteFuncs = { + VGAarbiterSpriteRealizeCursor, VGAarbiterSpriteUnrealizeCursor, + VGAarbiterSpriteSetCursor, VGAarbiterSpriteMoveCursor, + VGAarbiterDeviceCursorInitialize, VGAarbiterDeviceCursorCleanup +}; + +static int VGAarbiterKeyIndex; +static DevPrivateKey VGAarbiterScreenKey = &VGAarbiterKeyIndex; +static int VGAarbiterGCIndex; +static DevPrivateKey VGAarbiterGCKey = &VGAarbiterGCIndex; + +static int vga_no_arb = 0; +void +xf86VGAarbiterInit(void) +{ + if (pci_device_vgaarb_init() != 0) { + vga_no_arb = 1; + xf86Msg(X_WARNING, "VGA arbiter: cannot open kernel arbiter, no multi-card support\n"); + } +} + +void +xf86VGAarbiterFini(void) +{ + if (vga_no_arb) + return; + pci_device_vgaarb_fini(); +} + +void +xf86VGAarbiterLock(ScrnInfoPtr pScrn) +{ + if (vga_no_arb) + return; + pci_device_vgaarb_set_target(pScrn->vgaDev); + pci_device_vgaarb_lock(); +} + +void +xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) +{ + if (vga_no_arb) + return; + pci_device_vgaarb_unlock(); +} + +Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) +{ + int vga_count; + int rsrc_decodes; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + + if (vga_no_arb) + return TRUE; + + pci_device_vgaarb_get_info(pScrn->vgaDev, &vga_count, &rsrc_decodes); + if (vga_count > 1) { + if (rsrc_decodes) { + return FALSE; + } + } + return TRUE; +} + +void +xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) +{ + struct pci_device *dev; + EntityPtr pEnt; + + if (vga_no_arb) + return; + + pEnt = xf86Entities[pScrn->entityList[0]]; + if (pEnt->bus.type != BUS_PCI) + return; + + dev = pEnt->bus.id.pci; + pScrn->vgaDev = dev; +} + +void +xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) +{ + if (vga_no_arb) + return; + pci_device_vgaarb_decodes(VGA_ARB_RSRC_LEGACY_MEM | VGA_ARB_RSRC_LEGACY_IO); +} + +Bool +xf86VGAarbiterWrapFunctions(ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn; + VGAarbiterScreenPtr pScreenPriv; + miPointerScreenPtr PointPriv; +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); +#endif + + if (vga_no_arb) + return FALSE; + + pScrn = xf86Screens[pScreen->myNum]; + PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); + + DPRINT_S("VGAarbiterWrapFunctions",pScreen->myNum); + + if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec))) + return FALSE; + + if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec)))) + return FALSE; + + dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv); + + WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen); + WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen); + WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler); + WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler); + WRAP_SCREEN(CreateGC, VGAarbiterCreateGC); + WRAP_SCREEN(GetImage, VGAarbiterGetImage); + WRAP_SCREEN(GetSpans, VGAarbiterGetSpans); + WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate); + WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow); + WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground); + WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap); + WRAP_SCREEN(StoreColors, VGAarbiterStoreColors); + WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor); + WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor); + WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor); + WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor); + WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition); +#ifdef RENDER + WRAP_PICT(Composite,VGAarbiterComposite); + WRAP_PICT(Glyphs,VGAarbiterGlyphs); + WRAP_PICT(CompositeRects,VGAarbiterCompositeRects); +#endif + WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame); + WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode); + WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT); + WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT); + WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen); + WRAP_SPRITE; + return TRUE; +} + +/* Screen funcs */ +static Bool +VGAarbiterCloseScreen (int i, ScreenPtr pScreen) +{ + Bool val; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, miPointerScreenKey); +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); +#endif + + DPRINT_S("VGAarbiterCloseScreen",pScreen->myNum); + UNWRAP_SCREEN(CreateGC); + UNWRAP_SCREEN(CloseScreen); + UNWRAP_SCREEN(GetImage); + UNWRAP_SCREEN(GetSpans); + UNWRAP_SCREEN(SourceValidate); + UNWRAP_SCREEN(CopyWindow); + UNWRAP_SCREEN(ClearToBackground); + UNWRAP_SCREEN(SaveScreen); + UNWRAP_SCREEN(StoreColors); + UNWRAP_SCREEN(DisplayCursor); + UNWRAP_SCREEN(RealizeCursor); + UNWRAP_SCREEN(UnrealizeCursor); + UNWRAP_SCREEN(RecolorCursor); + UNWRAP_SCREEN(SetCursorPosition); +#ifdef RENDER + UNWRAP_PICT(Composite); + UNWRAP_PICT(Glyphs); + UNWRAP_PICT(CompositeRects); +#endif + UNWRAP_SCREEN_INFO(AdjustFrame); + UNWRAP_SCREEN_INFO(SwitchMode); + UNWRAP_SCREEN_INFO(EnterVT); + UNWRAP_SCREEN_INFO(LeaveVT); + UNWRAP_SCREEN_INFO(FreeScreen); + UNWRAP_SPRITE; + + xfree ((pointer) pScreenPriv); + xf86VGAarbiterLock(xf86Screens[i]); + val = (*pScreen->CloseScreen) (i, pScreen); + xf86VGAarbiterUnlock(xf86Screens[i]); + return val; +} + +static void +VGAarbiterBlockHandler(int i, + pointer blockData, pointer pTimeout, pointer pReadmask) +{ + ScreenPtr pScreen = screenInfo.screens[i]; + SCREEN_PROLOG(BlockHandler); + VGAGet(); + pScreen->BlockHandler(i, blockData, pTimeout, pReadmask); + VGAPut(); + SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler); +} + +static void +VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask) +{ + ScreenPtr pScreen = screenInfo.screens[i]; + SCREEN_PROLOG(WakeupHandler); + VGAGet(); + pScreen->WakeupHandler(i, blockData, result, pReadmask); + VGAPut(); + SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler); +} + +static void +VGAarbiterGetImage ( + DrawablePtr pDrawable, + int sx, int sy, int w, int h, + unsigned int format, + unsigned long planemask, + char *pdstLine + ) +{ + ScreenPtr pScreen = pDrawable->pScreen; + DPRINT_S("VGAarbiterGetImage",pScreen->myNum); + SCREEN_PROLOG(GetImage); +// if (xf86Screens[pScreen->myNum]->vtSema) { + VGAGet(); +// } + (*pScreen->GetImage) (pDrawable, sx, sy, w, h, + format, planemask, pdstLine); + VGAPut(); + SCREEN_EPILOG (GetImage, VGAarbiterGetImage); +} + +static void +VGAarbiterGetSpans ( + DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pdstStart + ) +{ + ScreenPtr pScreen = pDrawable->pScreen; + + DPRINT_S("VGAarbiterGetSpans",pScreen->myNum); + SCREEN_PROLOG (GetSpans); + VGAGet(); + (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + VGAPut(); + SCREEN_EPILOG (GetSpans, VGAarbiterGetSpans); +} + +static void +VGAarbiterSourceValidate ( + DrawablePtr pDrawable, + int x, int y, int width, int height ) +{ + ScreenPtr pScreen = pDrawable->pScreen; + DPRINT_S("VGAarbiterSourceValidate",pScreen->myNum); + SCREEN_PROLOG (SourceValidate); + VGAGet(); + if (pScreen->SourceValidate) + (*pScreen->SourceValidate) (pDrawable, x, y, width, height); + VGAPut(); + SCREEN_EPILOG (SourceValidate, VGAarbiterSourceValidate); +} + +static void +VGAarbiterCopyWindow( + WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc ) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + DPRINT_S("VGAarbiterCopyWindow",pScreen->myNum); + SCREEN_PROLOG (CopyWindow); + VGAGet(); + (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); + VGAPut(); + SCREEN_EPILOG (CopyWindow, VGAarbiterCopyWindow); +} + +static void +VGAarbiterClearToBackground ( + WindowPtr pWin, + int x, int y, + int w, int h, + Bool generateExposures ) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + DPRINT_S("VGAarbiterClearToBackground",pScreen->myNum); + SCREEN_PROLOG ( ClearToBackground); + VGAGet(); + (*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures); + VGAPut(); + SCREEN_EPILOG (ClearToBackground, VGAarbiterClearToBackground); +} + +static PixmapPtr +VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) +{ + PixmapPtr pPix; + + DPRINT_S("VGAarbiterCreatePixmap",pScreen->myNum); + SCREEN_PROLOG ( CreatePixmap); + VGAGet(); + pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint); + VGAPut(); + SCREEN_EPILOG (CreatePixmap, VGAarbiterCreatePixmap); + + return pPix; +} + +static Bool +VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank) +{ + Bool val; + + DPRINT_S("VGAarbiterSaveScreen",pScreen->myNum); + SCREEN_PROLOG (SaveScreen); + VGAGet(); + val = (*pScreen->SaveScreen) (pScreen, unblank); + VGAPut(); + SCREEN_EPILOG (SaveScreen, VGAarbiterSaveScreen); + + return val; +} + +static void +VGAarbiterStoreColors ( + ColormapPtr pmap, + int ndef, + xColorItem *pdefs) +{ + ScreenPtr pScreen = pmap->pScreen; + + DPRINT_S("VGAarbiterStoreColors",pScreen->myNum); + SCREEN_PROLOG (StoreColors); + VGAGet(); + (*pScreen->StoreColors) (pmap,ndef,pdefs); + VGAPut(); + SCREEN_EPILOG ( StoreColors, VGAarbiterStoreColors); +} + +static void +VGAarbiterRecolorCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCurs, + Bool displayed + ) +{ + DPRINT_S("VGAarbiterRecolorCursor",pScreen->myNum); + SCREEN_PROLOG (RecolorCursor); + VGAGet(); + (*pScreen->RecolorCursor) (pDev, pScreen, pCurs, displayed); + VGAPut(); + SCREEN_EPILOG ( RecolorCursor, VGAarbiterRecolorCursor); +} + +static Bool +VGAarbiterRealizeCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor + ) +{ + Bool val; + + DPRINT_S("VGAarbiterRealizeCursor",pScreen->myNum); + SCREEN_PROLOG (RealizeCursor); + VGAGet(); + val = (*pScreen->RealizeCursor) (pDev, pScreen,pCursor); + VGAPut(); + SCREEN_EPILOG ( RealizeCursor, VGAarbiterRealizeCursor); + return val; +} + +static Bool +VGAarbiterUnrealizeCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor + ) +{ + Bool val; + + DPRINT_S("VGAarbiterUnrealizeCursor",pScreen->myNum); + SCREEN_PROLOG (UnrealizeCursor); + VGAGet(); + val = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor); + VGAPut(); + SCREEN_EPILOG ( UnrealizeCursor, VGAarbiterUnrealizeCursor); + return val; +} + +static Bool +VGAarbiterDisplayCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor + ) +{ + Bool val; + + DPRINT_S("VGAarbiterDisplayCursor",pScreen->myNum); + SCREEN_PROLOG (DisplayCursor); + VGAGet(); + val = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); + VGAPut(); + SCREEN_EPILOG ( DisplayCursor, VGAarbiterDisplayCursor); + return val; +} + +static Bool +VGAarbiterSetCursorPosition ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + int x, int y, + Bool generateEvent) +{ + Bool val; + + DPRINT_S("VGAarbiterSetCursorPosition",pScreen->myNum); + SCREEN_PROLOG (SetCursorPosition); + VGAGet(); + val = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); + VGAPut(); + SCREEN_EPILOG ( SetCursorPosition, VGAarbiterSetCursorPosition); + return val; +} + +static void +VGAarbiterAdjustFrame(int index, int x, int y, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterAdjustFrame",index); + VGAGet(); + (*pScreenPriv->AdjustFrame)(index, x, y, flags); + VGAPut(); +} + +static Bool +VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags) +{ + Bool val; + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterSwitchMode",index); + VGAGet(); + val = (*pScreenPriv->SwitchMode)(index, mode, flags); + VGAPut(); + return val; +} + +static Bool +VGAarbiterEnterVT(int index, int flags) +{ + Bool val; + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterEnterVT",index); + VGAGet(); + val = (*pScreenPriv->EnterVT)(index, flags); + VGAPut(); + return val; +} + +static void +VGAarbiterLeaveVT(int index, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterLeaveVT",index); + + VGAGet(); + (*pScreenPriv->LeaveVT)(index, flags); + VGAPut(); +} + +static void +VGAarbiterFreeScreen(int index, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterFreeScreen",index); + + VGAGet(); + (*pScreenPriv->FreeScreen)(index, flags); + VGAPut(); +} + +static Bool +VGAarbiterCreateGC(GCPtr pGC) +{ + ScreenPtr pScreen = pGC->pScreen; + VGAarbiterGCPtr pGCPriv = (VGAarbiterGCPtr)dixLookupPrivate(&pGC->devPrivates, VGAarbiterGCKey); + Bool ret; + + DPRINT_S("VGAarbiterCreateGC",pScreen->myNum); + SCREEN_PROLOG(CreateGC); + VGAGet(); + ret = (*pScreen->CreateGC)(pGC); + VGAPut(); + GC_WRAP(pGC); + SCREEN_EPILOG(CreateGC,VGAarbiterCreateGC); + + return ret; +} + +/* GC funcs */ +static void +VGAarbiterValidateGC( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDraw ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterValidateGC"); + (*pGC->funcs->ValidateGC)(pGC, changes, pDraw); + GC_WRAP(pGC); +} + + +static void +VGAarbiterDestroyGC(GCPtr pGC) +{ + GC_UNWRAP (pGC); + DPRINT("VGAarbiterDestroyGC"); + (*pGC->funcs->DestroyGC)(pGC); + GC_WRAP (pGC); +} + +static void +VGAarbiterChangeGC ( + GCPtr pGC, + unsigned long mask) +{ + GC_UNWRAP (pGC); + DPRINT("VGAarbiterChangeGC"); + (*pGC->funcs->ChangeGC) (pGC, mask); + GC_WRAP (pGC); +} + +static void +VGAarbiterCopyGC ( + GCPtr pGCSrc, + unsigned long mask, + GCPtr pGCDst) +{ + GC_UNWRAP (pGCDst); + DPRINT("VGAarbiterCopyGC"); + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); + GC_WRAP (pGCDst); +} + +static void +VGAarbiterChangeClip ( + GCPtr pGC, + int type, + pointer pvalue, + int nrects ) +{ + GC_UNWRAP (pGC); + DPRINT("VGAarbiterChangeClip"); + (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); + GC_WRAP (pGC); +} + +static void +VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + GC_UNWRAP (pgcDst); + DPRINT("VGAarbiterCopyClip"); + (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc); + GC_WRAP (pgcDst); +} + +static void +VGAarbiterDestroyClip(GCPtr pGC) +{ + GC_UNWRAP (pGC); + DPRINT("VGAarbiterDestroyClip"); + (* pGC->funcs->DestroyClip)(pGC); + GC_WRAP (pGC); +} + +/* GC Ops */ +static void +VGAarbiterFillSpans( + DrawablePtr pDraw, + GC *pGC, + int nInit, + DDXPointPtr pptInit, + int *pwidthInit, + int fSorted ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterFillSpans"); + VGAGet_GC(); + (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterSetSpans( + DrawablePtr pDraw, + GCPtr pGC, + char *pcharsrc, + register DDXPointPtr ppt, + int *pwidth, + int nspans, + int fSorted ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterSetSpans"); + VGAGet_GC(); + (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPutImage( + DrawablePtr pDraw, + GCPtr pGC, + int depth, + int x, int y, int w, int h, + int leftPad, + int format, + char *pImage ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPutImage"); + VGAGet_GC(); + (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, + leftPad, format, pImage); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static RegionPtr +VGAarbiterCopyArea( + DrawablePtr pSrc, + DrawablePtr pDst, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty ) +{ + RegionPtr ret; + + GC_UNWRAP(pGC); + DPRINT("VGAarbiterCopyArea"); + VGAGet_GC(); + ret = (*pGC->ops->CopyArea)(pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty); + VGAPut_GC(); + GC_WRAP(pGC); + return ret; +} + +static RegionPtr +VGAarbiterCopyPlane( + DrawablePtr pSrc, + DrawablePtr pDst, + GCPtr pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + unsigned long bitPlane ) +{ + RegionPtr ret; + + GC_UNWRAP(pGC); + DPRINT("VGAarbiterCopyPlane"); + VGAGet_GC(); + ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, srcx, srcy, + width, height, dstx, dsty, bitPlane); + VGAPut_GC(); + GC_WRAP(pGC); + return ret; +} + +static void +VGAarbiterPolyPoint( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + xPoint *pptInit ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyPoint"); + VGAGet_GC(); + (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); + VGAPut_GC(); + GC_WRAP(pGC); +} + + +static void +VGAarbiterPolylines( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr pptInit ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolylines"); + VGAGet_GC(); + (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolySegment( + DrawablePtr pDraw, + GCPtr pGC, + int nseg, + xSegment *pSeg ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolySegment"); + VGAGet_GC(); + (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyRectangle( + DrawablePtr pDraw, + GCPtr pGC, + int nRectsInit, + xRectangle *pRectsInit ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyRectangle"); + VGAGet_GC(); + (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyArc"); + VGAGet_GC(); + (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterFillPolygon( + DrawablePtr pDraw, + GCPtr pGC, + int shape, + int mode, + int count, + DDXPointPtr ptsIn ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterFillPolygon"); + VGAGet_GC(); + (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyFillRect( + DrawablePtr pDraw, + GCPtr pGC, + int nrectFill, + xRectangle *prectInit) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyFillRect"); + VGAGet_GC(); + (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyFillArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyFillArc"); + VGAGet_GC(); + (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static int +VGAarbiterPolyText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars ) +{ + int ret; + + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyText8"); + VGAGet_GC(); + ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); + VGAPut_GC(); + GC_WRAP(pGC); + return ret; +} + +static int +VGAarbiterPolyText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars ) +{ + int ret; + + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyText16"); + VGAGet_GC(); + ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); + VGAPut_GC(); + GC_WRAP(pGC); + return ret; +} + +static void +VGAarbiterImageText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterImageText8"); + VGAGet_GC(); + (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterImageText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterImageText16"); + VGAGet_GC(); + (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); + VGAPut_GC(); + GC_WRAP(pGC); +} + + +static void +VGAarbiterImageGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterImageGlyphBlt"); + VGAGet_GC(); + (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, + nglyph, ppci, pglyphBase); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyGlyphBlt"); + VGAGet_GC(); + (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, + nglyph, ppci, pglyphBase); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPushPixels( + GCPtr pGC, + PixmapPtr pBitMap, + DrawablePtr pDraw, + int dx, int dy, int xOrg, int yOrg ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPushPixels"); + VGAGet_GC(); + (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); + VGAPut_GC(); + GC_WRAP(pGC); +} + + +/* miSpriteFuncs */ +static Bool +VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) +{ + Bool val; + SPRITE_PROLOG; + DPRINT_S("VGAarbiterSpriteRealizeCursor",pScreen->myNum); + VGAGet(); + val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur); + VGAPut(); + SPRITE_EPILOG; + return val; +} + +static Bool +VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) +{ + Bool val; + SPRITE_PROLOG; + DPRINT_S("VGAarbiterSpriteUnrealizeCursor",pScreen->myNum); + VGAGet(); + val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur); + VGAPut(); + SPRITE_EPILOG; + return val; +} + +static void +VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur, int x, int y) +{ + SPRITE_PROLOG; + DPRINT_S("VGAarbiterSpriteSetCursor",pScreen->myNum); + VGAGet(); + PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y); + VGAPut(); + SPRITE_EPILOG; +} + +static void +VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) +{ + SPRITE_PROLOG; + DPRINT_S("VGAarbiterSpriteMoveCursor",pScreen->myNum); + VGAGet(); + PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y); + VGAPut(); + SPRITE_EPILOG; +} + +static Bool +VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + Bool val; + SPRITE_PROLOG; + DPRINT_S("VGAarbiterDeviceCursorInitialize",pScreen->myNum); + VGAGet(); + val = PointPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen); + VGAPut(); + SPRITE_EPILOG; + return val; +} + +static void +VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + SPRITE_PROLOG; + DPRINT_S("VGAarbiterDeviceCursorCleanup",pScreen->myNum); + VGAGet(); + PointPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen); + VGAPut(); + SPRITE_EPILOG; +} + +#ifdef RENDER +static void +VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, + PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, + INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, + CARD16 height) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + PICTURE_PROLOGUE(Composite); + + VGAGet(); + (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, + yDst, width, height); + VGAPut(); + PICTURE_EPILOGUE(Composite, VGAarbiterComposite); +} + +static void +VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, + GlyphListPtr list, GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + PICTURE_PROLOGUE(Glyphs); + + VGAGet(); + (*ps->Glyphs)(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + VGAPut(); + PICTURE_EPILOGUE (Glyphs, VGAarbiterGlyphs); +} + +static void +VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect, + xRectangle *rects) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + PICTURE_PROLOGUE(CompositeRects); + + VGAGet(); + (*ps->CompositeRects)(op, pDst, color, nRect, rects); + VGAPut(); + PICTURE_EPILOGUE (CompositeRects, VGAarbiterCompositeRects); +} +#endif +#else +/* dummy functions */ +void xf86VGAarbiterInit(void) {} +void xf86VGAarbiterFini(void) {} + +void xf86VGAarbiterLock(ScrnInfoPtr pScrn) {} +void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) {} +Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) { return TRUE; } +void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) {} +void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) {} +Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen) { return FALSE; } + +#endif diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h new file mode 100644 index 000000000..145d31c78 --- /dev/null +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2009 Tiago Vignatti + * + * 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 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. + */ + +#ifndef __XF86VGAARBITER_H +#define __XF86VGAARBITER_H + +#include "screenint.h" +#include "misc.h" +#include "xf86.h" + +/* Functions */ +extern void xf86VGAarbiterInit(void); +extern void xf86VGAarbiterFini(void); +void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn); +extern Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen); +extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn); +extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn); + +/* allow a driver to remove itself from arbiter - really should be + * done in the kernel though */ +extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn); +/* DRI and arbiter are really not possible together, + * you really want to remove the card from arbitration if you can */ +extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen); + +#endif /* __XF86VGAARBITER_H */ diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h new file mode 100644 index 000000000..40d436856 --- /dev/null +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h @@ -0,0 +1,266 @@ +/* + * Copyright (c) 2009 Tiago Vignatti + * + * 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 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. + * + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include "misc.h" +#include "xf86.h" +#include "xf86_OSproc.h" +#include +#include "colormapst.h" +#include "scrnintstr.h" +#include "screenint.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "pixmap.h" +#include "windowstr.h" +#include "window.h" +#include "xf86str.h" +#include "mipointer.h" +#include "mipointrst.h" +#ifdef RENDER +# include "picturestr.h" +#endif + + +#define WRAP_SCREEN(x,y) {pScreenPriv->x = pScreen->x; pScreen->x = y;} + +#define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x + +#define SCREEN_PROLOG(x) pScreen->x = ((VGAarbiterScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, VGAarbiterScreenKey))->x + +#define SCREEN_EPILOG(x,y) pScreen->x = y; + +#define WRAP_PICT(x,y) if (ps) {pScreenPriv->x = ps->x;\ + ps->x = y;} + +#define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;} + +#define PICTURE_PROLOGUE(field) ps->field = \ + ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \ + VGAarbiterScreenKey))->field + +#define PICTURE_EPILOGUE(field, wrap) ps->field = wrap + +#define WRAP_SCREEN_INFO(x,y) do {pScreenPriv->x = pScrn->x; pScrn->x = y;} while(0) + +#define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x + +#define SPRITE_PROLOG miPointerScreenPtr PointPriv = \ + (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, \ + miPointerScreenKey); VGAarbiterScreenPtr pScreenPriv = \ + ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \ + VGAarbiterScreenKey)); PointPriv->spriteFuncs = pScreenPriv->miSprite; + +#define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\ + PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; + +#define WRAP_SPRITE do { pScreenPriv->miSprite = PointPriv->spriteFuncs;\ + PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \ + } while (0) + +#define UNWRAP_SPRITE PointPriv->spriteFuncs = pScreenPriv->miSprite + +#define GC_WRAP(x) pGCPriv->wrapOps = (x)->ops;\ + pGCPriv->wrapFuncs = (x)->funcs; (x)->ops = &VGAarbiterGCOps;\ + (x)->funcs = &VGAarbiterGCFuncs; + +#define GC_UNWRAP(x) VGAarbiterGCPtr pGCPriv = \ + (VGAarbiterGCPtr)dixLookupPrivate(&(x)->devPrivates, VGAarbiterGCKey);\ + (x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs; + +#define GC_SCREEN register ScrnInfoPtr pScrn = \ + xf86Screens[pGC->pScreen->myNum] + +#define VGAGet(x)\ + pci_device_vgaarb_set_target(xf86Screens[pScreen->myNum]->vgaDev); \ + pci_device_vgaarb_lock(); + +#define VGAGet_GC(x)\ + pci_device_vgaarb_set_target(xf86Screens[pGC->pScreen->myNum]->vgaDev); \ + pci_device_vgaarb_lock(); + +#define VGAPut(x)\ + pci_device_vgaarb_unlock(); + +#define VGAPut_GC(x)\ + pci_device_vgaarb_unlock(); + + +typedef struct _VGAarbiterScreen { + CreateGCProcPtr CreateGC; + CloseScreenProcPtr CloseScreen; + ScreenBlockHandlerProcPtr BlockHandler; + ScreenWakeupHandlerProcPtr WakeupHandler; + GetImageProcPtr GetImage; + GetSpansProcPtr GetSpans; + SourceValidateProcPtr SourceValidate; + CopyWindowProcPtr CopyWindow; + ClearToBackgroundProcPtr ClearToBackground; + CreatePixmapProcPtr CreatePixmap; + SaveScreenProcPtr SaveScreen; + /* Colormap */ + StoreColorsProcPtr StoreColors; + /* Cursor */ + DisplayCursorProcPtr DisplayCursor; + RealizeCursorProcPtr RealizeCursor; + UnrealizeCursorProcPtr UnrealizeCursor; + RecolorCursorProcPtr RecolorCursor; + SetCursorPositionProcPtr SetCursorPosition; + void (*AdjustFrame)(int,int,int,int); + Bool (*SwitchMode)(int, DisplayModePtr,int); + Bool (*EnterVT)(int, int); + void (*LeaveVT)(int, int); + void (*FreeScreen)(int, int); + miPointerSpriteFuncPtr miSprite; +#ifdef RENDER + CompositeProcPtr Composite; + GlyphsProcPtr Glyphs; + CompositeRectsProcPtr CompositeRects; +#endif +} VGAarbiterScreenRec, *VGAarbiterScreenPtr; + +typedef struct _VGAarbiterGC { + GCOps *wrapOps; + GCFuncs *wrapFuncs; +} VGAarbiterGCRec, *VGAarbiterGCPtr; + +/* Screen funcs */ +static void VGAarbiterBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask); +static void VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask); +static Bool VGAarbiterCloseScreen (int i, ScreenPtr pScreen); +static void VGAarbiterGetImage (DrawablePtr pDrawable, int sx, int sy, int w, + int h, unsigned int format, unsigned long planemask, char *pdstLine); +static void VGAarbiterGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr + ppt, int *pwidth, int nspans, char *pdstStart); +static void VGAarbiterSourceValidate (DrawablePtr pDrawable, int x, int y, + int width, int height); +static void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc); +static void VGAarbiterClearToBackground (WindowPtr pWin, int x, int y, int w, + int h, Bool generateExposures); +static PixmapPtr VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, + int depth, unsigned int usage_hint); +static Bool VGAarbiterCreateGC(GCPtr pGC); +static Bool VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank); +static void VGAarbiterStoreColors (ColormapPtr pmap, int ndef, xColorItem + *pdefs); +static void VGAarbiterRecolorCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCurs, Bool displayed); +static Bool VGAarbiterRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool VGAarbiterUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool VGAarbiterDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool VGAarbiterSetCursorPosition (DeviceIntPtr pDev, ScreenPtr + pScreen, int x, int y, Bool generateEvent); +static void VGAarbiterAdjustFrame(int index, int x, int y, int flags); +static Bool VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags); +static Bool VGAarbiterEnterVT(int index, int flags); +static void VGAarbiterLeaveVT(int index, int flags); +static void VGAarbiterFreeScreen(int index, int flags); + +/* GC funcs */ +static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes, + DrawablePtr pDraw); +static void VGAarbiterChangeGC(GCPtr pGC, unsigned long mask); +static void VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); +static void VGAarbiterDestroyGC(GCPtr pGC); +static void VGAarbiterChangeClip(GCPtr pGC, int type, pointer pvalue, + int nrects); +static void VGAarbiterDestroyClip(GCPtr pGC); +static void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc); + +/* GC ops */ +static void VGAarbiterFillSpans( DrawablePtr pDraw, GC *pGC, int nInit, + DDXPointPtr pptInit, int *pwidthInit, int fSorted); +static void VGAarbiterSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc, + register DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); +static void VGAarbiterPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, + int x, int y, int w, int h, int leftPad, int format, char *pImage); +static RegionPtr VGAarbiterCopyArea(DrawablePtr pSrc, DrawablePtr pDst, + GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty); +static RegionPtr VGAarbiterCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, + GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, + unsigned long bitPlane); +static void VGAarbiterPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, + int npt, xPoint *pptInit); +static void VGAarbiterPolylines(DrawablePtr pDraw, GCPtr pGC, int mode, + int npt, DDXPointPtr pptInit); +static void VGAarbiterPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, + xSegment *pSeg); +static void VGAarbiterPolyRectangle(DrawablePtr pDraw, GCPtr pGC, + int nRectsInit, xRectangle *pRectsInit); +static void VGAarbiterPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, + xArc *parcs); +static void VGAarbiterFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape, + int mode, int count, DDXPointPtr ptsIn); +static void VGAarbiterPolyFillRect( DrawablePtr pDraw, GCPtr pGC, + int nrectFill, xRectangle *prectInit); +static void VGAarbiterPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, + xArc *parcs); +static int VGAarbiterPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, char *chars); +static int VGAarbiterPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, unsigned short *chars); +static void VGAarbiterImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, char *chars); +static void VGAarbiterImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, unsigned short *chars); +static void VGAarbiterImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, + int yInit, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase); +static void VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, + int yInit, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase); +static void VGAarbiterPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr + pDraw, int dx, int dy, int xOrg, int yOrg); + +/* miSpriteFuncs */ +static Bool VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr + pScreen, CursorPtr pCur); +static Bool VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr + pScreen, CursorPtr pCur); +static void VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur, int x, int y); +static void VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y); +static Bool VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); +static void VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); + + +#ifdef RENDER +static void VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, + PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); +static void VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr + list, GlyphPtr *glyphs); +static void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor + *color, int nRect, xRectangle *rects); +#endif diff --git a/xorg-server/hw/xfree86/common/xf86VidMode.c b/xorg-server/hw/xfree86/common/xf86VidMode.c index 24fccd31b..49b86e73a 100644 --- a/xorg-server/hw/xfree86/common/xf86VidMode.c +++ b/xorg-server/hw/xfree86/common/xf86VidMode.c @@ -56,20 +56,14 @@ static Bool VidModeClose(int i, ScreenPtr pScreen); #endif -#ifdef DEBUG -# define DEBUG_P(x) ErrorF(x"\n"); -#else -# define DEBUG_P(x) /**/ -#endif - -_X_EXPORT Bool +Bool VidModeExtensionInit(ScreenPtr pScreen) { #ifdef XF86VIDMODE VidModePtr pVidMode; if (!xf86GetVidModeEnabled()) { - DEBUG_P("!xf86GetVidModeEnabled()"); + DebugF("!xf86GetVidModeEnabled()\n"); return FALSE; } @@ -77,7 +71,7 @@ VidModeExtensionInit(ScreenPtr pScreen) if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey, xcalloc(sizeof(VidModeRec), 1))) { - DEBUG_P("xcalloc failed"); + DebugF("xcalloc failed\n"); return FALSE; } @@ -89,7 +83,7 @@ VidModeExtensionInit(ScreenPtr pScreen) VidModeCount++; return TRUE; #else - DEBUG_P("no vidmode extension"); + DebugF("no vidmode extension\n"); return FALSE; #endif } @@ -123,13 +117,13 @@ VidModeAvailable(int scrnIndex) VidModePtr pVidMode; if (VidModeKey == NULL) { - DEBUG_P("VidModeKey == NULL"); + DebugF("VidModeKey == NULL\n"); return FALSE; } pScrn = xf86Screens[scrnIndex]; if (pScrn == NULL) { - DEBUG_P("pScrn == NULL"); + DebugF("pScrn == NULL\n"); return FALSE; } @@ -137,12 +131,12 @@ VidModeAvailable(int scrnIndex) if (pVidMode) return TRUE; else { - DEBUG_P("pVidMode == NULL"); + DebugF("pVidMode == NULL\n"); return FALSE; } } -_X_EXPORT Bool +Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -161,7 +155,7 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; } -_X_EXPORT int +int VidModeGetDotClock(int scrnIndex, int Clock) { ScrnInfoPtr pScrn; @@ -176,7 +170,7 @@ VidModeGetDotClock(int scrnIndex, int Clock) return pScrn->clock[Clock]; } -_X_EXPORT int +int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock) { ScrnInfoPtr pScrn; @@ -194,7 +188,7 @@ VidModeGetNumOfClocks(int scrnIndex, Bool *progClock) } } -_X_EXPORT Bool +Bool VidModeGetClocks(int scrnIndex, int *Clocks) { ScrnInfoPtr pScrn; @@ -215,7 +209,7 @@ VidModeGetClocks(int scrnIndex, int *Clocks) } -_X_EXPORT Bool +Bool VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -238,7 +232,7 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) return VidModeGetNextModeline(scrnIndex, mode, dotClock); } -_X_EXPORT Bool +Bool VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -263,7 +257,7 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; } -_X_EXPORT Bool +Bool VidModeDeleteModeline(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -276,7 +270,7 @@ VidModeDeleteModeline(int scrnIndex, pointer mode) return TRUE; } -_X_EXPORT Bool +Bool VidModeZoomViewport(int scrnIndex, int zoom) { ScrnInfoPtr pScrn; @@ -289,7 +283,7 @@ VidModeZoomViewport(int scrnIndex, int zoom) return TRUE; } -_X_EXPORT Bool +Bool VidModeSetViewPort(int scrnIndex, int x, int y) { ScrnInfoPtr pScrn; @@ -310,7 +304,7 @@ VidModeSetViewPort(int scrnIndex, int x, int y) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetViewPort(int scrnIndex, int *x, int *y) { ScrnInfoPtr pScrn; @@ -324,7 +318,7 @@ VidModeGetViewPort(int scrnIndex, int *x, int *y) return TRUE; } -_X_EXPORT Bool +Bool VidModeSwitchMode(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -346,7 +340,7 @@ VidModeSwitchMode(int scrnIndex, pointer mode) return retval; } -_X_EXPORT Bool +Bool VidModeLockZoom(int scrnIndex, Bool lock) { ScrnInfoPtr pScrn; @@ -363,7 +357,7 @@ VidModeLockZoom(int scrnIndex, Bool lock) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetMonitor(int scrnIndex, pointer *monitor) { ScrnInfoPtr pScrn; @@ -377,7 +371,7 @@ VidModeGetMonitor(int scrnIndex, pointer *monitor) return TRUE; } -_X_EXPORT ModeStatus +ModeStatus VidModeCheckModeForMonitor(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -390,7 +384,7 @@ VidModeCheckModeForMonitor(int scrnIndex, pointer mode) return xf86CheckModeForMonitor((DisplayModePtr)mode, pScrn->monitor); } -_X_EXPORT ModeStatus +ModeStatus VidModeCheckModeForDriver(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -403,7 +397,7 @@ VidModeCheckModeForDriver(int scrnIndex, pointer mode) return xf86CheckModeForDriver(pScrn, (DisplayModePtr)mode, 0); } -_X_EXPORT void +void VidModeSetCrtcForMode(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -422,7 +416,7 @@ VidModeSetCrtcForMode(int scrnIndex, pointer mode) return; } -_X_EXPORT Bool +Bool VidModeAddModeline(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -443,7 +437,7 @@ VidModeAddModeline(int scrnIndex, pointer mode) return TRUE; } -_X_EXPORT int +int VidModeGetNumOfModes(int scrnIndex) { pointer mode = NULL; @@ -459,7 +453,7 @@ VidModeGetNumOfModes(int scrnIndex) } while (TRUE); } -_X_EXPORT Bool +Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue) { ScrnInfoPtr pScrn; @@ -478,7 +472,7 @@ VidModeSetGamma(int scrnIndex, float red, float green, float blue) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue) { ScrnInfoPtr pScrn; @@ -493,7 +487,7 @@ VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue) return TRUE; } -_X_EXPORT Bool +Bool VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) { ScrnInfoPtr pScrn; @@ -506,7 +500,7 @@ VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) { ScrnInfoPtr pScrn; @@ -519,7 +513,7 @@ VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) return TRUE; } -_X_EXPORT int +int VidModeGetGammaRampSize(int scrnIndex) { if (!VidModeAvailable(scrnIndex)) @@ -528,7 +522,7 @@ VidModeGetGammaRampSize(int scrnIndex) return xf86GetGammaRampSize(xf86Screens[scrnIndex]->pScreen); } -_X_EXPORT pointer +pointer VidModeCreateMode(void) { DisplayModePtr mode; @@ -544,14 +538,14 @@ VidModeCreateMode(void) return mode; } -_X_EXPORT void +void VidModeCopyMode(pointer modefrom, pointer modeto) { memcpy(modeto, modefrom, sizeof(DisplayModeRec)); } -_X_EXPORT int +int VidModeGetModeValue(pointer mode, int valtyp) { int ret = 0; @@ -594,7 +588,7 @@ VidModeGetModeValue(pointer mode, int valtyp) return ret; } -_X_EXPORT void +void VidModeSetModeValue(pointer mode, int valtyp, int val) { switch (valtyp) { @@ -635,7 +629,7 @@ VidModeSetModeValue(pointer mode, int valtyp, int val) return; } -_X_EXPORT vidMonitorValue +vidMonitorValue VidModeGetMonitorValue(pointer monitor, int valtyp, int indx) { vidMonitorValue ret; diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index 1f412349c..3543811db 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -54,6 +54,7 @@ #include #include #include +#include #include "xf86.h" #include "xf86Priv.h" #include "xf86Xinput.h" @@ -65,15 +66,14 @@ #include "extinit.h" #ifdef DPMSExtension -#define DPMS_SERVER -#include +#include #include "dpmsproc.h" #endif #include "exevents.h" /* AddInputDevice */ #include "exglobals.h" +#include "eventstr.h" -#define EXTENSION_PROC_ARGS void * #include "extnsionst.h" #include "windowstr.h" /* screenIsSaved */ @@ -85,14 +85,13 @@ #include "mi.h" #include /* dix pointer acceleration */ +#include #ifdef XFreeXDGA #include "dgaproc.h" #endif -#ifdef XKB #include "xkbsrv.h" -#endif #include "os.h" @@ -102,54 +101,79 @@ EventListPtr xf86Events = NULL; * Eval config and modify DeviceVelocityRec accordingly */ static void -ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){ - int tempi, i; - float tempf, tempf2; +ProcessVelocityConfiguration(DeviceIntPtr pDev, char* devname, pointer list, + DeviceVelocityPtr s) +{ + int tempi; + float tempf; + Atom float_prop = XIGetKnownProperty(XATOM_FLOAT); + Atom prop; if(!s) return; - tempf = xf86SetRealOption(list, "FilterHalflife", -1); - if(tempf > 0) - tempf = 1.0 / tempf; /* set reciprocal if possible */ - - tempf2 = xf86SetRealOption(list, "FilterChainProgression", 2.0); - xf86Msg(X_CONFIG, "%s: (accel) filter chain progression: %.2f\n", - devname, tempf2); - if(tempf2 < 1) - tempf2 = 2; - - tempi = xf86SetIntOption(list, "FilterChainLength", 1); - if(tempi < 1 || tempi > MAX_VELOCITY_FILTERS) - tempi = 1; - - if(tempf > 0.0f && tempi >= 1 && tempf2 >= 1.0f) - InitFilterChain(s, tempf, tempf2, tempi, 40); - - for(i = 0; i < tempi; i++) - xf86Msg(X_CONFIG, "%s: (accel) filter stage %i: %.2f ms\n", - devname, i, 1.0f / (s->filters[i].rdecay)); - - tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0); + /* common settings (available via device properties) */ + tempf = xf86SetIntOption(list, "ConstantDeceleration", 1); if(tempf > 1.0){ xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n", devname, tempf); - s->const_acceleration = 1.0 / tempf; /* set reciprocal deceleration - alias acceleration */ + prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION); + XIChangeDeviceProperty(pDev, prop, float_prop, 32, + PropModeReplace, 1, &tempf, FALSE); } - tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1.0); + tempf = xf86SetIntOption(list, "AdaptiveDeceleration", 1); if(tempf > 1.0){ xf86Msg(X_CONFIG, "%s: (accel) adaptive deceleration by %.1f\n", devname, tempf); - s->min_acceleration = 1.0 / tempf; /* set minimum acceleration */ + prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION); + XIChangeDeviceProperty(pDev, prop, float_prop, 32, + PropModeReplace, 1, &tempf, FALSE); + } + + /* select profile by number */ + tempi = xf86SetIntOption(list, "AccelerationProfile", + s->statistics.profile_number); + + prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); + if (XIChangeDeviceProperty(pDev, prop, XA_INTEGER, 32, + PropModeReplace, 1, &tempi, FALSE) == Success) + { + xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i\n", devname, + tempi); + } else { + xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i is unknown\n", + devname, tempi); + } + + /* set scaling */ + tempf = xf86SetRealOption(list, "ExpectedRate", 0); + prop = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING); + if(tempf > 0){ + tempf = 1000.0 / tempf; + XIChangeDeviceProperty(pDev, prop, float_prop, 32, + PropModeReplace, 1, &tempf, FALSE); + }else{ + tempf = xf86SetRealOption(list, "VelocityScale", s->corr_mul); + XIChangeDeviceProperty(pDev, prop, float_prop, 32, + PropModeReplace, 1, &tempf, FALSE); + } + + tempi = xf86SetIntOption(list, "VelocityTrackerCount", -1); + if(tempi > 1){ + InitTrackers(s, tempi); } - tempf = xf86SetRealOption(list, "VelocityCoupling", -1); + s->initial_range = xf86SetIntOption(list, "VelocityInitialRange", + s->initial_range); + + s->max_diff = xf86SetRealOption(list, "VelocityAbsDiff", s->max_diff); + + tempf = xf86SetRealOption(list, "VelocityRelDiff", -1); if(tempf >= 0){ - xf86Msg(X_CONFIG, "%s: (accel) velocity coupling is %.1f%%\n", devname, - tempf*100.0); - s->coupling = tempf; + xf86Msg(X_CONFIG, "%s: (accel) max rel. velocity difference: %.1f%%\n", + devname, tempf*100.0); + s->max_rel_diff = tempf; } /* Configure softening. If const deceleration is used, this is expected @@ -163,24 +187,6 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){ s->average_accel); s->reset_time = xf86SetIntOption(list, "VelocityReset", s->reset_time); - - tempf = xf86SetRealOption(list, "ExpectedRate", 0); - if(tempf > 0){ - s->corr_mul = 1000.0 / tempf; - }else{ - s->corr_mul = xf86SetRealOption(list, "VelocityScale", s->corr_mul); - } - - /* select profile by number */ - tempi= xf86SetIntOption(list, "AccelerationProfile", - s->statistics.profile_number); - - if(SetAccelerationProfile(s, tempi)){ - xf86Msg(X_CONFIG, "%s: (accel) set acceleration profile %i\n", devname, tempi); - }else{ - xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i is unknown\n", - devname, tempi); - } } static void @@ -229,7 +235,7 @@ ApplyAccelerationSettings(DeviceIntPtr dev){ switch(scheme){ case PtrAccelPredictable: pVel = GetDevicePredictableAccelData(dev); - ProcessVelocityConfiguration (local->name, local->options, + ProcessVelocityConfiguration (dev, local->name, local->options, pVel); break; } @@ -255,7 +261,7 @@ xf86SendDragEvents(DeviceIntPtr device) * *********************************************************************** */ -_X_EXPORT void +void xf86ProcessCommonOptions(LocalDevicePtr local, pointer list) { @@ -293,7 +299,7 @@ xf86ProcessCommonOptions(LocalDevicePtr local, * Returns TRUE on success, or FALSE otherwise. *********************************************************************** */ -_X_EXPORT int +int xf86ActivateDevice(LocalDevicePtr local) { DeviceIntPtr dev; @@ -317,24 +323,14 @@ xf86ActivateDevice(LocalDevicePtr local) local->dev = dev; dev->coreEvents = local->flags & XI86_ALWAYS_CORE; - dev->isMaster = FALSE; + dev->type = SLAVE; dev->spriteInfo->spriteOwner = FALSE; - if (DeviceIsPointerType(dev)) - { - dev->deviceGrab.ActivateGrab = ActivatePointerGrab; - dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab; - } else - { - dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; - dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; - } + dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; RegisterOtherDevice(dev); -#ifdef XKB - if (!noXkbExtension) - XkbSetExtension(dev, ProcessKeyboardEvent); -#endif + XkbSetExtension(dev, ProcessKeyboardEvent); if (serverGeneration == 1) xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n", @@ -374,7 +370,7 @@ OpenInputDevice(DeviceIntPtr dev, int *status) { if (!dev->inited) - ActivateDevice(dev); + ActivateDevice(dev, TRUE); *status = Success; } @@ -471,7 +467,7 @@ ChangeDeviceControl (ClientPtr client, DeviceIntPtr dev, xDeviceCtl *control) } void -AddOtherInputDevices() +AddOtherInputDevices(void) { } @@ -541,18 +537,24 @@ xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL enable) } dev = pInfo->dev; - rval = ActivateDevice(dev); + rval = ActivateDevice(dev, TRUE); if (rval != Success) { xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", idev->identifier); - RemoveDevice(dev); + RemoveDevice(dev, TRUE); goto unwind; } /* Enable it if it's properly initialised and we're currently in the VT */ if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema) { - EnableDevice(dev); + EnableDevice(dev, TRUE); + if (!dev->enabled) + { + xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", idev->identifier); + rval = BadMatch; + goto unwind; + } /* send enter/leave event, update sprite window */ CheckMotion(NULL, dev); } @@ -570,7 +572,7 @@ unwind: return rval; } -_X_EXPORT int +int NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) { IDevRec *idev = NULL; @@ -611,12 +613,11 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) /* Right now, the only automatic config we know of is HAL. */ if (strcmp(option->key, "_source") == 0 && strcmp(option->value, "server/hal") == 0) { + is_auto = 1; if (!xf86Info.autoAddDevices) { rval = BadMatch; goto unwind; } - - is_auto = 1; } } if (!idev->driver || !idev->identifier) { @@ -645,6 +646,8 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) return Success; unwind: + if (is_auto && !xf86Info.autoAddDevices) + xf86Msg(X_INFO, "AutoAddDevices is off - not adding device.\n"); if(idev->driver) xfree(idev->driver); if(idev->identifier) @@ -654,14 +657,14 @@ unwind: return rval; } -_X_EXPORT void +void DeleteInputDeviceRequest(DeviceIntPtr pDev) { LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate; InputDriverPtr drv = NULL; IDevRec *idev = NULL; IDevPtr *it; - Bool isMaster = pDev->isMaster; + Bool isMaster = IsMaster(pDev); if (pInfo) /* need to get these before RemoveDevice */ { @@ -670,9 +673,9 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) } OsBlockSignals(); - RemoveDevice(pDev); + RemoveDevice(pDev, TRUE); - if (!isMaster) + if (!isMaster && pInfo != NULL) { if(drv->UnInit) drv->UnInit(drv, pInfo, 0); @@ -699,7 +702,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) * convenient functions to post events */ -_X_EXPORT void +void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, int first_valuator, @@ -710,11 +713,7 @@ xf86PostMotionEvent(DeviceIntPtr device, int i = 0; static int valuators[MAX_VALUATORS]; - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } + XI_VERIFY_VALUATORS(num_valuators); va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) @@ -724,7 +723,7 @@ xf86PostMotionEvent(DeviceIntPtr device, xf86PostMotionEventP(device, is_absolute, first_valuator, num_valuators, valuators); } -_X_EXPORT void +void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, @@ -734,15 +733,11 @@ xf86PostMotionEventP(DeviceIntPtr device, int i = 0, nevents = 0; int dx = 0, dy = 0; Bool drag = xf86SendDragEvents(device); - xEvent *xE = NULL; + DeviceEvent *event; int index; int flags = 0; - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } + XI_VERIFY_VALUATORS(num_valuators); if (is_absolute) flags = POINTER_ABSOLUTE; @@ -780,16 +775,17 @@ xf86PostMotionEventP(DeviceIntPtr device, valuators); for (i = 0; i < nevents; i++) { - xE = (xf86Events + i)->event; + event = (DeviceEvent*)((xf86Events + i)->event); /* Don't post core motion events for devices not registered to send * drag events. */ - if (xE->u.u.type != MotionNotify || drag) { - mieqEnqueue(device, (xf86Events + i)->event); + if (event->header == ET_Internal && + (event->type != ET_Motion || drag)) { + mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); } } } -_X_EXPORT void +void xf86PostProximityEvent(DeviceIntPtr device, int is_in, int first_valuator, @@ -797,31 +793,42 @@ xf86PostProximityEvent(DeviceIntPtr device, ...) { va_list var; - int i, nevents; + int i; int valuators[MAX_VALUATORS]; - - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } + XI_VERIFY_VALUATORS(num_valuators); va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuators[i] = va_arg(var, int); va_end(var); + xf86PostProximityEventP(device, is_in, first_valuator, num_valuators, + valuators); + +} + +void +xf86PostProximityEventP(DeviceIntPtr device, + int is_in, + int first_valuator, + int num_valuators, + int *valuators) +{ + int i, nevents; + + XI_VERIFY_VALUATORS(num_valuators); + GetEventList(&xf86Events); nevents = GetProximityEvents(xf86Events, device, is_in ? ProximityIn : ProximityOut, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(device, (xf86Events + i)->event); + mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); } -_X_EXPORT void +void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, @@ -832,8 +839,39 @@ xf86PostButtonEvent(DeviceIntPtr device, { va_list var; int valuators[MAX_VALUATORS]; + int i = 0; + + XI_VERIFY_VALUATORS(num_valuators); + + va_start(var, num_valuators); + for (i = 0; i < num_valuators; i++) + valuators[i] = va_arg(var, int); + va_end(var); + + xf86PostButtonEventP(device, is_absolute, button, is_down, first_valuator, + num_valuators, valuators); + +} + +void +xf86PostButtonEventP(DeviceIntPtr device, + int is_absolute, + int button, + int is_down, + int first_valuator, + int num_valuators, + int *valuators) +{ int i = 0, nevents = 0; int index; + int flags = 0; + + XI_VERIFY_VALUATORS(num_valuators); + + if (is_absolute) + flags = POINTER_ABSOLUTE; + else + flags = POINTER_RELATIVE | POINTER_ACCELERATE; #if XFreeXDGA if (miPointerGetScreen(device)) { @@ -842,29 +880,18 @@ xf86PostButtonEvent(DeviceIntPtr device, return; } #endif - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } - - va_start(var, num_valuators); - for (i = 0; i < num_valuators; i++) - valuators[i] = va_arg(var, int); - va_end(var); GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, is_down ? ButtonPress : ButtonRelease, button, - (is_absolute) ? POINTER_ABSOLUTE : POINTER_RELATIVE, - first_valuator, num_valuators, valuators); + flags, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(device, (xf86Events + i)->event); + mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); } -_X_EXPORT void +void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, @@ -874,7 +901,7 @@ xf86PostKeyEvent(DeviceIntPtr device, ...) { va_list var; - int i = 0, nevents = 0; + int i = 0; static int valuators[MAX_VALUATORS]; /* instil confidence in the user */ @@ -882,18 +909,37 @@ xf86PostKeyEvent(DeviceIntPtr device, "badly south after this message, then xf86PostKeyEvent is " "broken.\n"); - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } + XI_VERIFY_VALUATORS(num_valuators); - if (is_absolute) { - va_start(var, num_valuators); - for (i = 0; i < num_valuators; i++) - valuators[i] = va_arg(var, int); - va_end(var); + va_start(var, num_valuators); + for (i = 0; i < num_valuators; i++) + valuators[i] = va_arg(var, int); + va_end(var); + xf86PostKeyEventP(device, key_code, is_down, is_absolute, first_valuator, + num_valuators, valuators); + +} + +void +xf86PostKeyEventP(DeviceIntPtr device, + unsigned int key_code, + int is_down, + int is_absolute, + int first_valuator, + int num_valuators, + int *valuators) +{ + int i = 0, nevents = 0; + + /* instil confidence in the user */ + DebugF("this function has never been tested properly. if things go quite " + "badly south after this message, then xf86PostKeyEvent is " + "broken.\n"); + + XI_VERIFY_VALUATORS(num_valuators); + + if (is_absolute) { GetEventList(&xf86Events); nevents = GetKeyboardValuatorEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, @@ -907,40 +953,19 @@ xf86PostKeyEvent(DeviceIntPtr device, } for (i = 0; i < nevents; i++) - mieqEnqueue(device, (xf86Events + i)->event); + mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); } -_X_EXPORT void +void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down) { - int nevents = 0, i = 0; - int index; - -#if XFreeXDGA - DeviceIntPtr pointer; - - /* Some pointers send key events, paired device is wrong then. */ - pointer = IsPointerDevice(device) ? device : GetPairedDevice(device); - - if (miPointerGetScreen(pointer)) { - index = miPointerGetScreen(pointer)->myNum; - if (DGAStealKeyEvent(device, index, key_code, is_down)) - return; - } -#endif - - GetEventList(&xf86Events); - nevents = GetKeyboardEvents(xf86Events, device, - is_down ? KeyPress : KeyRelease, key_code); - - for (i = 0; i < nevents; i++) - mieqEnqueue(device, (xf86Events + i)->event); + xf86PostKeyEventP(device, key_code, is_down, 0, 0, 0, NULL); } -_X_EXPORT LocalDevicePtr -xf86FirstLocalDevice() +LocalDevicePtr +xf86FirstLocalDevice(void) { return xf86InputDevs; } @@ -958,7 +983,7 @@ xf86FirstLocalDevice() * different orgins on the touch screen vs X. */ -_X_EXPORT int +int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, @@ -992,7 +1017,7 @@ xf86ScaleAxis(int Cx, * ReadInput function before any events are posted, if the device is screen * specific like a touch screen. */ -_X_EXPORT void +void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, @@ -1005,14 +1030,14 @@ xf86XInputSetScreen(LocalDevicePtr local, } -_X_EXPORT void -xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, +void +xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval, int resolution, int min_res, int max_res) { if (!dev || !dev->valuator) return; - InitValuatorAxisStruct(dev, axnum, minval, maxval, resolution, min_res, + InitValuatorAxisStruct(dev, axnum, label, minval, maxval, resolution, min_res, max_res); } @@ -1020,7 +1045,7 @@ xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, * Set the valuator values to be in synch with dix/event.c * DefineInitialRootWindow(). */ -_X_EXPORT void +void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) { if (axnum == 0) { @@ -1046,7 +1071,7 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) * * @param panic True if device is unrecoverable and needs to be removed. */ -_X_EXPORT void +void xf86DisableDevice(DeviceIntPtr dev, Bool panic) { devicePresenceNotify ev; @@ -1054,7 +1079,7 @@ xf86DisableDevice(DeviceIntPtr dev, Bool panic) if(!panic) { - DisableDevice(dev); + DisableDevice(dev, TRUE); } else { ev.type = DevicePresenceNotify; @@ -1074,10 +1099,10 @@ xf86DisableDevice(DeviceIntPtr dev, Bool panic) * out that the read error wasn't quite that bad after all. * Device will be re-activated, and an event sent to the client. */ -_X_EXPORT void +void xf86EnableDevice(DeviceIntPtr dev) { - EnableDevice(dev); + EnableDevice(dev, TRUE); } /* end of xf86Xinput.c */ diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h index 2ca2073f9..aa9e9d507 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.h +++ b/xorg-server/hw/xfree86/common/xf86Xinput.h @@ -52,9 +52,6 @@ #ifndef _xf86Xinput_h #define _xf86Xinput_h -#ifndef NEED_EVENTS -#define NEED_EVENTS -#endif #include "xf86str.h" #include "inputstr.h" #include @@ -83,6 +80,14 @@ #define XI_PRIVATE(dev) \ (((LocalDevicePtr)((dev)->public.devicePrivate))->private) +/* Valuator verification macro */ +#define XI_VERIFY_VALUATORS(num_valuators) \ + if (num_valuators > MAX_VALUATORS) { \ + xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" \ + " MAX_VALUATORS\n", __FUNCTION__, num_valuators); \ + return; \ + } + /* Stupid API backwards-compatibility. */ #define TS_Raw 60 #define TS_Scaled 61 @@ -152,53 +157,58 @@ typedef struct _DeviceAssocRec } DeviceAssocRec, *DeviceAssocPtr; /* xf86Globals.c */ -extern InputInfoPtr xf86InputDevs; +extern _X_EXPORT InputInfoPtr xf86InputDevs; /* xf86Xinput.c */ -void InitExtInput(void); -void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, +extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, ...); -void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, +extern _X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, int *valuators); -void xf86PostProximityEvent(DeviceIntPtr device, int is_in, +extern _X_EXPORT void xf86PostProximityEvent(DeviceIntPtr device, int is_in, int first_valuator, int num_valuators, ...); -void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, +extern _X_EXPORT void xf86PostProximityEventP(DeviceIntPtr device, int is_in, int first_valuator, + int num_valuators, int *valuators); +extern _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, int is_down, int first_valuator, int num_valuators, ...); -void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, +extern _X_EXPORT void xf86PostButtonEventP(DeviceIntPtr device, int is_absolute, int button, + int is_down, int first_valuator, int num_valuators, + int *valuators); +extern _X_EXPORT void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, int is_absolute, int first_valuator, int num_valuators, ...); -void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, +extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_code, int is_down, + int is_absolute, int first_valuator, int num_valuators, + int *valuators); +extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down); -int xf86ActivateDevice(LocalDevicePtr local); -LocalDevicePtr xf86FirstLocalDevice(void); -int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow); -void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, int y); -void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options); -void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, +extern _X_EXPORT int xf86ActivateDevice(LocalDevicePtr local); +extern _X_EXPORT LocalDevicePtr xf86FirstLocalDevice(void); +extern _X_EXPORT int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow); +extern _X_EXPORT void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, int y); +extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options); +extern _X_EXPORT void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval, int resolution, int min_res, int max_res); -void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum); -void xf86AddEnabledDevice(InputInfoPtr pInfo); -void xf86RemoveEnabledDevice(InputInfoPtr pInfo); -void xf86DisableDevice(DeviceIntPtr dev, Bool panic); -void xf86EnableDevice(DeviceIntPtr dev); +extern _X_EXPORT void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum); +extern _X_EXPORT void xf86AddEnabledDevice(InputInfoPtr pInfo); +extern _X_EXPORT void xf86RemoveEnabledDevice(InputInfoPtr pInfo); +extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic); +extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev); +/* not exported */ int xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL is_auto); /* xf86Helper.c */ -void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags); -void xf86DeleteInputDriver(int drvIndex); -InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags); -InputDriverPtr xf86LookupInputDriver(const char *name); -InputInfoPtr xf86LookupInput(const char *name); -void xf86DeleteInput(InputInfoPtr pInp, int flags); -void xf86MotionHistoryAllocate(LocalDevicePtr local); -int xf86GetMotionEvents(DeviceIntPtr dev, xTimecoord *buff, - unsigned long start, unsigned long stop, - ScreenPtr pScreen, BOOL core); +extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags); +extern _X_EXPORT void xf86DeleteInputDriver(int drvIndex); +extern _X_EXPORT InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags); +extern _X_EXPORT InputDriverPtr xf86LookupInputDriver(const char *name); +extern _X_EXPORT InputInfoPtr xf86LookupInput(const char *name); +extern _X_EXPORT void xf86DeleteInput(InputInfoPtr pInp, int flags); +extern _X_EXPORT void xf86MotionHistoryAllocate(LocalDevicePtr local); /* xf86Option.c */ -void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, +extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, pointer extraOpts); diff --git a/xorg-server/hw/xfree86/common/xf86cmap.c b/xorg-server/hw/xfree86/common/xf86cmap.c index e57844764..36e6f96de 100644 --- a/xorg-server/hw/xfree86/common/xf86cmap.c +++ b/xorg-server/hw/xfree86/common/xf86cmap.c @@ -49,10 +49,10 @@ #include "xf86_OSproc.h" #include "xf86str.h" #include "micmap.h" +#include "xf86Crtc.h" #ifdef XFreeXDGA -#define _XF86DGA_SERVER_ -#include +#include #include "dgaproc.h" #endif @@ -84,6 +84,7 @@ typedef struct { Bool (*EnterVT)(int, int); Bool (*SwitchMode)(int, DisplayModePtr, int); int (*SetDGAMode)(int, int, DGADevicePtr); + xf86ChangeGammaProc *ChangeGamma; int maxColors; int sigRGBbits; int gammaElements; @@ -126,7 +127,7 @@ static void CMapUnwrapScreen(ScreenPtr pScreen); -_X_EXPORT Bool xf86HandleColormaps( +Bool xf86HandleColormaps( ScreenPtr pScreen, int maxColors, int sigRGBbits, @@ -141,6 +142,10 @@ _X_EXPORT Bool xf86HandleColormaps( int *indices; int elements; + /* If we support a better colormap system, then pretend we succeeded. */ + if (xf86_crtc_supports_gamma(pScrn)) + return TRUE; + if(!maxColors || !sigRGBbits || !loadPalette) return FALSE; @@ -190,6 +195,7 @@ _X_EXPORT Bool xf86HandleColormaps( pScreenPriv->EnterVT = pScrn->EnterVT; pScreenPriv->SwitchMode = pScrn->SwitchMode; pScreenPriv->SetDGAMode = pScrn->SetDGAMode; + pScreenPriv->ChangeGamma = pScrn->ChangeGamma; if (!(flags & CMAP_LOAD_EVEN_IF_OFFSCREEN)) { pScrn->EnterVT = CMapEnterVT; @@ -204,8 +210,8 @@ _X_EXPORT Bool xf86HandleColormaps( ComputeGamma(pScreenPriv); /* get the default map */ - - pDefMap = (ColormapPtr) LookupIDByType(pScreen->defColormap, RT_COLORMAP); + dixLookupResourceByType((pointer *)&pDefMap, pScreen->defColormap, + RT_COLORMAP, serverClient, DixInstallAccess); if(!CMapAllocateColormapPrivate(pDefMap)) { CMapUnwrapScreen(pScreen); @@ -557,8 +563,8 @@ CMapRefreshColors(ColormapPtr pmap, int defs, int* indices) switch(pVisual->class) { case StaticGray: - for(i = 0; i <= numColors - 1; i++) { - index = i * maxValue / numColors; + for(i = 0; i < numColors; i++) { + index = (i+1) * maxValue / numColors; colors[i].red = gamma[index].red; colors[i].green = gamma[index].green; colors[i].blue = gamma[index].blue; @@ -819,6 +825,7 @@ CMapUnwrapScreen(ScreenPtr pScreen) pScrn->EnterVT = pScreenPriv->EnterVT; pScrn->SwitchMode = pScreenPriv->SwitchMode; pScrn->SetDGAMode = pScreenPriv->SetDGAMode; + pScrn->ChangeGamma = pScreenPriv->ChangeGamma; xfree(pScreenPriv->gamma); xfree(pScreenPriv->PreAllocIndices); @@ -884,6 +891,7 @@ CMapChangeGamma( int index, Gamma gamma ){ + int ret = Success; ScrnInfoPtr pScrn = xf86Screens[index]; ScreenPtr pScreen = pScrn->pScreen; CMapColormapPtr pColPriv; @@ -949,7 +957,12 @@ CMapChangeGamma( CMapReinstallMap(pMap); } - return Success; + pScrn->ChangeGamma = pScreenPriv->ChangeGamma; + if (pScrn->ChangeGamma) + ret = pScrn->ChangeGamma(index, gamma); + pScrn->ChangeGamma = CMapChangeGamma; + + return ret; } @@ -972,7 +985,7 @@ ComputeGammaRamp ( } } -_X_EXPORT int +int xf86ChangeGammaRamp( ScreenPtr pScreen, int size, @@ -985,6 +998,18 @@ xf86ChangeGammaRamp( CMapScreenPtr pScreenPriv; CMapLinkPtr pLink; + if (xf86_crtc_supports_gamma(pScrn)) { + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + RRCrtcPtr crtc = config->output[config->compat_output]->crtc->randr_crtc; + + if (crtc->gammaSize != size) + return BadValue; + + RRCrtcGammaSet(crtc, red, green, blue); + + return Success; + } + if(CMapScreenKey == NULL) return BadImplementation; @@ -1040,11 +1065,19 @@ xf86ChangeGammaRamp( return Success; } -_X_EXPORT int +int xf86GetGammaRampSize(ScreenPtr pScreen) { + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; CMapScreenPtr pScreenPriv; + if (xf86_crtc_supports_gamma(pScrn)) { + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + RRCrtcPtr crtc = config->output[config->compat_output]->crtc->randr_crtc; + + return crtc->gammaSize; + } + if(CMapScreenKey == NULL) return 0; pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, @@ -1054,7 +1087,7 @@ xf86GetGammaRampSize(ScreenPtr pScreen) return pScreenPriv->gammaElements; } -_X_EXPORT int +int xf86GetGammaRamp( ScreenPtr pScreen, int size, @@ -1062,10 +1095,28 @@ xf86GetGammaRamp( unsigned short *green, unsigned short *blue ){ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; CMapScreenPtr pScreenPriv; LOCO *entry; int shift, sigbits; + if (xf86_crtc_supports_gamma(pScrn)) { + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + RRCrtcPtr crtc = config->output[config->compat_output]->crtc->randr_crtc; + + if (crtc->gammaSize < size) + return BadValue; + + if (!RRCrtcGammaGet(crtc)) + return BadImplementation; + + memcpy(red, crtc->gammaRed, size * sizeof(*red)); + memcpy(green, crtc->gammaGreen, size * sizeof(*green)); + memcpy(blue, crtc->gammaBlue, size * sizeof(*blue)); + + return Success; + } + if(CMapScreenKey == NULL) return BadImplementation; @@ -1108,5 +1159,5 @@ xf86ChangeGamma( if(pScrn->ChangeGamma) return (*pScrn->ChangeGamma)(pScreen->myNum, gamma); - return Success; /* Success? */ + return BadImplementation; } diff --git a/xorg-server/hw/xfree86/common/xf86cmap.h b/xorg-server/hw/xfree86/common/xf86cmap.h index b98bd3bfd..f15844e59 100644 --- a/xorg-server/hw/xfree86/common/xf86cmap.h +++ b/xorg-server/hw/xfree86/common/xf86cmap.h @@ -36,7 +36,7 @@ #define CMAP_RELOAD_ON_MODE_SWITCH 0x0000002 #define CMAP_LOAD_EVEN_IF_OFFSCREEN 0x0000004 -Bool xf86HandleColormaps( +extern _X_EXPORT Bool xf86HandleColormaps( ScreenPtr pScreen, int maxCol, int sigRGBbits, @@ -45,13 +45,13 @@ Bool xf86HandleColormaps( unsigned int flags ); -int +extern _X_EXPORT int xf86ChangeGamma( ScreenPtr pScreen, Gamma newGamma ); -int +extern _X_EXPORT int xf86ChangeGammaRamp( ScreenPtr pScreen, int size, @@ -60,9 +60,9 @@ xf86ChangeGammaRamp( unsigned short *blue ); -int xf86GetGammaRampSize(ScreenPtr pScreen); +extern _X_EXPORT int xf86GetGammaRampSize(ScreenPtr pScreen); -int +extern _X_EXPORT int xf86GetGammaRamp( ScreenPtr pScreen, int size, diff --git a/xorg-server/hw/xfree86/common/xf86fbBus.c b/xorg-server/hw/xfree86/common/xf86fbBus.c index 102f6b1b2..059e378e3 100644 --- a/xorg-server/hw/xfree86/common/xf86fbBus.c +++ b/xorg-server/hw/xfree86/common/xf86fbBus.c @@ -1,4 +1,3 @@ - /* * Copyright (c) 2000-2001 by The XFree86 Project, Inc. * @@ -41,36 +40,35 @@ #include "os.h" #include "xf86.h" #include "xf86Priv.h" -#include "xf86Resources.h" #include "xf86Bus.h" #define XF86_OS_PRIVS -#define NEED_OS_RAC_PROTOS #include "xf86_OSproc.h" -#include "xf86RAC.h" - Bool fbSlotClaimed = FALSE; -_X_EXPORT int +int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p; int num; + + if (pciSlotClaimed) + return -1; +#if defined(__sparc__) || defined (__sparc64__) + if (sbusSlotClaimed) + return -1; +#endif num = xf86AllocateEntity(); p = xf86Entities[num]; p->driver = drvp; p->chipset = 0; - p->busType = BUS_NONE; + p->bus.type = BUS_NONE; p->active = active; p->inUse = FALSE; xf86AddDevToEntity(num, dev); - p->access = xnfcalloc(1,sizeof(EntityAccessRec)); - p->access->fallback = &AccessNULL; - p->access->pAccess = &AccessNULL; - p->busAcc = NULL; fbSlotClaimed = TRUE; return num; @@ -88,7 +86,7 @@ xf86GetFbInfoForScreen(int scrnIndex) for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) { p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]]; - if (p->busType == BUS_NONE) { + if (p->bus.type == BUS_NONE) { num++; } } diff --git a/xorg-server/hw/xfree86/common/xf86fbman.c b/xorg-server/hw/xfree86/common/xf86fbman.c index 5471c58f0..5b8871723 100644 --- a/xorg-server/hw/xfree86/common/xf86fbman.c +++ b/xorg-server/hw/xfree86/common/xf86fbman.c @@ -45,7 +45,7 @@ static int xf86FBManagerKeyIndex; static DevPrivateKey xf86FBManagerKey; -_X_EXPORT Bool xf86RegisterOffscreenManager( +Bool xf86RegisterOffscreenManager( ScreenPtr pScreen, FBManagerFuncsPtr funcs ){ @@ -57,7 +57,7 @@ _X_EXPORT Bool xf86RegisterOffscreenManager( } -_X_EXPORT Bool +Bool xf86FBManagerRunning(ScreenPtr pScreen) { if(xf86FBManagerKey == NULL) @@ -68,7 +68,7 @@ xf86FBManagerRunning(ScreenPtr pScreen) return TRUE; } -_X_EXPORT Bool +Bool xf86RegisterFreeBoxCallback( ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, @@ -86,7 +86,7 @@ xf86RegisterFreeBoxCallback( } -_X_EXPORT FBAreaPtr +FBAreaPtr xf86AllocateOffscreenArea( ScreenPtr pScreen, int w, int h, @@ -108,7 +108,7 @@ xf86AllocateOffscreenArea( } -_X_EXPORT FBLinearPtr +FBLinearPtr xf86AllocateOffscreenLinear( ScreenPtr pScreen, int length, @@ -130,7 +130,7 @@ xf86AllocateOffscreenLinear( } -_X_EXPORT void +void xf86FreeOffscreenArea(FBAreaPtr area) { FBManagerFuncsPtr funcs; @@ -149,7 +149,7 @@ xf86FreeOffscreenArea(FBAreaPtr area) } -_X_EXPORT void +void xf86FreeOffscreenLinear(FBLinearPtr linear) { FBManagerFuncsPtr funcs; @@ -168,7 +168,7 @@ xf86FreeOffscreenLinear(FBLinearPtr linear) } -_X_EXPORT Bool +Bool xf86ResizeOffscreenArea( FBAreaPtr resize, int w, int h @@ -186,7 +186,7 @@ xf86ResizeOffscreenArea( return (*funcs->ResizeOffscreenArea)(resize, w, h); } -_X_EXPORT Bool +Bool xf86ResizeOffscreenLinear( FBLinearPtr resize, int size @@ -205,7 +205,7 @@ xf86ResizeOffscreenLinear( } -_X_EXPORT Bool +Bool xf86QueryLargestOffscreenArea( ScreenPtr pScreen, int *w, int *h, @@ -228,7 +228,7 @@ xf86QueryLargestOffscreenArea( pScreen, w, h, gran, preferences, severity); } -_X_EXPORT Bool +Bool xf86QueryLargestOffscreenLinear( ScreenPtr pScreen, int *size, @@ -250,7 +250,7 @@ xf86QueryLargestOffscreenLinear( } -_X_EXPORT Bool +Bool xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen) { FBManagerFuncsPtr funcs; @@ -802,10 +802,10 @@ LinearRemoveCBWrapper(FBAreaPtr area) xfree(pLink); } -#ifdef DEBUG static void -Dump(FBLinearLinkPtr pLink) +DumpDebug(FBLinearLinkPtr pLink) { +#ifdef DEBUG if (!pLink) ErrorF("MMmm, PLINK IS NULL!\n"); while (pLink) { @@ -817,8 +817,8 @@ Dump(FBLinearLinkPtr pLink) pLink = pLink->next; } -} #endif +} static FBLinearPtr AllocateLinear( @@ -889,9 +889,7 @@ AllocateLinear( linear->linear.RemoveLinearCallback = NULL; linear->linear.devPrivate.ptr = NULL; -#ifdef DEBUG - Dump(offman->LinearAreas); -#endif + DumpDebug(offman->LinearAreas); return &(linear->linear); } @@ -916,15 +914,11 @@ localAllocateOffscreenLinear( xf86FBScreenKey); /* Try to allocate from linear memory first...... */ -#ifdef DEBUG - ErrorF("ALLOCATING LINEAR\n"); -#endif + DebugF("ALLOCATING LINEAR\n"); if ((linear = AllocateLinear(offman, length, gran, privData))) return linear; -#ifdef DEBUG - ErrorF("NOPE, ALLOCATING AREA\n"); -#endif + DebugF("NOPE, ALLOCATING AREA\n"); if(!(link = xalloc(sizeof(FBLinearLink)))) return NULL; @@ -978,9 +972,7 @@ localAllocateOffscreenLinear( } else xfree(link); -#ifdef DEBUG - Dump(offman->LinearAreas); -#endif + DumpDebug(offman->LinearAreas); return linear; } @@ -1005,17 +997,13 @@ localFreeOffscreenLinear(FBLinearPtr linear) } if(pLink->area) { /* really an XY area */ -#ifdef DEBUG - ErrorF("FREEING AREA\n"); -#endif + DebugF("FREEING AREA\n"); localFreeOffscreenArea(pLink->area); if(pLinkPrev) pLinkPrev->next = pLink->next; else offman->LinearAreas = pLink->next; xfree(pLink); -#ifdef DEBUG - Dump(offman->LinearAreas); -#endif + DumpDebug(offman->LinearAreas); return; } @@ -1037,10 +1025,8 @@ localFreeOffscreenLinear(FBLinearPtr linear) } } -#ifdef DEBUG - ErrorF("FREEING LINEAR\n"); - Dump(offman->LinearAreas); -#endif + DebugF("FREEING LINEAR\n"); + DumpDebug(offman->LinearAreas); } @@ -1196,7 +1182,7 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen) return (*pScreen->CloseScreen) (i, pScreen); } -_X_EXPORT Bool +Bool xf86InitFBManager( ScreenPtr pScreen, BoxPtr FullBox @@ -1233,7 +1219,7 @@ xf86InitFBManager( return ret; } -_X_EXPORT Bool +Bool xf86InitFBManagerArea( ScreenPtr pScreen, int PixelArea, @@ -1325,7 +1311,7 @@ xf86InitFBManagerArea( return ret; } -_X_EXPORT Bool +Bool xf86InitFBManagerRegion( ScreenPtr pScreen, RegionPtr FullRegion @@ -1363,7 +1349,7 @@ xf86InitFBManagerRegion( return TRUE; } -_X_EXPORT Bool +Bool xf86InitFBManagerLinear( ScreenPtr pScreen, int offset, @@ -1407,7 +1393,7 @@ xf86InitFBManagerLinear( disappear after the next release. People should use the real linear functions instead */ -_X_EXPORT FBAreaPtr +FBAreaPtr xf86AllocateLinearOffscreenArea ( ScreenPtr pScreen, int length, diff --git a/xorg-server/hw/xfree86/common/xf86fbman.h b/xorg-server/hw/xfree86/common/xf86fbman.h index 4f2eac5e6..1b3c31635 100644 --- a/xorg-server/hw/xfree86/common/xf86fbman.h +++ b/xorg-server/hw/xfree86/common/xf86fbman.h @@ -110,43 +110,43 @@ typedef struct { } FBManagerFuncs, *FBManagerFuncsPtr; -Bool xf86RegisterOffscreenManager( +extern _X_EXPORT Bool xf86RegisterOffscreenManager( ScreenPtr pScreen, FBManagerFuncsPtr funcs ); -Bool +extern _X_EXPORT Bool xf86InitFBManagerRegion( ScreenPtr pScreen, RegionPtr ScreenRegion ); -Bool +extern _X_EXPORT Bool xf86InitFBManagerArea( ScreenPtr pScreen, int PixalArea, int Verbosity ); -Bool +extern _X_EXPORT Bool xf86InitFBManager( ScreenPtr pScreen, BoxPtr FullBox ); -Bool +extern _X_EXPORT Bool xf86InitFBManagerLinear( ScreenPtr pScreen, int offset, int size ); -Bool +extern _X_EXPORT Bool xf86FBManagerRunning( ScreenPtr pScreen ); -FBAreaPtr +extern _X_EXPORT FBAreaPtr xf86AllocateOffscreenArea ( ScreenPtr pScreen, int w, int h, @@ -156,7 +156,7 @@ xf86AllocateOffscreenArea ( pointer privData ); -FBAreaPtr +extern _X_EXPORT FBAreaPtr xf86AllocateLinearOffscreenArea ( ScreenPtr pScreen, int length, @@ -166,7 +166,7 @@ xf86AllocateLinearOffscreenArea ( pointer privData ); -FBLinearPtr +extern _X_EXPORT FBLinearPtr xf86AllocateOffscreenLinear ( ScreenPtr pScreen, int length, @@ -176,36 +176,36 @@ xf86AllocateOffscreenLinear ( pointer privData ); -void xf86FreeOffscreenArea(FBAreaPtr area); -void xf86FreeOffscreenLinear(FBLinearPtr area); +extern _X_EXPORT void xf86FreeOffscreenArea(FBAreaPtr area); +extern _X_EXPORT void xf86FreeOffscreenLinear(FBLinearPtr area); -Bool +extern _X_EXPORT Bool xf86ResizeOffscreenArea( FBAreaPtr resize, int w, int h ); -Bool +extern _X_EXPORT Bool xf86ResizeOffscreenLinear( FBLinearPtr resize, int size ); -Bool +extern _X_EXPORT Bool xf86RegisterFreeBoxCallback( ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, pointer devPriv ); -Bool +extern _X_EXPORT Bool xf86PurgeUnlockedOffscreenAreas( ScreenPtr pScreen ); -Bool +extern _X_EXPORT Bool xf86QueryLargestOffscreenArea( ScreenPtr pScreen, int *width, int *height, @@ -214,7 +214,7 @@ xf86QueryLargestOffscreenArea( int priority ); -Bool +extern _X_EXPORT Bool xf86QueryLargestOffscreenLinear( ScreenPtr pScreen, int *size, diff --git a/xorg-server/hw/xfree86/common/xf86noBus.c b/xorg-server/hw/xfree86/common/xf86noBus.c index 0e3e3cc6b..0b9634918 100644 --- a/xorg-server/hw/xfree86/common/xf86noBus.c +++ b/xorg-server/hw/xfree86/common/xf86noBus.c @@ -1,4 +1,3 @@ - /* * Copyright (c) 2000-2002 by The XFree86 Project, Inc. * @@ -41,17 +40,13 @@ #include "os.h" #include "xf86.h" #include "xf86Priv.h" -#include "xf86Resources.h" #include "xf86Bus.h" #define XF86_OS_PRIVS -#define NEED_OS_RAC_PROTOS #include "xf86_OSproc.h" -#include "xf86RAC.h" - -_X_EXPORT int +int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p; @@ -61,14 +56,10 @@ xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) p = xf86Entities[num]; p->driver = drvp; p->chipset = 0; - p->busType = BUS_NONE; + p->bus.type = BUS_NONE; p->active = active; p->inUse = FALSE; xf86AddDevToEntity(num, dev); - p->access = xnfcalloc(1,sizeof(EntityAccessRec)); - p->access->fallback = &AccessNULL; - p->access->pAccess = &AccessNULL; - p->busAcc = NULL; return num; } diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c index 5b29a1511..df62e0766 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.c +++ b/xorg-server/hw/xfree86/common/xf86pciBus.c @@ -41,23 +41,17 @@ #include "Pci.h" #include "xf86.h" #include "xf86Priv.h" -#include "xf86Resources.h" /* Bus-specific headers */ #include "xf86Bus.h" #define XF86_OS_PRIVS -#define NEED_OS_RAC_PROTOS #include "xf86_OSproc.h" -#include "xf86RAC.h" /* Bus-specific globals */ Bool pciSlotClaimed = FALSE; -static struct pci_device ** xf86PciVideoInfo = NULL; /* PCI probe for video hw */ - -/* PCI classes that get included in xf86PciVideoInfo */ #define PCIINFOCLASSES(c) \ ( (((c) & 0x00ff0000) == (PCI_CLASS_PREHISTORIC << 16)) \ || (((c) & 0x00ff0000) == (PCI_CLASS_DISPLAY << 16)) \ @@ -81,23 +75,7 @@ static struct pci_device ** xf86PciVideoInfo = NULL; /* PCI probe for video hw * (((c) & 0x00ffff00) \ == ((PCI_CLASS_DISPLAY << 16) | (PCI_SUBCLASS_DISPLAY_VGA << 8))) -/* - * PCI classes for which potentially destructive checking of the map sizes - * may be done. Any classes where this may be unsafe should be omitted - * from this list. - */ -#define PCINONSYSTEMCLASSES(c) PCIALWAYSPRINTCLASSES(c) - -/* - * PCI classes that use RAC - */ -#define PCISHAREDIOCLASSES(c) \ - ( (((c) & 0x00ffff00) \ - == ((PCI_CLASS_PREHISTORIC << 16) | (PCI_SUBCLASS_PREHISTORIC_VGA << 8))) \ - || IS_VGA(c) ) - - -_X_EXPORT void +void xf86FormatPciBusNumber(int busnum, char *buffer) { /* 'buffer' should be at least 8 characters long */ @@ -107,241 +85,6 @@ xf86FormatPciBusNumber(int busnum, char *buffer) sprintf(buffer, "%d@%d", busnum & 0x00ff, busnum >> 8); } -/* - * IO enable/disable related routines for PCI - */ -#define pArg ((pciArg*)arg) -#define SETBITS PCI_CMD_IO_ENABLE -static void -pciIoAccessEnable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciIoAccessEnable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl |= SETBITS | PCI_CMD_MASTER_ENABLE; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -static void -pciIoAccessDisable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciIoAccessDisable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl &= ~SETBITS; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -#undef SETBITS -#define SETBITS (PCI_CMD_IO_ENABLE | PCI_CMD_MEM_ENABLE) -static void -pciIo_MemAccessEnable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciIo_MemAccessEnable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl |= SETBITS | PCI_CMD_MASTER_ENABLE; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -static void -pciIo_MemAccessDisable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciIo_MemAccessDisable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl &= ~SETBITS; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -#undef SETBITS -#define SETBITS (PCI_CMD_MEM_ENABLE) -static void -pciMemAccessEnable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciMemAccessEnable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl |= SETBITS | PCI_CMD_MASTER_ENABLE; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -static void -pciMemAccessDisable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciMemAccessDisable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl &= ~SETBITS; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} -#undef SETBITS -#undef pArg - - -/* move to OS layer */ -#define MASKBITS (PCI_PCI_BRIDGE_VGA_EN | PCI_PCI_BRIDGE_MASTER_ABORT_EN) -static void -pciBusAccessEnable(BusAccPtr ptr) -{ -#if 0 - struct pci_device * const dev = ptr->busdep.pci.dev; - uint16_t ctrl; - -#ifdef DEBUG - ErrorF("pciBusAccessEnable: bus=%d\n", ptr->busdep.pci.bus); -#endif - pci_device_cfg_read_u16( dev, & ctrl, PCI_PCI_BRIDGE_CONTROL_REG ); - if ((ctrl & MASKBITS) != PCI_PCI_BRIDGE_VGA_EN) { - ctrl = (ctrl | PCI_PCI_BRIDGE_VGA_EN) & - ~(PCI_PCI_BRIDGE_MASTER_ABORT_EN | PCI_PCI_BRIDGE_SECONDARY_RESET); - pci_device_cfg_write_u16(dev, ctrl, PCI_PCI_BRIDGE_CONTROL_REG); - } -#endif -} - -/* move to OS layer */ -static void -pciBusAccessDisable(BusAccPtr ptr) -{ -#if 0 - struct pci_device * const dev = ptr->busdep.pci.dev; - uint16_t ctrl; - -#ifdef DEBUG - ErrorF("pciBusAccessDisable: bus=%d\n", ptr->busdep.pci.bus); -#endif - pci_device_cfg_read_u16( dev, & ctrl, PCI_PCI_BRIDGE_CONTROL_REG ); - if (ctrl & MASKBITS) { - ctrl &= ~(MASKBITS | PCI_PCI_BRIDGE_SECONDARY_RESET); - pci_device_cfg_write_u16(dev, ctrl, PCI_PCI_BRIDGE_CONTROL_REG); - } -#endif -} -#undef MASKBITS - -static void -pciSetBusAccess(BusAccPtr ptr) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciSetBusAccess: route VGA to bus %d\n", ptr->busdep.pci.bus); -#endif - - if (!ptr->primary && !ptr->current) - return; - - if (ptr->current && ptr->current->disable_f) - (*ptr->current->disable_f)(ptr->current); - ptr->current = NULL; - - /* walk down */ - while (ptr->primary) { /* No enable for root bus */ - if (ptr != ptr->primary->current) { - if (ptr->primary->current && ptr->primary->current->disable_f) - (*ptr->primary->current->disable_f)(ptr->primary->current); - if (ptr->enable_f) - (*ptr->enable_f)(ptr); - ptr->primary->current = ptr; - } - ptr = ptr->primary; - } -#endif -} - -/* move to OS layer */ -static void -savePciState( struct pci_device * dev, pciSavePtr ptr ) -{ -#if 0 - int i; - - pci_device_cfg_read_u32( dev, & ptr->command, PCI_CMD_STAT_REG ); - - for ( i = 0; i < 6; i++ ) { - pci_device_cfg_read_u32( dev, & ptr->base[i], - PCI_CMD_BASE_REG + (i * 4) ); - } - - pci_device_cfg_read_u32( dev, & ptr->biosBase, PCI_CMD_BIOS_REG ); -#endif -} - -/* move to OS layer */ -#if 0 -static void -restorePciState( struct pci_device * dev, pciSavePtr ptr) -{ - int i; - - /* disable card before setting anything */ - pci_device_cfg_write_bits(dev, PCI_CMD_MEM_ENABLE | PCI_CMD_IO_ENABLE, 0, - PCI_CMD_STAT_REG); - - pci_device_cfg_write_u32(dev, ptr->biosBase, PCI_CMD_BIOS_REG); - - for ( i = 0; i < 6; i++ ) { - pci_device_cfg_write_u32(dev, ptr->base[i], - PCI_CMD_BASE_REG + (i * 4)); - } - - pci_device_cfg_write_u32(dev, ptr->command, PCI_CMD_STAT_REG); -} -#endif - -/* move to OS layer */ -static void -savePciBusState(BusAccPtr ptr) -{ -#if 0 - struct pci_device * const dev = ptr->busdep.pci.dev; - uint16_t temp; - - pci_device_cfg_read_u16( dev, & temp, PCI_PCI_BRIDGE_CONTROL_REG ); - ptr->busdep.pci.save.control = temp & ~PCI_PCI_BRIDGE_SECONDARY_RESET; - - /* Allow master aborts to complete normally on non-root buses */ - if ( ptr->busdep.pci.save.control & PCI_PCI_BRIDGE_MASTER_ABORT_EN ) { - temp = ptr->busdep.pci.save.control & ~PCI_PCI_BRIDGE_MASTER_ABORT_EN; - pci_device_cfg_read_u16( dev, & temp, PCI_PCI_BRIDGE_CONTROL_REG ); - } -#endif -} - -/* move to OS layer */ -#define MASKBITS (PCI_PCI_BRIDGE_VGA_EN | PCI_PCI_BRIDGE_MASTER_ABORT_EN) -static void -restorePciBusState(BusAccPtr ptr) -{ -#if 0 - struct pci_device * const dev = ptr->busdep.pci.dev; - uint16_t ctrl; - - /* Only restore the bits we've changed (and don't cause resets) */ - pci_device_cfg_read_u16( dev, & ctrl, PCI_PCI_BRIDGE_CONTROL_REG ); - - if ((ctrl ^ ptr->busdep.pci.save.control) & MASKBITS) { - ctrl &= ~(MASKBITS | PCI_PCI_BRIDGE_SECONDARY_RESET); - ctrl |= ptr->busdep.pci.save.control & MASKBITS; - pci_device_cfg_write_u16(dev, ctrl, PCI_PCI_BRIDGE_CONTROL_REG); - } -#endif -} -#undef MASKBITS - - /* * xf86Bus.c interface */ @@ -353,6 +96,7 @@ xf86PciProbe(void) int num = 0; struct pci_device *info; struct pci_device_iterator *iter; + struct pci_device ** xf86PciVideoInfo = NULL; if (!xf86scanpci()) { @@ -371,6 +115,12 @@ xf86PciProbe(void) xf86PciVideoInfo[num - 1] = info; pci_device_probe(info); +#ifdef HAVE_PCI_DEVICE_IS_BOOT_VGA + if (pci_device_is_boot_vga(info)) { + primaryBus.type = BUS_PCI; + primaryBus.id.pci = info; + } +#endif info->user_data = 0; } } @@ -464,250 +214,16 @@ xf86PciProbe(void) } } -void -initPciState(void) -{ - unsigned i; - pciAccPtr pcaccp; - - if (xf86PciVideoInfo == NULL) { - return; - } - - for (i = 0 ; xf86PciVideoInfo[i] != NULL ; i++) { - struct pci_device * const pvp = xf86PciVideoInfo[i]; - - if (pvp->user_data == 0) { - pcaccp = xnfalloc( sizeof( pciAccRec ) ); - pvp->user_data = (intptr_t) pcaccp; - - pcaccp->arg.dev = pvp; - pcaccp->ioAccess.AccessDisable = pciIoAccessDisable; - pcaccp->ioAccess.AccessEnable = pciIoAccessEnable; - pcaccp->ioAccess.arg = &pcaccp->arg; - pcaccp->io_memAccess.AccessDisable = pciIo_MemAccessDisable; - pcaccp->io_memAccess.AccessEnable = pciIo_MemAccessEnable; - pcaccp->io_memAccess.arg = &pcaccp->arg; - pcaccp->memAccess.AccessDisable = pciMemAccessDisable; - pcaccp->memAccess.AccessEnable = pciMemAccessEnable; - pcaccp->memAccess.arg = &pcaccp->arg; - - pcaccp->ctrl = PCISHAREDIOCLASSES(pvp->device_class); - - savePciState(pvp, &pcaccp->save); - pcaccp->arg.ctrl = pcaccp->save.command; - } - } -} - -/* - * initPciBusState() - fill out the BusAccRec for a PCI bus. - * Theory: each bus is associated with one bridge connecting it - * to its parent bus. The address of a bridge is therefore stored - * in the BusAccRec of the bus it connects to. Each bus can - * have several bridges connecting secondary buses to it. Only one - * of these bridges can be open. Therefore the status of a bridge - * associated with a bus is stored in the BusAccRec of the parent - * the bridge connects to. The first member of the structure is - * a pointer to a function that open access to this bus. This function - * receives a pointer to the structure itself as argument. This - * design should be common to BusAccRecs of any type of buses we - * support. The remeinder of the structure is bus type specific. - * In this case it contains a pointer to the structure of the - * parent bus. Thus enabling access to a specific bus is simple: - * 1. Close any bridge going to secondary buses. - * 2. Climb down the ladder and enable any bridge on buses - * on the path from the CPU to this bus. - */ - -void -initPciBusState(void) -{ - static const struct pci_id_match bridge_match = { - PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, - (PCI_CLASS_BRIDGE << 16), 0x0000ff0000, 0 - }; - struct pci_device *dev; - struct pci_device_iterator *iter; - BusAccPtr pbap, pbap_tmp; - - iter = pci_id_match_iterator_create(& bridge_match); - while((dev = pci_device_next(iter)) != NULL) { - const uint8_t subclass = (dev->device_class >> 8) & 0x0ff; - int primary; - int secondary; - int subordinate; - - - pci_device_get_bridge_buses(dev, &primary, &secondary, &subordinate); - - pbap = xnfcalloc(1,sizeof(BusAccRec)); - pbap->busdep.pci.bus = secondary; - pbap->busdep.pci.primary_bus = primary; - pbap->busdep_type = BUS_PCI; - pbap->busdep.pci.dev = dev; - - pbap->set_f = pciSetBusAccess; - - switch (subclass) { - case PCI_SUBCLASS_BRIDGE_HOST: - pbap->type = BUS_PCI; - break; - case PCI_SUBCLASS_BRIDGE_PCI: - case PCI_SUBCLASS_BRIDGE_CARDBUS: - pbap->type = BUS_PCI; - pbap->save_f = savePciBusState; - pbap->restore_f = restorePciBusState; - pbap->enable_f = pciBusAccessEnable; - pbap->disable_f = pciBusAccessDisable; - savePciBusState(pbap); - break; - } - pbap->next = xf86BusAccInfo; - xf86BusAccInfo = pbap; - } - - pci_iterator_destroy(iter); - - for (pbap = xf86BusAccInfo; pbap; pbap = pbap->next) { - pbap->primary = NULL; - - if (pbap->busdep_type == BUS_PCI - && pbap->busdep.pci.primary_bus > -1) { - pbap_tmp = xf86BusAccInfo; - while (pbap_tmp) { - if (pbap_tmp->busdep_type == BUS_PCI && - pbap_tmp->busdep.pci.bus == pbap->busdep.pci.primary_bus) { - /* Don't create loops */ - if (pbap == pbap_tmp) - break; - pbap->primary = pbap_tmp; - break; - } - pbap_tmp = pbap_tmp->next; - } - } - } -} - -void -PciStateEnter(void) -{ -#if 0 - unsigned i; - - if (xf86PciVideoInfo == NULL) - return; - - for ( i = 0 ; xf86PciVideoInfo[i] != NULL ; i++ ) { - pciAccPtr paccp = (pciAccPtr) xf86PciVideoInfo[i]->user_data; - - if ( (paccp != NULL) && paccp->ctrl ) { - savePciState(paccp->arg.dev, &paccp->save); - restorePciState(paccp->arg.dev, &paccp->restore); - paccp->arg.ctrl = paccp->restore.command; - } - } -#endif -} - -void -PciBusStateEnter(void) -{ -#if 0 - BusAccPtr pbap = xf86BusAccInfo; - - while (pbap) { - if (pbap->save_f) - pbap->save_f(pbap); - pbap = pbap->next; - } -#endif -} - -void -PciStateLeave(void) -{ -#if 0 - unsigned i; - - if (xf86PciVideoInfo == NULL) - return; - - for ( i = 0 ; xf86PciVideoInfo[i] != NULL ; i++ ) { - pciAccPtr paccp = (pciAccPtr) xf86PciVideoInfo[i]->user_data; - - if ( (paccp != NULL) && paccp->ctrl ) { - savePciState(paccp->arg.dev, &paccp->restore); - restorePciState(paccp->arg.dev, &paccp->save); - } - } -#endif -} - -void -PciBusStateLeave(void) -{ -#if 0 - BusAccPtr pbap = xf86BusAccInfo; - - while (pbap) { - if (pbap->restore_f) - pbap->restore_f(pbap); - pbap = pbap->next; - } -#endif -} - -void -DisablePciAccess(void) -{ -#if 0 - unsigned i; - - if (xf86PciVideoInfo == NULL) - return; - - for ( i = 0 ; xf86PciVideoInfo[i] != NULL ; i++ ) { - pciAccPtr paccp = (pciAccPtr) xf86PciVideoInfo[i]->user_data; - - if ( (paccp != NULL) && paccp->ctrl ) { - pciIo_MemAccessDisable(paccp->io_memAccess.arg); - } - } -#endif -} - -void -DisablePciBusAccess(void) -{ -#if 0 - BusAccPtr pbap = xf86BusAccInfo; - - while (pbap) { - if (pbap->disable_f) - pbap->disable_f(pbap); - if (pbap->primary) - pbap->primary->current = NULL; - pbap = pbap->next; - } -#endif -} - /* * If the slot requested is already in use, return -1. * Otherwise, claim the slot for the screen requesting it. */ -_X_EXPORT int +int xf86ClaimPciSlot(struct pci_device * d, DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p = NULL; - pciAccPtr paccp = (pciAccPtr) d->user_data; - BusAccPtr pbap = xf86BusAccInfo; - const unsigned bus = PCI_MAKE_BUS(d->domain, d->bus); - int num; if (xf86CheckPciSlot(d)) { @@ -721,25 +237,6 @@ xf86ClaimPciSlot(struct pci_device * d, DriverPtr drvp, p->inUse = FALSE; if (dev) xf86AddDevToEntity(num, dev); - /* Here we initialize the access structure */ - p->access = xnfcalloc(1,sizeof(EntityAccessRec)); - if (paccp != NULL) { - p->access->fallback = & paccp->io_memAccess; - p->access->pAccess = & paccp->io_memAccess; - paccp->ctrl = TRUE; /* mark control if not already */ - } - else { - p->access->fallback = &AccessNULL; - p->access->pAccess = &AccessNULL; - } - - p->busAcc = NULL; - while (pbap) { - if (pbap->type == BUS_PCI && pbap->busdep.pci.bus == bus) - p->busAcc = pbap; - pbap = pbap->next; - } - pciSlotClaimed = TRUE; if (active) { @@ -752,12 +249,31 @@ xf86ClaimPciSlot(struct pci_device * d, DriverPtr drvp, return -1; } +/* + * Unclaim PCI slot, e.g. if probing failed, so that a different driver can claim. + */ +void +xf86UnclaimPciSlot(struct pci_device *d) +{ + int i; + + for (i = 0; i < xf86NumEntities; i++) { + const EntityPtr p = xf86Entities[i]; + + if ((p->bus.type == BUS_PCI) && (p->bus.id.pci == d)) { + /* Probably the slot should be deallocated? */ + p->bus.type = BUS_NONE; + return; + } + } +} + /* * Parse a BUS ID string, and return the PCI bus parameters if it was * in the correct format for a PCI bus id. */ -_X_EXPORT Bool +Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) { /* @@ -831,7 +347,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) * Compare a BUS ID string with a PCI bus id. Return TRUE if they match. */ -_X_EXPORT Bool +Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func) { int ibus, idevice, ifunc; @@ -848,7 +364,7 @@ xf86ComparePciBusString(const char *busID, int bus, int device, int func) * is PCI and bus, dev and func numbers match. */ -_X_EXPORT Bool +Bool xf86IsPrimaryPci(struct pci_device *pPci) { return ((primaryBus.type == BUS_PCI) && (pPci == primaryBus.id.pci)); @@ -857,7 +373,7 @@ xf86IsPrimaryPci(struct pci_device *pPci) /* * xf86GetPciInfoForEntity() -- Get the pciVideoRec of entity. */ -_X_EXPORT struct pci_device * +struct pci_device * xf86GetPciInfoForEntity(int entityIndex) { EntityPtr p; @@ -873,7 +389,7 @@ xf86GetPciInfoForEntity(int entityIndex) * xf86CheckPciMemBase() checks that the memory base value matches one of the * PCI base address register values for the given PCI device. */ -_X_EXPORT Bool +Bool xf86CheckPciMemBase( struct pci_device * pPci, memType base ) { int i; @@ -888,7 +404,7 @@ xf86CheckPciMemBase( struct pci_device * pPci, memType base ) * Check if the slot requested is free. If it is already in use, return FALSE. */ -_X_EXPORT Bool +Bool xf86CheckPciSlot(const struct pci_device *d) { int i; @@ -904,52 +420,3 @@ xf86CheckPciSlot(const struct pci_device *d) } -void -pciConvertRange2Host(int entityIndex, resRange *pRange) -{ - struct pci_device *const pvp = xf86GetPciInfoForEntity(entityIndex); - const PCITAG tag = PCI_MAKE_TAG(PCI_MAKE_BUS(pvp->domain, pvp->bus), - pvp->dev, pvp->func); - - if (pvp == NULL) { - return; - } - - if (!(pRange->type & ResBus)) - return; - - switch(pRange->type & ResPhysMask) { - case ResMem: - switch(pRange->type & ResExtMask) { - case ResBlock: - pRange->rBegin = pciBusAddrToHostAddr(tag,PCI_MEM, pRange->rBegin); - pRange->rEnd = pciBusAddrToHostAddr(tag,PCI_MEM, pRange->rEnd); - break; - case ResSparse: - pRange->rBase = pciBusAddrToHostAddr(tag,PCI_MEM_SPARSE_BASE, - pRange->rBegin); - pRange->rMask = pciBusAddrToHostAddr(tag,PCI_MEM_SPARSE_MASK, - pRange->rEnd); - break; - } - break; - case ResIo: - switch(pRange->type & ResExtMask) { - case ResBlock: - pRange->rBegin = pciBusAddrToHostAddr(tag,PCI_IO, pRange->rBegin); - pRange->rEnd = pciBusAddrToHostAddr(tag,PCI_IO, pRange->rEnd); - break; - case ResSparse: - pRange->rBase = pciBusAddrToHostAddr(tag,PCI_IO_SPARSE_BASE - , pRange->rBegin); - pRange->rMask = pciBusAddrToHostAddr(tag,PCI_IO_SPARSE_MASK - , pRange->rEnd); - break; - } - break; - } - - /* Set domain number */ - pRange->type &= ~(ResDomain | ResBus); - pRange->type |= pvp->domain << 24; -} diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.h b/xorg-server/hw/xfree86/common/xf86pciBus.h index 1cbfa38ea..3125e0db8 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.h +++ b/xorg-server/hw/xfree86/common/xf86pciBus.h @@ -33,42 +33,6 @@ #ifndef _XF86_PCI_BUS_H #define _XF86_PCI_BUS_H -#define PCITAG_SPECIAL pciTag(0xFF,0xFF,0xFF) - -typedef struct { - CARD32 command; - CARD32 base[6]; - CARD32 biosBase; -} pciSave, *pciSavePtr; - -typedef struct { - struct pci_device * dev; - CARD32 ctrl; -} pciArg; - -typedef struct { - pciArg arg; - xf86AccessRec ioAccess; - xf86AccessRec io_memAccess; - xf86AccessRec memAccess; - pciSave save; - pciSave restore; - Bool ctrl; -} pciAccRec, *pciAccPtr; - -typedef union { - CARD16 control; -} pciBridgesSave, *pciBridgesSavePtr; - void xf86PciProbe(void); -void initPciState(void); -void initPciBusState(void); -void DisablePciAccess(void); -void DisablePciBusAccess(void); -void PciStateEnter(void); -void PciBusStateEnter(void); -void PciStateLeave(void); -void PciBusStateLeave(void); -void pciConvertRange2Host(int entityIndex, resRange *pRange); #endif /* _XF86_PCI_BUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.c b/xorg-server/hw/xfree86/common/xf86sbusBus.c index af2b14539..7b23233aa 100644 --- a/xorg-server/hw/xfree86/common/xf86sbusBus.c +++ b/xorg-server/hw/xfree86/common/xf86sbusBus.c @@ -33,7 +33,6 @@ #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" -#include "xf86Resources.h" #include "xf86cmap.h" #include "xf86Bus.h" @@ -320,7 +319,7 @@ xf86CheckSbusSlot(int fbNum) for (i = 0; i < xf86NumEntities; i++) { p = xf86Entities[i]; /* Check if this SBUS slot is taken */ - if (p->busType == BUS_SBUS && p->sbusBusId.fbNum == fbNum) + if (p->bus.type == BUS_SBUS && p->bus.id.sbus.fbNum == fbNum) return FALSE; } @@ -345,22 +344,18 @@ xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp, p = xf86Entities[num]; p->driver = drvp; p->chipset = -1; - p->busType = BUS_SBUS; + p->bus.type = BUS_SBUS; xf86AddDevToEntity(num, dev); - p->sbusBusId.fbNum = psdp->fbNum; + p->bus.id.sbus.fbNum = psdp->fbNum; p->active = active; p->inUse = FALSE; - /* Here we initialize the access structure */ - p->access = xnfcalloc(1,sizeof(EntityAccessRec)); - p->access->fallback = &AccessNULL; - p->access->pAccess = &AccessNULL; sbusSlotClaimed = TRUE; return num; } else return -1; } -_X_EXPORT int +int xf86MatchSbusInstances(const char *driverName, int sbusDevId, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities) @@ -406,11 +401,6 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, return 0; } - if (xf86DoProbe) { - xfree(instances); - return numFound; - } - if (sparcPromInit() >= 0) useProm = 1; @@ -435,9 +425,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, return actualcards; } -#ifdef DEBUG - ErrorF("%s instances found: %d\n", driverName, allocatedInstances); -#endif + DebugF("%s instances found: %d\n", driverName, allocatedInstances); for (i = 0; i < allocatedInstances; i++) { char *promPath = NULL; @@ -494,9 +482,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, xfree(promPath); } -#ifdef DEBUG - ErrorF("%s instances found: %d\n", driverName, numClaimedInstances); -#endif + DebugF("%s instances found: %d\n", driverName, numClaimedInstances); /* * Of the claimed instances, check that another driver hasn't already @@ -510,11 +496,9 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, if (!xf86CheckSbusSlot(psdp->fbNum)) continue; -#ifdef DEBUG - ErrorF("%s: card at fb%d %08x is claimed by a Device section\n", + DebugF("%s: card at fb%d %08x is claimed by a Device section\n", driverName, psdp->fbNum, psdp->node.node); -#endif - + /* Allocate an entry in the lists to be returned */ numFound++; retEntities = xnfrealloc(retEntities, numFound * sizeof(int)); @@ -536,38 +520,38 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, /* * xf86GetSbusInfoForEntity() -- Get the sbusDevicePtr of entity. */ -_X_EXPORT sbusDevicePtr +sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex) { sbusDevicePtr *psdpp; EntityPtr p = xf86Entities[entityIndex]; if (entityIndex >= xf86NumEntities - || p->busType != BUS_SBUS) return NULL; + || p->bus.type != BUS_SBUS) return NULL; for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) { - if (p->sbusBusId.fbNum == (*psdpp)->fbNum) + if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum) return (*psdpp); } return NULL; } -_X_EXPORT int +int xf86GetEntityForSbusInfo(sbusDevicePtr psdp) { int i; for (i = 0; i < xf86NumEntities; i++) { EntityPtr p = xf86Entities[i]; - if (p->busType != BUS_SBUS) continue; + if (p->bus.type != BUS_SBUS) continue; - if (p->sbusBusId.fbNum == psdp->fbNum) + if (p->bus.id.sbus.fbNum == psdp->fbNum) return i; } return -1; } -_X_EXPORT void +void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp) { DisplayModePtr mode; @@ -667,7 +651,7 @@ xf86SbusCmapCloseScreen(int i, ScreenPtr pScreen) return (*pScreen->CloseScreen) (i, pScreen); } -_X_EXPORT Bool +Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp) { sbusCmapPtr cmap; diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.h b/xorg-server/hw/xfree86/common/xf86sbusBus.h index 6161a08e2..5cdb0951a 100644 --- a/xorg-server/hw/xfree86/common/xf86sbusBus.h +++ b/xorg-server/hw/xfree86/common/xf86sbusBus.h @@ -56,44 +56,45 @@ typedef struct sbus_device { char *device; } sbusDevice, *sbusDevicePtr; -extern struct sbus_devtable { +struct sbus_devtable { int devId; int fbType; char *promName; char *driverName; char *descr; -} sbusDeviceTable[]; +}; -void xf86SbusProbe(void); -extern sbusDevicePtr *xf86SbusInfo; +extern _X_EXPORT void xf86SbusProbe(void); +extern _X_EXPORT sbusDevicePtr *xf86SbusInfo; +extern _X_EXPORT struct sbus_devtable sbusDeviceTable[]; -int xf86MatchSbusInstances(const char *driverName, int sbusDevId, +extern _X_EXPORT int xf86MatchSbusInstances(const char *driverName, int sbusDevId, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities); -sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex); -int xf86GetEntityForSbusInfo(sbusDevicePtr psdp); -void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp); -pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, +extern _X_EXPORT sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex); +extern _X_EXPORT int xf86GetEntityForSbusInfo(sbusDevicePtr psdp); +extern _X_EXPORT void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp); +extern _X_EXPORT pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size); -void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size); -void xf86SbusHideOsHwCursor(sbusDevicePtr psdp); -void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg); -Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp); +extern _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size); +extern _X_EXPORT void xf86SbusHideOsHwCursor(sbusDevicePtr psdp); +extern _X_EXPORT void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg); +extern _X_EXPORT Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp); -extern int promRootNode; +extern _X_EXPORT int promRootNode; -int promGetSibling(int node); -int promGetChild(int node); -char * promGetProperty(const char *prop, int *lenp); -int promGetBool(const char *prop); +extern _X_EXPORT int promGetSibling(int node); +extern _X_EXPORT int promGetChild(int node); +extern _X_EXPORT char * promGetProperty(const char *prop, int *lenp); +extern _X_EXPORT int promGetBool(const char *prop); -int sparcPromInit(void); -void sparcPromClose(void); -char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp); -int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop); -void sparcPromAssignNodes(void); -char * sparcPromNode2Pathname(sbusPromNodePtr pnode); -int sparcPromPathname2Node(const char *pathName); -char *sparcDriverName(void); +extern _X_EXPORT int sparcPromInit(void); +extern _X_EXPORT void sparcPromClose(void); +extern _X_EXPORT char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp); +extern _X_EXPORT int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop); +extern _X_EXPORT void sparcPromAssignNodes(void); +extern _X_EXPORT char * sparcPromNode2Pathname(sbusPromNodePtr pnode); +extern _X_EXPORT int sparcPromPathname2Node(const char *pathName); +extern _X_EXPORT char *sparcDriverName(void); #endif /* _XF86_SBUSBUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86str.h b/xorg-server/hw/xfree86/common/xf86str.h index 904c369a6..b9a2e06de 100644 --- a/xorg-server/hw/xfree86/common/xf86str.h +++ b/xorg-server/hw/xfree86/common/xf86str.h @@ -342,21 +342,6 @@ typedef struct _DriverRec { */ #define HaveDriverFuncs 1 - -/* - * The optional module list struct. This allows modules exporting helping - * functions to configuration tools, the Xserver, or any other - * application/module interested in such information. - */ -_X_DEPRECATED typedef struct _ModuleInfoRec { - int moduleVersion; - char * moduleName; - pointer module; - int refCount; - const OptionInfoRec * (*AvailableOptions)(void *unused); - pointer unused[8]; /* leave some space for more fields */ -} ModuleInfoRec, *ModuleInfoPtr; - /* * These are the private bus types. New types can be added here. Types * required for the public interface should be added to xf86str.h, with @@ -532,7 +517,7 @@ typedef struct _confdrirec { /* These values should be adjusted when new fields are added to ScrnInfoRec */ #define NUM_RESERVED_INTS 16 -#define NUM_RESERVED_POINTERS 15 +#define NUM_RESERVED_POINTERS 14 #define NUM_RESERVED_FUNCS 11 typedef pointer (*funcPointer)(void); @@ -571,145 +556,6 @@ typedef enum { PM_NONE } pmWait; -/* - * The IO access enabler struct. This contains the address for - * the IOEnable/IODisable funcs for their specific bus along - * with a pointer to data needed by them - */ -typedef struct _AccessRec { - void (*AccessDisable)(void *arg); - void (*AccessEnable)(void *arg); - void *arg; -} xf86AccessRec, *xf86AccessPtr; - -typedef struct { - xf86AccessPtr mem; - xf86AccessPtr io; - xf86AccessPtr io_mem; -} xf86SetAccessFuncRec, *xf86SetAccessFuncPtr; - -/* bus-access-related types */ -typedef enum { - NONE, - IO, - MEM_IO, - MEM -} resType; - -typedef struct _EntityAccessRec { - xf86AccessPtr fallback; - xf86AccessPtr pAccess; - resType rt; - pointer busAcc; - struct _EntityAccessRec *next; -} EntityAccessRec, *EntityAccessPtr; - -typedef struct _CurrAccRec { - EntityAccessPtr pMemAccess; - EntityAccessPtr pIoAccess; -} xf86CurrentAccessRec, *xf86CurrentAccessPtr; - -/* new RAC */ - -/* Resource Type values */ -#define ResNone ((unsigned long)(-1)) - -#define ResMem 0x0001 -#define ResIo 0x0002 -#define ResPhysMask 0x000F - -#define ResExclusive 0x0010 -#define ResShared 0x0020 -#define ResAny 0x0040 -#define ResAccMask 0x0070 -#define ResUnused 0x0080 - -#define ResUnusedOpr 0x0100 -#define ResDisableOpr 0x0200 -#define ResOprMask 0x0300 - -#define ResBlock 0x0400 -#define ResSparse 0x0800 -#define ResExtMask 0x0C00 - -#define ResEstimated 0x001000 -#define ResInit 0x002000 -#define ResBios 0x004000 -#define ResMiscMask 0x00F000 - -#define ResBus 0x010000 - -#if defined(__alpha__) && defined(linux) -# define ResDomain 0x1ff000000ul -#else -# define ResDomain 0xff000000ul -#endif -#define ResTypeMask (ResPhysMask | ResDomain) /* For conflict check */ - -#define ResEnd ResNone - -#define ResExcMemBlock (ResMem | ResExclusive | ResBlock) -#define ResExcIoBlock (ResIo | ResExclusive | ResBlock) -#define ResShrMemBlock (ResMem | ResShared | ResBlock) -#define ResShrIoBlock (ResIo | ResShared | ResBlock) -#define ResExcUusdMemBlock (ResMem | ResExclusive | ResUnused | ResBlock) -#define ResExcUusdIoBlock (ResIo | ResExclusive | ResUnused | ResBlock) -#define ResShrUusdMemBlock (ResMem | ResShared | ResUnused | ResBlock) -#define ResShrUusdIoBlock (ResIo | ResShared | ResUnused | ResBlock) -#define ResExcUusdMemSparse (ResMem | ResExclusive | ResUnused | ResSparse) -#define ResExcUusdIoSparse (ResIo | ResExclusive | ResUnused | ResSparse) -#define ResShrUusdMemSparse (ResMem | ResShared | ResUnused | ResSparse) -#define ResShrUusdIoSparse (ResIo | ResShared | ResUnused | ResSparse) - -#define ResExcMemSparse (ResMem | ResExclusive | ResSparse) -#define ResExcIoSparse (ResIo | ResExclusive | ResSparse) -#define ResShrMemSparse (ResMem | ResShared | ResSparse) -#define ResShrIoSparse (ResIo | ResShared | ResSparse) -#define ResUusdMemSparse (ResMem | ResUnused | ResSparse) -#define ResUusdIoSparse (ResIo | ResUnused | ResSparse) - -#define ResIsMem(r) (((r)->type & ResPhysMask) == ResMem) -#define ResIsIo(r) (((r)->type & ResPhysMask) == ResIo) -#define ResIsExclusive(r) (((r)->type & ResAccMask) == ResExclusive) -#define ResIsShared(r) (((r)->type & ResAccMask) == ResShared) -#define ResIsUnused(r) (((r)->type & ResAccMask) == ResUnused) -#define ResIsBlock(r) (((r)->type & ResExtMask) == ResBlock) -#define ResIsSparse(r) (((r)->type & ResExtMask) == ResSparse) -#define ResIsEstimated(r) (((r)->type & ResMiscMask) == ResEstimated) - -typedef struct { - unsigned long type; /* shared, exclusive, unused etc. */ - memType a; - memType b; -} resRange, *resList; - -#define RANGE_TYPE(type, domain) \ - (((unsigned long)(domain) << 24) | ((type) & ~ResBus)) -#define RANGE(r,u,v,t) {\ - (r).a = (u);\ - (r).b = (v);\ - (r).type = (t);\ - } - -#define rBase a -#define rMask b -#define rBegin a -#define rEnd b - -/* resource record */ -typedef struct _resRec *resPtr; -typedef struct _resRec { - resRange val; - int entityIndex; /* who owns the resource */ - resPtr next; -} resRec; - -#define sparse_base val.rBase -#define sparse_mask val.rMask -#define block_begin val.rBegin -#define block_end val.rEnd -#define res_type val.type - typedef struct _PciChipsets { /** * Key used to match this device with its name in an array of @@ -735,12 +581,14 @@ typedef struct _PciChipsets { */ int PCIid; - /** - * Resources associated with this type of device. - */ - resRange *resList; +/* dummy place holders for drivers to build against old/new servers */ +#define RES_UNDEFINED NULL +#define RES_EXCLUSIVE_VGA NULL +#define RES_SHARED_VGA NULL + void *dummy; } PciChipsets; + /* Entity properties */ typedef void (*EntityProc)(int entityIndex,pointer private); @@ -749,7 +597,6 @@ typedef struct _entityInfo { BusRec location; int chipset; Bool active; - resPtr resources; GDevPtr device; DriverPtr driver; } EntityInfoRec, *EntityInfoPtr; @@ -761,18 +608,6 @@ typedef enum { OPERATING } xf86State; -typedef enum { - NOTIFY_SETUP_TRANSITION, - NOTIFY_SETUP, - NOTIFY_OPERATING, - NOTIFY_OPERATING_TRANSITION, - NOTIFY_ENABLE, - NOTIFY_ENTER, - NOTIFY_LEAVE -} xf86NotifyState; - -typedef void (*xf86StateChangeNotificationCallbackFunc)(xf86NotifyState state,pointer); - /* DGA */ typedef struct { @@ -941,12 +776,6 @@ typedef struct _ScrnInfoRec { int chipID; int chipRev; - int racMemFlags; - int racIoFlags; - pointer access; - xf86CurrentAccessPtr CurrentAccess; - resType resourceType; - pointer busAccess; /* Allow screens to be enabled/disabled individually */ Bool vtSema; @@ -967,6 +796,8 @@ typedef struct _ScrnInfoRec { int reservedInt[NUM_RESERVED_INTS]; int * entityInstanceList; + struct pci_device *vgaDev; + pointer reservedPtr[NUM_RESERVED_POINTERS]; /* diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c index 02d6e37a4..abbe03397 100644 --- a/xorg-server/hw/xfree86/common/xf86xv.c +++ b/xorg-server/hw/xfree86/common/xf86xv.c @@ -132,7 +132,7 @@ int (*XvScreenInitProc)(ScreenPtr) = NULL; static xf86XVInitGenericAdaptorPtr *GenDrivers = NULL; static int NumGenDrivers = 0; -_X_EXPORT int +int xf86XVRegisterGenericAdaptorDriver( xf86XVInitGenericAdaptorPtr InitFunc ){ @@ -149,7 +149,7 @@ xf86XVRegisterGenericAdaptorDriver( return 1; } -_X_EXPORT int +int xf86XVListGenericAdaptors( ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **adaptors @@ -188,7 +188,7 @@ typedef struct { static OffscreenImageRec OffscreenImages[MAXSCREENS]; -_X_EXPORT Bool +Bool xf86XVRegisterOffscreenImages( ScreenPtr pScreen, XF86OffscreenImagePtr images, @@ -200,7 +200,7 @@ xf86XVRegisterOffscreenImages( return TRUE; } -_X_EXPORT XF86OffscreenImagePtr +XF86OffscreenImagePtr xf86XVQueryOffscreenImages( ScreenPtr pScreen, int *num @@ -210,20 +210,20 @@ xf86XVQueryOffscreenImages( } -_X_EXPORT XF86VideoAdaptorPtr +XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn) { return xcalloc(1, sizeof(XF86VideoAdaptorRec)); } -_X_EXPORT void +void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr) { xfree(ptr); } -_X_EXPORT Bool +Bool xf86XVScreenInit( ScreenPtr pScreen, XF86VideoAdaptorPtr *adaptors, @@ -1123,6 +1123,10 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy) pPriv->pCompositeClip = NULL; + if (pPriv->AdaptorRec->ClipNotify) + (*pPriv->AdaptorRec->ClipNotify)(pPriv->pScrn, pPriv->DevPriv.ptr, + pWin, dx, dy); + /* Stop everything except images, but stop them too if the window isn't visible. But we only remove the images. */ @@ -1814,7 +1818,7 @@ xf86XVQueryImageAttributes( } -_X_EXPORT void +void xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) { ScreenPtr pScreen = pDraw->pScreen; @@ -1864,7 +1868,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) xfree(rects); } -_X_EXPORT void +void xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) { DrawablePtr root = &WindowTable[pScreen->myNum]->drawable; @@ -1909,7 +1913,7 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) #define DummyScreen screenInfo.screens[0] -_X_EXPORT Bool +Bool xf86XVClipVideoHelper( BoxPtr dst, INT32 *xa, @@ -1991,7 +1995,7 @@ xf86XVClipVideoHelper( return TRUE; } -_X_EXPORT void +void xf86XVCopyYUV12ToPacked( const void *srcy, const void *srcv, @@ -2049,7 +2053,7 @@ xf86XVCopyYUV12ToPacked( } } -_X_EXPORT void +void xf86XVCopyPacked( const void *src, void *dst, diff --git a/xorg-server/hw/xfree86/common/xf86xv.h b/xorg-server/hw/xfree86/common/xf86xv.h index 817e2b994..c3db6cc73 100644 --- a/xorg-server/hw/xfree86/common/xf86xv.h +++ b/xorg-server/hw/xfree86/common/xf86xv.h @@ -112,6 +112,8 @@ typedef int (* ReputImageFuncPtr)( ScrnInfoPtr pScrn, short drw_x, short drw_y, typedef int (*QueryImageAttributesFuncPtr)(ScrnInfoPtr pScrn, int image, unsigned short *width, unsigned short *height, int *pitches, int *offsets); +typedef void (*ClipNotifyFuncPtr)(ScrnInfoPtr pScrn, pointer data, + WindowPtr window, int dx, int dy); typedef enum { XV_OFF, @@ -165,6 +167,7 @@ typedef struct { PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; QueryImageAttributesFuncPtr QueryImageAttributes; + ClipNotifyFuncPtr ClipNotify; } XF86VideoAdaptorRec, *XF86VideoAdaptorPtr; typedef struct { @@ -191,7 +194,7 @@ typedef struct { XF86AttributePtr attributes; } XF86OffscreenImageRec, *XF86OffscreenImagePtr; -Bool +extern _X_EXPORT Bool xf86XVScreenInit( ScreenPtr pScreen, XF86VideoAdaptorPtr *Adaptors, @@ -201,41 +204,41 @@ xf86XVScreenInit( typedef int (* xf86XVInitGenericAdaptorPtr)(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **Adaptors); -int +extern _X_EXPORT int xf86XVRegisterGenericAdaptorDriver( xf86XVInitGenericAdaptorPtr InitFunc ); -int +extern _X_EXPORT int xf86XVListGenericAdaptors( ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **Adaptors ); -Bool +extern _X_EXPORT Bool xf86XVRegisterOffscreenImages( ScreenPtr pScreen, XF86OffscreenImagePtr images, int num ); -XF86OffscreenImagePtr +extern _X_EXPORT XF86OffscreenImagePtr xf86XVQueryOffscreenImages( ScreenPtr pScreen, int *num ); -XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn); +extern _X_EXPORT XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn); -void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr); +extern _X_EXPORT void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr); -void +extern _X_EXPORT void xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes); -void +extern _X_EXPORT void xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes); -Bool +extern _X_EXPORT Bool xf86XVClipVideoHelper( BoxPtr dst, INT32 *xa, @@ -247,7 +250,7 @@ xf86XVClipVideoHelper( INT32 height ); -void +extern _X_EXPORT void xf86XVCopyYUV12ToPacked( const void *srcy, const void *srcv, @@ -260,7 +263,7 @@ xf86XVCopyYUV12ToPacked( int w ); -void +extern _X_EXPORT void xf86XVCopyPacked( const void *src, void *dst, @@ -270,4 +273,8 @@ xf86XVCopyPacked( int w ); +extern _X_EXPORT DevPrivateKey (*XvGetScreenKeyProc)(void); +extern _X_EXPORT unsigned long (*XvGetRTPortProc)(void); +extern _X_EXPORT int (*XvScreenInitProc)(ScreenPtr); + #endif /* _XF86XV_H_ */ diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.c b/xorg-server/hw/xfree86/common/xf86xvmc.c index 41ef0a0ca..39d33da08 100644 --- a/xorg-server/hw/xfree86/common/xf86xvmc.c +++ b/xorg-server/hw/xfree86/common/xf86xvmc.c @@ -45,8 +45,7 @@ #include "xf86xvpriv.h" #include "xf86xvmc.h" -typedef int (*XvMCScreenInitProcPtr)(ScreenPtr, int, XvMCAdaptorPtr); -_X_EXPORT XvMCScreenInitProcPtr XvMCScreenInitProc = NULL; +XvMCScreenInitProcPtr XvMCScreenInitProc = NULL; typedef struct { @@ -156,7 +155,7 @@ xf86XvMCCloseScreen (int i, ScreenPtr pScreen) return (*pScreen->CloseScreen)(i, pScreen); } -_X_EXPORT Bool xf86XvMCScreenInit( +Bool xf86XvMCScreenInit( ScreenPtr pScreen, int num_adaptors, XF86MCAdaptorPtr *adaptors @@ -219,12 +218,12 @@ _X_EXPORT Bool xf86XvMCScreenInit( return TRUE; } -_X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void) +XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void) { return xcalloc(1, sizeof(XF86MCAdaptorRec)); } -_X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor) +void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor) { xfree(adaptor); } diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.h b/xorg-server/hw/xfree86/common/xf86xvmc.h index bc7a98c6a..902b4f8fc 100644 --- a/xorg-server/hw/xfree86/common/xf86xvmc.h +++ b/xorg-server/hw/xfree86/common/xf86xvmc.h @@ -151,13 +151,16 @@ typedef struct { an array of structures. */ -Bool xf86XvMCScreenInit( +extern _X_EXPORT Bool xf86XvMCScreenInit( ScreenPtr pScreen, int num_adaptors, XF86MCAdaptorPtr *adaptors ); -XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void); -void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor); +extern _X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void); +extern _X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor); + +typedef int (*XvMCScreenInitProcPtr)(ScreenPtr, int, XvMCAdaptorPtr); +extern _X_EXPORT XvMCScreenInitProcPtr XvMCScreenInitProc; #endif /* _XF86XVMC_H */ diff --git a/xorg-server/hw/xfree86/common/xf86xvpriv.h b/xorg-server/hw/xfree86/common/xf86xvpriv.h index 4200dac80..7623d297d 100644 --- a/xorg-server/hw/xfree86/common/xf86xvpriv.h +++ b/xorg-server/hw/xfree86/common/xf86xvpriv.h @@ -34,7 +34,7 @@ /*** These are DDX layer privates ***/ -extern DevPrivateKey XF86XvScreenKey; +extern _X_EXPORT DevPrivateKey XF86XvScreenKey; typedef struct { DestroyWindowProcPtr DestroyWindow; @@ -59,6 +59,7 @@ typedef struct { PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; QueryImageAttributesFuncPtr QueryImageAttributes; + ClipNotifyFuncPtr ClipNotify; } XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr; typedef struct { diff --git a/xorg-server/hw/xfree86/common/xisb.c b/xorg-server/hw/xfree86/common/xisb.c index 6314094a0..1cb9e4854 100644 --- a/xorg-server/hw/xfree86/common/xisb.c +++ b/xorg-server/hw/xfree86/common/xisb.c @@ -62,7 +62,7 @@ * Function Definitions ****************************************************************************/ -_X_EXPORT XISBuffer * +XISBuffer * XisbNew (int fd, ssize_t size) { XISBuffer *b; @@ -86,14 +86,14 @@ XisbNew (int fd, ssize_t size) return (b); } -_X_EXPORT void +void XisbFree (XISBuffer *b) { xfree (b->buf); xfree (b); } -_X_EXPORT int +int XisbRead (XISBuffer *b) { int ret; @@ -136,7 +136,7 @@ XisbRead (XISBuffer *b) } /* the only purpose of this function is to provide output tracing */ -_X_EXPORT ssize_t +ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len) { if (b->trace) @@ -149,7 +149,7 @@ XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len) } /* turn tracing of this buffer on (1) or off (0) */ -_X_EXPORT void +void XisbTrace (XISBuffer *b, int trace) { b->trace = trace; @@ -167,7 +167,7 @@ XisbTrace (XISBuffer *b, int trace) * give duration in usecs. */ -_X_EXPORT void +void XisbBlockDuration (XISBuffer *b, int block_duration) { b->block_duration = block_duration; diff --git a/xorg-server/hw/xfree86/common/xisb.h b/xorg-server/hw/xfree86/common/xisb.h index b7bdd5682..bacfde166 100644 --- a/xorg-server/hw/xfree86/common/xisb.h +++ b/xorg-server/hw/xfree86/common/xisb.h @@ -52,12 +52,12 @@ typedef struct _XISBuffer * of globals. * put locals in the .c file. *****************************************************************************/ -XISBuffer * XisbNew (int fd, ssize_t size); -void XisbFree (XISBuffer *b); -int XisbRead (XISBuffer *b); -ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len); -void XisbTrace (XISBuffer *b, int trace); -void XisbBlockDuration (XISBuffer *b, int block_duration); +extern _X_EXPORT XISBuffer * XisbNew (int fd, ssize_t size); +extern _X_EXPORT void XisbFree (XISBuffer *b); +extern _X_EXPORT int XisbRead (XISBuffer *b); +extern _X_EXPORT ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len); +extern _X_EXPORT void XisbTrace (XISBuffer *b, int trace); +extern _X_EXPORT void XisbBlockDuration (XISBuffer *b, int block_duration); /* * DO NOT PUT ANYTHING AFTER THIS ENDIF diff --git a/xorg-server/hw/xfree86/common/xorgHelper.c b/xorg-server/hw/xfree86/common/xorgHelper.c index 7f9dd507a..7a8e5167d 100644 --- a/xorg-server/hw/xfree86/common/xorgHelper.c +++ b/xorg-server/hw/xfree86/common/xorgHelper.c @@ -17,7 +17,7 @@ CARD32 -xorgGetVersion() +xorgGetVersion(void) { return XORG_VERSION_CURRENT; } diff --git a/xorg-server/hw/xfree86/ddc/Makefile.am b/xorg-server/hw/xfree86/ddc/Makefile.am index cd146c5a3..93ea4a2a5 100644 --- a/xorg-server/hw/xfree86/ddc/Makefile.am +++ b/xorg-server/hw/xfree86/ddc/Makefile.am @@ -1,12 +1,11 @@ sdk_HEADERS = edid.h xf86DDC.h -noinst_LIBRARIES = libddc.a +noinst_LTLIBRARIES = libddc.la -libddc_a_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \ - ddcProperty.c +libddc_la_SOURCES = ddc.c interpret_edid.c print_edid.c ddcProperty.c INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -EXTRA_DIST = ddcPriv.h DDC.HOWTO +EXTRA_DIST = DDC.HOWTO diff --git a/xorg-server/hw/xfree86/ddc/Makefile.in b/xorg-server/hw/xfree86/ddc/Makefile.in index 0e32157ba..750c9791c 100644 --- a/xorg-server/hw/xfree86/ddc/Makefile.in +++ b/xorg-server/hw/xfree86/ddc/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/ddc DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,17 +53,15 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libddc_a_AR = $(AR) $(ARFLAGS) -libddc_a_LIBADD = -am_libddc_a_OBJECTS = xf86DDC.$(OBJEXT) edid.$(OBJEXT) \ - interpret_edid.$(OBJEXT) print_edid.$(OBJEXT) \ - ddcProperty.$(OBJEXT) -libddc_a_OBJECTS = $(am_libddc_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libddc_la_LIBADD = +am_libddc_la_OBJECTS = ddc.lo interpret_edid.lo print_edid.lo \ + ddcProperty.lo +libddc_la_OBJECTS = $(am_libddc_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -71,8 +72,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libddc_a_SOURCES) -DIST_SOURCES = $(libddc_a_SOURCES) +SOURCES = $(libddc_la_SOURCES) +DIST_SOURCES = $(libddc_la_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -104,6 +105,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -124,9 +126,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -155,7 +160,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -164,9 +171,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -205,12 +216,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -230,7 +242,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -240,6 +251,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -253,11 +265,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -293,6 +304,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -317,7 +329,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -340,6 +351,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -371,20 +383,20 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ sdk_HEADERS = edid.h xf86DDC.h -noinst_LIBRARIES = libddc.a -libddc_a_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \ - ddcProperty.c - +noinst_LTLIBRARIES = libddc.la +libddc_la_SOURCES = ddc.c interpret_edid.c print_edid.c ddcProperty.c INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -EXTRA_DIST = ddcPriv.h DDC.HOWTO +EXTRA_DIST = DDC.HOWTO all: all-am .SUFFIXES: @@ -420,12 +432,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libddc.a: $(libddc_a_OBJECTS) $(libddc_a_DEPENDENCIES) - -rm -f libddc.a - $(libddc_a_AR) libddc.a $(libddc_a_OBJECTS) $(libddc_a_LIBADD) - $(RANLIB) libddc.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libddc.la: $(libddc_la_OBJECTS) $(libddc_la_DEPENDENCIES) + $(LINK) $(libddc_la_OBJECTS) $(libddc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -433,11 +449,10 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddcProperty.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpret_edid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_edid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DDC.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddcProperty.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpret_edid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_edid.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -570,7 +585,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -602,7 +617,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -674,7 +689,7 @@ uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/xfree86/ddc/ddc.c b/xorg-server/hw/xfree86/ddc/ddc.c new file mode 100644 index 000000000..6fad9fbbc --- /dev/null +++ b/xorg-server/hw/xfree86/ddc/ddc.c @@ -0,0 +1,507 @@ +/* xf86DDC.c + * + * Copyright 1998,1999 by Egbert Eich + */ + +/* + * A note on terminology. DDC1 is the original dumb serial protocol, and + * can only do up to 128 bytes of EDID. DDC2 is I2C-encapsulated and + * introduces extension blocks. EDID is the old display identification + * block, DisplayID is the new one. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include "misc.h" +#include "xf86.h" +#include "xf86_OSproc.h" +#include "xf86DDC.h" +#include + +#define RETRIES 4 + +typedef enum { + DDCOPT_NODDC1, + DDCOPT_NODDC2, + DDCOPT_NODDC +} DDCOpts; + +static const OptionInfoRec DDCOptions[] = { + { DDCOPT_NODDC1, "NoDDC1", OPTV_BOOLEAN, {0}, FALSE }, + { DDCOPT_NODDC2, "NoDDC2", OPTV_BOOLEAN, {0}, FALSE }, + { DDCOPT_NODDC, "NoDDC", OPTV_BOOLEAN, {0}, FALSE }, + { -1, NULL, OPTV_NONE, {0}, FALSE }, +}; + +/* DDC1 */ + +static int +find_start(unsigned int *ptr) +{ + unsigned int comp[9], test[9]; + int i,j; + + for (i=0;i<9;i++){ + comp[i] = *(ptr++); + test[i] = 1; + } + for (i=0;i<127;i++){ + for (j=0;j<9;j++){ + test[j] = test[j] & !(comp[j] ^ *(ptr++)); + } + } + for (i=0;i<9;i++) + if (test[i]) return (i+1); + return (-1); +} + +static unsigned char * +find_header(unsigned char *block) +{ + unsigned char *ptr, *head_ptr, *end; + unsigned char header[]={0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00}; + + ptr = block; + end = block + EDID1_LEN; + while (ptrscrnIndex, X_PROBED, + "chipset doesn't support DDC1\n"); + return NULL; + }; + + if (TestDDC1(pScrn,read_DDC)==-1) { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "No DDC signal\n"); + return NULL; + }; + + if (DDCSpeed) DDCSpeed(pScrn,DDC_FAST); + do { + EDID_block = GetEDID_DDC1(FetchEDID_DDC1(pScrn,read_DDC)); + count --; + } while (!EDID_block && count); + if (DDCSpeed) DDCSpeed(pScrn,DDC_SLOW); + + return EDID_block; +} + +/** + * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC1 are + * unset. EDID information blocks are interpreted and the results returned in + * an xf86MonPtr. + * + * This function does not affect the list of modes used by drivers -- it is up + * to the driver to decide policy on what to do with EDID information. + * + * @return pointer to a new xf86MonPtr containing the EDID information. + * @return NULL if no monitor attached or failure to interpret the EDID. + */ +xf86MonPtr +xf86DoEDID_DDC1( + int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed, + unsigned int (*DDC1Read)(ScrnInfoPtr) +) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + unsigned char *EDID_block = NULL; + xf86MonPtr tmp = NULL; + int sigio; + /* Default DDC and DDC1 to enabled. */ + Bool noddc = FALSE, noddc1 = FALSE; + OptionInfoPtr options; + + options = xnfalloc(sizeof(DDCOptions)); + (void)memcpy(options, DDCOptions, sizeof(DDCOptions)); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); + + xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); + xf86GetOptValBool(options, DDCOPT_NODDC1, &noddc1); + xfree(options); + + if (noddc || noddc1) + return NULL; + + sigio = xf86BlockSIGIO(); + EDID_block = EDIDRead_DDC1(pScrn,DDC1SetSpeed,DDC1Read); + xf86UnblockSIGIO(sigio); + + if (EDID_block){ + tmp = xf86InterpretEDID(scrnIndex,EDID_block); + } +#ifdef DEBUG + else ErrorF("No EDID block returned\n"); + if (!tmp) + ErrorF("Cannot interpret EDID block\n"); +#endif + return tmp; +} + +/* DDC2 */ + +static I2CDevPtr +DDC2MakeDevice(I2CBusPtr pBus, int address, char *name) +{ + I2CDevPtr dev = NULL; + + if (!(dev = xf86I2CFindDev(pBus, address))) { + dev = xf86CreateI2CDevRec(); + dev->DevName = name; + dev->SlaveAddr = address; + dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */ + dev->StartTimeout = 550; + dev->BitTimeout = 40; + dev->AcknTimeout = 40; + + dev->pI2CBus = pBus; + if (!xf86I2CDevInit(dev)) { + xf86DrvMsg(pBus->scrnIndex, X_PROBED, "No DDC2 device\n"); + return NULL; + } + } + + return dev; +} + +static I2CDevPtr +DDC2Init(int scrnIndex, I2CBusPtr pBus) +{ + I2CDevPtr dev = NULL; + + /* + * Slow down the bus so that older monitors don't + * miss things. + */ + pBus->RiseFallTime = 20; + + dev = DDC2MakeDevice(pBus, 0x00A0, "ddc2"); + if (xf86I2CProbeAddress(pBus, 0x0060)) + DDC2MakeDevice(pBus, 0x0060, "E-EDID segment register"); + if (xf86I2CProbeAddress(pBus, 0x0062)) + DDC2MakeDevice(pBus, 0x0062, "EDID EEPROM interface"); + if (xf86I2CProbeAddress(pBus, 0x006E)) + DDC2MakeDevice(pBus, 0x006E, "DDC control interface"); + + return dev; +} + +/* Mmmm, smell the hacks */ +static void +EEDIDStop(I2CDevPtr d) +{ +} + +/* block is the EDID block number. a segment is two blocks. */ +static Bool +DDC2Read(I2CDevPtr dev, int block, unsigned char *R_Buffer) +{ + unsigned char W_Buffer[1]; + int i, segment; + I2CDevPtr seg; + void (*stop)(I2CDevPtr); + + for (i = 0; i < RETRIES; i++) { + /* Stop bits reset the segment pointer to 0, so be careful here. */ + segment = block >> 1; + if (segment) { + Bool b; + + if (!(seg = xf86I2CFindDev(dev->pI2CBus, 0x0060))) + return FALSE; + + W_Buffer[0] = segment; + + stop = dev->pI2CBus->I2CStop; + dev->pI2CBus->I2CStop = EEDIDStop; + + b = xf86I2CWriteRead(seg, W_Buffer, 1, NULL, 0); + + dev->pI2CBus->I2CStop = stop; + if (!b) { + dev->pI2CBus->I2CStop(dev); + continue; + } + } + + W_Buffer[0] = (block & 0x01) * EDID1_LEN; + + if (xf86I2CWriteRead(dev, W_Buffer, 1, R_Buffer, EDID1_LEN)) { + if (!DDC_checksum(R_Buffer, EDID1_LEN)) + return TRUE; + } + } + + return FALSE; +} + +/** + * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are + * unset. EDID information blocks are interpreted and the results returned in + * an xf86MonPtr. Unlike xf86DoEDID_DDC[12](), this function will return + * the complete EDID data, including all extension blocks, if the 'complete' + * parameter is TRUE; + * + * This function does not affect the list of modes used by drivers -- it is up + * to the driver to decide policy on what to do with EDID information. + * + * @return pointer to a new xf86MonPtr containing the EDID information. + * @return NULL if no monitor attached or failure to interpret the EDID. + */ +xf86MonPtr +xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + unsigned char *EDID_block = NULL; + xf86MonPtr tmp = NULL; + I2CDevPtr dev = NULL; + /* Default DDC and DDC2 to enabled. */ + Bool noddc = FALSE, noddc2 = FALSE; + OptionInfoPtr options; + + options = xalloc(sizeof(DDCOptions)); + if (!options) + return NULL; + memcpy(options, DDCOptions, sizeof(DDCOptions)); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); + + xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); + xf86GetOptValBool(options, DDCOPT_NODDC2, &noddc2); + xfree(options); + + if (noddc || noddc2) + return NULL; + + if (!(dev = DDC2Init(scrnIndex, pBus))) + return NULL; + + EDID_block = xcalloc(1, EDID1_LEN); + if (!EDID_block) + return NULL; + + if (DDC2Read(dev, 0, EDID_block)) { + int i, n = EDID_block[0x7e]; + + if (complete && n) { + EDID_block = xrealloc(EDID_block, EDID1_LEN * (1+n)); + + for (i = 0; i < n; i++) + DDC2Read(dev, i+1, EDID_block + (EDID1_LEN * (1+i))); + } + + tmp = xf86InterpretEEDID(scrnIndex, EDID_block); + } + + if (tmp && complete) + tmp->flags |= MONITOR_EDID_COMPLETE_RAWDATA; + + return tmp; +} + +/** + * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are + * unset. EDID information blocks are interpreted and the results returned in + * an xf86MonPtr. + * + * This function does not affect the list of modes used by drivers -- it is up + * to the driver to decide policy on what to do with EDID information. + * + * @return pointer to a new xf86MonPtr containing the EDID information. + * @return NULL if no monitor attached or failure to interpret the EDID. + */ +xf86MonPtr +xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus) +{ + return xf86DoEEDID(scrnIndex, pBus, FALSE); +} + +/* XXX write me */ +static void * +DDC2ReadDisplayID(void) +{ + return FALSE; +} + +/** + * Attempts to probe the monitor for DisplayID information, if NoDDC and + * NoDDC2 are unset. DisplayID blocks are interpreted and the results + * returned in an xf86MonPtr. + * + * This function does not affect the list of modes used by drivers -- it is up + * to the driver to decide policy on what to do with DisplayID information. + * + * @return pointer to a new xf86MonPtr containing the DisplayID information. + * @return NULL if no monitor attached or failure to interpret the DisplayID. + */ +xf86MonPtr +xf86DoDisplayID(int scrnIndex, I2CBusPtr pBus) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + unsigned char *did = NULL; + xf86MonPtr tmp = NULL; + I2CDevPtr dev = NULL; + /* Default DDC and DDC2 to enabled. */ + Bool noddc = FALSE, noddc2 = FALSE; + OptionInfoPtr options; + + options = xalloc(sizeof(DDCOptions)); + if (!options) + return NULL; + memcpy(options, DDCOptions, sizeof(DDCOptions)); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); + + xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); + xf86GetOptValBool(options, DDCOPT_NODDC2, &noddc2); + xfree(options); + + if (noddc || noddc2) + return NULL; + + if (!(dev = DDC2Init(scrnIndex, pBus))) + return NULL; + + if ((did = DDC2ReadDisplayID())) { + tmp = xcalloc(1, sizeof(*tmp)); + if (!tmp) + return NULL; + + tmp->scrnIndex = scrnIndex; + tmp->flags |= MONITOR_DISPLAYID; + tmp->rawData = did; + } + + return tmp; +} diff --git a/xorg-server/hw/xfree86/ddc/ddcProperty.c b/xorg-server/hw/xfree86/ddc/ddcProperty.c index a4384f1d3..329a63964 100644 --- a/xorg-server/hw/xfree86/ddc/ddcProperty.c +++ b/xorg-server/hw/xfree86/ddc/ddcProperty.c @@ -31,21 +31,36 @@ #include "property.h" #include "propertyst.h" #include "xf86DDC.h" +#include #define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA" #define EDID2_ATOM_NAME "XFree86_DDC_EDID2_RAWDATA" +static void +edidMakeAtom(int i, const char *name, CARD8 *data, int size) +{ + Atom atom; + unsigned char *atom_data; + + if (!(atom_data = xalloc(size*sizeof(CARD8)))) + return; + + atom = MakeAtom(name, strlen(name), TRUE); + memcpy(atom_data, data, size); + xf86RegisterRootWindowProperty(i, atom, XA_INTEGER, 8, size, atom_data); +} + static void addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) { - Atom EDID1Atom=-1, EDID2Atom=-1; - CARD8 *EDID1rawdata = NULL; - CARD8 *EDID2rawdata = NULL; int i, scrnIndex = pScrn->scrnIndex; Bool makeEDID1prop = FALSE; Bool makeEDID2prop = FALSE; - if (DDC->ver.version == 1) { + if (DDC->flags & MONITOR_DISPLAYID) { + /* Don't bother, use RANDR already */ + return; + } else if (DDC->ver.version == 1) { makeEDID1prop = TRUE; } else if (DDC->ver.version == 2) { int checksum1; @@ -83,29 +98,14 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) } if (makeEDID1prop) { - int size = 128; - - if (DDC->flags & EDID_COMPLETE_RAWDATA) - size += DDC->no_sections * 128; + int size = 128 + + (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0); - if ((EDID1rawdata = xalloc(size*sizeof(CARD8)))==NULL) - return; - - EDID1Atom = MakeAtom(EDID1_ATOM_NAME, sizeof(EDID1_ATOM_NAME) - 1, TRUE); - memcpy(EDID1rawdata, DDC->rawData, size); - xf86RegisterRootWindowProperty(scrnIndex, EDID1Atom, XA_INTEGER, 8, - size, (unsigned char *)EDID1rawdata); + edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC->rawData, size); } - if (makeEDID2prop) { - if ((EDID2rawdata = xalloc(256*sizeof(CARD8)))==NULL) - return; - - memcpy(EDID2rawdata, DDC->rawData, 256); - EDID2Atom = MakeAtom(EDID2_ATOM_NAME, sizeof(EDID2_ATOM_NAME) - 1, TRUE); - xf86RegisterRootWindowProperty(scrnIndex, EDID2Atom, XA_INTEGER, 8, - 256, (unsigned char *)EDID2rawdata); - } + if (makeEDID2prop) + edidMakeAtom(scrnIndex, EDID2_ATOM_NAME, DDC->rawData, 256); } Bool @@ -114,7 +114,10 @@ xf86SetDDCproperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) if (!pScrn || !pScrn->monitor || !DDC) return FALSE; - xf86DDCMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC); + if (DDC->flags & MONITOR_DISPLAYID) + ; + else + xf86EdidMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC); addRootWindowProperties(pScrn, DDC); diff --git a/xorg-server/hw/xfree86/ddc/edid.h b/xorg-server/hw/xfree86/ddc/edid.h index 3ca402f57..3feb9796f 100644 --- a/xorg-server/hw/xfree86/ddc/edid.h +++ b/xorg-server/hw/xfree86/ddc/edid.h @@ -12,6 +12,12 @@ #ifndef _EDID_H_ #define _EDID_H_ +#include + +#ifndef _X_EXPORT +# include +#endif + /* read complete EDID record */ #define EDID1_LEN 128 #define BITS_PER_BYTE 9 @@ -532,8 +538,15 @@ struct detailed_monitor_section { }; /* flags */ -#define EDID_COMPLETE_RAWDATA 0x1 +#define MONITOR_EDID_COMPLETE_RAWDATA 0x01 +/* old, don't use */ +#define EDID_COMPLETE_RAWDATA 0x01 +#define MONITOR_DISPLAYID 0x02 +/* + * For DisplayID devices, only the scrnIndex, flags, and rawData fields + * are meaningful. For EDID, they all are. + */ typedef struct { int scrnIndex; struct vendor vendor; @@ -547,6 +560,6 @@ typedef struct { Uchar *rawData; } xf86Monitor, *xf86MonPtr; -extern xf86MonPtr ConfiguredMonitor; +extern _X_EXPORT xf86MonPtr ConfiguredMonitor; #endif /* _EDID_H_ */ diff --git a/xorg-server/hw/xfree86/ddc/interpret_edid.c b/xorg-server/hw/xfree86/ddc/interpret_edid.c index 310606c7c..12a52545e 100644 --- a/xorg-server/hw/xfree86/ddc/interpret_edid.c +++ b/xorg-server/hw/xfree86/ddc/interpret_edid.c @@ -3,22 +3,23 @@ * Copyright 2007 Red Hat, Inc. * * 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 - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * them Software is furnished to do so, subject to the following conditions: + * 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 MERCHANTIBILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS 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. + * 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. * * interpret_edid.c: interpret a primary EDID block */ @@ -466,7 +467,7 @@ validate_version(int scrnIndex, struct edid_version *r) /* * Returns true if HDMI, false if definitely not or unknown. */ -_X_EXPORT Bool +Bool xf86MonitorIsHDMI(xf86MonPtr mon) { int i = 0, version, offset; diff --git a/xorg-server/hw/xfree86/ddc/print_edid.c b/xorg-server/hw/xfree86/ddc/print_edid.c index e9c8cbdf7..ff0b39cc1 100644 --- a/xorg-server/hw/xfree86/ddc/print_edid.c +++ b/xorg-server/hw/xfree86/ddc/print_edid.c @@ -3,22 +3,23 @@ * Copyright 2007 Red Hat, Inc. * * 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 - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * them Software is furnished to do so, subject to the following conditions: + * 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 MERCHANTIBILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS 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. + * 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. * * print_edid.c: print out all information retrieved from display device */ @@ -250,7 +251,7 @@ print_established_timings(int scrnIndex, struct established_timings *t) if (c&0x02) xf86DrvMsg(scrnIndex,X_INFO,"1024x768@75Hz\n"); if (c&0x01) xf86DrvMsg(scrnIndex,X_INFO,"1280x1024@75Hz\n"); c=t->t_manu; - if (c&0x80) xf86DrvMsg(scrnIndex,X_INFO,"1152x870@75Hz\n"); + if (c&0x80) xf86DrvMsg(scrnIndex,X_INFO,"1152x864@75Hz\n"); xf86DrvMsg(scrnIndex,X_INFO,"Manufacturer's mask: %X\n",c&0x7F); } @@ -397,8 +398,12 @@ print_detailed_monitor_section(int scrnIndex, if (r->supported_scaling & SCALING_VSTRETCH) xf86ErrorF(" vstretch"); xf86ErrorF("\n"); - xf86DrvMsg(scrnIndex, X_INFO, "Preferred refresh rate: %d\n", - r->preferred_refresh); + if (r->preferred_refresh) + xf86DrvMsg(scrnIndex, X_INFO, "Preferred refresh rate: %d\n", + r->preferred_refresh); + else + xf86DrvMsg(scrnIndex, X_INFO, "Buggy monitor, no preferred " + "refresh rate given\n"); } else if (r->max_clock != 0) { xf86ErrorF(" PixClock max %i MHz\n", r->max_clock); } else { @@ -445,7 +450,7 @@ print_detailed_monitor_section(int scrnIndex, break; } if (m[i].type >= DS_VENDOR && m[i].type <= DS_VENDOR_MAX) { - xf86DrvMsg(scrnIndex, X_WARNING, + xf86DrvMsg(scrnIndex, X_INFO, "Unknown vendor-specific block %hx\n", m[i].type - DS_VENDOR); } diff --git a/xorg-server/hw/xfree86/ddc/xf86DDC.h b/xorg-server/hw/xfree86/ddc/xf86DDC.h index 3172b555d..64869da10 100644 --- a/xorg-server/hw/xfree86/ddc/xf86DDC.h +++ b/xorg-server/hw/xfree86/ddc/xf86DDC.h @@ -24,42 +24,53 @@ typedef enum { typedef void (* DDC1SetSpeedProc)(ScrnInfoPtr, xf86ddcSpeed); -extern xf86MonPtr xf86DoEDID_DDC1( +extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC1( int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed, unsigned int (*DDC1Read)(ScrnInfoPtr) ); -extern xf86MonPtr xf86DoEDID_DDC2( +extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC2( int scrnIndex, I2CBusPtr pBus ); -extern xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool); +extern _X_EXPORT xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool); -extern xf86MonPtr xf86PrintEDID( +extern _X_EXPORT xf86MonPtr xf86PrintEDID( xf86MonPtr monPtr ); -extern xf86MonPtr xf86InterpretEDID( +extern _X_EXPORT xf86MonPtr xf86InterpretEDID( int screenIndex, Uchar *block ); -extern xf86MonPtr xf86InterpretEEDID( +extern _X_EXPORT xf86MonPtr xf86InterpretEEDID( int screenIndex, Uchar *block ); -extern void -xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC); +extern _X_EXPORT void +xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC); -extern Bool xf86SetDDCproperties( +extern _X_EXPORT Bool xf86SetDDCproperties( ScrnInfoPtr pScreen, xf86MonPtr DDC ); -DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); +extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); -extern Bool +extern _X_EXPORT Bool xf86MonitorIsHDMI(xf86MonPtr mon); +extern _X_EXPORT xf86MonPtr +xf86DoDisplayID(int scrnIndex, I2CBusPtr pBus); + +extern _X_EXPORT void +xf86DisplayIDMonitorSet(int scrnIndex, MonPtr mon, xf86MonPtr DDC); + +extern _X_EXPORT DisplayModePtr +FindDMTMode(int hsize, int vsize, int refresh, Bool rb); + +extern _X_EXPORT const DisplayModeRec DMTModes[]; + #endif diff --git a/xorg-server/hw/xfree86/dixmods/Makefile.in b/xorg-server/hw/xfree86/dixmods/Makefile.in index f4fb88edb..e7eecf268 100644 --- a/xorg-server/hw/xfree86/dixmods/Makefile.in +++ b/xorg-server/hw/xfree86/dixmods/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/dixmods DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -189,6 +193,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -209,9 +214,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -240,7 +248,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -249,9 +259,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -290,12 +304,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -315,7 +330,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -325,6 +339,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -338,11 +353,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -378,6 +392,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -402,7 +417,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -425,6 +439,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -456,7 +471,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am index dd4ccd633..d93e63afa 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am +++ b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am @@ -12,7 +12,7 @@ XV_SRCS = xvmod.c xvmodproc.h endif if XF86VIDMODE -XF86VMODE_SRCS = xf86vmode.c vidmodeproc.h +XF86VMODE_SRCS = xf86vmode.c endif AM_CFLAGS = @DIX_CFLAGS@ @XORG_CFLAGS@ diff --git a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in index b50686064..477d57bc0 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in +++ b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/dixmods/extmod DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -78,8 +82,7 @@ am__installdirs = "$(DESTDIR)$(extsmoduledir)" "$(DESTDIR)$(sdkdir)" LTLIBRARIES = $(extsmodule_LTLIBRARIES) libextmod_la_DEPENDENCIES = $(top_builddir)/Xext/libXextmodule.la am__libextmod_la_SOURCES_DIST = modinit.c modinit.h xf86dga2.c \ - dgaproc.h xf86dgaext.h xf86vmode.c vidmodeproc.h xvmod.c \ - xvmodproc.h + dgaproc.h xf86dgaext.h xf86vmode.c xvmod.c xvmodproc.h @DGA_TRUE@am__objects_1 = xf86dga2.lo @XF86VIDMODE_TRUE@am__objects_2 = xf86vmode.lo @XV_TRUE@am__objects_3 = xvmod.lo @@ -110,6 +113,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -130,9 +134,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -161,7 +168,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -170,9 +179,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -211,12 +224,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -236,7 +250,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -246,6 +259,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -259,11 +273,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -299,6 +312,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -323,7 +337,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -346,6 +359,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -377,7 +391,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -388,7 +404,7 @@ extsmoduledir = $(moduledir)/extensions extsmodule_LTLIBRARIES = libextmod.la @DGA_TRUE@DGA_SRCS = xf86dga2.c dgaproc.h xf86dgaext.h @XV_TRUE@XV_SRCS = xvmod.c xvmodproc.h -@XF86VIDMODE_TRUE@XF86VMODE_SRCS = xf86vmode.c vidmodeproc.h +@XF86VIDMODE_TRUE@XF86VMODE_SRCS = xf86vmode.c AM_CFLAGS = @DIX_CFLAGS@ @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ \ -I$(top_srcdir)/dbe \ diff --git a/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h b/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h index f4d3fe45b..6745a6e7a 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h +++ b/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h @@ -54,7 +54,7 @@ typedef struct { /* DDX interface */ -int +extern _X_EXPORT int DGASetMode( int Index, int num, @@ -62,35 +62,35 @@ DGASetMode( PixmapPtr *pPix ); -void +extern _X_EXPORT void DGASetInputMode( int Index, Bool keyboard, Bool mouse ); -void +extern _X_EXPORT void DGASelectInput( int Index, ClientPtr client, long mask ); -Bool DGAAvailable(int Index); -Bool DGAActive(int Index); -void DGAShutdown(void); -void DGAInstallCmap(ColormapPtr cmap); -int DGAGetViewportStatus(int Index); -int DGASync(int Index); +extern _X_EXPORT Bool DGAAvailable(int Index); +extern _X_EXPORT Bool DGAActive(int Index); +extern _X_EXPORT void DGAShutdown(void); +extern _X_EXPORT void DGAInstallCmap(ColormapPtr cmap); +extern _X_EXPORT int DGAGetViewportStatus(int Index); +extern _X_EXPORT int DGASync(int Index); -int +extern _X_EXPORT int DGAFillRect( int Index, int x, int y, int w, int h, unsigned long color ); -int +extern _X_EXPORT int DGABlitRect( int Index, int srcx, int srcy, @@ -98,7 +98,7 @@ DGABlitRect( int dstx, int dsty ); -int +extern _X_EXPORT int DGABlitTransRect( int Index, int srcx, int srcy, @@ -107,38 +107,36 @@ DGABlitTransRect( unsigned long color ); -int +extern _X_EXPORT int DGASetViewport( int Index, int x, int y, int mode ); -int DGAGetModes(int Index); -int DGAGetOldDGAMode(int Index); +extern _X_EXPORT int DGAGetModes(int Index); +extern _X_EXPORT int DGAGetOldDGAMode(int Index); -int DGAGetModeInfo(int Index, XDGAModePtr mode, int num); +extern _X_EXPORT int DGAGetModeInfo(int Index, XDGAModePtr mode, int num); -Bool DGAVTSwitch(void); -Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, int button, +extern _X_EXPORT Bool DGAVTSwitch(void); +extern _X_EXPORT Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, int button, int is_down); -Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); -Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, int key_code, int is_down); -Bool DGAIsDgaEvent (xEvent *e); - -Bool DGADeliverEvent (ScreenPtr pScreen, xEvent *e); +extern _X_EXPORT Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); +extern _X_EXPORT Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, int key_code, int is_down); +extern _X_EXPORT Bool DGAIsDgaEvent (xEvent *e); -Bool DGAOpenFramebuffer(int Index, char **name, unsigned char **mem, +extern _X_EXPORT Bool DGAOpenFramebuffer(int Index, char **name, unsigned char **mem, int *size, int *offset, int *flags); -void DGACloseFramebuffer(int Index); -Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode); -int DGACreateColormap(int Index, ClientPtr client, int id, int mode, +extern _X_EXPORT void DGACloseFramebuffer(int Index); +extern _X_EXPORT Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode); +extern _X_EXPORT int DGACreateColormap(int Index, ClientPtr client, int id, int mode, int alloc); -extern unsigned char DGAReqCode; -extern int DGAErrorBase; -extern int DGAEventBase; -extern int *XDGAEventBase; +extern _X_EXPORT unsigned char DGAReqCode; +extern _X_EXPORT int DGAErrorBase; +extern _X_EXPORT int DGAEventBase; +extern _X_EXPORT int *XDGAEventBase; diff --git a/xorg-server/hw/xfree86/dixmods/extmod/modinit.c b/xorg-server/hw/xfree86/dixmods/extmod/modinit.c index 9bcf51f00..299562592 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/modinit.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/modinit.c @@ -56,15 +56,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef notyet - { - XTestExtensionInit, - XTestExtensionName, - &noTestExtensions, - NULL, - NULL - }, -#endif #ifdef SCREENSAVER { ScreenSaverExtensionInit, diff --git a/xorg-server/hw/xfree86/dixmods/extmod/modinit.h b/xorg-server/hw/xfree86/dixmods/extmod/modinit.h index 1de14858c..6210526aa 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/modinit.h +++ b/xorg-server/hw/xfree86/dixmods/extmod/modinit.h @@ -7,20 +7,16 @@ #define INITARGS void #endif -#define _SHAPE_SERVER_ /* don't want Xlib structures */ -#include +#include #ifdef MULTIBUFFER extern void MultibufferExtensionInit(INITARGS); -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#include +#include #endif #ifdef XTEST extern void XTestExtensionInit(INITARGS); -#define _XTEST_SERVER_ -#include -#include +#include #endif #if 1 @@ -34,20 +30,18 @@ extern void ScreenSaverExtensionInit (INITARGS); #ifdef XF86VIDMODE extern void XFree86VidModeExtensionInit(INITARGS); -#define _XF86VIDMODE_SERVER_ -#include +#include #endif #ifdef XFreeXDGA extern void XFree86DGAExtensionInit(INITARGS); extern void XFree86DGARegister(INITARGS); -#define _XF86DGA_SERVER_ -#include +#include #endif #ifdef DPMSExtension extern void DPMSExtensionInit(INITARGS); -#include +#include #endif #ifdef XV @@ -65,7 +59,7 @@ extern void ResExtensionInit(INITARGS); #ifdef SHM extern void ShmExtensionInit(INITARGS); -#include +#include extern void ShmRegisterFuncs( ScreenPtr pScreen, ShmFuncsPtr funcs); diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c index df0030e80..7579f7d51 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -11,8 +11,6 @@ #include #endif -#define NEED_REPLIES -#define NEED_EVENTS #include #include #include "misc.h" @@ -24,9 +22,7 @@ #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" -#define _XF86DGA_SERVER_ -#include -#include +#include #include "swaprep.h" #include "dgaproc.h" #include "xf86dgaext.h" @@ -161,7 +157,7 @@ ProcXDGAOpenFramebuffer(ClientPtr client) } nameSize = deviceName ? (strlen(deviceName) + 1) : 0; - rep.length = (nameSize + 3) >> 2; + rep.length = bytes_to_int32(nameSize); WriteToClient(client, sizeof(xXDGAOpenFramebufferReply), (char *)&rep); if(rep.length) @@ -227,10 +223,10 @@ ProcXDGAQueryModes(ClientPtr client) size = num * sz_xXDGAModeInfo; for(i = 0; i < num; i++) - size += (strlen(mode[i].name) + 4) & ~3L; /* plus NULL */ + size += pad_to_int32(strlen(mode[i].name) + 1); /* plus NULL */ rep.number = num; - rep.length = size >> 2; + rep.length = bytes_to_int32(size); WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); @@ -391,7 +387,7 @@ ProcXDGASetMode(ClientPtr client) info.reserved1 = mode.reserved1; info.reserved2 = mode.reserved2; - rep.length = (sz_xXDGAModeInfo + info.name_size) >> 2; + rep.length = bytes_to_int32(sz_xXDGAModeInfo + info.name_size); WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep); WriteToClient(client, sz_xXDGAModeInfo, (char*)(&info)); @@ -422,6 +418,7 @@ static int ProcXDGAInstallColormap(ClientPtr client) { ColormapPtr cmap; + int rc; REQUEST(xXDGAInstallColormapReq); if (stuff->screen > screenInfo.numScreens) @@ -432,13 +429,13 @@ ProcXDGAInstallColormap(ClientPtr client) REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); - cmap = (ColormapPtr)LookupIDByType(stuff->cmap, RT_COLORMAP); - if (cmap) { + rc = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, RT_COLORMAP, + client, DixInstallAccess); + if (rc == Success) { DGAInstallCmap(cmap); return (client->noClientException); } else { - client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } return (client->noClientException); @@ -860,6 +857,7 @@ static int ProcXF86DGAInstallColormap(ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xXF86DGAInstallColormapReq); if (stuff->screen > screenInfo.numScreens) @@ -873,13 +871,13 @@ ProcXF86DGAInstallColormap(ClientPtr client) if (!DGAActive(stuff->screen)) return (DGAErrorBase + XF86DGADirectNotActivated); - pcmp = (ColormapPtr )LookupIDByType(stuff->id, RT_COLORMAP); - if (pcmp) { + rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP, + client, DixInstallAccess); + if (rc == Success) { DGAInstallCmap(pcmp); return (client->noClientException); } else { - client->errorValue = stuff->id; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c index aecaf94ff..4a288d79f 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c @@ -34,8 +34,6 @@ from Kaleb S. KEITHLEY #include #endif -#define NEED_REPLIES -#define NEED_EVENTS #include #include #include "misc.h" @@ -43,8 +41,7 @@ from Kaleb S. KEITHLEY #include "extnsionst.h" #include "scrnintstr.h" #include "servermd.h" -#define _XF86VIDMODE_SERVER_ -#include +#include #include "swaprep.h" #include "xf86.h" #include "vidmodeproc.h" @@ -416,11 +413,11 @@ ProcXF86VidModeGetModeLine(ClientPtr client) REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); rep.type = X_Reply; if (ver < 2) { - rep.length = (SIZEOF(xXF86OldVidModeGetModeLineReply) - - SIZEOF(xGenericReply)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86OldVidModeGetModeLineReply) - + SIZEOF(xGenericReply)); } else { - rep.length = (SIZEOF(xXF86VidModeGetModeLineReply) - - SIZEOF(xGenericReply)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetModeLineReply) - + SIZEOF(xGenericReply)); } rep.sequenceNumber = client->sequence; @@ -672,10 +669,10 @@ ProcXF86VidModeAddModeLine(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeAddModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeAddModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeAddModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeAddModeLineReq)); } if (len != stuff->privsize) return BadLength; @@ -811,10 +808,10 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeDeleteModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeDeleteModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeDeleteModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeDeleteModeLineReq)); } if (len != stuff->privsize) { if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { @@ -925,10 +922,10 @@ ProcXF86VidModeModModeLine(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeModModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeModModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeModModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeModModeLineReq)); } if (len != stuff->privsize) return BadLength; @@ -1054,10 +1051,10 @@ ProcXF86VidModeValidateModeLine(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); len = client->req_len - - (sizeof(xXF86OldVidModeValidateModeLineReq) >> 2); + bytes_to_int32(sizeof(xXF86OldVidModeValidateModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeValidateModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeValidateModeLineReq)); } if (len != stuff->privsize) return BadLength; @@ -1109,8 +1106,8 @@ status_reply: xfree(modetmp); rep.type = X_Reply; - rep.length = (SIZEOF(xXF86VidModeValidateModeLineReply) - - SIZEOF(xGenericReply)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86VidModeValidateModeLineReply) + - SIZEOF(xGenericReply)); rep.sequenceNumber = client->sequence; rep.status = status; if (client->swapped) { @@ -1187,10 +1184,10 @@ ProcXF86VidModeSwitchToMode(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeSwitchToModeReq); - len = client->req_len - (sizeof(xXF86OldVidModeSwitchToModeReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeSwitchToModeReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeSwitchToModeReq); - len = client->req_len - (sizeof(xXF86VidModeSwitchToModeReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeSwitchToModeReq)); } if (len != stuff->privsize) return BadLength; @@ -1291,10 +1288,10 @@ ProcXF86VidModeGetMonitor(ClientPtr client) VIDMODE_MON_MODEL, 0)).ptr); else rep.modelLength = 0; - rep.length = (SIZEOF(xXF86VidModeGetMonitorReply) - SIZEOF(xGenericReply) + + rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetMonitorReply) - SIZEOF(xGenericReply) + (nHsync + nVrefresh) * sizeof(CARD32) + - ((rep.vendorLength + 3) & ~3) + - ((rep.modelLength + 3) & ~3)) >> 2; + pad_to_int32(rep.vendorLength) + + pad_to_int32(rep.modelLength)); rep.sequenceNumber = client->sequence; rep.nhsync = nHsync; rep.nvsync = nVrefresh; @@ -1415,8 +1412,8 @@ ProcXF86VidModeGetDotClocks(ClientPtr client) numClocks = VidModeGetNumOfClocks(stuff->screen, &ClockProg); rep.type = X_Reply; - rep.length = (SIZEOF(xXF86VidModeGetDotClocksReply) - - SIZEOF(xGenericReply) + numClocks) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetDotClocksReply) + - SIZEOF(xGenericReply) + numClocks); rep.sequenceNumber = client->sequence; rep.clocks = numClocks; rep.maxclocks = MAXCLOCKS; @@ -1542,7 +1539,7 @@ static int ProcXF86VidModeGetGammaRamp(ClientPtr client) { CARD16 *ramp = NULL; - int n, length, i; + int n, length; size_t ramplen; xXF86VidModeGetGammaRampReply rep; REQUEST(xXF86VidModeGetGammaRampReq); @@ -1577,7 +1574,7 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client) swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); swaps(&rep.size, n); - SwapShorts(ramp, length * 3); + SwapShorts((short*)ramp, length * 3); } WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep); diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c index 6b3f1149a..955104679 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c @@ -13,7 +13,7 @@ #include "xvmodproc.h" void -XvRegister() +XvRegister(void) { XvScreenInitProc = XvScreenInit; XvGetScreenKeyProc = XvGetScreenKey; diff --git a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c index 9074fd390..0f4e25c0c 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c +++ b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c @@ -33,7 +33,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS 1 #include #include #include diff --git a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c index db21a4e17..9742eaf31 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c +++ b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c @@ -8,7 +8,6 @@ #endif #include -#define NEED_EVENTS 1 #include #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS diff --git a/xorg-server/hw/xfree86/dixmods/xkbVT.c b/xorg-server/hw/xfree86/dixmods/xkbVT.c index e6d69e2eb..13bd6f41e 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbVT.c +++ b/xorg-server/hw/xfree86/dixmods/xkbVT.c @@ -33,7 +33,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS 1 #include #include #include diff --git a/xorg-server/hw/xfree86/doc/Makefile.in b/xorg-server/hw/xfree86/doc/Makefile.in index b6c671248..5f4680acf 100644 --- a/xorg-server/hw/xfree86/doc/Makefile.in +++ b/xorg-server/hw/xfree86/doc/Makefile.in @@ -36,8 +36,11 @@ host_triplet = @host@ subdir = hw/xfree86/doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,7 +50,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -98,6 +102,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -118,9 +123,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -149,7 +157,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -158,9 +168,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -199,12 +213,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -224,7 +239,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -234,6 +248,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -247,11 +262,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -287,6 +301,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -311,7 +326,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -334,6 +348,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -365,7 +380,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/doc/devel/Makefile.am b/xorg-server/hw/xfree86/doc/devel/Makefile.am index eb8b1cb29..c9eca5eb3 100644 --- a/xorg-server/hw/xfree86/doc/devel/Makefile.am +++ b/xorg-server/hw/xfree86/doc/devel/Makefile.am @@ -2,8 +2,6 @@ # not installed on the system for end-users EXTRA_DIST = \ - Domain.note \ - RAC.Notes \ Registry \ exa-driver.txt \ README.DRIcomp diff --git a/xorg-server/hw/xfree86/doc/devel/Makefile.in b/xorg-server/hw/xfree86/doc/devel/Makefile.in index 160ecf4e4..390803a89 100644 --- a/xorg-server/hw/xfree86/doc/devel/Makefile.in +++ b/xorg-server/hw/xfree86/doc/devel/Makefile.in @@ -39,8 +39,11 @@ host_triplet = @host@ subdir = hw/xfree86/doc/devel DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -61,6 +65,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -81,9 +86,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -112,7 +120,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -121,9 +131,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -162,12 +176,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -187,7 +202,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -197,6 +211,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -210,11 +225,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -250,6 +264,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -274,7 +289,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -297,6 +311,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -328,15 +343,15 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ - Domain.note \ - RAC.Notes \ Registry \ exa-driver.txt \ README.DRIcomp diff --git a/xorg-server/hw/xfree86/doc/man/Makefile.in b/xorg-server/hw/xfree86/doc/man/Makefile.in index 56c10fcd4..26ab17b12 100644 --- a/xorg-server/hw/xfree86/doc/man/Makefile.in +++ b/xorg-server/hw/xfree86/doc/man/Makefile.in @@ -42,8 +42,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xfree86/doc/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -53,7 +56,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -87,6 +91,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -107,9 +112,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -138,7 +146,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -147,9 +157,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -188,12 +202,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -213,7 +228,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -223,6 +237,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -236,11 +251,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -276,6 +290,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -300,7 +315,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -323,6 +337,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -354,7 +369,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre index 4992dc715..2f9ff98c7 100644 --- a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre +++ b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre @@ -134,7 +134,7 @@ will use. Without this option, .B __xservername__ will pick the first available Virtual Terminal that it can locate. This option applies only to platforms that have virtual terminal support, such -as Linux, BSD, SVR3, and SVR4. +as Linux, BSD, OpenSolaris, SVR3, and SVR4. .TP .B \-allowMouseOpenFail Allow the server to start up even if the mouse device can't be opened @@ -313,10 +313,6 @@ file verbosity level. When the value is supplied, the log file verbosity level is set to that value. The default log file verbosity level is 3. .TP 8 -.B \-modalias -Print a list of device ids each installed driver module claims to support, -in a format similar to Linux modalias. -.TP 8 .BI \-modulepath " searchpath" Set the module search path to .IR searchpath . @@ -356,11 +352,6 @@ section and this option, the first relevant .B InputDevice section is used for the core pointer. .TP 8 -.B \-probeonly -Causes the server to exit after the device probing stage. The -__xconfigfile__(__filemansuffix__) file is still used when this option is -given, so information that can be auto-detected should be commented out. -.TP 8 .B \-quiet Suppress most informational messages at startup. The verbosity level is set to zero. @@ -432,17 +423,12 @@ server is normally configured to recognize various special combinations of key presses that instruct the server to perform some action, rather than just sending the key press event to a client application. The default XKEYBOARD keymap defines the key combinations listed below. -The server also has these key combinations builtin to its event handler +The kbd (__drivermansuffix__) driver also has these key combinations +builtin to its event handler for cases where the XKEYBOARD extension is not being used. When using the XKEYBOARD extension, which key combinations perform which actions is completely configurable. .PP -For more information about when the builtin event handler -is used to recognize the special key combinations, see -the documentation on the -.B HandleSpecialKeys -option in the __xconfigfile__(__filemansuffix__) man page. -.PP The special combinations of key presses recognized directly by .B __xservername__ diff --git a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre index 96ad0160f..634805a69 100644 --- a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre @@ -615,26 +615,6 @@ Default: PM enabled on platforms that support it. enable or disable XINERAMA extension. Default is disabled. .TP 7 -.BI "Option \*qHandleSpecialKeys\*q \*q" when \*q -This option controls when the server uses the builtin handler to process -special key combinations (such as -.BR Ctrl+Alt+Backspace ). -Normally the XKEYBOARD extension keymaps will provide mappings for each of -the special key combinations, so the builtin handler is not needed unless -the XKEYBOARD extension is disabled. -The value of -.I when -can be -.BR Always , -.BR Never , -or -.BR WhenNeeded . -Default: Use the builtin handler only if needed. -The server will scan the keymap for a mapping to the -.B Terminate -action and, if found, use XKEYBOARD for processing actions, otherwise -the builtin handler will be used. -.TP 7 .BI "Option \*qAIGLX\*q \*q" boolean \*q enable or disable AIGLX. AIGLX is enabled by default. .TP 7 @@ -859,7 +839,7 @@ The most commonly used input drivers are on Linux systems, and .BR kbd (__drivermansuffix__) and -.BR mouse (__drivermansuffix__) +.BR mousedrv (__drivermansuffix__) on other platforms. .PP In the absence of an explicitly specified core input device, the first @@ -1409,11 +1389,10 @@ This option controls whether the video card should drive the sync signal on the green color pin. Not all cards support this option, and most monitors do not require it. The default is off. .TP 7 -.BI "Option " "\*qTargetRefresh\*q " \*qrate\*q -This optional entry specifies the vertical refresh rate that the server -should aim for when selecting video modes. Without this option, the -default is to prefer modes with higher refresh rates. -.TP 7 +.BI "Option " "\*qPrimary\*q " \*qbool\*q +This optional entry specifies that the monitor should be treated as the primary +monitor. (RandR 1.2-supporting drivers only) +.TP7 .BI "Option " "\*qPreferredMode\*q " \*qstring\*q This optional entry specifies a mode to be marked as the preferred initial mode of the monitor. diff --git a/xorg-server/hw/xfree86/doc/sgml/Makefile.in b/xorg-server/hw/xfree86/doc/sgml/Makefile.in index a88958981..a699e4371 100644 --- a/xorg-server/hw/xfree86/doc/sgml/Makefile.in +++ b/xorg-server/hw/xfree86/doc/sgml/Makefile.in @@ -58,8 +58,11 @@ host_triplet = @host@ subdir = hw/xfree86/doc/sgml DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -69,7 +72,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -81,6 +85,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -101,9 +106,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -132,7 +140,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -141,9 +151,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -182,12 +196,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -207,7 +222,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -217,6 +231,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -230,11 +245,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -270,6 +284,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -294,7 +309,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -317,6 +331,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -348,7 +363,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/dri/Makefile.am b/xorg-server/hw/xfree86/dri/Makefile.am index 3ec30beec..a7b491c6e 100644 --- a/xorg-server/hw/xfree86/dri/Makefile.am +++ b/xorg-server/hw/xfree86/dri/Makefile.am @@ -8,12 +8,10 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/ramdac \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/glx \ - -I$(top_srcdir)/GL/include \ - -I$(top_builddir)/GL/include \ -DHAVE_XORG_CONFIG_H \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \ @LIBDRM_CFLAGS@ \ - @GL_CFLAGS@ + @DRI_CFLAGS@ libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@ libdri_ladir = $(moduledir)/extensions libdri_la_SOURCES = \ diff --git a/xorg-server/hw/xfree86/dri/Makefile.in b/xorg-server/hw/xfree86/dri/Makefile.in index cf445fecd..278a514ef 100644 --- a/xorg-server/hw/xfree86/dri/Makefile.in +++ b/xorg-server/hw/xfree86/dri/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/dri DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -104,6 +108,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -124,9 +129,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -155,7 +163,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -164,9 +174,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -205,12 +219,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -230,7 +245,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -240,6 +254,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -253,11 +268,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -293,6 +307,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -317,7 +332,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -340,6 +354,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -371,7 +386,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -387,12 +404,10 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/ramdac \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/glx \ - -I$(top_srcdir)/GL/include \ - -I$(top_builddir)/GL/include \ -DHAVE_XORG_CONFIG_H \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \ @LIBDRM_CFLAGS@ \ - @GL_CFLAGS@ + @DRI_CFLAGS@ libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@ libdri_ladir = $(moduledir)/extensions diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c index bddb6510e..d32b284ed 100644 --- a/xorg-server/hw/xfree86/dri/dri.c +++ b/xorg-server/hw/xfree86/dri/dri.c @@ -45,8 +45,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#define NEED_REPLIES -#define NEED_EVENTS #include #include #include "xf86drm.h" @@ -71,6 +69,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mipointer.h" #include "xf86_OSproc.h" #include "inputstr.h" +#include "xf86VGAarbiter.h" #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) @@ -335,6 +334,12 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) return FALSE; } + if (!xf86VGAarbiterAllowDRI(pScreen)) { + DRIDrvMsg(pScreen->myNum, X_WARNING, + "Direct rendering is not supported when VGA arb is necessary for the device\n"); + return FALSE; + } + /* * If Xinerama is on, don't allow DRI to initialise. It won't be usable * anyway. @@ -1365,11 +1370,12 @@ Bool DRIDrawablePrivDelete(pointer pResource, XID id) { WindowPtr pWin; + int rc; id = (XID)pResource; - pWin = LookupIDByType(id, RT_WINDOW); + rc = dixLookupWindow(&pWin, id, serverClient, DixGetAttrAccess); - if (pWin) { + if (rc == Success) { DRIDrawablePrivPtr pDRIDrwPriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); if (!pDRIDrwPriv) @@ -1835,7 +1841,7 @@ DRISwapContext(int drmFD, void *oldctx, void *newctx) newContextStore); } -void* +void* DRIGetContextStore(DRIContextPrivPtr context) { return((void *)context->pContextStore); diff --git a/xorg-server/hw/xfree86/dri/dri.h b/xorg-server/hw/xfree86/dri/dri.h index 516da97a5..f690e234b 100644 --- a/xorg-server/hw/xfree86/dri/dri.h +++ b/xorg-server/hw/xfree86/dri/dri.h @@ -198,59 +198,59 @@ typedef struct { } DRIInfoRec, *DRIInfoPtr; -extern Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize, +extern _X_EXPORT Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize, const char *busID, const char *drmDriverName); -extern Bool DRIScreenInit(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD); -extern void DRICloseScreen(ScreenPtr pScreen); +extern _X_EXPORT void DRICloseScreen(ScreenPtr pScreen); -extern Bool DRIExtensionInit(void); +extern _X_EXPORT Bool DRIExtensionInit(void); -extern void DRIReset(void); +extern _X_EXPORT void DRIReset(void); -extern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool *isCapable); -extern Bool DRIOpenConnection(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIOpenConnection(ScreenPtr pScreen, drm_handle_t * hSAREA, char **busIdString); -extern Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic); +extern _X_EXPORT Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic); -extern Bool DRICloseConnection(ScreenPtr pScreen); +extern _X_EXPORT Bool DRICloseConnection(ScreenPtr pScreen); -extern Bool DRIGetClientDriverName(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIGetClientDriverName(ScreenPtr pScreen, int* ddxDriverMajorVersion, int* ddxDriverMinorVersion, int* ddxDriverPatchVersion, char** clientDriverName); -extern Bool DRICreateContext(ScreenPtr pScreen, +extern _X_EXPORT Bool DRICreateContext(ScreenPtr pScreen, VisualPtr visual, XID context, drm_context_t * pHWContext); -extern Bool DRIDestroyContext(ScreenPtr pScreen, XID context); +extern _X_EXPORT Bool DRIDestroyContext(ScreenPtr pScreen, XID context); -extern Bool DRIContextPrivDelete(pointer pResource, XID id); +extern _X_EXPORT Bool DRIContextPrivDelete(pointer pResource, XID id); -extern Bool DRICreateDrawable(ScreenPtr pScreen, +extern _X_EXPORT Bool DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, drm_drawable_t * hHWDrawable); -extern Bool DRIDestroyDrawable(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable); -extern Bool DRIDrawablePrivDelete(pointer pResource, +extern _X_EXPORT Bool DRIDrawablePrivDelete(pointer pResource, XID id); -extern Bool DRIGetDrawableInfo(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIGetDrawableInfo(ScreenPtr pScreen, DrawablePtr pDrawable, unsigned int* indx, unsigned int* stamp, @@ -265,7 +265,7 @@ extern Bool DRIGetDrawableInfo(ScreenPtr pScreen, int* numBackClipRects, drm_clip_rect_t ** pBackClipRects); -extern Bool DRIGetDeviceInfo(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIGetDeviceInfo(ScreenPtr pScreen, drm_handle_t * hFrameBuffer, int* fbOrigin, int* fbSize, @@ -273,109 +273,109 @@ extern Bool DRIGetDeviceInfo(ScreenPtr pScreen, int* devPrivateSize, void** pDevPrivate); -extern DRIInfoPtr DRICreateInfoRec(void); +extern _X_EXPORT DRIInfoPtr DRICreateInfoRec(void); -extern void DRIDestroyInfoRec(DRIInfoPtr DRIInfo); +extern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo); -extern Bool DRIFinishScreenInit(ScreenPtr pScreen); +extern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen); -extern void DRIWakeupHandler(pointer wakeupData, +extern _X_EXPORT void DRIWakeupHandler(pointer wakeupData, int result, pointer pReadmask); -extern void DRIBlockHandler(pointer blockData, +extern _X_EXPORT void DRIBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask); -extern void DRIDoWakeupHandler(int screenNum, +extern _X_EXPORT void DRIDoWakeupHandler(int screenNum, pointer wakeupData, unsigned long result, pointer pReadmask); -extern void DRIDoBlockHandler(int screenNum, +extern _X_EXPORT void DRIDoBlockHandler(int screenNum, pointer blockData, pointer pTimeout, pointer pReadmask); -extern void DRISwapContext(int drmFD, +extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx); -extern void *DRIGetContextStore(DRIContextPrivPtr context); +extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context); -extern void DRIWindowExposures(WindowPtr pWin, +extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg); -extern Bool DRIDestroyWindow(WindowPtr pWin); +extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin); -extern void DRICopyWindow(WindowPtr pWin, +extern _X_EXPORT void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); -extern int DRIValidateTree(WindowPtr pParent, +extern _X_EXPORT int DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); -extern void DRIPostValidateTree(WindowPtr pParent, +extern _X_EXPORT void DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); -extern void DRIClipNotify(WindowPtr pWin, +extern _X_EXPORT void DRIClipNotify(WindowPtr pWin, int dx, int dy); -extern CARD32 DRIGetDrawableIndex(WindowPtr pWin); +extern _X_EXPORT CARD32 DRIGetDrawableIndex(WindowPtr pWin); -extern void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg); +extern _X_EXPORT void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg); -extern void DRILock(ScreenPtr pScreen, int flags); +extern _X_EXPORT void DRILock(ScreenPtr pScreen, int flags); -extern void DRIUnlock(ScreenPtr pScreen); +extern _X_EXPORT void DRIUnlock(ScreenPtr pScreen); -extern DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen); +extern _X_EXPORT DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen); -extern void *DRIGetSAREAPrivate(ScreenPtr pScreen); +extern _X_EXPORT void *DRIGetSAREAPrivate(ScreenPtr pScreen); -extern unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, +extern _X_EXPORT unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, CARD32 drawable_index); -extern DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen, +extern _X_EXPORT DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen, drm_context_t * pHWContext, DRIContextFlags flags); -extern DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, +extern _X_EXPORT DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, drm_context_t hHWContext, DRIContextFlags flags); -extern Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv); +extern _X_EXPORT Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv); -extern drm_context_t DRIGetContext(ScreenPtr pScreen); +extern _X_EXPORT drm_context_t DRIGetContext(ScreenPtr pScreen); -extern void DRIQueryVersion(int *majorVersion, +extern _X_EXPORT void DRIQueryVersion(int *majorVersion, int *minorVersion, int *patchVersion); -extern void DRIAdjustFrame(int scrnIndex, int x, int y, int flags); +extern _X_EXPORT void DRIAdjustFrame(int scrnIndex, int x, int y, int flags); -extern void DRIMoveBuffersHelper(ScreenPtr pScreen, +extern _X_EXPORT void DRIMoveBuffersHelper(ScreenPtr pScreen, int dx, int dy, int *xdir, int *ydir, RegionPtr reg); -extern char *DRICreatePCIBusID(const struct pci_device *PciInfo); +extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *PciInfo); -extern int drmInstallSIGIOHandler(int fd, void (*f)(int, void *, void *)); -extern int drmRemoveSIGIOHandler(int fd); -extern int DRIMasterFD(ScrnInfoPtr pScrn); +extern _X_EXPORT int drmInstallSIGIOHandler(int fd, void (*f)(int, void *, void *)); +extern _X_EXPORT int drmRemoveSIGIOHandler(int fd); +extern _X_EXPORT int DRIMasterFD(ScrnInfoPtr pScrn); -extern void *DRIMasterSareaPointer(ScrnInfoPtr pScrn); +extern _X_EXPORT void *DRIMasterSareaPointer(ScrnInfoPtr pScrn); -extern drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn); +extern _X_EXPORT drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn); -extern void DRIGetTexOffsetFuncs(ScreenPtr pScreen, +extern _X_EXPORT void DRIGetTexOffsetFuncs(ScreenPtr pScreen, DRITexOffsetStartProcPtr *texOffsetStartFunc, DRITexOffsetFinishProcPtr *texOffsetFinishFunc); diff --git a/xorg-server/hw/xfree86/dri/xf86dri.c b/xorg-server/hw/xfree86/dri/xf86dri.c index ea11b38ee..d3e5e688a 100644 --- a/xorg-server/hw/xfree86/dri/xf86dri.c +++ b/xorg-server/hw/xfree86/dri/xf86dri.c @@ -42,8 +42,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "xf86.h" -#define NEED_REPLIES -#define NEED_EVENTS #include #include #include "misc.h" @@ -216,8 +214,8 @@ ProcXF86DRIOpenConnection( rep.busIdStringLength = 0; if (busIdString) rep.busIdStringLength = strlen(busIdString); - rep.length = (SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) + - ((rep.busIdStringLength + 3) & ~3)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) + + pad_to_int32(rep.busIdStringLength)); rep.hSAREALow = (CARD32)(hSAREA & 0xffffffff); #if defined(LONG64) && !defined(__linux__) @@ -302,9 +300,9 @@ ProcXF86DRIGetClientDriverName( rep.clientDriverNameLength = 0; if (clientDriverName) rep.clientDriverNameLength = strlen(clientDriverName); - rep.length = (SIZEOF(xXF86DRIGetClientDriverNameReply) - + rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetClientDriverNameReply) - SIZEOF(xGenericReply) + - ((rep.clientDriverNameLength + 3) & ~3)) >> 2; + pad_to_int32(rep.clientDriverNameLength)); WriteToClient(client, sizeof(xXF86DRIGetClientDriverNameReply), (char *)&rep); @@ -408,8 +406,8 @@ ProcXF86DRIDestroyDrawable( { REQUEST(xXF86DRIDestroyDrawableReq); DrawablePtr pDrawable; - REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq); int rc; + REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; @@ -517,7 +515,7 @@ ProcXF86DRIGetDrawableInfo( rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects; } - rep.length = ((rep.length + 3) & ~3) >> 2; + rep.length = bytes_to_int32(rep.length); WriteToClient(client, sizeof(xXF86DRIGetDrawableInfoReply), (char *)&rep); @@ -576,9 +574,9 @@ ProcXF86DRIGetDeviceInfo( rep.length = 0; if (rep.devPrivateSize) { - rep.length = (SIZEOF(xXF86DRIGetDeviceInfoReply) - + rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetDeviceInfoReply) - SIZEOF(xGenericReply) + - ((rep.devPrivateSize + 3) & ~3)) >> 2; + pad_to_int32(rep.devPrivateSize)); } WriteToClient(client, sizeof(xXF86DRIGetDeviceInfoReply), (char *)&rep); diff --git a/xorg-server/hw/xfree86/dri2/Makefile.am b/xorg-server/hw/xfree86/dri2/Makefile.am index e5bd16bd2..c9fdde2f8 100644 --- a/xorg-server/hw/xfree86/dri2/Makefile.am +++ b/xorg-server/hw/xfree86/dri2/Makefile.am @@ -1,7 +1,7 @@ libdri2_la_LTLIBRARIES = libdri2.la libdri2_la_CFLAGS = \ -DHAVE_XORG_CONFIG_H \ - @GL_CFLAGS@ \ + @DRI_CFLAGS@ \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRI2PROTO_CFLAGS@ @LIBDRM_CFLAGS@ \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support/bus diff --git a/xorg-server/hw/xfree86/dri2/Makefile.in b/xorg-server/hw/xfree86/dri2/Makefile.in index 25e0ff702..569c4b04a 100644 --- a/xorg-server/hw/xfree86/dri2/Makefile.in +++ b/xorg-server/hw/xfree86/dri2/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/dri2 DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -123,9 +128,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -154,7 +162,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -163,9 +173,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -204,12 +218,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -229,7 +244,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -292,6 +306,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -316,7 +331,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -379,7 +396,7 @@ top_srcdir = @top_srcdir@ libdri2_la_LTLIBRARIES = libdri2.la libdri2_la_CFLAGS = \ -DHAVE_XORG_CONFIG_H \ - @GL_CFLAGS@ \ + @DRI_CFLAGS@ \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRI2PROTO_CFLAGS@ @LIBDRM_CFLAGS@ \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support/bus diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c index 580383dbc..d15ced112 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.c +++ b/xorg-server/hw/xfree86/dri2/dri2.c @@ -39,6 +39,7 @@ #include "scrnintstr.h" #include "windowstr.h" #include "dri2.h" +#include "xf86VGAarbiter.h" #include "xf86.h" @@ -53,7 +54,7 @@ typedef struct _DRI2Drawable { unsigned int refCount; int width; int height; - DRI2Buffer2Ptr *buffers; + DRI2BufferPtr *buffers; int bufferCount; unsigned int pendingSequence; } DRI2DrawableRec, *DRI2DrawablePtr; @@ -64,9 +65,6 @@ typedef struct _DRI2Screen { int fd; unsigned int lastSequence; - DRI2CreateBuffersProcPtr CreateBuffers; - DRI2DestroyBuffersProcPtr DestroyBuffers; - DRI2CreateBufferProcPtr CreateBuffer; DRI2DestroyBufferProcPtr DestroyBuffer; DRI2CopyRegionProcPtr CopyRegion; @@ -155,13 +153,13 @@ find_attachment(DRI2DrawablePtr pPriv, unsigned attachment) return -1; } -static DRI2Buffer2Ptr +static DRI2BufferPtr allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, DRI2DrawablePtr pPriv, unsigned int attachment, unsigned int format, int dimensions_match) { - DRI2Buffer2Ptr buffer; + DRI2BufferPtr buffer; int old_buf; old_buf = find_attachment(pPriv, attachment); @@ -178,173 +176,91 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, return buffer; } -static DRI2Buffer2Ptr * +static DRI2BufferPtr * do_get_buffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count, int has_format) { DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); - DRI2Buffer2Ptr *buffers; + DRI2BufferPtr *buffers; int need_real_front = 0; int need_fake_front = 0; int have_fake_front = 0; int front_format = 0; - const int dimensions_match = (pDraw->width == pPriv->width) - && (pDraw->height == pPriv->height); + int dimensions_match; int i; + if (!pPriv) { + *width = pDraw->width; + *height = pDraw->height; + *out_count = 0; + return NULL; + } - buffers = xalloc((count + 1) * sizeof(buffers[0])); - - if (ds->CreateBuffer) { - /* Version 2 API with CreateBuffer */ - for (i = 0; i < count; i++) { - const unsigned attachment = *(attachments++); - const unsigned format = (has_format) ? *(attachments++) : 0; - - buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, - format, dimensions_match); - - /* If the drawable is a window and the front-buffer is requested, - * silently add the fake front-buffer to the list of requested - * attachments. The counting logic in the loop accounts for the case - * where the client requests both the fake and real front-buffer. - */ - if (attachment == DRI2BufferBackLeft) { - need_real_front++; - front_format = format; - } - - if (attachment == DRI2BufferFrontLeft) { - need_real_front--; - front_format = format; - - if (pDraw->type == DRAWABLE_WINDOW) { - need_fake_front++; - } - } - - if (pDraw->type == DRAWABLE_WINDOW) { - if (attachment == DRI2BufferFakeFrontLeft) { - need_fake_front--; - have_fake_front = 1; - } - } - } + dimensions_match = (pDraw->width == pPriv->width) + && (pDraw->height == pPriv->height); - if (need_real_front > 0) { - buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, - DRI2BufferFrontLeft, - front_format, dimensions_match); - } + buffers = xalloc((count + 1) * sizeof(buffers[0])); - if (need_fake_front > 0) { - buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, - DRI2BufferFakeFrontLeft, - front_format, dimensions_match); - have_fake_front = 1; + for (i = 0; i < count; i++) { + const unsigned attachment = *(attachments++); + const unsigned format = (has_format) ? *(attachments++) : 0; + + buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, + format, dimensions_match); + + /* If the drawable is a window and the front-buffer is requested, + * silently add the fake front-buffer to the list of requested + * attachments. The counting logic in the loop accounts for the case + * where the client requests both the fake and real front-buffer. + */ + if (attachment == DRI2BufferBackLeft) { + need_real_front++; + front_format = format; } - *out_count = i; - + if (attachment == DRI2BufferFrontLeft) { + need_real_front--; + front_format = format; - if (pPriv->buffers != NULL) { - for (i = 0; i < pPriv->bufferCount; i++) { - if (pPriv->buffers[i] != NULL) { - (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); - } + if (pDraw->type == DRAWABLE_WINDOW) { + need_fake_front++; } - - xfree(pPriv->buffers); } - } else { - DRI2BufferPtr buffers1; - unsigned int temp_buf[32]; - unsigned int *temp = temp_buf; - int i; - int buffers_match = 1; - /* Version 1 API with CreateBuffers */ - - if ((count + 1) > 32) { - temp = xalloc((count + 1) * sizeof(temp[0])); - } - - for (i = 0; i < count; i++) { - const unsigned attachment = *(attachments++); - - /* Version 1 doesn't deal with the format at all */ - if (has_format) - attachments++; - - /* - * Make sure the client also gets the front buffer when - * it asks for a back buffer - */ - if (attachment == DRI2BufferBackLeft) - need_real_front++; - - /* - * If the drawable is a window and the front-buffer is requested, - * silently add the fake front-buffer to the list of requested - * attachments. The counting logic in the loop accounts for the - * case where the client requests both the fake and real - * front-buffer. - */ - if (attachment == DRI2BufferFrontLeft) { - need_real_front--; - if (pDraw->type == DRAWABLE_WINDOW) - need_fake_front++; - } - if (pDraw->type == DRAWABLE_WINDOW && - attachment == DRI2BufferFakeFrontLeft) - { + if (pDraw->type == DRAWABLE_WINDOW) { + if (attachment == DRI2BufferFakeFrontLeft) { need_fake_front--; have_fake_front = 1; } - - temp[i] = attachment; - } - - if (need_real_front > 0) - temp[count++] = DRI2BufferFrontLeft; - - if (need_fake_front > 0) { - temp[count++] = DRI2BufferFakeFrontLeft; - have_fake_front = 1; } + } - if (count != pPriv->bufferCount) - buffers_match = 0; - else { - for (i = 0; i < count; i++) - if (pPriv->buffers[i]->attachment != temp[i]) { - buffers_match = 0; - break; - } - } - if (pPriv->buffers == NULL || !dimensions_match || !buffers_match) - { - buffers1 = (*ds->CreateBuffers)(pDraw, temp, count); - if (pPriv->buffers != NULL) - (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], - pPriv->bufferCount); - } - else - buffers1 = (DRI2BufferPtr) pPriv->buffers[0]; + if (need_real_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFrontLeft, + front_format, dimensions_match); + } - for (i = 0; i < count; i++) - buffers[i] = (DRI2Buffer2Ptr) &buffers1[i]; + if (need_fake_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFakeFrontLeft, + front_format, dimensions_match); + have_fake_front = 1; + } - *out_count = count; + *out_count = i; - if (pPriv->buffers) - xfree (pPriv->buffers); - if (temp != temp_buf) { - xfree(temp); + if (pPriv->buffers != NULL) { + for (i = 0; i < pPriv->bufferCount; i++) { + if (pPriv->buffers[i] != NULL) { + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + } } + + xfree(pPriv->buffers); } pPriv->buffers = buffers; @@ -376,7 +292,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, return pPriv->buffers; } -DRI2Buffer2Ptr * +DRI2BufferPtr * DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { @@ -384,7 +300,7 @@ DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, out_count, FALSE); } -DRI2Buffer2Ptr * +DRI2BufferPtr * DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { @@ -441,14 +357,8 @@ DRI2DestroyDrawable(DrawablePtr pDraw) if (pPriv->buffers != NULL) { int i; - if (ds->DestroyBuffer) { - for (i = 0; i < pPriv->bufferCount; i++) { - (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); - } - } else { - (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], - pPriv->bufferCount); - } + for (i = 0; i < pPriv->bufferCount; i++) + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); xfree(pPriv->buffers); } @@ -502,6 +412,15 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) { DRI2ScreenPtr ds; + if (info->version < 3) + return FALSE; + + if (!xf86VGAarbiterAllowDRI(pScreen)) { + xf86DrvMsg(pScreen->myNum, X_WARNING, + "[DRI2] Direct rendering is not supported when VGA arb is necessary for the device\n"); + return FALSE; + } + ds = xalloc(sizeof *ds); if (!ds) return FALSE; @@ -510,32 +429,8 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) ds->driverName = info->driverName; ds->deviceName = info->deviceName; - /* Prefer the new one-at-a-time buffer API */ - if (info->version >= 2 && info->CreateBuffer && info->DestroyBuffer) { - ds->CreateBuffer = info->CreateBuffer; - ds->DestroyBuffer = info->DestroyBuffer; - ds->CreateBuffers = NULL; - ds->DestroyBuffers = NULL; - } else if (info->CreateBuffers && info->DestroyBuffers) { - xf86DrvMsg(pScreen->myNum, X_WARNING, - "[DRI2] Version 1 API (broken front buffer rendering)\n"); - ds->CreateBuffer = NULL; - ds->DestroyBuffer = NULL; - ds->CreateBuffers = info->CreateBuffers; - ds->DestroyBuffers = info->DestroyBuffers; - } else { - xf86DrvMsg(pScreen->myNum, X_ERROR, - "[DRI2] Missing buffer management functions\n"); - xfree(ds); - return FALSE; - } - - if (!info->CopyRegion) { - xf86DrvMsg(pScreen->myNum, X_ERROR, - "[DRI2] Missing copy region function\n"); - xfree(ds); - return FALSE; - } + ds->CreateBuffer = info->CreateBuffer; + ds->DestroyBuffer = info->DestroyBuffer; ds->CopyRegion = info->CopyRegion; dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); diff --git a/xorg-server/hw/xfree86/dri2/dri2.h b/xorg-server/hw/xfree86/dri2/dri2.h index f3692673a..175471aae 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.h +++ b/xorg-server/hw/xfree86/dri2/dri2.h @@ -35,26 +35,18 @@ #include -/* Version 1 structure (for ABI compatibility) */ +/* Version 2 structure (with format at the end) */ typedef struct { unsigned int attachment; unsigned int name; unsigned int pitch; unsigned int cpp; unsigned int flags; + unsigned int format; void *driverPrivate; } DRI2BufferRec, *DRI2BufferPtr; -/* Version 2 structure (with format at the end) */ -typedef struct { - unsigned int attachment; - unsigned int name; - unsigned int pitch; - unsigned int cpp; - unsigned int flags; - void *driverPrivate; - unsigned int format; -} DRI2Buffer2Rec, *DRI2Buffer2Ptr; +typedef DRI2BufferRec DRI2Buffer2Rec, *DRI2Buffer2Ptr; typedef DRI2BufferPtr (*DRI2CreateBuffersProcPtr)(DrawablePtr pDraw, unsigned int *attachments, @@ -70,16 +62,16 @@ typedef void (*DRI2CopyRegionProcPtr)(DrawablePtr pDraw, typedef void (*DRI2WaitProcPtr)(WindowPtr pWin, unsigned int sequence); -typedef DRI2Buffer2Ptr (*DRI2CreateBufferProcPtr)(DrawablePtr pDraw, +typedef DRI2BufferPtr (*DRI2CreateBufferProcPtr)(DrawablePtr pDraw, unsigned int attachment, unsigned int format); typedef void (*DRI2DestroyBufferProcPtr)(DrawablePtr pDraw, - DRI2Buffer2Ptr buffer); + DRI2BufferPtr buffer); /** * Version of the DRI2InfoRec structure defined in this header */ -#define DRI2INFOREC_VERSION 2 +#define DRI2INFOREC_VERSION 3 typedef struct { unsigned int version; /**< Version of this struct */ @@ -87,46 +79,38 @@ typedef struct { const char *driverName; const char *deviceName; - DRI2CreateBuffersProcPtr CreateBuffers; - DRI2DestroyBuffersProcPtr DestroyBuffers; - DRI2CopyRegionProcPtr CopyRegion; - DRI2WaitProcPtr Wait; - - /** - * \name Fields added in version 2 of the structure. - */ - /*@{*/ DRI2CreateBufferProcPtr CreateBuffer; DRI2DestroyBufferProcPtr DestroyBuffer; - /*@}*/ + DRI2CopyRegionProcPtr CopyRegion; + DRI2WaitProcPtr Wait; } DRI2InfoRec, *DRI2InfoPtr; -Bool DRI2ScreenInit(ScreenPtr pScreen, +extern _X_EXPORT Bool DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info); -void DRI2CloseScreen(ScreenPtr pScreen); +extern _X_EXPORT void DRI2CloseScreen(ScreenPtr pScreen); -Bool DRI2Connect(ScreenPtr pScreen, +extern _X_EXPORT Bool DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd, const char **driverName, const char **deviceName); -Bool DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic); +extern _X_EXPORT Bool DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic); -int DRI2CreateDrawable(DrawablePtr pDraw); +extern _X_EXPORT int DRI2CreateDrawable(DrawablePtr pDraw); -void DRI2DestroyDrawable(DrawablePtr pDraw); +extern _X_EXPORT void DRI2DestroyDrawable(DrawablePtr pDraw); -DRI2Buffer2Ptr *DRI2GetBuffers(DrawablePtr pDraw, +extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count); -int DRI2CopyRegion(DrawablePtr pDraw, +extern _X_EXPORT int DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion, unsigned int dest, unsigned int src); @@ -149,7 +133,7 @@ int DRI2CopyRegion(DrawablePtr pDraw, */ extern _X_EXPORT void DRI2Version(int *major, int *minor); -extern _X_EXPORT DRI2Buffer2Ptr *DRI2GetBuffersWithFormat(DrawablePtr pDraw, +extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count); diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c index 3c06174cb..72f9a448b 100644 --- a/xorg-server/hw/xfree86/dri2/dri2ext.c +++ b/xorg-server/hw/xfree86/dri2/dri2ext.c @@ -34,7 +34,6 @@ #include #endif -#define NEED_REPLIES #include #include #include @@ -54,10 +53,10 @@ static ExtensionEntry *dri2Extension; static RESTYPE dri2DrawableRes; static Bool -validDrawable(ClientPtr client, XID drawable, +validDrawable(ClientPtr client, XID drawable, Mask access_mode, DrawablePtr *pDrawable, int *status) { - *status = dixLookupDrawable(pDrawable, drawable, client, 0, DixReadAccess); + *status = dixLookupDrawable(pDrawable, drawable, client, 0, access_mode); if (*status != Success) { client->errorValue = drawable; return FALSE; @@ -106,7 +105,8 @@ ProcDRI2Connect(ClientPtr client) const char *deviceName; REQUEST_SIZE_MATCH(xDRI2ConnectReq); - if (!validDrawable(client, stuff->window, &pDraw, &status)) + if (!validDrawable(client, stuff->window, DixGetAttrAccess, + &pDraw, &status)) return status; rep.type = X_Reply; @@ -141,7 +141,8 @@ ProcDRI2Authenticate(ClientPtr client) int status; REQUEST_SIZE_MATCH(xDRI2AuthenticateReq); - if (!validDrawable(client, stuff->window, &pDraw, &status)) + if (!validDrawable(client, stuff->window, DixGetAttrAccess, + &pDraw, &status)) return status; rep.type = X_Reply; @@ -162,7 +163,8 @@ ProcDRI2CreateDrawable(ClientPtr client) REQUEST_SIZE_MATCH(xDRI2CreateDrawableReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixAddAccess, + &pDrawable, &status)) return status; status = DRI2CreateDrawable(pDrawable); @@ -185,7 +187,8 @@ ProcDRI2DestroyDrawable(ClientPtr client) int status; REQUEST_SIZE_MATCH(xDRI2DestroyDrawableReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixRemoveAccess, + &pDrawable, &status)) return status; FreeResourceByType(stuff->drawable, dri2DrawableRes, FALSE); @@ -196,7 +199,7 @@ ProcDRI2DestroyDrawable(ClientPtr client) static void send_buffers_reply(ClientPtr client, DrawablePtr pDrawable, - DRI2Buffer2Ptr *buffers, int count, int width, int height) + DRI2BufferPtr *buffers, int count, int width, int height) { xDRI2GetBuffersReply rep; int skip = 0; @@ -246,12 +249,13 @@ ProcDRI2GetBuffers(ClientPtr client) { REQUEST(xDRI2GetBuffersReq); DrawablePtr pDrawable; - DRI2Buffer2Ptr *buffers; + DRI2BufferPtr *buffers; int status, width, height, count; unsigned int *attachments; REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * 4); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess, + &pDrawable, &status)) return status; attachments = (unsigned int *) &stuff[1]; @@ -269,12 +273,13 @@ ProcDRI2GetBuffersWithFormat(ClientPtr client) { REQUEST(xDRI2GetBuffersReq); DrawablePtr pDrawable; - DRI2Buffer2Ptr *buffers; + DRI2BufferPtr *buffers; int status, width, height, count; unsigned int *attachments; REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * (2 * 4)); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess, + &pDrawable, &status)) return status; attachments = (unsigned int *) &stuff[1]; @@ -297,7 +302,8 @@ ProcDRI2CopyRegion(ClientPtr client) REQUEST_SIZE_MATCH(xDRI2CopyRegionReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixWriteAccess, + &pDrawable, &status)) return status; VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess); diff --git a/xorg-server/hw/xfree86/exa/Makefile.in b/xorg-server/hw/xfree86/exa/Makefile.in index 8861fed08..482afe5a7 100644 --- a/xorg-server/hw/xfree86/exa/Makefile.in +++ b/xorg-server/hw/xfree86/exa/Makefile.in @@ -43,8 +43,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xfree86/exa ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -54,7 +57,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -107,6 +111,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -127,9 +132,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -158,7 +166,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -167,9 +177,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -208,12 +222,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -233,7 +248,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -243,6 +257,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -256,11 +271,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -296,6 +310,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -320,7 +335,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -343,6 +357,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -374,7 +389,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/exa/examodule.c b/xorg-server/hw/xfree86/exa/examodule.c index 27607a1ac..601288c73 100644 --- a/xorg-server/hw/xfree86/exa/examodule.c +++ b/xorg-server/hw/xfree86/exa/examodule.c @@ -146,7 +146,7 @@ exaDDXDriverInit(ScreenPtr pScreen) pExaScr->optimize_migration = xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_OPTIMIZE_MIGRATION, - FALSE); + TRUE); } if (xf86ReturnOptValBool(pScreenPriv->options, diff --git a/xorg-server/hw/xfree86/fbdevhw/Makefile.in b/xorg-server/hw/xfree86/fbdevhw/Makefile.in index e4676b679..0c615d0a5 100644 --- a/xorg-server/hw/xfree86/fbdevhw/Makefile.in +++ b/xorg-server/hw/xfree86/fbdevhw/Makefile.in @@ -44,8 +44,11 @@ DIST_COMMON = README $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/cpprules.in subdir = hw/xfree86/fbdevhw ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -55,7 +58,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -112,6 +116,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -132,9 +137,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -163,7 +171,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -172,9 +182,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -213,12 +227,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -238,7 +253,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -248,6 +262,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -261,11 +276,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -301,6 +315,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -325,7 +340,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -348,6 +362,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -379,7 +394,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c index 5269277ef..00ebd6b39 100644 --- a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c +++ b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c @@ -17,16 +17,10 @@ #include "fbdevhw.h" #include "fbpriv.h" -#if 0 -/* kernel header doesn't work with -ansi */ -# include "asm/page.h" /* #define for PAGE_* */ -#else -# define PAGE_MASK (~(getpagesize() - 1)) -#endif +#define PAGE_MASK (~(getpagesize() - 1)) #include "globals.h" -#define DPMS_SERVER -#include +#include #define DEBUG 0 @@ -65,20 +59,7 @@ _X_EXPORT XF86ModuleData fbdevhwModuleData = { static pointer fbdevhwSetup(pointer module, pointer opts, int *errmaj, int *errmin) { - const char *osname; - - /* Check that we're being loaded on a Linux system */ - LoaderGetOS(&osname, NULL, NULL, NULL); - if (!osname || strcmp(osname, "linux") != 0) { - if (errmaj) - *errmaj = LDR_BADOS; - if (errmin) - *errmin = 0; - return NULL; - } else { - /* OK */ - return (pointer)1; - } + return (pointer)1; } #include @@ -152,6 +133,17 @@ fbdevHWFreeRec(ScrnInfoPtr pScrn) FBDEVHWPTRLVAL(pScrn) = NULL; } +int +fbdevHWGetFD(ScrnInfoPtr pScrn) +{ + fbdevHWPtr fPtr; + + fbdevHWGetRec(pScrn); + fPtr = FBDEVHWPTR(pScrn); + + return fPtr->fd; +} + /* -------------------------------------------------------------------- */ /* some helpers for printing debug informations */ @@ -223,10 +215,8 @@ xfree2fbdev_timing(DisplayModePtr mode, struct fb_var_screeninfo *var) var->sync |= FB_SYNC_VERT_HIGH_ACT; if (mode->Flags & V_PCSYNC) var->sync |= FB_SYNC_COMP_HIGH_ACT; -#if 1 /* Badly needed for PAL/NTSC on Amiga (amifb)!! [geert] */ if (mode->Flags & V_BCAST) var->sync |= FB_SYNC_BROADCAST; -#endif if (mode->Flags & V_INTERLACE) var->vmode = FB_VMODE_INTERLACED; else if (mode->Flags & V_DBLSCAN) @@ -270,10 +260,8 @@ fbdev2xfree_timing(struct fb_var_screeninfo *var, DisplayModePtr mode) mode->Flags |= var->sync & FB_SYNC_HOR_HIGH_ACT ? V_PHSYNC : V_NHSYNC; mode->Flags |= var->sync & FB_SYNC_VERT_HIGH_ACT ? V_PVSYNC : V_NVSYNC; mode->Flags |= var->sync & FB_SYNC_COMP_HIGH_ACT ? V_PCSYNC : V_NCSYNC; -#if 1 /* Badly needed for PAL/NTSC on Amiga (amifb)!! [geert] */ if (var->sync & FB_SYNC_BROADCAST) mode->Flags |= V_BCAST; -#endif if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) mode->Flags |= V_INTERLACE; else if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) @@ -332,10 +320,9 @@ fbdev_open_pci(struct pci_device * pPci, char **namep) return fd; } + close(fd); } } - - close(fd); } diff --git a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h index 614dc6fed..bc46b9c4f 100644 --- a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h +++ b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h @@ -13,50 +13,52 @@ #define FBDEVHW_TEXT 3 /* Text/attributes */ #define FBDEVHW_VGA_PLANES 4 /* EGA/VGA planes */ -Bool fbdevHWGetRec(ScrnInfoPtr pScrn); -void fbdevHWFreeRec(ScrnInfoPtr pScrn); - -Bool fbdevHWProbe(struct pci_device * pPci, char *device, char **namep); -Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * pPci, char *device); - -char* fbdevHWGetName(ScrnInfoPtr pScrn); -int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp); -int fbdevHWGetLineLength(ScrnInfoPtr pScrn); -int fbdevHWGetType(ScrnInfoPtr pScrn); -int fbdevHWGetVidmem(ScrnInfoPtr pScrn); - -void* fbdevHWMapVidmem(ScrnInfoPtr pScrn); -int fbdevHWLinearOffset(ScrnInfoPtr pScrn); -Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn); -void* fbdevHWMapMMIO(ScrnInfoPtr pScrn); -Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn); - -void fbdevHWSetVideoModes(ScrnInfoPtr pScrn); -DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn); -void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn); -Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); -void fbdevHWSave(ScrnInfoPtr pScrn); -void fbdevHWRestore(ScrnInfoPtr pScrn); - -void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, +extern _X_EXPORT Bool fbdevHWGetRec(ScrnInfoPtr pScrn); +extern _X_EXPORT void fbdevHWFreeRec(ScrnInfoPtr pScrn); + +extern _X_EXPORT int fbdevHWGetFD(ScrnInfoPtr pScrn); + +extern _X_EXPORT Bool fbdevHWProbe(struct pci_device * pPci, char *device, char **namep); +extern _X_EXPORT Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * pPci, char *device); + +extern _X_EXPORT char* fbdevHWGetName(ScrnInfoPtr pScrn); +extern _X_EXPORT int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp); +extern _X_EXPORT int fbdevHWGetLineLength(ScrnInfoPtr pScrn); +extern _X_EXPORT int fbdevHWGetType(ScrnInfoPtr pScrn); +extern _X_EXPORT int fbdevHWGetVidmem(ScrnInfoPtr pScrn); + +extern _X_EXPORT void* fbdevHWMapVidmem(ScrnInfoPtr pScrn); +extern _X_EXPORT int fbdevHWLinearOffset(ScrnInfoPtr pScrn); +extern _X_EXPORT Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn); +extern _X_EXPORT void* fbdevHWMapMMIO(ScrnInfoPtr pScrn); +extern _X_EXPORT Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn); + +extern _X_EXPORT void fbdevHWSetVideoModes(ScrnInfoPtr pScrn); +extern _X_EXPORT DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn); +extern _X_EXPORT void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn); +extern _X_EXPORT Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); +extern _X_EXPORT void fbdevHWSave(ScrnInfoPtr pScrn); +extern _X_EXPORT void fbdevHWRestore(ScrnInfoPtr pScrn); + +extern _X_EXPORT void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual); -ModeStatus fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags); -Bool fbdevHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags); -void fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags); -Bool fbdevHWEnterVT(int scrnIndex, int flags); -void fbdevHWLeaveVT(int scrnIndex, int flags); -void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags); - -Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode); - -xf86SwitchModeProc *fbdevHWSwitchModeWeak(void); -xf86AdjustFrameProc *fbdevHWAdjustFrameWeak(void); -xf86EnterVTProc *fbdevHWEnterVTWeak(void); -xf86LeaveVTProc *fbdevHWLeaveVTWeak(void); -xf86ValidModeProc *fbdevHWValidModeWeak(void); -xf86DPMSSetProc *fbdevHWDPMSSetWeak(void); -xf86LoadPaletteProc *fbdevHWLoadPaletteWeak(void); -SaveScreenProcPtr fbdevHWSaveScreenWeak(void); +extern _X_EXPORT ModeStatus fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags); +extern _X_EXPORT Bool fbdevHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags); +extern _X_EXPORT void fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags); +extern _X_EXPORT Bool fbdevHWEnterVT(int scrnIndex, int flags); +extern _X_EXPORT void fbdevHWLeaveVT(int scrnIndex, int flags); +extern _X_EXPORT void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags); + +extern _X_EXPORT Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode); + +extern _X_EXPORT xf86SwitchModeProc *fbdevHWSwitchModeWeak(void); +extern _X_EXPORT xf86AdjustFrameProc *fbdevHWAdjustFrameWeak(void); +extern _X_EXPORT xf86EnterVTProc *fbdevHWEnterVTWeak(void); +extern _X_EXPORT xf86LeaveVTProc *fbdevHWLeaveVTWeak(void); +extern _X_EXPORT xf86ValidModeProc *fbdevHWValidModeWeak(void); +extern _X_EXPORT xf86DPMSSetProc *fbdevHWDPMSSetWeak(void); +extern _X_EXPORT xf86LoadPaletteProc *fbdevHWLoadPaletteWeak(void); +extern _X_EXPORT SaveScreenProcPtr fbdevHWSaveScreenWeak(void); #endif diff --git a/xorg-server/hw/xfree86/i2c/Makefile.am b/xorg-server/hw/xfree86/i2c/Makefile.am index a16d88071..0b80cc8a6 100644 --- a/xorg-server/hw/xfree86/i2c/Makefile.am +++ b/xorg-server/hw/xfree86/i2c/Makefile.am @@ -1,4 +1,4 @@ -noinst_LIBRARIES = libi2c.a +noinst_LTLIBRARIES = libi2c.la multimediadir = $(moduledir)/multimedia multimedia_LTLIBRARIES = \ @@ -10,7 +10,7 @@ multimedia_LTLIBRARIES = \ tda9885_drv.la \ uda1380_drv.la -libi2c_a_SOURCES = xf86i2c.c +libi2c_la_SOURCES = xf86i2c.c INCLUDES = $(XORG_INCS) diff --git a/xorg-server/hw/xfree86/i2c/Makefile.in b/xorg-server/hw/xfree86/i2c/Makefile.in index 5cb63d658..4439c7565 100644 --- a/xorg-server/hw/xfree86/i2c/Makefile.in +++ b/xorg-server/hw/xfree86/i2c/Makefile.in @@ -16,7 +16,6 @@ @SET_MAKE@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -40,8 +39,11 @@ subdir = hw/xfree86/i2c DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -51,15 +53,10 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libi2c_a_AR = $(AR) $(ARFLAGS) -libi2c_a_LIBADD = -am_libi2c_a_OBJECTS = xf86i2c.$(OBJEXT) -libi2c_a_OBJECTS = $(am_libi2c_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -82,7 +79,7 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(multimediadir)" "$(DESTDIR)$(sdkdir)" -LTLIBRARIES = $(multimedia_LTLIBRARIES) +LTLIBRARIES = $(multimedia_LTLIBRARIES) $(noinst_LTLIBRARIES) bt829_drv_la_LIBADD = am_bt829_drv_la_OBJECTS = bt829.lo bt829_module.lo bt829_drv_la_OBJECTS = $(am_bt829_drv_la_OBJECTS) @@ -95,6 +92,9 @@ fi1236_drv_la_OBJECTS = $(am_fi1236_drv_la_OBJECTS) fi1236_drv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(fi1236_drv_la_LDFLAGS) $(LDFLAGS) -o $@ +libi2c_la_LIBADD = +am_libi2c_la_OBJECTS = xf86i2c.lo +libi2c_la_OBJECTS = $(am_libi2c_la_OBJECTS) msp3430_drv_la_LIBADD = am_msp3430_drv_la_OBJECTS = msp3430.lo msp3430_module.lo msp3430_drv_la_OBJECTS = $(am_msp3430_drv_la_OBJECTS) @@ -135,12 +135,12 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libi2c_a_SOURCES) $(bt829_drv_la_SOURCES) \ - $(fi1236_drv_la_SOURCES) $(msp3430_drv_la_SOURCES) \ +SOURCES = $(bt829_drv_la_SOURCES) $(fi1236_drv_la_SOURCES) \ + $(libi2c_la_SOURCES) $(msp3430_drv_la_SOURCES) \ $(tda8425_drv_la_SOURCES) $(tda9850_drv_la_SOURCES) \ $(tda9885_drv_la_SOURCES) $(uda1380_drv_la_SOURCES) -DIST_SOURCES = $(libi2c_a_SOURCES) $(bt829_drv_la_SOURCES) \ - $(fi1236_drv_la_SOURCES) $(msp3430_drv_la_SOURCES) \ +DIST_SOURCES = $(bt829_drv_la_SOURCES) $(fi1236_drv_la_SOURCES) \ + $(libi2c_la_SOURCES) $(msp3430_drv_la_SOURCES) \ $(tda8425_drv_la_SOURCES) $(tda9850_drv_la_SOURCES) \ $(tda9885_drv_la_SOURCES) $(uda1380_drv_la_SOURCES) HEADERS = $(sdk_HEADERS) @@ -152,6 +152,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -172,9 +173,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -203,7 +207,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -212,9 +218,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -253,12 +263,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -278,7 +289,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -288,6 +298,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -301,11 +312,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -341,6 +351,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -365,7 +376,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -388,6 +398,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -419,13 +430,15 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libi2c.a +noinst_LTLIBRARIES = libi2c.la multimediadir = $(moduledir)/multimedia multimedia_LTLIBRARIES = \ bt829_drv.la \ @@ -436,7 +449,7 @@ multimedia_LTLIBRARIES = \ tda9885_drv.la \ uda1380_drv.la -libi2c_a_SOURCES = xf86i2c.c +libi2c_la_SOURCES = xf86i2c.c INCLUDES = $(XORG_INCS) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) sdk_HEADERS = xf86i2c.h bt829.h fi1236.h msp3430.h tda8425.h tda9850.h tda9885.h uda1380.h i2c_def.h @@ -492,13 +505,6 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libi2c.a: $(libi2c_a_OBJECTS) $(libi2c_a_DEPENDENCIES) - -rm -f libi2c.a - $(libi2c_a_AR) libi2c.a $(libi2c_a_OBJECTS) $(libi2c_a_LIBADD) - $(RANLIB) libi2c.a install-multimediaLTLIBRARIES: $(multimedia_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(multimediadir)" || $(MKDIR_P) "$(DESTDIR)$(multimediadir)" @@ -530,10 +536,21 @@ clean-multimediaLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done bt829_drv.la: $(bt829_drv_la_OBJECTS) $(bt829_drv_la_DEPENDENCIES) $(bt829_drv_la_LINK) -rpath $(multimediadir) $(bt829_drv_la_OBJECTS) $(bt829_drv_la_LIBADD) $(LIBS) fi1236_drv.la: $(fi1236_drv_la_OBJECTS) $(fi1236_drv_la_DEPENDENCIES) $(fi1236_drv_la_LINK) -rpath $(multimediadir) $(fi1236_drv_la_OBJECTS) $(fi1236_drv_la_LIBADD) $(LIBS) +libi2c.la: $(libi2c_la_OBJECTS) $(libi2c_la_DEPENDENCIES) + $(LINK) $(libi2c_la_OBJECTS) $(libi2c_la_LIBADD) $(LIBS) msp3430_drv.la: $(msp3430_drv_la_OBJECTS) $(msp3430_drv_la_DEPENDENCIES) $(msp3430_drv_la_LINK) -rpath $(multimediadir) $(msp3430_drv_la_OBJECTS) $(msp3430_drv_la_LIBADD) $(LIBS) tda8425_drv.la: $(tda8425_drv_la_OBJECTS) $(tda8425_drv_la_DEPENDENCIES) @@ -565,7 +582,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tda9885_module.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uda1380.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uda1380_module.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86i2c.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86i2c.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -698,7 +715,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(multimediadir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -731,7 +748,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-generic clean-libtool clean-multimediaLTLIBRARIES \ - clean-noinstLIBRARIES mostlyclean-am + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -803,7 +820,7 @@ uninstall-am: uninstall-multimediaLTLIBRARIES uninstall-sdkHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-multimediaLTLIBRARIES \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ diff --git a/xorg-server/hw/xfree86/i2c/bt829.h b/xorg-server/hw/xfree86/i2c/bt829.h index bca9d37de..06e488f04 100644 --- a/xorg-server/hw/xfree86/i2c/bt829.h +++ b/xorg-server/hw/xfree86/i2c/bt829.h @@ -36,12 +36,15 @@ typedef struct { CARD8 svideo_mux; } BT829Rec, *BT829Ptr; -BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_bt829_Detect bt829_Detect +extern _X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr); /* ATI card specific initialization */ #define BT829_ATI_ADDR_1 0x8A #define BT829_ATI_ADDR_2 0x88 -int bt829_ATIInit(BT829Ptr bt); + +#define xf86_bt829_ATIInit bt829_ATIInit +extern _X_EXPORT int bt829_ATIInit(BT829Ptr bt); #define BT829_NTSC 1 /* NTSC-M */ #define BT829_NTSC_JAPAN 2 /* NTSC-Japan */ @@ -50,24 +53,35 @@ int bt829_ATIInit(BT829Ptr bt); #define BT829_PAL_N 5 /* PAL-N */ #define BT829_SECAM 6 /* SECAM */ #define BT829_PAL_N_COMB 7 /* PAL-N combination */ -int bt829_SetFormat(BT829Ptr bt, CARD8 format); + +#define xf86_bt829_SetFormat bt829_SetFormat +extern _X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format); #define BT829_MUX2 1 /* ATI -> composite video */ #define BT829_MUX0 2 /* ATI -> tv tuner */ #define BT829_MUX1 3 /* ATI -> s-video */ -int bt829_SetMux(BT829Ptr bt, CARD8 mux); -int bt829_SetCaptSize(BT829Ptr bt, int width, int height); +#define xf86_bt829_SetMux bt829_SetMux +extern _X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux); -void bt829_SetBrightness(BT829Ptr bt, int brightness); -void bt829_SetContrast(BT829Ptr bt, int contrast); -void bt829_SetSaturation(BT829Ptr bt, int saturation); -void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */ +#define xf86_bt829_SetCaptSize bt829_SetCaptSize +extern _X_EXPORT int bt829_SetCaptSize(BT829Ptr bt, int width, int height); -void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en); /* VPOLE register */ -void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */ +#define xf86_bt829_SetBrightness bt829_SetBrightness +extern _X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness); +#define xf86_bt829_SetContrast bt829_SetContrast +extern _X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast); +#define xf86_bt829_SetSaturation bt829_SetSaturation +extern _X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation); +#define xf86_bt829_SetTint bt829_SetTint +extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */ -int bt829_SetCC(BT829Ptr bt); +#define xf86_bt829_SetOUT_EN bt829_SetOUT_EN +extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en);/* VPOLE register */ +#define xf86_bt829_SetP_IO bt829_SetP_IO +extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */ + +extern _X_EXPORT int bt829_SetCC(BT829Ptr bt); #define BT829SymbolsList \ "bt829_Detect", \ @@ -82,16 +96,4 @@ int bt829_SetCC(BT829Ptr bt); "bt829_SetOUT_EN", \ "bt829_SetP_IO" -#define xf86_bt829_Detect ((BT829Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("bt829_Detect")) -#define xf86_bt829_ATIInit ((int (*)(BT829Ptr))LoaderSymbol("bt829_ATIInit")) -#define xf86_bt829_SetFormat ((int (*)(BT829Ptr, CARD8))LoaderSymbol("bt829_SetFormat")) -#define xf86_bt829_SetMux ((int (*)(BT829Ptr, CARD8))LoaderSymbol("bt829_SetMux")) -#define xf86_bt829_SetCaptSize ((int (*)(BT829Ptr, int, int))LoaderSymbol("bt829_SetCaptSize")) -#define xf86_bt829_SetBrightness ((void (*)(BT829Ptr, int))LoaderSymbol("bt829_SetBrightness")) -#define xf86_bt829_SetContrast ((void (*)(BT829Ptr, int))LoaderSymbol("bt829_SetContrast")) -#define xf86_bt829_SetSaturation ((void (*)(BT829Ptr, int))LoaderSymbol("bt829_SetSaturation")) -#define xf86_bt829_SetTint ((void (*)(BT829Ptr, int))LoaderSymbol("bt829_SetTint")) -#define xf86_bt829_SetOUT_EN ((void (*)(BT829Ptr, Bool))LoaderSymbol("bt829_SetOUT_EN")) -#define xf86_bt829_SetP_IO ((void (*)(BT829Ptr, CARD8))LoaderSymbol("bt829_SetP_IO")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/fi1236.h b/xorg-server/hw/xfree86/i2c/fi1236.h index eda1c781c..8dd7e4fdb 100644 --- a/xorg-server/hw/xfree86/i2c/fi1236.h +++ b/xorg-server/hw/xfree86/i2c/fi1236.h @@ -87,24 +87,25 @@ typedef struct { #define TUNER_STILL_TUNING 5 -FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr); -void FI1236_set_tuner_type(FI1236Ptr f, int type); -void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency); void FI1236_tune(FI1236Ptr f, CARD32 frequency); -int FI1236_AFC(FI1236Ptr f); -int TUNER_get_afc_hint(FI1236Ptr f); -void fi1236_dump_status(FI1236Ptr f); #define FI1236SymbolsList \ "Detect_FI1236", \ "FI1236_set_tuner_type", \ "TUNER_set_frequency" -#define xf86_Detect_FI1236 ((FI1236Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_FI1236")) -#define xf86_FI1236_set_tuner_type ((void (*)(FI1236Ptr, int))LoaderSymbol("FI1236_set_tuner_type")) -#define xf86_TUNER_set_frequency ((void (*)(FI1236Ptr, CARD32))LoaderSymbol("TUNER_set_frequency")) -#define xf86_FI1236_AFC ((int (*)(FI1236Ptr))LoaderSymbol("FI1236_AFC")) -#define xf86_TUNER_get_afc_hint ((int (*)(FI1236Ptr))LoaderSymbol("TUNER_get_afc_hint")) -#define xf86_fi1236_dump_status ((void (*)(FI1236Ptr))LoaderSymbol("fi1236_dump_status")) +#define xf86_Detect_FI1236 Detect_FI1236 +extern _X_EXPORT FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_FI1236_set_tuner_type FI1236_set_tuner_type +extern _X_EXPORT void FI1236_set_tuner_type(FI1236Ptr f, int type); +#define xf86_TUNER_set_frequency TUNER_set_frequency +extern _X_EXPORT void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency); + +#define xf86_FI1236_AFC FI1236_AFC +extern _X_EXPORT int FI1236_AFC(FI1236Ptr f); +#define xf86_TUNER_get_afc_hint TUNER_get_afc_hint +extern _X_EXPORT int TUNER_get_afc_hint(FI1236Ptr f); +#define xf86_fi1236_dump_status fi1236_dump_status +extern _X_EXPORT void fi1236_dump_status(FI1236Ptr f); #endif diff --git a/xorg-server/hw/xfree86/i2c/i2c_def.h b/xorg-server/hw/xfree86/i2c/i2c_def.h index 6e119e478..140a071d6 100644 --- a/xorg-server/hw/xfree86/i2c/i2c_def.h +++ b/xorg-server/hw/xfree86/i2c/i2c_def.h @@ -1,14 +1,6 @@ #ifndef __I2C_DEF_H__ #define __I2C_DEF_H__ -/* the following are a workaround for possible loader bug.. - WATCH function types ! */ -#define CreateI2CBusRec ((pointer (*)(void))LoaderSymbol("xf86CreateI2CBusRec")) -#define DestroyI2CBusRec ((pointer (*)(I2CBusPtr, Bool, Bool))LoaderSymbol("xf86DestroyI2CBusRec")) -#define I2CBusInit ((Bool (*)(pointer))LoaderSymbol("xf86I2CBusInit")) -#define I2C_WriteRead ((Bool (*)(I2CDevPtr, I2CByte *, int, I2CByte *, int))LoaderSymbol("xf86I2CWriteRead")) -#define CreateI2CDevRec ((pointer (*)(void))LoaderSymbol("xf86CreateI2CDevRec")) -#define I2CDevInit ((Bool (*)(I2CDevPtr))LoaderSymbol("xf86I2CDevInit")) -#define I2CProbeAddress ((Bool (*)(I2CBusPtr,I2CSlaveAddr))LoaderSymbol("xf86I2CProbeAddress")) +#include "xf86i2c.h" #endif diff --git a/xorg-server/hw/xfree86/i2c/msp3430.h b/xorg-server/hw/xfree86/i2c/msp3430.h index 1cb9b869d..8423d1411 100644 --- a/xorg-server/hw/xfree86/i2c/msp3430.h +++ b/xorg-server/hw/xfree86/i2c/msp3430.h @@ -92,11 +92,16 @@ typedef struct { #define MSPMODE_B 8 /*----------------------------------------------------------*/ -void InitMSP3430(MSP3430Ptr m); -MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr); -void ResetMSP3430(MSP3430Ptr m); -void MSP3430SetVolume (MSP3430Ptr m, CARD8 value); -void MSP3430SetSAP (MSP3430Ptr m, int mode); +#define xf86_InitMSP3430 InitMSP3430 +extern _X_EXPORT void InitMSP3430(MSP3430Ptr m); +#define xf86_DetectMSP3430 DetectMSP3430 +extern _X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_ResetMSP3430 ResetMSP3430 +extern _X_EXPORT void ResetMSP3430(MSP3430Ptr m); +#define xf86_MSP3430SetVolume MSP3430SetVolume +extern _X_EXPORT void MSP3430SetVolume (MSP3430Ptr m, CARD8 value); +#define xf86_MSP3430SetSAP MSP3430SetSAP +extern _X_EXPORT void MSP3430SetSAP (MSP3430Ptr m, int mode); #define MSP3430SymbolsList \ "InitMSP3430", \ @@ -105,10 +110,4 @@ void MSP3430SetSAP (MSP3430Ptr m, int mode); "MSP3430SetVolume", \ "MSP3430SetSAP" -#define xf86_DetectMSP3430 ((MSP3430Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("DetectMSP3430")) -#define xf86_ResetMSP3430 ((void (*)(MSP3430Ptr))LoaderSymbol("ResetMSP3430")) -#define xf86_MSP3430SetVolume ((void (*)(MSP3430Ptr, CARD8))LoaderSymbol("MSP3430SetVolume")) -#define xf86_MSP3430SetSAP ((void (*)(MSP3430Ptr, int))LoaderSymbol("MSP3430SetSAP")) -#define xf86_InitMSP3430 ((void (*)(MSP3430Ptr))LoaderSymbol("InitMSP3430")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/tda8425.h b/xorg-server/hw/xfree86/i2c/tda8425.h index 4abb4175f..9c33e7f60 100644 --- a/xorg-server/hw/xfree86/i2c/tda8425.h +++ b/xorg-server/hw/xfree86/i2c/tda8425.h @@ -23,10 +23,14 @@ typedef struct { of I2C protocol is not always available. Besides address there is no good way to autodetect it so we have to _know_ it is there anyway */ -TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr,Bool force); -Bool tda8425_init(TDA8425Ptr t); -void tda8425_setaudio(TDA8425Ptr t); -void tda8425_mute(TDA8425Ptr t, Bool mute); +#define xf86_Detect_tda8425 Detect_tda8425 +extern _X_EXPORT TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr,Bool force); +#define xf86_tda8425_init tda8425_init +extern _X_EXPORT Bool tda8425_init(TDA8425Ptr t); +#define xf86_tda8425_setaudio tda8425_setaudio +extern _X_EXPORT void tda8425_setaudio(TDA8425Ptr t); +#define xf86_tda8425_mute tda8425_mute +extern _X_EXPORT void tda8425_mute(TDA8425Ptr t, Bool mute); #define TDA8425SymbolsList \ "Detect_tda8425", \ @@ -34,9 +38,4 @@ void tda8425_mute(TDA8425Ptr t, Bool mute); "tda8425_setaudio", \ "tda8425_mute" -#define xf86_Detect_tda8425 ((TDA8425Ptr (*)(I2CBusPtr, I2CSlaveAddr,Bool))LoaderSymbol("Detect_tda8425")) -#define xf86_tda8425_init ((Bool (*)(TDA8425Ptr))LoaderSymbol("tda8425_init")) -#define xf86_tda8425_setaudio ((void (*)(TDA8425Ptr))LoaderSymbol("tda8425_setaudio")) -#define xf86_tda8425_mute ((void (*)(TDA8425Ptr, Bool))LoaderSymbol("tda8425_mute")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/tda9850.h b/xorg-server/hw/xfree86/i2c/tda9850.h index d5dec36fe..d81679510 100644 --- a/xorg-server/hw/xfree86/i2c/tda9850.h +++ b/xorg-server/hw/xfree86/i2c/tda9850.h @@ -15,12 +15,18 @@ typedef struct { #define TDA9850_ADDR_1 0xB4 -TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr); -Bool tda9850_init(TDA9850Ptr t); -void tda9850_setaudio(TDA9850Ptr t); -void tda9850_mute(TDA9850Ptr t, Bool mute); -void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute); -CARD16 tda9850_getstatus(TDA9850Ptr t); +#define xf86_Detect_tda9850 Detect_tda9850 +extern _X_EXPORT TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_tda9850_init tda9850_init +extern _X_EXPORT Bool tda9850_init(TDA9850Ptr t); +#define xf86_tda9850_setaudio tda9850_setaudio +extern _X_EXPORT void tda9850_setaudio(TDA9850Ptr t); +#define xf86_tda9850_mute tda9850_mute +extern _X_EXPORT void tda9850_mute(TDA9850Ptr t, Bool mute); +#define xf86_tda9850_sap_mute tda9850_sap_mute +extern _X_EXPORT void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute); +#define xf86_tda9850_getstatus tda9850_getstatus +extern _X_EXPORT CARD16 tda9850_getstatus(TDA9850Ptr t); #define TDA9850SymbolsList \ "Detect_tda9850", \ @@ -29,11 +35,4 @@ CARD16 tda9850_getstatus(TDA9850Ptr t); "tda9850_mute", \ "tda9850_sap_mute" -#define xf86_Detect_tda9850 ((TDA9850Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_tda9850")) -#define xf86_tda9850_init ((Bool (*)(TDA9850Ptr))LoaderSymbol("tda9850_init")) -#define xf86_tda9850_setaudio ((void (*)(TDA9850Ptr))LoaderSymbol("tda9850_setaudio")) -#define xf86_tda9850_mute ((void (*)(TDA9850Ptr, Bool))LoaderSymbol("tda9850_mute")) -#define xf86_tda9850_sap_mute ((void (*)(TDA9850Ptr, Bool))LoaderSymbol("tda9850_sap_mute")) -#define xf86_tda9850_getstatus ((CARD16 (*)(TDA9850Ptr))LoaderSymbol("tda9850_getstatus")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/tda9885.h b/xorg-server/hw/xfree86/i2c/tda9885.h index 46ae9fc0d..004f43d5c 100644 --- a/xorg-server/hw/xfree86/i2c/tda9885.h +++ b/xorg-server/hw/xfree86/i2c/tda9885.h @@ -39,11 +39,16 @@ typedef struct { #define TDA9885_ADDR_3 0x96 #define TDA9885_ADDR_4 0x94 -TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr); -Bool tda9885_init(TDA9885Ptr t); -void tda9885_setparameters(TDA9885Ptr t); -void tda9885_getstatus(TDA9885Ptr t); -void tda9885_dumpstatus(TDA9885Ptr t); +#define xf86_Detect_tda9885 Detect_tda9885 +extern _X_EXPORT TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_tda9885_init tda9885_init +extern _X_EXPORT Bool tda9885_init(TDA9885Ptr t); +#define xf86_tda9885_setparameters tda9885_setparameters +extern _X_EXPORT void tda9885_setparameters(TDA9885Ptr t); +#define xf86_tda9885_getstatus tda9885_getstatus +extern _X_EXPORT void tda9885_getstatus(TDA9885Ptr t); +#define xf86_tda9885_dumpstatus tda9885_dumpstatus +extern _X_EXPORT void tda9885_dumpstatus(TDA9885Ptr t); #define TDA9885SymbolsList \ "Detect_tda9885", \ @@ -51,10 +56,4 @@ void tda9885_dumpstatus(TDA9885Ptr t); "tda9885_setaudio", \ "tda9885_mute" -#define xf86_Detect_tda9885 ((TDA9885Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_tda9885")) -#define xf86_tda9885_init ((Bool (*)(TDA9885Ptr))LoaderSymbol("tda9885_init")) -#define xf86_tda9885_setparameters ((void (*)(TDA9885Ptr))LoaderSymbol("tda9885_setparameters")) -#define xf86_tda9885_getstatus ((void (*)(TDA9885Ptr))LoaderSymbol("tda9885_getstatus")) -#define xf86_tda9885_dumpstatus ((void (*)(TDA9885Ptr))LoaderSymbol("tda9885_dumpstatus")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/uda1380.h b/xorg-server/hw/xfree86/i2c/uda1380.h index e671d66f8..da232f90d 100644 --- a/xorg-server/hw/xfree86/i2c/uda1380.h +++ b/xorg-server/hw/xfree86/i2c/uda1380.h @@ -44,14 +44,22 @@ typedef struct { #define UDA1380_ADDR_1 0x30 #define UDA1380_ADDR_2 0x34 -UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr); -Bool uda1380_init(UDA1380Ptr t); -void uda1380_shutdown(UDA1380Ptr t); -void uda1380_setvolume(UDA1380Ptr t, INT32); -void uda1380_mute(UDA1380Ptr t, Bool); -void uda1380_setparameters(UDA1380Ptr t); -void uda1380_getstatus(UDA1380Ptr t); -void uda1380_dumpstatus(UDA1380Ptr t); +#define xf86_Detect_uda1380 Detect_uda1380 +extern _X_EXPORT UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_uda1380_init uda1380_init +extern _X_EXPORT Bool uda1380_init(UDA1380Ptr t); +#define xf86_uda1380_shutdown uda1380_shutdown +extern _X_EXPORT void uda1380_shutdown(UDA1380Ptr t); +#define xf86_uda1380_setvolume uda1380_setvolume +extern _X_EXPORT void uda1380_setvolume(UDA1380Ptr t, INT32); +#define xf86_uda1380_mute uda1380_mute +extern _X_EXPORT void uda1380_mute(UDA1380Ptr t, Bool); +#define xf86_uda1380_setparameters uda1380_setparameters +extern _X_EXPORT void uda1380_setparameters(UDA1380Ptr t); +#define xf86_uda1380_getstatus uda1380_getstatus +extern _X_EXPORT void uda1380_getstatus(UDA1380Ptr t); +#define xf86_uda1380_dumpstatus uda1380_dumpstatus +extern _X_EXPORT void uda1380_dumpstatus(UDA1380Ptr t); #define UDA1380SymbolsList \ "Detect_uda1380", \ @@ -63,13 +71,4 @@ void uda1380_dumpstatus(UDA1380Ptr t); "uda1380_getstatus", \ "uda1380_dumpstatus" -#define xf86_Detect_uda1380 ((UDA1380Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_uda1380")) -#define xf86_uda1380_init ((Bool (*)(UDA1380Ptr))LoaderSymbol("uda1380_init")) -#define xf86_uda1380_shutdown ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_shutdown")) -#define xf86_uda1380_setvolume ((void (*)(UDA1380Ptr, CARD16))LoaderSymbol("uda1380_setvolume")) -#define xf86_uda1380_mute ((void (*)(UDA1380Ptr, Bool))LoaderSymbol("uda1380_mute")) -#define xf86_uda1380_setparameters ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_setparameters")) -#define xf86_uda1380_getstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_getstatus")) -#define xf86_uda1380_dumpstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_dumpstatus")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/xf86i2c.h b/xorg-server/hw/xfree86/i2c/xf86i2c.h index 76d2ebf92..f2ded09db 100644 --- a/xorg-server/hw/xfree86/i2c/xf86i2c.h +++ b/xorg-server/hw/xfree86/i2c/xf86i2c.h @@ -49,11 +49,15 @@ typedef struct _I2CBusRec { I2CByte *ReadBuffer, int nRead); } I2CBusRec; -I2CBusPtr xf86CreateI2CBusRec(void); -void xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too); -Bool xf86I2CBusInit(I2CBusPtr pI2CBus); -I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name); -int xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus); +#define CreateI2CBusRec xf86CreateI2CBusRec +extern _X_EXPORT I2CBusPtr xf86CreateI2CBusRec(void); +#define DestroyI2CBusRec xf86DestroyI2CBusRec +extern _X_EXPORT void xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too); +#define I2CBusInit xf86I2CBusInit +extern _X_EXPORT Bool xf86I2CBusInit(I2CBusPtr pI2CBus); + +extern _X_EXPORT I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name); +extern _X_EXPORT int xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus); /* I2C slave devices */ @@ -72,25 +76,31 @@ typedef struct _I2CDevRec { DevUnion DriverPrivate; } I2CDevRec; -I2CDevPtr xf86CreateI2CDevRec(void); -void xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc); -Bool xf86I2CDevInit(I2CDevPtr pI2CDev); -I2CDevPtr xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr); +#define CreateI2CDevRec xf86CreateI2CDevRec +extern _X_EXPORT I2CDevPtr xf86CreateI2CDevRec(void); +extern _X_EXPORT void xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc); +#define I2CDevInit xf86I2CDevInit +extern _X_EXPORT Bool xf86I2CDevInit(I2CDevPtr pI2CDev); +extern _X_EXPORT I2CDevPtr xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr); /* See descriptions of these functions in xf86i2c.c */ -Bool xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr); -Bool xf86I2CWriteRead(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite, +#define I2CProbeAddress xf86I2CProbeAddress +extern _X_EXPORT Bool xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr); + +#define I2C_WriteRead xf86I2CWriteRead +extern _X_EXPORT Bool xf86I2CWriteRead(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite, I2CByte *ReadBuffer, int nRead); #define xf86I2CRead(d, rb, nr) xf86I2CWriteRead(d, NULL, 0, rb, nr) -Bool xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte); -Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte); -Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n); -Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword); + +extern _X_EXPORT Bool xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte); +extern _X_EXPORT Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte); +extern _X_EXPORT Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n); +extern _X_EXPORT Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword); #define xf86I2CWrite(d, wb, nw) xf86I2CWriteRead(d, wb, nw, NULL, 0) -Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte); -Bool xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *WriteBuffer, int nWrite); -Bool xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word); -Bool xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues); +extern _X_EXPORT Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte); +extern _X_EXPORT Bool xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *WriteBuffer, int nWrite); +extern _X_EXPORT Bool xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word); +extern _X_EXPORT Bool xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues); #endif /*_XF86I2C_H */ diff --git a/xorg-server/hw/xfree86/int10/Makefile.in b/xorg-server/hw/xfree86/int10/Makefile.in index 1afc07a81..8d6cf288d 100644 --- a/xorg-server/hw/xfree86/int10/Makefile.in +++ b/xorg-server/hw/xfree86/int10/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/int10 DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -117,6 +121,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -137,9 +142,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -168,7 +176,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -177,9 +187,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -218,12 +232,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -243,7 +258,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -253,6 +267,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -266,11 +281,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -306,6 +320,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -330,7 +345,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -353,6 +367,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -384,7 +399,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/int10/generic.c b/xorg-server/hw/xfree86/int10/generic.c index 0af7c1baa..9d39e99b0 100644 --- a/xorg-server/hw/xfree86/int10/generic.c +++ b/xorg-server/hw/xfree86/int10/generic.c @@ -75,6 +75,7 @@ static void *sysMem = NULL; * etc.). How do we know that \c pci_device_read_rom will return the * legacy VGA BIOS image? */ +#ifndef _PC static int read_legacy_video_BIOS(struct pci_device *dev, unsigned char *Buf) { @@ -114,6 +115,7 @@ read_legacy_video_BIOS(struct pci_device *dev, unsigned char *Buf) return Len; } +#endif /* _PC */ xf86Int10InfoPtr @@ -126,8 +128,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) int screen; legacyVGARec vga; -#ifdef _PC - int size; +#if 0 CARD32 cs; #endif diff --git a/xorg-server/hw/xfree86/int10/helper_exec.c b/xorg-server/hw/xfree86/int10/helper_exec.c index 1c89ce508..6ba647f89 100644 --- a/xorg-server/hw/xfree86/int10/helper_exec.c +++ b/xorg-server/hw/xfree86/int10/helper_exec.c @@ -219,7 +219,7 @@ port_rep_inb(xf86Int10InfoPtr pInt, register int inc = d_f ? -1 : 1; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_insb(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_insb(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { MEM_WB(pInt, dst, x_inb(port)); @@ -235,7 +235,7 @@ port_rep_inw(xf86Int10InfoPtr pInt, register int inc = d_f ? -2 : 2; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_insw(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_insw(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { MEM_WW(pInt, dst, x_inw(port)); @@ -251,7 +251,7 @@ port_rep_inl(xf86Int10InfoPtr pInt, register int inc = d_f ? -4 : 4; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_insl(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_insl(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { MEM_WL(pInt, dst, x_inl(port)); @@ -267,7 +267,7 @@ port_rep_outb(xf86Int10InfoPtr pInt, register int inc = d_f ? -1 : 1; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_outb(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_outb(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { x_outb(port, MEM_RB(pInt, dst)); @@ -283,7 +283,7 @@ port_rep_outw(xf86Int10InfoPtr pInt, register int inc = d_f ? -2 : 2; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_outw(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_outw(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { x_outw(port, MEM_RW(pInt, dst)); @@ -299,7 +299,7 @@ port_rep_outl(xf86Int10InfoPtr pInt, register int inc = d_f ? -4 : 4; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_outl(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_outl(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { x_outl(port, MEM_RL(pInt, dst)); @@ -409,7 +409,7 @@ x_inl(CARD16 port) if (!pciCfg1in(port, &val)) { val = inl(Int10Current->ioBase + port); if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" inl(%#x) = %8.8x\n", port, val); + ErrorF(" inl(%#x) = %8.8lx\n", port, val); } return val; } @@ -419,7 +419,7 @@ x_outl(CARD16 port, CARD32 val) { if (!pciCfg1out(port, val)) { if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" outl(%#x, %8.8x)\n", port, val); + ErrorF(" outl(%#x, %8.8lx)\n", port, val); outl(Int10Current->ioBase + port, val); } } @@ -500,7 +500,7 @@ pciCfg1in(CARD16 addr, CARD32 *val) pci_device_cfg_read_u32(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr)); if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_inl(%#x) = %8.8x\n", PciCfg1Addr, *val); + ErrorF(" cfg_inl(%#lx) = %8.8lx\n", PciCfg1Addr, *val); return 1; } return 0; @@ -515,7 +515,7 @@ pciCfg1out(CARD16 addr, CARD32 val) } if (addr == 0xCFC) { if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_outl(%#x, %8.8x)\n", PciCfg1Addr, val); + ErrorF(" cfg_outl(%#lx, %8.8lx)\n", PciCfg1Addr, val); pci_device_cfg_write_u32(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr)); return 1; @@ -539,7 +539,7 @@ pciCfg1inw(CARD16 addr, CARD16 *val) pci_device_cfg_read_u16(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_inw(%#x) = %4.4x\n", PciCfg1Addr + offset, *val); + ErrorF(" cfg_inw(%#lx) = %4.4x\n", PciCfg1Addr + offset, *val); return 1; } return 0; @@ -560,7 +560,7 @@ pciCfg1outw(CARD16 addr, CARD16 val) const unsigned offset = addr - 0xCFC; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_outw(%#x, %4.4x)\n", PciCfg1Addr + offset, val); + ErrorF(" cfg_outw(%#lx, %4.4x)\n", PciCfg1Addr + offset, val); pci_device_cfg_write_u16(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); return 1; @@ -584,7 +584,7 @@ pciCfg1inb(CARD16 addr, CARD8 *val) pci_device_cfg_read_u8(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_inb(%#x) = %2.2x\n", PciCfg1Addr + offset, *val); + ErrorF(" cfg_inb(%#lx) = %2.2x\n", PciCfg1Addr + offset, *val); return 1; } return 0; @@ -605,7 +605,7 @@ pciCfg1outb(CARD16 addr, CARD8 val) const unsigned offset = addr - 0xCFC; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_outb(%#x, %2.2x)\n", PciCfg1Addr + offset, val); + ErrorF(" cfg_outb(%#lx, %2.2x)\n", PciCfg1Addr + offset, val); pci_device_cfg_write_u8(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); return 1; @@ -644,7 +644,6 @@ bios_checksum(const CARD8 *start, int size) void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) { - xf86SetCurrentAccess(FALSE, xf86Screens[pInt->scrnIndex]); vga->save_msr = inb(pInt->ioBase + 0x03CC); vga->save_vse = inb(pInt->ioBase + 0x03C3); #ifndef __ia64__ @@ -657,20 +656,17 @@ LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) outb(pInt->ioBase + 0x46E8, ~(CARD8)0x08 & vga->save_46e8); #endif outb(pInt->ioBase + 0x0102, ~(CARD8)0x01 & vga->save_pos102); - xf86SetCurrentAccess(TRUE, xf86Screens[pInt->scrnIndex]); } void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) { - xf86SetCurrentAccess(FALSE, xf86Screens[pInt->scrnIndex]); outb(pInt->ioBase + 0x0102, vga->save_pos102); #ifndef __ia64__ outb(pInt->ioBase + 0x46E8, vga->save_46e8); #endif outb(pInt->ioBase + 0x03C3, vga->save_vse); outb(pInt->ioBase + 0x03C2, vga->save_msr); - xf86SetCurrentAccess(TRUE, xf86Screens[pInt->scrnIndex]); } #if defined (_PC) diff --git a/xorg-server/hw/xfree86/int10/xf86int10.h b/xorg-server/hw/xfree86/int10/xf86int10.h index 0e6669d8f..ba9ee5276 100644 --- a/xorg-server/hw/xfree86/int10/xf86int10.h +++ b/xorg-server/hw/xfree86/int10/xf86int10.h @@ -61,15 +61,18 @@ typedef struct { } legacyVGARec, *legacyVGAPtr; /* OS dependent functions */ -xf86Int10InfoPtr xf86InitInt10(int entityIndex); -xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags); -void xf86FreeInt10(xf86Int10InfoPtr pInt); -void *xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off); -void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num); -pointer xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr); +extern _X_EXPORT xf86Int10InfoPtr xf86InitInt10(int entityIndex); +extern _X_EXPORT xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, + int Flags); +extern _X_EXPORT void xf86FreeInt10(xf86Int10InfoPtr pInt); +extern _X_EXPORT void *xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, + int *off); +extern _X_EXPORT void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, + int num); +extern _X_EXPORT pointer xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr); /* x86 executor related functions */ -void xf86ExecX86int10(xf86Int10InfoPtr pInt); +extern _X_EXPORT void xf86ExecX86int10(xf86Int10InfoPtr pInt); #ifdef _INT10_PRIVATE @@ -112,12 +115,12 @@ void xf86ExecX86int10(xf86Int10InfoPtr pInt); #define MEM_WL(name, addr, val) (*name->mem->wl)(name, addr, val) /* OS dependent functions */ -Bool MapCurrentInt10(xf86Int10InfoPtr pInt); +extern _X_EXPORT Bool MapCurrentInt10(xf86Int10InfoPtr pInt); /* x86 executor related functions */ -Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt); +extern _X_EXPORT Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt); /* int.c */ -extern xf86Int10InfoPtr Int10Current; +extern _X_EXPORT xf86Int10InfoPtr Int10Current; int int_handler(xf86Int10InfoPtr pInt); /* helper_exec.c */ @@ -129,12 +132,11 @@ int run_bios_int(int num, xf86Int10InfoPtr pInt); void dump_code(xf86Int10InfoPtr pInt); void dump_registers(xf86Int10InfoPtr pInt); void stack_trace(xf86Int10InfoPtr pInt); -xf86Int10InfoPtr getInt10Rec(int entityIndex); CARD8 bios_checksum(const CARD8 *start, int size); void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga); void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga); #if defined (_PC) -void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save); +extern _X_EXPORT void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save); #endif int port_rep_inb(xf86Int10InfoPtr pInt, CARD16 port, CARD32 base, int d_f, CARD32 count); @@ -168,13 +170,13 @@ void setup_int_vect(xf86Int10InfoPtr pInt); int setup_system_bios(void *base_addr); void reset_int_vect(xf86Int10InfoPtr pInt); void set_return_trap(xf86Int10InfoPtr pInt); -void * xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex); +extern _X_EXPORT void * xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex); Bool int10skip(const void* options); Bool int10_check_bios(int scrnIndex, int codeSeg, const unsigned char* vbiosMem); Bool initPrimary(const void* options); -BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt); -Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base); +extern _X_EXPORT BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt); +extern _X_EXPORT Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base); #ifdef DEBUG void dprint(unsigned long start, unsigned long size); #endif diff --git a/xorg-server/hw/xfree86/libxorg.c b/xorg-server/hw/xfree86/libxorg.c new file mode 100644 index 000000000..e69de29bb diff --git a/xorg-server/hw/xfree86/loader/Makefile.am b/xorg-server/hw/xfree86/loader/Makefile.am index fa9dbfe5d..0bfa7a283 100644 --- a/xorg-server/hw/xfree86/loader/Makefile.am +++ b/xorg-server/hw/xfree86/loader/Makefile.am @@ -1,27 +1,30 @@ -noinst_LIBRARIES = libloader.a +noinst_LTLIBRARIES = libloader.la -INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \ - -I$(srcdir)/../vbe -I$(top_srcdir)/miext/cw -I$(srcdir)/../int10 \ +INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(top_srcdir)/miext/cw \ -I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \ -I$(srcdir)/../ramdac #AM_LDFLAGS = -r -AM_CFLAGS = -DIN_LOADER $(DIX_CFLAGS) $(XORG_CFLAGS) +AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ dlloader.h \ loader.h \ - loaderProcs.h + loaderProcs.h \ + sdksyms.sh -libloader_a_SOURCES = \ +libloader_la_SOURCES = \ loader.c \ loaderProcs.h \ loadext.c \ loadmod.c \ dlloader.c \ os.c \ - dixsym.c \ - extsym.c \ - misym.c \ - xf86sym.c \ - sym.h + sdksyms.c + +CLEANFILES = sdksyms.c sdksyms.dep + +sdksyms.dep sdksyms.c: sdksyms.sh + CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES) + +sinclude sdksyms.dep diff --git a/xorg-server/hw/xfree86/loader/Makefile.in b/xorg-server/hw/xfree86/loader/Makefile.in index a004254a6..b642bde62 100644 --- a/xorg-server/hw/xfree86/loader/Makefile.in +++ b/xorg-server/hw/xfree86/loader/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/loader DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,18 +51,15 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libloader_a_AR = $(AR) $(ARFLAGS) -libloader_a_LIBADD = -am_libloader_a_OBJECTS = loader.$(OBJEXT) loadext.$(OBJEXT) \ - loadmod.$(OBJEXT) dlloader.$(OBJEXT) os.$(OBJEXT) \ - dixsym.$(OBJEXT) extsym.$(OBJEXT) misym.$(OBJEXT) \ - xf86sym.$(OBJEXT) -libloader_a_OBJECTS = $(am_libloader_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libloader_la_LIBADD = +am_libloader_la_OBJECTS = loader.lo loadext.lo loadmod.lo dlloader.lo \ + os.lo sdksyms.lo +libloader_la_OBJECTS = $(am_libloader_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -70,8 +70,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libloader_a_SOURCES) -DIST_SOURCES = $(libloader_a_SOURCES) +SOURCES = $(libloader_la_SOURCES) +DIST_SOURCES = $(libloader_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -80,6 +80,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -100,9 +101,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -131,7 +135,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -140,9 +146,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -181,12 +191,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -206,7 +217,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -216,6 +226,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -229,11 +240,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -269,6 +279,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -293,7 +304,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -316,6 +326,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -347,39 +358,38 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libloader.a -INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \ - -I$(srcdir)/../vbe -I$(top_srcdir)/miext/cw -I$(srcdir)/../int10 \ +noinst_LTLIBRARIES = libloader.la +INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(top_srcdir)/miext/cw \ -I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \ -I$(srcdir)/../ramdac #AM_LDFLAGS = -r -AM_CFLAGS = -DIN_LOADER $(DIX_CFLAGS) $(XORG_CFLAGS) +AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ dlloader.h \ loader.h \ - loaderProcs.h + loaderProcs.h \ + sdksyms.sh -libloader_a_SOURCES = \ +libloader_la_SOURCES = \ loader.c \ loaderProcs.h \ loadext.c \ loadmod.c \ dlloader.c \ os.c \ - dixsym.c \ - extsym.c \ - misym.c \ - xf86sym.c \ - sym.h + sdksyms.c +CLEANFILES = sdksyms.c sdksyms.dep all: all-am .SUFFIXES: @@ -415,12 +425,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libloader.a: $(libloader_a_OBJECTS) $(libloader_a_DEPENDENCIES) - -rm -f libloader.a - $(libloader_a_AR) libloader.a $(libloader_a_OBJECTS) $(libloader_a_LIBADD) - $(RANLIB) libloader.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libloader.la: $(libloader_la_OBJECTS) $(libloader_la_DEPENDENCIES) + $(LINK) $(libloader_la_OBJECTS) $(libloader_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -428,15 +442,12 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixsym.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlloader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extsym.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadmod.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misym.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86sym.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlloader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadmod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdksyms.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -549,7 +560,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -568,6 +579,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -578,7 +590,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -650,7 +662,7 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -663,6 +675,11 @@ uninstall-am: pdf pdf-am ps ps-am tags uninstall uninstall-am +sdksyms.dep sdksyms.c: sdksyms.sh + CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES) + +sinclude sdksyms.dep + # 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/xorg-server/hw/xfree86/loader/loader.c b/xorg-server/hw/xfree86/loader/loader.c index fc0db2886..6a4c08916 100644 --- a/xorg-server/hw/xfree86/loader/loader.c +++ b/xorg-server/hw/xfree86/loader/loader.c @@ -74,41 +74,50 @@ #include "xf86.h" #include "xf86Priv.h" #include "compiler.h" -#include "sym.h" -/* - * handles are used to identify files that are loaded. Even archives - * are counted as a single file. - */ +extern void *xorg_symbols[]; + #define MAX_HANDLE 256 -#define HANDLE_FREE 0 -#define HANDLE_USED 1 -static char freeHandles[MAX_HANDLE]; static int refCount[MAX_HANDLE]; -/* - * modules are used to identify compilation units (ie object modules). - * Archives contain multiple modules, each of which is treated seperately. - */ static int moduleseq = 0; /* Prototypes for static functions. */ -static loaderPtr _LoaderListPush(void); -static loaderPtr _LoaderListPop(int); +static loaderPtr listHead = NULL; -void -LoaderInit(void) +static loaderPtr +_LoaderListPush(void) +{ + loaderPtr item = calloc(1, sizeof(struct _loader)); + + item->next = listHead; + listHead = item; + + return item; +} + +static loaderPtr +_LoaderListPop(int handle) { - const char *osname = NULL; + loaderPtr item = listHead; + loaderPtr *bptr = &listHead; /* pointer to previous node */ - char *ld_bind_now = getenv("LD_BIND_NOW"); - if (ld_bind_now && *ld_bind_now) { - xf86Msg(X_ERROR, "LD_BIND_NOW is set, dlloader will NOT work!\n"); + while (item) { + if (item->handle == handle) { + *bptr = item->next; /* remove this from the list */ + return item; + } + bptr = &(item->next); + item = item->next; } - xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *) - ((long)dixLookupTab ^ (long)extLookupTab - ^ (long)miLookupTab ^ (long)xfree86LookupTab)); + return 0; +} + +void +LoaderInit(void) +{ + xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *)xorg_symbols); xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n"); xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC, GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion), @@ -123,10 +132,6 @@ LoaderInit(void) GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion), GET_ABI_MINOR(LoaderVersionInfo.extensionVersion)); - LoaderGetOS(&osname, NULL, NULL, NULL); - if (osname) - xf86MsgVerb(X_INFO, 2, "Loader running on %s\n", osname); - #if defined(__UNIXWARE__) && !defined(__GNUC__) /* For UnixWare we need to load the C Runtime libraries which are * normally auto-linked by the compiler. Otherwise we are bound to @@ -149,58 +154,6 @@ LoaderInit(void) #endif } -static loaderPtr listHead = (loaderPtr) 0; - -static loaderPtr -_LoaderListPush() -{ - loaderPtr item = calloc(1, sizeof(struct _loader)); - - item->next = listHead; - listHead = item; - - return item; -} - -static loaderPtr -_LoaderListPop(int handle) -{ - loaderPtr item = listHead; - loaderPtr *bptr = &listHead; /* pointer to previous node */ - - while (item) { - if (item->handle == handle) { - *bptr = item->next; /* remove this from the list */ - return item; - } - bptr = &(item->next); - item = item->next; - } - - return 0; -} - -/* These four are just ABI stubs */ -_X_EXPORT void -LoaderRefSymbols(const char *sym0, ...) -{ -} - -_X_EXPORT void -LoaderRefSymLists(const char **list0, ...) -{ -} - -_X_EXPORT void -LoaderReqSymLists(const char **list0, ...) -{ -} - -_X_EXPORT void -LoaderReqSymbols(const char *sym0, ...) -{ -} - /* Public Interface to the loader. */ int @@ -214,12 +167,7 @@ LoaderOpen(const char *module, const char *cname, int handle, ErrorF("LoaderOpen(%s)\n", module); #endif - /* - * Check to see if the module is already loaded. - * Only if we are loading it into an existing namespace. - * If it is to be loaded into a new namespace, don't check. - * Note: We only have one namespace. - */ + /* Is the module already loaded? */ if (handle >= 0) { tmp = listHead; while (tmp) { @@ -249,7 +197,7 @@ LoaderOpen(const char *module, const char *cname, int handle, * Find a free handle. */ new_handle = 1; - while (new_handle < MAX_HANDLE && freeHandles[new_handle]) + while (new_handle < MAX_HANDLE && refCount[new_handle]) new_handle++; if (new_handle == MAX_HANDLE) { @@ -261,7 +209,6 @@ LoaderOpen(const char *module, const char *cname, int handle, return -1; } - freeHandles[new_handle] = HANDLE_USED; refCount[new_handle] = 1; tmp = _LoaderListPush(); @@ -275,7 +222,7 @@ LoaderOpen(const char *module, const char *cname, int handle, if ((tmp->private = DLLoadModule(tmp, flags)) == NULL) { xf86Msg(X_ERROR, "Failed to load %s\n", module); _LoaderListPop(new_handle); - freeHandles[new_handle] = HANDLE_FREE; + refCount[new_handle] = 0; if (errmaj) *errmaj = LDR_NOLOAD; if (errmin) @@ -292,26 +239,19 @@ LoaderHandleOpen(int handle) if (handle < 0 || handle >= MAX_HANDLE) return -1; - if (freeHandles[handle] != HANDLE_USED) + if (!refCount[handle]) return -1; refCount[handle]++; return handle; } -_X_EXPORT void * +void * LoaderSymbol(const char *sym) { return (DLFindSymbol(sym)); } -/* more stub */ -_X_EXPORT int -LoaderCheckUnresolved(int delay_flag) -{ - return 0; -} - int LoaderUnload(int handle) { @@ -331,18 +271,13 @@ LoaderUnload(int handle) */ while ((tmp = _LoaderListPop(handle)) != NULL) { - if (strchr(tmp->name, ':') == NULL) { - /* It is not a member of an archive */ - xf86Msg(X_INFO, "Unloading %s\n", tmp->name); - } + xf86Msg(X_INFO, "Unloading %s\n", tmp->name); DLUnloadModule(tmp->private); free(tmp->name); free(tmp->cname); free(tmp); } - freeHandles[handle] = HANDLE_FREE; - return 0; } @@ -354,13 +289,13 @@ LoaderSetOptions(unsigned long opts) LoaderOptions |= opts; } -_X_EXPORT Bool +Bool LoaderShouldIgnoreABI(void) { return (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) != 0; } -_X_EXPORT int +int LoaderGetABIVersion(const char *abiclass) { struct { diff --git a/xorg-server/hw/xfree86/loader/loaderProcs.h b/xorg-server/hw/xfree86/loader/loaderProcs.h index a10f0b3a6..a7925ecee 100644 --- a/xorg-server/hw/xfree86/loader/loaderProcs.h +++ b/xorg-server/hw/xfree86/loader/loaderProcs.h @@ -53,8 +53,6 @@ #ifndef _LOADERPROCS_H #define _LOADERPROCS_H -#undef IN_LOADER -#define IN_LOADER #include "xf86Module.h" typedef struct module_desc { @@ -78,16 +76,7 @@ ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *, ModuleDescPtr LoadModule(const char *, const char *, const char **, const char **, pointer, const XF86ModReqInfo *, int *, int *); -ModuleDescPtr LoadSubModule(ModuleDescPtr, const char *, - const char **, const char **, pointer, - const XF86ModReqInfo *, int *, int *); -ModuleDescPtr LoadSubModuleLocal(ModuleDescPtr, const char *, - const char **, const char **, - pointer, const XF86ModReqInfo *, - int *, int *); ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent); -void UnloadModule(ModuleDescPtr); -void UnloadSubModule(ModuleDescPtr); void UnloadDriver(ModuleDescPtr); void LoaderSetPath(const char *path); void LoaderSortExtensions(void); diff --git a/xorg-server/hw/xfree86/loader/loadext.c b/xorg-server/hw/xfree86/loader/loadext.c index b7523289c..a61b28cc2 100644 --- a/xorg-server/hw/xfree86/loader/loadext.c +++ b/xorg-server/hw/xfree86/loader/loadext.c @@ -66,7 +66,7 @@ NewExtensionModule(void) } } -_X_EXPORT void +void LoadExtension(ExtensionModule * e, Bool builtin) { ExtensionModule *newext; @@ -387,7 +387,7 @@ tsort(void) } void -LoaderSortExtensions() +LoaderSortExtensions(void) { int i, j; ExtensionModule *ext, *newList; diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c index 22b540c5d..0b220f1b6 100644 --- a/xorg-server/hw/xfree86/loader/loadmod.c +++ b/xorg-server/hw/xfree86/loader/loadmod.c @@ -68,8 +68,6 @@ #include #include -#define TestFree(a) if (a) { xfree (a); a = NULL; } - typedef struct _pattern { const char *pattern; regex_t rex; @@ -411,21 +409,21 @@ FindModuleInSubdir(const char *dirpath, const char *module) snprintf(tmpBuf, PATH_MAX, "lib%s.so", module); if (strcmp(direntry->d_name, tmpBuf) == 0) { ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2); - sprintf(ret, "%s/%s", dirpath, tmpBuf); + sprintf(ret, "%s%s", dirpath, tmpBuf); break; } snprintf(tmpBuf, PATH_MAX, "%s_drv.so", module); if (strcmp(direntry->d_name, tmpBuf) == 0) { ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2); - sprintf(ret, "%s/%s", dirpath, tmpBuf); + sprintf(ret, "%s%s", dirpath, tmpBuf); break; } snprintf(tmpBuf, PATH_MAX, "%s.so", module); if (strcmp(direntry->d_name, tmpBuf) == 0) { ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2); - sprintf(ret, "%s/%s", dirpath, tmpBuf); + sprintf(ret, "%s%s", dirpath, tmpBuf); break; } } @@ -469,7 +467,7 @@ FindModule(const char *module, const char *dirname, const char **subdirlist, return name; } -_X_EXPORT char ** +char ** LoaderListDirs(const char **subdirlist, const char **patternlist) { char buf[PATH_MAX + 1]; @@ -563,7 +561,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist) return listing; } -_X_EXPORT void +void LoaderFreeDirList(char **list) { FreeStringList(list); @@ -745,13 +743,14 @@ AddSibling(ModuleDescPtr head, ModuleDescPtr new) return (new); } -_X_EXPORT ModuleDescPtr -LoadSubModule(ModuleDescPtr parent, const char *module, +pointer +LoadSubModule(pointer _parent, const char *module, const char **subdirlist, const char **patternlist, pointer options, const XF86ModReqInfo * modreq, int *errmaj, int *errmin) { ModuleDescPtr submod; + ModuleDescPtr parent = (ModuleDescPtr)_parent; xf86MsgVerb(X_INFO, 3, "Loading sub module \"%s\"\n", module); @@ -794,7 +793,7 @@ NewModuleDesc(const char *name) return (mdp); } -_X_EXPORT ModuleDescPtr +ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent) { ModuleDescPtr ret; @@ -1019,19 +1018,10 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, LoadModule_exit: FreePathList(pathlist); FreePatterns(patterns); - TestFree(found); - TestFree(name); - TestFree(p); + xfree(found); + xfree(name); + xfree(p); - /* - * If you need to do something to keep the - * instruction cache in sync with the main - * memory before jumping to that code, you may - * do it here. - */ -#ifdef __alpha__ - istream_mem_barrier(); -#endif return ret; } @@ -1082,9 +1072,9 @@ LoadModule(const char *module, const char *path, const char **subdirlist, } void -UnloadModule(ModuleDescPtr mod) +UnloadModule(pointer mod) { - UnloadModuleOrDriver(mod); + UnloadModuleOrDriver((ModuleDescPtr)mod); } static void @@ -1106,16 +1096,15 @@ UnloadModuleOrDriver(ModuleDescPtr mod) UnloadModuleOrDriver(mod->child); if (mod->sib) UnloadModuleOrDriver(mod->sib); - TestFree(mod->name); + xfree(mod->name); xfree(mod); -#ifdef __alpha__ - istream_mem_barrier(); -#endif } -_X_EXPORT void -UnloadSubModule(ModuleDescPtr mod) +void +UnloadSubModule(pointer _mod) { + ModuleDescPtr mod = (ModuleDescPtr)_mod; + if (mod == NULL || mod->name == NULL) return; @@ -1130,7 +1119,7 @@ UnloadSubModule(ModuleDescPtr mod) if (mod->child) UnloadModuleOrDriver(mod->child); - TestFree(mod->name); + xfree(mod->name); xfree(mod); } @@ -1161,7 +1150,7 @@ RemoveChild(ModuleDescPtr child) return; } -_X_EXPORT void +void LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin) { const char *msg; diff --git a/xorg-server/hw/xfree86/loader/os.c b/xorg-server/hw/xfree86/loader/os.c index ef9ac38b4..5acce0024 100644 --- a/xorg-server/hw/xfree86/loader/os.c +++ b/xorg-server/hw/xfree86/loader/os.c @@ -64,7 +64,7 @@ /* Return the OS name, and run-time OS version */ -_X_EXPORT void +void LoaderGetOS(const char **name, int *major, int *minor, int *teeny) { if (name) diff --git a/xorg-server/hw/xfree86/loader/sdksyms.c b/xorg-server/hw/xfree86/loader/sdksyms.c new file mode 100644 index 000000000..b96c1e6a1 --- /dev/null +++ b/xorg-server/hw/xfree86/loader/sdksyms.c @@ -0,0 +1,2342 @@ +/* This file is automatically generated by sdksyms.sh. */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + + +/* These must be included first */ +#include "misc.h" +#include "miscstruct.h" + + +/* render/Makefile.am */ +#include "picture.h" +#include "mipict.h" +#include "glyphstr.h" +#include "picturestr.h" +#include "renderedge.h" + + +/* fb/Makefile.am -- module */ +/* +#include "fb.h" +#include "fbrop.h" +#include "fboverlay.h" +#include "wfbrename.h" +#include "fbpict.h" + */ + + +/* miext/shadow/Makefile.am -- module */ +/* +#include "shadow.h" + */ + + +/* miext/damage/Makefile.am */ +#include "damage.h" +#include "damagestr.h" + + +/* Xext/Makefile.am -- half is module, half is builtin */ +/* +#include "xvdix.h" +#include "xvmcext.h" + */ +#include "geext.h" +#include "geint.h" +#include "shmint.h" +#if XINERAMA +# include "panoramiXsrv.h" +# include "panoramiX.h" +#endif + + +/* hw/xfree86/int10/Makefile.am -- module */ +/* +#include "xf86int10.h" + */ + + +/* hw/xfree86/i2c/Makefile.am -- "mostly" modules */ +#include "xf86i2c.h" +/* +#include "bt829.h" +#include "fi1236.h" +#include "msp3430.h" +#include "tda8425.h" +#include "tda9850.h" +#include "tda9885.h" +#include "uda1380.h" +#include "i2c_def.h" + */ + + +/* hw/xfree86/modes/Makefile.am */ +#include "xf86Crtc.h" +#include "xf86Modes.h" +#include "xf86RandR12.h" +/* #include "xf86Rename.h" */ + + +/* hw/xfree86/ddc/Makefile.am */ +#include "edid.h" +#include "xf86DDC.h" + + +/* hw/xfree86/dri2/Makefile.am -- module */ +/* +#if DRI2 +# include "dri2.h" +#endif + */ + + +/* hw/xfree86/vgahw/Makefile.am -- module */ +/* +#include "vgaHW.h" + */ + + +/* hw/xfree86/fbdevhw/Makefile.am -- module */ +/* +#include "fbdevhw.h" + */ + + +/* hw/xfree86/common/Makefile.am */ +#include "compiler.h" +#include "fourcc.h" +#include "xf86.h" +#include "xf86Module.h" +#include "xf86Opt.h" +#include "xf86PciInfo.h" +#include "xf86Priv.h" +#include "xf86Privstr.h" +#include "xf86cmap.h" +#include "xf86fbman.h" +#include "xf86str.h" +#include "xf86Xinput.h" +#include "xf86VGAarbiter.h" +#include "xisb.h" +#if XV +# include "xf86xv.h" +# include "xf86xvmc.h" +# include "xf86xvpriv.h" +#endif +/* XF86VidMode code is in libextmod module */ +/* +#if XF86VIDMODE +# include "vidmodeproc.h" +#endif + */ +#include "xorgVersion.h" +#if defined(__sparc__) || defined(__sparc) +# include "xf86sbusBus.h" +#endif + + +/* hw/xfree86/ramdac/Makefile.am */ +#include "BT.h" +#include "IBM.h" +#include "TI.h" +#include "xf86Cursor.h" +#include "xf86RamDac.h" + + +/* hw/xfree86/shadowfb/Makefile.am -- module */ +/* +#include "shadowfb.h" + */ + + +/* hw/xfree86/os-support/solaris/Makefile.am */ +#if defined(sun386) +# include "agpgart.h" +#endif + + +/* hw/xfree86/os-support/Makefile.am */ +#include "xf86_OSproc.h" +#include "xf86_OSlib.h" + + +/* hw/xfree86/os-support/bus/Makefile.am */ +#include "xf86Pci.h" +#if defined(__sparc__) || defined(__sparc) +# include "xf86Sbus.h" +#endif + + +/* hw/xfree86/xaa/Makefile.am -- module */ +/* +#include "xaa.h" +#include "xaalocal.h" +#include "xaarop.h" +#include "xaaWrapper.h" + */ + + +/* hw/xfree86/dixmods/extmod/Makefile.am -- module */ +/* +#include "dgaproc.h" + */ + + +/* hw/xfree86/parser/Makefile.am */ +#include "xf86Parser.h" +#include "xf86Optrec.h" + + +/* hw/xfree86/vbe/Makefile.am -- module */ +/* +#include "vbe.h" +#include "vbeModes.h" + */ + + +/* hw/xfree86/dri/Makefile.am -- module */ +/* +#if XF86DRI +# include "dri.h" +# include "sarea.h" +# include "dristruct.h" +#endif + */ + + +/* hw/xfree86/xf8_16bpp/Makefile.am -- module */ +/* +#include "cfb8_16.h" + */ + + +/* mi/Makefile.am */ +#include "mibank.h" +#include "micmap.h" +#include "miline.h" +#include "mipointer.h" +#include "mi.h" +#include "mibstore.h" +#include "migc.h" +#include "mipointrst.h" +#include "mizerarc.h" +#include "micoord.h" +#include "mifillarc.h" +#include "mispans.h" +#include "miwideline.h" +#include "mistruct.h" +#include "mifpoly.h" +#include "mioverlay.h" + + +/* randr/Makefile.am */ +#include "randrstr.h" +#include "rrtransform.h" + + +/* dbe/Makefile.am -- module */ +/* +#include "dbestruct.h" + */ + + +/* exa/Makefile.am -- module */ +/* +#include "exa.h" + */ + + +/* xfixes/Makefile.am */ +#include "xfixes.h" + + +/* include/Makefile.am */ +#include "XIstubs.h" +#include "bstore.h" +#include "bstorestr.h" +#include "closestr.h" +#include "closure.h" +#include "colormap.h" +#include "colormapst.h" +#include "hotplug.h" +#include "cursor.h" +#include "cursorstr.h" +#include "dix.h" +#include "dixaccess.h" +#include "dixevents.h" +#include "dixfont.h" +#include "dixfontstr.h" +#include "dixgrabs.h" +#include "dixstruct.h" +#include "exevents.h" +#include "extension.h" +#include "extinit.h" +#include "extnsionst.h" +#include "gc.h" +#include "gcstruct.h" +#include "globals.h" +#include "input.h" +#include "inputstr.h" +/* already included */ +/* +#include "misc.h" +#include "miscstruct.h" + */ +#include "opaque.h" +#include "os.h" +#include "pixmap.h" +#include "pixmapstr.h" +#include "privates.h" +#include "property.h" +#include "propertyst.h" +#include "ptrveloc.h" +#include "region.h" +#include "regionstr.h" +#include "registry.h" +#include "resource.h" +#include "rgb.h" +#include "screenint.h" +#include "scrnintstr.h" +#include "selection.h" +#include "servermd.h" +#include "site.h" +#include "swaprep.h" +#include "swapreq.h" +#include "validate.h" +#include "window.h" +#include "windowstr.h" +#include "xace.h" +#include "xkbfile.h" +#include "xkbsrv.h" +#include "xkbstr.h" +#include "xkbrules.h" +#include "xserver-properties.h" + +/* + * These symbols are referenced to ensure they + * will be available in the X Server binary. + */ +/* topdir=../../.. */ +_X_HIDDEN void *xorg_symbols[] = { + (void *) &WaitForSomething, + (void *) &ReadRequestFromClient, + (void *) &InsertFakeRequest, + (void *) &ResetCurrentRequest, + (void *) &FlushAllOutput, + (void *) &FlushIfCriticalOutputPending, + (void *) &SetCriticalOutputPending, + (void *) &WriteToClient, + (void *) &ResetOsBuffers, + (void *) &InitConnectionLimits, + (void *) &NotifyParentProcess, + (void *) &CreateWellKnownSockets, + (void *) &ResetWellKnownSockets, + (void *) &CloseWellKnownConnections, + (void *) &AuthorizationIDOfClient, + (void *) &ClientAuthorized, + (void *) &EstablishNewConnections, + (void *) &CheckConnections, + (void *) &CloseDownConnection, + (void *) &AddGeneralSocket, + (void *) &RemoveGeneralSocket, + (void *) &AddEnabledDevice, + (void *) &RemoveEnabledDevice, + (void *) &OnlyListenToOneClient, + (void *) &ListenToAllClients, + (void *) &IgnoreClient, + (void *) &AttendClient, + (void *) &MakeClientGrabImpervious, + (void *) &MakeClientGrabPervious, + (void *) &GetTimeInMillis, + (void *) &AdjustWaitForDelay, + (void *) &TimerInit, + (void *) &TimerForce, + (void *) &TimerSet, + (void *) &TimerCheck, + (void *) &TimerCancel, + (void *) &TimerFree, + (void *) &SetScreenSaverTimer, + (void *) &FreeScreenSaverTimer, + (void *) &AutoResetServer, + (void *) &GiveUp, + (void *) &UseMsg, + (void *) &ProcessCommandLine, + (void *) &set_font_authorizations, + (void *) &Xalloc, + (void *) &Xcalloc, + (void *) &Xrealloc, + (void *) &Xfree, + (void *) &XNFalloc, + (void *) &XNFcalloc, + (void *) &XNFrealloc, + (void *) &Xstrdup, + (void *) &XNFstrdup, + (void *) &Xprintf, + (void *) &Xvprintf, + (void *) &XNFprintf, + (void *) &XNFvprintf, + (void *) &OsSignal, + (void *) &OsRegisterSigWrapper, + (void *) &auditTrailLevel, + (void *) &LockServer, + (void *) &UnlockServer, + (void *) &OsLookupColor, + (void *) &OsInit, + (void *) &OsCleanup, + (void *) &OsVendorFatalError, + (void *) &OsVendorInit, + (void *) &OsBlockSignals, + (void *) &OsReleaseSignals, + (void *) &System, + (void *) &Popen, + (void *) &Pclose, + (void *) &Fopen, + (void *) &Fclose, + (void *) &CheckUserParameters, + (void *) &CheckUserAuthorization, + (void *) &AddHost, + (void *) &ForEachHostInFamily, + (void *) &RemoveHost, + (void *) &GetHosts, + (void *) &InvalidHost, + (void *) &LocalClient, + (void *) &LocalClientCred, + (void *) &GetLocalClientCreds, + (void *) &FreeLocalClientCreds, + (void *) &ChangeAccessControl, + (void *) &GetAccessControl, + (void *) &AddLocalHosts, + (void *) &ResetHosts, + (void *) &EnableLocalHost, + (void *) &DisableLocalHost, + (void *) &AccessUsingXdmcp, + (void *) &DefineSelf, + (void *) &AugmentSelf, + (void *) &RegisterAuthorizations, + (void *) &InitAuthorization, + (void *) &AuthorizationFromID, + (void *) &CheckAuthorization, + (void *) &ResetAuthorization, + (void *) &RemoveAuthorization, + (void *) &AddAuthorization, + (void *) &ddxProcessArgument, + (void *) &ddxUseMsg, + (void *) &ReplyCallback, + (void *) &FlushCallback, + (void *) &AbortDDX, + (void *) &ddxGiveUp, + (void *) &TimeSinceLastInputEvent, + (void *) &strlcpy, + (void *) &strlcat, + (void *) &LogInit, + (void *) &LogClose, + (void *) &LogSetParameter, + (void *) &LogVWrite, + (void *) &LogWrite, + (void *) &LogVMessageVerb, + (void *) &LogMessageVerb, + (void *) &LogMessage, + (void *) &FreeAuditTimer, + (void *) &AuditF, + (void *) &VAuditF, + (void *) &FatalError, + (void *) &VErrorF, + (void *) &ErrorF, + (void *) &Error, + (void *) &LogPrintMarkers, + (void *) &xorg_backtrace, + (void *) &SwapLongs, + (void *) &SwapShorts, + (void *) &MakePredeclaredAtoms, + (void *) &Ones, + (void *) &globalSerialNumber, + (void *) &serverGeneration, + (void *) &AddScreen, + (void *) &GetScratchPixmapHeader, + (void *) &FreeScratchPixmapHeader, + (void *) &CreateScratchPixmapsForScreen, + (void *) &FreeScratchPixmapsForScreen, + (void *) &AllocatePixmap, + (void *) &ValidateGC, + (void *) &ChangeGC, + (void *) &DoChangeGC, + (void *) &dixChangeGC, + (void *) &CreateGC, + (void *) &CopyGC, + (void *) &FreeGC, + (void *) &CreateScratchGC, + (void *) &FreeGCperDepth, + (void *) &CreateGCperDepth, + (void *) &CreateDefaultStipple, + (void *) &FreeDefaultStipple, + (void *) &SetDashes, + (void *) &VerifyRectOrder, + (void *) &SetClipRects, + (void *) &GetScratchGC, + (void *) &FreeScratchGC, + (void *) &miEmptyBox, + (void *) &miEmptyData, + (void *) &miBrokenData, + (void *) &InitRegions, + (void *) &miRegionCreate, + (void *) &miRegionInit, + (void *) &miRegionDestroy, + (void *) &miRegionUninit, + (void *) &miRegionCopy, + (void *) &miIntersect, + (void *) &miUnion, + (void *) &miRegionAppend, + (void *) &miRegionValidate, + (void *) &miRectsToRegion, + (void *) &miSubtract, + (void *) &miInverse, + (void *) &miRectIn, + (void *) &miTranslateRegion, + (void *) &miRegionReset, + (void *) &miRegionBreak, + (void *) &miPointInRegion, + (void *) &miRegionEqual, + (void *) &miRegionNotEmpty, + (void *) &miRegionEmpty, + (void *) &miRegionExtents, + (void *) &miPrintRegion, + (void *) &TraverseTree, + (void *) &WalkTree, + (void *) &CreateRootWindow, + (void *) &InitRootWindow, + (void *) &RegisterRealChildHeadProc, + (void *) &RealChildHead, + (void *) &CreateWindow, + (void *) &DeleteWindow, + (void *) &DestroySubwindows, + (void *) &ChangeWindowAttributes, + (void *) &ChangeWindowDeviceCursor, + (void *) &WindowGetDeviceCursor, + (void *) &GetWindowAttributes, + (void *) &GravityTranslate, + (void *) &ConfigureWindow, + (void *) &CirculateWindow, + (void *) &ReparentWindow, + (void *) &MapWindow, + (void *) &MapSubwindows, + (void *) &UnmapWindow, + (void *) &UnmapSubwindows, + (void *) &HandleSaveSet, + (void *) &PointInWindowIsVisible, + (void *) &NotClippedByChildren, + (void *) &SendVisibilityNotify, + (void *) &dixSaveScreens, + (void *) &SaveScreens, + (void *) &FindWindowWithOptional, + (void *) &CheckWindowOptionalNeed, + (void *) &MakeWindowOptional, + (void *) &MoveWindowInStack, + (void *) &SetWinSize, + (void *) &SetBorderSize, + (void *) &ResizeChildrenWinSize, + (void *) &ShapeExtensionInit, + (void *) &SendShapeNotify, + (void *) &CreateBoundingShape, + (void *) &CreateClipShape, + (void *) &DisableMapUnmapEvents, + (void *) &EnableMapUnmapEvents, + (void *) &XkbRF_GetComponents, + (void *) &XkbRF_LoadRules, + (void *) &XkbRF_LoadRulesByName, + (void *) &XkbRF_Create, + (void *) &XkbRF_Free, + (void *) &InputEventList, + (void *) &InputEventListLen, + (void *) &defaultKeyboardControl, + (void *) &defaultPointerControl, + (void *) &set_key_down, + (void *) &set_key_up, + (void *) &key_is_down, + (void *) &InitCoreDevices, + (void *) &InitXTestDevices, + (void *) &AddInputDevice, + (void *) &EnableDevice, + (void *) &ActivateDevice, + (void *) &DisableDevice, + (void *) &InitAndStartDevices, + (void *) &CloseDownDevices, + (void *) &UndisplayDevices, + (void *) &RemoveDevice, + (void *) &NumMotionEvents, + (void *) &RegisterPointerDevice, + (void *) &RegisterKeyboardDevice, + (void *) &dixLookupDevice, + (void *) &QueryMinMaxKeyCodes, + (void *) &SetKeySymsMap, + (void *) &InitButtonClassDeviceStruct, + (void *) &InitValuatorClassDeviceStruct, + (void *) &InitPointerAccelerationScheme, + (void *) &InitAbsoluteClassDeviceStruct, + (void *) &InitFocusClassDeviceStruct, + (void *) &InitPtrFeedbackClassDeviceStruct, + (void *) &InitStringFeedbackClassDeviceStruct, + (void *) &InitBellFeedbackClassDeviceStruct, + (void *) &InitLedFeedbackClassDeviceStruct, + (void *) &InitIntegerFeedbackClassDeviceStruct, + (void *) &InitPointerDeviceStruct, + (void *) &InitKeyboardDeviceStruct, + (void *) &ApplyPointerMapping, + (void *) &BadDeviceMap, + (void *) &NoteLedState, + (void *) &MaybeStopHint, + (void *) &ProcessPointerEvent, + (void *) &ProcessKeyboardEvent, + (void *) &LegalModifier, + (void *) &ProcessInputEvents, + (void *) &InitInput, + (void *) &GetMaximumEventsNum, + (void *) &GetEventList, + (void *) &InitEventList, + (void *) &SetMinimumEventSize, + (void *) &FreeEventList, + (void *) &CreateClassesChangedEvent, + (void *) &GetPointerEvents, + (void *) &GetKeyboardEvents, + (void *) &GetKeyboardValuatorEvents, + (void *) &GetProximityEvents, + (void *) &PostSyntheticMotion, + (void *) &GetMotionHistorySize, + (void *) &AllocateMotionHistory, + (void *) &GetMotionHistory, + (void *) &AttachDevice, + (void *) &GetPairedDevice, + (void *) &GetMaster, + (void *) &AllocDevicePair, + (void *) &DeepCopyDeviceClasses, + (void *) &generate_modkeymap, + (void *) &change_modmap, + (void *) &AllocXTestDevice, + (void *) &IsXTestDevice, + (void *) &GetXTestDevice, + (void *) &GetEventFilter, + (void *) &GetWindowXI2Mask, + (void *) &NewInputDeviceRequest, + (void *) &DeleteInputDeviceRequest, + (void *) &DDXRingBell, + (void *) &EnableCursor, + (void *) &cursorScreenDevPriv, + (void *) &rootCursor, + (void *) &FreeCursor, + (void *) &AllocARGBCursor, + (void *) &AllocGlyphCursor, + (void *) &CreateRootCursor, + (void *) &ServerBitsFromGlyph, + (void *) &CursorMetricsFromGlyph, + (void *) &CheckCursorConfinement, + (void *) &NewCurrentScreen, + (void *) &PointerConfinedToScreen, + (void *) &GetSpritePosition, + (void *) &XineramaGetCursorScreen, + (void *) &GEExtensions, + (void *) &GERegisterExtension, + (void *) &GEInitEvent, + (void *) &GEExtensionInit, + (void *) &clients, + (void *) &serverClient, + (void *) ¤tMaxClients, + (void *) &dispatchExceptionAtReset, + (void *) &checkForInput, + (void *) &SetInputCheck, + (void *) &CloseDownClient, + (void *) &UpdateCurrentTime, + (void *) &UpdateCurrentTimeIf, + (void *) &dixDestroyPixmap, + (void *) &InitClient, + (void *) &NextAvailableClient, + (void *) &SendErrorToClient, + (void *) &MarkClientException, + (void *) &CreateConnectionBlock, + (void *) &CopyISOLatin1Lowered, + (void *) &CompareISOLatin1Lowered, + (void *) &dixLookupWindow, + (void *) &dixLookupDrawable, + (void *) &dixLookupGC, + (void *) &dixLookupClient, + (void *) &NoopDDA, + (void *) &AlterSaveSetForClient, + (void *) &DeleteWindowFromAnySaveSet, + (void *) &BlockHandler, + (void *) &WakeupHandler, + (void *) &RegisterBlockAndWakeupHandlers, + (void *) &RemoveBlockAndWakeupHandlers, + (void *) &InitBlockAndWakeupHandlers, + (void *) &ProcessWorkQueue, + (void *) &ProcessWorkQueueZombies, + (void *) &QueueWorkProc, + (void *) &ClientSleep, + (void *) &ClientSignal, + (void *) &ClientWakeup, + (void *) &ClientIsAsleep, + (void *) &MakeAtom, + (void *) &ValidAtom, + (void *) &NameForAtom, + (void *) &AtomError, + (void *) &FreeAllAtoms, + (void *) &InitAtoms, + (void *) &SetVendorRelease, + (void *) &SetVendorString, + (void *) &SetMaskForEvent, + (void *) &ConfineToShape, + (void *) &IsParent, + (void *) &GetCurrentRootWindow, + (void *) &GetSpriteWindow, + (void *) &NoticeEventTime, + (void *) &EnqueueEvent, + (void *) &ActivatePointerGrab, + (void *) &DeactivatePointerGrab, + (void *) &ActivateKeyboardGrab, + (void *) &DeactivateKeyboardGrab, + (void *) &ActivateFocusInGrab, + (void *) &AllowSome, + (void *) &ReleaseActiveGrabs, + (void *) &DeliverEventsToWindow, + (void *) &DeliverDeviceEvents, + (void *) &InitializeSprite, + (void *) &UpdateSpriteForScreen, + (void *) &WindowHasNewCursor, + (void *) &CheckDeviceGrabs, + (void *) &DeliverFocusedEvent, + (void *) &DeliverGrabbedEvent, + (void *) &FixKeyState, + (void *) &RecalculateDeliverableEvents, + (void *) &OtherClientGone, + (void *) &DoFocusEvents, + (void *) &SetInputFocus, + (void *) &GrabDevice, + (void *) &InitEvents, + (void *) &CloseDownEvents, + (void *) &DeleteWindowFromAnyEvents, + (void *) &EventMaskForClient, + (void *) &DeliverEvents, + (void *) &CheckMotion, + (void *) &WriteEventsToClient, + (void *) &TryClientEvents, + (void *) &WindowsRestructured, + (void *) &SetClientPointer, + (void *) &PickPointer, + (void *) &PickKeyboard, + (void *) &IsInterferingGrab, + (void *) &ReinitializeRootWindow, + (void *) &ScreenRestructured, + (void *) &ffs, + (void *) &AddCallback, + (void *) &DeleteCallback, + (void *) &CallCallbacks, + (void *) &DeleteCallbackList, + (void *) &InitCallbackManager, + (void *) &ServerGrabCallback, + (void *) &EventCallback, + (void *) &DeviceEventCallback, + (void *) &XItoCoreType, + (void *) &DevHasCursor, + (void *) &IsPointerDevice, + (void *) &IsKeyboardDevice, + (void *) &IsPointerEvent, + (void *) &IsMaster, + (void *) &CorePointerProc, + (void *) &CoreKeyboardProc, + (void *) &SecurityLookupWindow, + (void *) &LookupWindow, + (void *) &SecurityLookupDrawable, + (void *) &LookupDrawable, + (void *) &LookupClient, + (void *) &ResourceStateCallback, + (void *) &CreateNewResourceType, + (void *) &CreateNewResourceClass, + (void *) &InitClientResources, + (void *) &FakeClientID, + (void *) &AddResource, + (void *) &FreeResource, + (void *) &FreeResourceByType, + (void *) &ChangeResourceValue, + (void *) &FindClientResourcesByType, + (void *) &FindAllClientResources, + (void *) &FreeClientNeverRetainResources, + (void *) &FreeClientResources, + (void *) &FreeAllResources, + (void *) &LegalNewID, + (void *) &LookupClientResourceComplex, + (void *) &dixLookupResourceByType, + (void *) &dixLookupResourceByClass, + (void *) &GetXIDRange, + (void *) &GetXIDList, + (void *) &lastResourceType, + (void *) &TypeMask, + (void *) &dixLookupResource, + (void *) &SecurityLookupIDByType, + (void *) &SecurityLookupIDByClass, + (void *) &LookupIDByType, + (void *) &LookupIDByClass, + (void *) &dixRequestPrivate, + (void *) &dixAllocatePrivate, + (void *) &dixLookupPrivate, + (void *) &dixLookupPrivateAddr, + (void *) &dixSetPrivate, + (void *) &dixRegisterPrivateInitFunc, + (void *) &dixRegisterPrivateDeleteFunc, + (void *) &dixFreePrivates, + (void *) &dixResetPrivates, + (void *) &dixLookupPrivateOffset, + (void *) &dixRegisterPrivateOffset, + (void *) &PictureCmapPolicy, + (void *) &PictureParseCmapPolicy, + (void *) &RenderErrBase, + (void *) &RenderClientPrivateKey, + (void *) &CreateColormap, + (void *) &FreeColormap, + (void *) &TellLostMap, + (void *) &TellGainedMap, + (void *) &CopyColormapAndFree, + (void *) &AllocColor, + (void *) &FakeAllocColor, + (void *) &FakeFreeColor, + (void *) &FindColor, + (void *) &QueryColors, + (void *) &FreeClientPixels, + (void *) &AllocColorCells, + (void *) &AllocColorPlanes, + (void *) &FreeColors, + (void *) &StoreColors, + (void *) &IsMapInstalled, + (void *) &screenInfo, + (void *) &InitOutput, + (void *) &FindGlyphHashSet, + (void *) &GlyphUninit, + (void *) &FindGlyphHashSet, + (void *) &FindGlyphRef, + (void *) &FindGlyphByHash, + (void *) &HashGlyph, + (void *) &FreeGlyph, + (void *) &AddGlyph, + (void *) &DeleteGlyph, + (void *) &FindGlyph, + (void *) &AllocateGlyph, + (void *) &AllocateGlyphHash, + (void *) &ResizeGlyphHash, + (void *) &ResizeGlyphSet, + (void *) &AllocateGlyphSet, + (void *) &FreeGlyphSet, + (void *) &PictureScreenPrivateKey, + (void *) &PictureWindowPrivateKey, + (void *) &PictureType, + (void *) &PictFormatType, + (void *) &GlyphSetType, + (void *) &PictureDestroyWindow, + (void *) &PictureCloseScreen, + (void *) &PictureStoreColors, + (void *) &PictureInitIndexedFormat, + (void *) &PictureSetSubpixelOrder, + (void *) &PictureGetSubpixelOrder, + (void *) &PictureCreateDefaultFormats, + (void *) &PictureMatchVisual, + (void *) &PictureMatchFormat, + (void *) &PictureInit, + (void *) &PictureGetFilterId, + (void *) &PictureGetFilterName, + (void *) &PictureAddFilter, + (void *) &PictureSetFilterAlias, + (void *) &PictureSetDefaultFilters, + (void *) &PictureResetFilters, + (void *) &PictureFindFilter, + (void *) &SetPicturePictFilter, + (void *) &SetPictureFilter, + (void *) &PictureFinishInit, + (void *) &SetPictureToDefaults, + (void *) &CreatePicture, + (void *) &ChangePicture, + (void *) &SetPictureClipRects, + (void *) &SetPictureClipRegion, + (void *) &SetPictureTransform, + (void *) &CopyPicture, + (void *) &ValidatePicture, + (void *) &FreePicture, + (void *) &FreePictFormat, + (void *) &CompositePicture, + (void *) &CompositeGlyphs, + (void *) &CompositeRects, + (void *) &CompositeTrapezoids, + (void *) &CompositeTriangles, + (void *) &CompositeTriStrip, + (void *) &CompositeTriFan, + (void *) &PictureGradientColor, + (void *) &RenderExtensionInit, + (void *) &AddTraps, + (void *) &CreateSolidPicture, + (void *) &CreateLinearGradientPicture, + (void *) &CreateRadialGradientPicture, + (void *) &CreateConicalGradientPicture, + (void *) &PanoramiXRenderInit, + (void *) &PanoramiXRenderReset, + (void *) &PictTransform_from_xRenderTransform, + (void *) &xRenderTransform_from_PictTransform, + (void *) &PictureTransformPoint, + (void *) &PictureTransformPoint3d, + (void *) &miCreatePicture, + (void *) &miDestroyPicture, + (void *) &miDestroyPictureClip, + (void *) &miChangePictureClip, + (void *) &miChangePicture, + (void *) &miValidatePicture, + (void *) &miChangePictureTransform, + (void *) &miChangePictureFilter, + (void *) &miCompositeSourceValidate, + (void *) &miComputeCompositeRegion, + (void *) &miPictureInit, + (void *) &miRealizeGlyph, + (void *) &miUnrealizeGlyph, + (void *) &miGlyphs, + (void *) &miRenderColorToPixel, + (void *) &miRenderPixelToColor, + (void *) &miIsSolidAlpha, + (void *) &miCompositeRects, + (void *) &miTrapezoidBounds, + (void *) &miTrapezoids, + (void *) &miPointFixedBounds, + (void *) &miTriangleBounds, + (void *) &miTriangles, + (void *) &miTriStrip, + (void *) &miTriFan, + (void *) &miCreateAlphaPicture, + (void *) &miInitIndexed, + (void *) &miCloseIndexed, + (void *) &miUpdateIndexed, + (void *) &RenderSampleCeilY, + (void *) &RenderSampleFloorY, + (void *) &RenderEdgeStep, + (void *) &RenderEdgeInit, + (void *) &RenderLineFixedEdgeInit, + (void *) &miDamageCreate, + (void *) &miDamageRegister, + (void *) &miDamageUnregister, + (void *) &miDamageDestroy, + (void *) &DamageSetup, + (void *) &DamageCreate, + (void *) &DamageDrawInternal, + (void *) &DamageRegister, + (void *) &DamageUnregister, + (void *) &DamageDestroy, + (void *) &DamageSubtract, + (void *) &DamageEmpty, + (void *) &DamageRegion, + (void *) &DamagePendingRegion, + (void *) &DamageRegionAppend, + (void *) &DamageRegionProcessPending, + (void *) &DamageRegionRendered, + (void *) &DamageDamageRegion, + (void *) &DamageSetReportAfterOp, + (void *) &DamageSetPostRenderingFunctions, + (void *) &DamageGetScreenFuncs, + (void *) &ClientStateCallback, + (void *) &ReplyNotSwappd, + (void *) &SmartScheduleTime, + (void *) &SmartScheduleInterval, + (void *) &SmartScheduleSlice, + (void *) &SmartScheduleMaxSlice, + (void *) &SmartScheduleDisable, + (void *) &SmartScheduleStartTimer, + (void *) &SmartScheduleStopTimer, + (void *) &SmartScheduleInit, + (void *) ¤tTime, + (void *) &lastDeviceEventTime, + (void *) &CompareTimeStamps, + (void *) &ClientTimeToServerTime, + (void *) &InitialVector, + (void *) &ProcVector, + (void *) &SwappedProcVector, + (void *) &ReplySwapVector, + (void *) &ProcBadRequest, + (void *) &StandardMinorOpcode, + (void *) &MinorOpcodeOfRequest, + (void *) &EnableDisableExtension, + (void *) &EnableDisableExtensionError, + (void *) &InitExtensions, + (void *) &CloseDownExtensions, + (void *) &EventSwapVector, + (void *) &NotImplemented, + (void *) &AddExtension, + (void *) &AddExtensionAlias, + (void *) &CheckExtension, + (void *) &GetExtensionEntry, + (void *) &GEEventType, + (void *) &GEEventBase, + (void *) &GEErrorBase, + (void *) &GEClientPrivateKey, + (void *) &ProcGEVector, + (void *) &SProcGEVector, + (void *) &ShmRegisterFuncs, + (void *) &ShmRegisterFbFuncs, + (void *) &ShmSegType, + (void *) &ShmCompletionCode, + (void *) &BadShmSegCode, + (void *) &PanoramiXNumScreens, + (void *) &panoramiXdataPtr, + (void *) &PanoramiXPixWidth, + (void *) &PanoramiXPixHeight, + (void *) &PanoramiXTranslateVisualID, + (void *) &PanoramiXConsolidate, + (void *) &PanoramiXCreateConnectionBlock, + (void *) &PanoramiXFindIDByScrnum, + (void *) &XineramaRegisterConnectionBlockCallback, + (void *) &XineramaDeleteResource, + (void *) &XineramaReinitData, + (void *) &XineramaScreenRegions, + (void *) &XRC_DRAWABLE, + (void *) &XRT_WINDOW, + (void *) &XRT_PIXMAP, + (void *) &XRT_GC, + (void *) &XRT_COLORMAP, + (void *) &XineramaVisualsEqualPtr, + (void *) &XineramaGetImageData, + (void *) &xf86CreateI2CBusRec, + (void *) &xf86DestroyI2CBusRec, + (void *) &xf86I2CBusInit, + (void *) &xf86I2CFindBus, + (void *) &xf86I2CGetScreenBuses, + (void *) &xf86CreateI2CDevRec, + (void *) &xf86DestroyI2CDevRec, + (void *) &xf86I2CDevInit, + (void *) &xf86I2CFindDev, + (void *) &xf86I2CProbeAddress, + (void *) &xf86I2CWriteRead, + (void *) &xf86I2CReadStatus, + (void *) &xf86I2CReadByte, + (void *) &xf86I2CReadBytes, + (void *) &xf86I2CReadWord, + (void *) &xf86I2CWriteByte, + (void *) &xf86I2CWriteBytes, + (void *) &xf86I2CWriteWord, + (void *) &xf86I2CWriteVec, + (void *) &ConfiguredMonitor, + (void *) &dixLookupProperty, + (void *) &dixChangeWindowProperty, + (void *) &ChangeWindowProperty, + (void *) &DeleteProperty, + (void *) &DeleteAllWindowProperties, + (void *) &defaultScreenSaverTime, + (void *) &defaultScreenSaverInterval, + (void *) &ScreenSaverTime, + (void *) &ScreenSaverInterval, + (void *) &screenSaverSuspended, + (void *) &defaultFontPath, + (void *) &monitorResolution, + (void *) &defaultColorVisualClass, + (void *) &WindowTable, + (void *) &GrabInProgress, + (void *) &noTestExtensions, + (void *) &dixScreenOrigins, + (void *) &ConnectionInfo, + (void *) &DPMSStandbyTime, + (void *) &DPMSSuspendTime, + (void *) &DPMSOffTime, + (void *) &DPMSPowerLevel, + (void *) &DPMSEnabled, + (void *) &DPMSDisabledSwitch, + (void *) &DPMSCapableFlag, + (void *) &PanoramiXExtensionDisabledHack, + (void *) &noCompositeExtension, + (void *) &noDamageExtension, + (void *) &noDbeExtension, + (void *) &noDPMSExtension, + (void *) &noGlxExtension, + (void *) &noScreenSaverExtension, + (void *) &noMITShmExtension, + (void *) &noRRExtension, + (void *) &noRenderExtension, + (void *) &noResExtension, + (void *) &noXFree86DGAExtension, + (void *) &noXFree86DRIExtension, + (void *) &noXFree86VidModeExtension, + (void *) &noXFixesExtension, + (void *) &noPanoramiXExtension, + (void *) &noXvExtension, + (void *) &noDRI2Extension, + (void *) &defaultTextFont, + (void *) &defaultCursorFont, + (void *) &MaxClients, + (void *) &isItTimeToYield, + (void *) &dispatchException, + (void *) &TimeOutValue, + (void *) &ScreenSaverBlanking, + (void *) &ScreenSaverAllowExposures, + (void *) &defaultScreenSaverBlanking, + (void *) &defaultScreenSaverAllowExposures, + (void *) &display, + (void *) &defaultBackingStore, + (void *) &disableBackingStore, + (void *) &enableBackingStore, + (void *) &PartialNetwork, + (void *) &logoScreenSaver, + (void *) &defeatAccessControl, + (void *) &maxBigRequestSize, + (void *) &party_like_its_1989, + (void *) &whiteRoot, + (void *) &CoreDump, + (void *) &DontPropagateMasks, + (void *) &screenIsSaved, + (void *) &savedScreenInfo, + (void *) &PixmapWidthPaddingInfo, + (void *) &RRTransformInit, + (void *) &RRTransformFini, + (void *) &RRTransformEqual, + (void *) &RRTransformSetFilter, + (void *) &RRTransformCopy, + (void *) &RRTransformCompute, + (void *) &RREventBase, + (void *) &ProcRandrVector, + (void *) &SProcRandrVector, + (void *) &rrPrivKey, + (void *) &RRClientType, + (void *) &RRClientPrivateKey, + (void *) &RRCrtcType, + (void *) &RRExtensionInit, + (void *) &RRScreenSetSizeRange, + (void *) &RRScreenSizeNotify, + (void *) &RRScreenSizeSet, + (void *) &RRSendConfigNotify, + (void *) &ProcRRGetScreenSizeRange, + (void *) &ProcRRSetScreenSize, + (void *) &ProcRRGetScreenResources, + (void *) &ProcRRGetScreenResourcesCurrent, + (void *) &ProcRRSetScreenConfig, + (void *) &ProcRRGetScreenInfo, + (void *) &RRDeliverScreenEvent, + (void *) &miRandRInit, + (void *) &miRRGetInfo, + (void *) &miRRCrtcSet, + (void *) &miRROutputSetProperty, + (void *) &miRROutputGetProperty, + (void *) &miRROutputValidateMode, + (void *) &miRRModeDestroy, + (void *) &RRTellChanged, + (void *) &RRGetInfo, + (void *) &RRInit, + (void *) &RRScreenInit, + (void *) &RRFirstOutput, + (void *) &RRGetRotation, + (void *) &RRVerticalRefresh, + (void *) &RRRegisterSize, + (void *) &RRRegisterRate, + (void *) &RRSetCurrentConfig, + (void *) &RRScreenInit, + (void *) &RRGetRotation, + (void *) &RRCrtcChanged, + (void *) &RRCrtcCreate, + (void *) &RRCrtcSetRotations, + (void *) &RRCrtcSetTransformSupport, + (void *) &RRCrtcNotify, + (void *) &RRDeliverCrtcEvent, + (void *) &RRCrtcSet, + (void *) &RRCrtcGammaSet, + (void *) &RRCrtcGammaGet, + (void *) &RRCrtcGammaNotify, + (void *) &RRCrtcGammaSetSize, + (void *) &RRCrtcGetScanoutSize, + (void *) &RRTransformCompute, + (void *) &RRCrtcGetTransform, + (void *) &RRCrtcPendingTransform, + (void *) &RRCrtcDestroy, + (void *) &RRCrtcTransformSet, + (void *) &RRCrtcInit, + (void *) &ProcRRGetCrtcInfo, + (void *) &ProcRRSetCrtcConfig, + (void *) &ProcRRGetCrtcGammaSize, + (void *) &ProcRRGetCrtcGamma, + (void *) &ProcRRSetCrtcGamma, + (void *) &ProcRRSetCrtcTransform, + (void *) &ProcRRGetCrtcTransform, + (void *) &RRClientKnowsRates, + (void *) &RRModeGet, + (void *) &RRModeDestroy, + (void *) &RRModesForScreen, + (void *) &RRModeInit, + (void *) &ProcRRCreateMode, + (void *) &ProcRRDestroyMode, + (void *) &ProcRRAddOutputMode, + (void *) &ProcRRDeleteOutputMode, + (void *) &RROutputChanged, + (void *) &RROutputCreate, + (void *) &RROutputSetClones, + (void *) &RROutputSetModes, + (void *) &RROutputAddUserMode, + (void *) &RROutputDeleteUserMode, + (void *) &RROutputSetCrtcs, + (void *) &RROutputSetConnection, + (void *) &RROutputSetSubpixelOrder, + (void *) &RROutputSetPhysicalSize, + (void *) &RRDeliverOutputEvent, + (void *) &RROutputDestroy, + (void *) &ProcRRGetOutputInfo, + (void *) &ProcRRSetOutputPrimary, + (void *) &ProcRRGetOutputPrimary, + (void *) &RROutputInit, + (void *) &RRPointerMoved, + (void *) &RRPointerScreenConfigured, + (void *) &RRDeleteAllOutputProperties, + (void *) &RRGetOutputProperty, + (void *) &RRQueryOutputProperty, + (void *) &RRDeleteOutputProperty, + (void *) &RRPostPendingProperties, + (void *) &RRChangeOutputProperty, + (void *) &RRConfigureOutputProperty, + (void *) &ProcRRChangeOutputProperty, + (void *) &ProcRRGetOutputProperty, + (void *) &ProcRRListOutputProperties, + (void *) &ProcRRQueryOutputProperty, + (void *) &ProcRRConfigureOutputProperty, + (void *) &ProcRRDeleteOutputProperty, + (void *) &RRXineramaExtensionInit, + (void *) &ExtensionModuleList, + (void *) &LoadSubModule, + (void *) &UnloadSubModule, + (void *) &UnloadModule, + (void *) &LoaderSymbol, + (void *) &LoaderListDirs, + (void *) &LoaderFreeDirList, + (void *) &LoaderErrorMsg, + (void *) &LoadExtension, + (void *) &LoaderGetOS, + (void *) &LoaderShouldIgnoreABI, + (void *) &LoaderGetABIVersion, + (void *) &xf86SetIntOption, + (void *) &xf86SetRealOption, + (void *) &xf86SetStrOption, + (void *) &xf86SetBoolOption, + (void *) &xf86CheckIntOption, + (void *) &xf86CheckRealOption, + (void *) &xf86CheckStrOption, + (void *) &xf86CheckBoolOption, + (void *) &xf86AddNewOption, + (void *) &xf86NewOption, + (void *) &xf86NextOption, + (void *) &xf86OptionListCreate, + (void *) &xf86OptionListMerge, + (void *) &xf86OptionListFree, + (void *) &xf86OptionName, + (void *) &xf86OptionValue, + (void *) &xf86OptionListReport, + (void *) &xf86FindOption, + (void *) &xf86FindOptionValue, + (void *) &xf86MarkOptionUsed, + (void *) &xf86MarkOptionUsedByName, + (void *) &xf86CheckIfOptionUsed, + (void *) &xf86CheckIfOptionUsedByName, + (void *) &xf86ShowUnusedOptions, + (void *) &xf86ProcessOptions, + (void *) &xf86TokenToOptinfo, + (void *) &xf86TokenToOptName, + (void *) &xf86IsOptionSet, + (void *) &xf86GetOptValString, + (void *) &xf86GetOptValInteger, + (void *) &xf86GetOptValULong, + (void *) &xf86GetOptValReal, + (void *) &xf86GetOptValFreq, + (void *) &xf86GetOptValBool, + (void *) &xf86ReturnOptValBool, + (void *) &xf86NameCmp, + (void *) &xf86NormalizeName, + (void *) &xf86ReplaceIntOption, + (void *) &xf86ReplaceRealOption, + (void *) &xf86ReplaceBoolOption, + (void *) &xf86ReplaceStrOption, + (void *) &pciTag, + (void *) &xf86scanpci, + (void *) &xf86MapDomainMemory, + (void *) &xf86MapLegacyIO, + (void *) &xf86DoConfigure, + (void *) &xf86DoShowOptions, + (void *) &xf86DoConfigurePass1, + (void *) &xf86ScreenKey, + (void *) &xf86CreateRootWindowKey, + (void *) &xf86PixmapKey, + (void *) &xf86Screens, + (void *) &byte_reversed, + (void *) &pciSlotClaimed, + (void *) &fbSlotClaimed, + (void *) &xf86ConfigDRI, + (void *) &xf86inSuspend, + (void *) &xf86DRI2Enabled, + (void *) &VTSwitchEnabled, + (void *) &xf86CheckPciSlot, + (void *) &xf86ClaimPciSlot, + (void *) &xf86UnclaimPciSlot, + (void *) &xf86ParsePciBusString, + (void *) &xf86ComparePciBusString, + (void *) &xf86FormatPciBusNumber, + (void *) &xf86GetFbInfoForScreen, + (void *) &xf86ClaimFbSlot, + (void *) &xf86ClaimNoSlot, + (void *) &xf86EnableAccess, + (void *) &xf86IsPrimaryPci, + (void *) &xf86DriverHasEntities, + (void *) &xf86AddEntityToScreen, + (void *) &xf86SetEntityInstanceForScreen, + (void *) &xf86GetNumEntityInstances, + (void *) &xf86GetDevFromEntity, + (void *) &xf86RemoveEntityFromScreen, + (void *) &xf86GetEntityInfo, + (void *) &xf86GetPciInfoForEntity, + (void *) &xf86SetEntityFuncs, + (void *) &xf86CheckPciMemBase, + (void *) &xf86IsEntityPrimary, + (void *) &xf86EnterServerState, + (void *) &xf86FindScreenForEntity, + (void *) &xf86GetLastScrnFlag, + (void *) &xf86SetLastScrnFlag, + (void *) &xf86IsEntityShared, + (void *) &xf86SetEntityShared, + (void *) &xf86IsEntitySharable, + (void *) &xf86SetEntitySharable, + (void *) &xf86IsPrimInitDone, + (void *) &xf86SetPrimInitDone, + (void *) &xf86ClearPrimInitDone, + (void *) &xf86AllocateEntityPrivateIndex, + (void *) &xf86GetEntityPrivate, + (void *) &xf86AddBusDeviceToConfigure, + (void *) &xf86LockZoom, + (void *) &xf86InitViewport, + (void *) &xf86SetViewport, + (void *) &xf86ZoomViewport, + (void *) &xf86SwitchMode, + (void *) &xf86GetPointerScreenFuncs, + (void *) &xf86InitOrigins, + (void *) &xf86ReconfigureLayout, + (void *) &xf86CVTMode, + (void *) &xf86DPMSInit, + (void *) &DPMSSet, + (void *) &DPMSSupported, + (void *) &DGAInit, + (void *) &DGAReInitModes, + (void *) &xf86SetDGAMode, + (void *) &SetTimeSinceLastInputEvent, + (void *) &xf86AddInputHandler, + (void *) &xf86RemoveInputHandler, + (void *) &xf86DisableInputHandler, + (void *) &xf86EnableInputHandler, + (void *) &xf86AddGeneralHandler, + (void *) &xf86RemoveGeneralHandler, + (void *) &xf86DisableGeneralHandler, + (void *) &xf86EnableGeneralHandler, + (void *) &xf86InterceptSignals, + (void *) &xf86InterceptSigIll, + (void *) &xf86EnableVTSwitch, + (void *) &xf86ProcessActionEvent, + (void *) &xf86PrintBacktrace, + (void *) &xf86AddDriver, + (void *) &xf86DeleteDriver, + (void *) &xf86AllocateScreen, + (void *) &xf86DeleteScreen, + (void *) &xf86AllocateScrnInfoPrivateIndex, + (void *) &xf86AddPixFormat, + (void *) &xf86SetDepthBpp, + (void *) &xf86PrintDepthBpp, + (void *) &xf86SetWeight, + (void *) &xf86SetDefaultVisual, + (void *) &xf86SetGamma, + (void *) &xf86SetDpi, + (void *) &xf86SetBlackWhitePixels, + (void *) &xf86EnableDisableFBAccess, + (void *) &xf86VDrvMsgVerb, + (void *) &xf86DrvMsgVerb, + (void *) &xf86DrvMsg, + (void *) &xf86MsgVerb, + (void *) &xf86Msg, + (void *) &xf86ErrorFVerb, + (void *) &xf86ErrorF, + (void *) &xf86TokenToString, + (void *) &xf86StringToToken, + (void *) &xf86ShowClocks, + (void *) &xf86PrintChipsets, + (void *) &xf86MatchDevice, + (void *) &xf86MatchPciInstances, + (void *) &xf86GetClocks, + (void *) &xf86GetVisualName, + (void *) &xf86GetVerbosity, + (void *) &xf86GetPix24, + (void *) &xf86GetDepth, + (void *) &xf86GetWeight, + (void *) &xf86GetGamma, + (void *) &xf86GetFlipPixels, + (void *) &xf86GetServerName, + (void *) &xf86ServerIsExiting, + (void *) &xf86ServerIsResetting, + (void *) &xf86ServerIsInitialising, + (void *) &xf86ServerIsOnlyDetecting, + (void *) &xf86CaughtSignal, + (void *) &xf86GetVidModeAllowNonLocal, + (void *) &xf86GetVidModeEnabled, + (void *) &xf86GetModInDevAllowNonLocal, + (void *) &xf86GetModInDevEnabled, + (void *) &xf86GetAllowMouseOpenFail, + (void *) &xf86IsPc98, + (void *) &xf86DisableRandR, + (void *) &xorgGetVersion, + (void *) &xf86GetModuleVersion, + (void *) &xf86LoadDrvSubModule, + (void *) &xf86LoadSubModule, + (void *) &xf86LoadOneModule, + (void *) &xf86UnloadSubModule, + (void *) &xf86LoaderCheckSymbol, + (void *) &xf86SetBackingStore, + (void *) &xf86SetSilkenMouse, + (void *) &xf86FindXvOptions, + (void *) &xf86GetOS, + (void *) &xf86ConfigPciEntity, + (void *) &xf86ConfigFbEntity, + (void *) &xf86ConfigActivePciEntity, + (void *) &xf86IsScreenPrimary, + (void *) &xf86RegisterRootWindowProperty, + (void *) &xf86IsUnblank, + (void *) &xf86GetPixFormat, + (void *) &xf86GetBppFromDepth, + (void *) &xf86GetNearestClock, + (void *) &xf86ModeStatusToString, + (void *) &xf86LookupMode, + (void *) &xf86CheckModeForMonitor, + (void *) &xf86InitialCheckModeForDriver, + (void *) &xf86CheckModeForDriver, + (void *) &xf86ValidateModes, + (void *) &xf86DeleteMode, + (void *) &xf86PruneDriverModes, + (void *) &xf86SetCrtcForModes, + (void *) &xf86PrintModes, + (void *) &xf86ShowClockRanges, + (void *) &xf86ModeHSync, + (void *) &xf86ModeVRefresh, + (void *) &xf86SetModeDefaultName, + (void *) &xf86SetModeCrtc, + (void *) &xf86DuplicateMode, + (void *) &xf86DuplicateModes, + (void *) &xf86ModesEqual, + (void *) &xf86PrintModeline, + (void *) &xf86ModesAdd, + (void *) &xf86CollectOptions, + (void *) &xf86RandRInit, + (void *) &xf86GetRotation, + (void *) &xf86RandRSetNewVirtualAndDimensions, + (void *) &VidModeExtensionInit, + (void *) &xf86addNewOption, + (void *) &xf86optionListDup, + (void *) &xf86optionListFree, + (void *) &xf86optionName, + (void *) &xf86optionValue, + (void *) &xf86newOption, + (void *) &xf86nextOption, + (void *) &xf86findOption, + (void *) &xf86findOptionValue, + (void *) &xf86optionListCreate, + (void *) &xf86optionListMerge, + (void *) &xf86nameCompare, + (void *) &xf86uLongToString, + (void *) &xf86parseOption, + (void *) &xf86printOptionList, + (void *) &xf86openConfigFile, + (void *) &xf86setBuiltinConfig, + (void *) &xf86readConfigFile, + (void *) &xf86closeConfigFile, + (void *) &xf86freeConfig, + (void *) &xf86writeConfigFile, + (void *) &xf86findDevice, + (void *) &xf86findLayout, + (void *) &xf86findMonitor, + (void *) &xf86findModes, + (void *) &xf86findModeLine, + (void *) &xf86findScreen, + (void *) &xf86findInput, + (void *) &xf86findInputByDriver, + (void *) &xf86findVideoAdaptor, + (void *) &xf86addListItem, + (void *) &xf86itemNotSublist, + (void *) &xf86pathIsAbsolute, + (void *) &xf86pathIsSafe, + (void *) &xf86addComment, + (void *) &xf86ModeHSync, + (void *) &xf86ModeVRefresh, + (void *) &xf86ModeBandwidth, + (void *) &xf86ModeWidth, + (void *) &xf86ModeHeight, + (void *) &xf86DuplicateMode, + (void *) &xf86DuplicateModes, + (void *) &xf86SetModeDefaultName, + (void *) &xf86SetModeCrtc, + (void *) &xf86ModesEqual, + (void *) &xf86PrintModeline, + (void *) &xf86ModesAdd, + (void *) &xf86DDCGetModes, + (void *) &xf86CVTMode, + (void *) &xf86GTFMode, + (void *) &xf86ModeIsReduced, + (void *) &xf86ValidateModesFlags, + (void *) &xf86ValidateModesClocks, + (void *) &xf86ValidateModesSize, + (void *) &xf86ValidateModesSync, + (void *) &xf86ValidateModesBandwidth, + (void *) &xf86ValidateModesReducedBlanking, + (void *) &xf86PruneInvalidModes, + (void *) &xf86ValidateModesFlags, + (void *) &xf86ValidateModesUserConfig, + (void *) &xf86GetMonitorModes, + (void *) &xf86GetDefaultModes, + (void *) &xf86DDCApplyQuirks, + (void *) &miDCInitialize, + (void *) &miPointerInitialize, + (void *) &miPointerWarpCursor, + (void *) &miPointerCurrentScreen, + (void *) &miPointerGetScreen, + (void *) &miPointerSetScreen, + (void *) &miPointerGetPosition, + (void *) &miPointerSetPosition, + (void *) &miPointerUpdateSprite, + (void *) &miPointerScreenKey, + (void *) &xf86InitCursor, + (void *) &xf86CreateCursorInfoRec, + (void *) &xf86DestroyCursorInfoRec, + (void *) &xf86ForceHWCursor, + (void *) &xf86CrtcConfigPrivateIndex, + (void *) &xf86CrtcConfigInit, + (void *) &xf86CrtcSetSizeRange, + (void *) &xf86CrtcCreate, + (void *) &xf86CrtcDestroy, + (void *) &xf86CrtcSetModeTransform, + (void *) &xf86CrtcSetMode, + (void *) &xf86CrtcSetOrigin, + (void *) &xf86CrtcRotate, + (void *) &xf86RotateDestroy, + (void *) &xf86RotateFreeShadow, + (void *) &xf86RotateCloseScreen, + (void *) &xf86CrtcInUse, + (void *) &xf86OutputCreate, + (void *) &xf86OutputUseScreenMonitor, + (void *) &xf86OutputRename, + (void *) &xf86OutputDestroy, + (void *) &xf86ProbeOutputModes, + (void *) &xf86SetScrnInfoModes, + (void *) &xf86CrtcScreenInit, + (void *) &xf86InitialConfiguration, + (void *) &xf86DPMSSet, + (void *) &xf86SaveScreen, + (void *) &xf86DisableUnusedFunctions, + (void *) &xf86OutputFindClosestMode, + (void *) &xf86SetSingleMode, + (void *) &xf86OutputSetEDID, + (void *) &xf86OutputGetEDIDModes, + (void *) &xf86OutputGetEDID, + (void *) &xf86DiDGAInit, + (void *) &xf86DiDGAReInit, + (void *) &xf86CrtcSetScreenSubpixelOrder, + (void *) &xf86ConnectorGetName, + (void *) &xf86SetDesiredModes, + (void *) &xf86_cursors_init, + (void *) &xf86_reload_cursors, + (void *) &xf86_show_cursors, + (void *) &xf86_hide_cursors, + (void *) &xf86_cursors_fini, + (void *) &xf86_crtc_clip_video_helper, + (void *) &xf86_wrap_crtc_notify, + (void *) &xf86_unwrap_crtc_notify, + (void *) &xf86_crtc_notify, + (void *) &xf86_crtc_supports_gamma, + (void *) &xf86RandR12CreateScreenResources, + (void *) &xf86RandR12Init, + (void *) &xf86RandR12SetRotations, + (void *) &xf86RandR12SetTransformSupport, + (void *) &xf86RandR12SetConfig, + (void *) &xf86RandR12GetRotation, + (void *) &xf86RandR12GetOriginalVirtualSize, + (void *) &xf86RandR12PreInit, + (void *) &xf86RandR12TellChanged, + (void *) &xf86DoEDID_DDC1, + (void *) &xf86DoEDID_DDC2, + (void *) &xf86DoEEDID, + (void *) &xf86PrintEDID, + (void *) &xf86InterpretEDID, + (void *) &xf86InterpretEEDID, + (void *) &xf86EdidMonitorSet, + (void *) &xf86SetDDCproperties, + (void *) &xf86DDCGetModes, + (void *) &xf86MonitorIsHDMI, + (void *) &xf86DoDisplayID, + (void *) &xf86DisplayIDMonitorSet, + (void *) &FindDMTMode, + (void *) &DMTModes, + (void *) &xf86ConfigFile, + (void *) &xf86AllowMouseOpenFail, + (void *) &xf86VidModeDisabled, + (void *) &xf86VidModeAllowNonLocal, + (void *) &xf86fpFlag, + (void *) &xf86sFlag, + (void *) &xf86bsEnableFlag, + (void *) &xf86bsDisableFlag, + (void *) &xf86silkenMouseDisableFlag, + (void *) &xf86xkbdirFlag, + (void *) &xf86LayoutName, + (void *) &xf86ScreenName, + (void *) &xf86PointerName, + (void *) &xf86KeyboardName, + (void *) &xf86FbBpp, + (void *) &xf86Depth, + (void *) &xf86Pix24, + (void *) &xf86Weight, + (void *) &xf86FlipPixels, + (void *) &xf86Gamma, + (void *) &xf86ServerName, + (void *) &xf86IsolateDevice, + (void *) &xf86Info, + (void *) &xf86ModulePath, + (void *) &xf86ModPathFrom, + (void *) &xf86LogFile, + (void *) &xf86LogFileFrom, + (void *) &xf86LogFileWasOpened, + (void *) &xf86ConfigLayout, + (void *) &xf86DriverList, + (void *) &xf86NumDrivers, + (void *) &xf86Resetting, + (void *) &xf86Initialising, + (void *) &xf86NumScreens, + (void *) &xf86VisualNames, + (void *) &xf86Verbose, + (void *) &xf86LogVerbose, + (void *) &xorgHWAccess, + (void *) &xf86RegisteredPropertiesTable, + (void *) &xf86BusProbe, + (void *) &xf86AccessInit, + (void *) &xf86AccessEnter, + (void *) &xf86AccessLeave, + (void *) &xf86EntityInit, + (void *) &xf86FindPrimaryDevice, + (void *) &xf86PostProbe, + (void *) &xf86ClearEntityListForScreen, + (void *) &xf86AddDevToEntity, + (void *) &xf86PostScreenInit, + (void *) &xf86PathIsSafe, + (void *) &xf86DefaultModes, + (void *) &xf86NumDefaultModes, + (void *) &DoConfigure, + (void *) &DoShowOptions, + (void *) &xf86Wakeup, + (void *) &xf86SigWrapper, + (void *) &xf86HandlePMEvents, + (void *) &xf86PMGetEventFromOs, + (void *) &xf86PMConfirmEventToOs, + (void *) &xf86LogInit, + (void *) &xf86CloseLog, + (void *) &xf86LoadModules, + (void *) &xf86SetVerbosity, + (void *) &xf86SetLogVerbosity, + (void *) &xf86CallDriverProbe, + (void *) &xf86Events, + (void *) &xf86HandleColormaps, + (void *) &xf86ChangeGamma, + (void *) &xf86ChangeGammaRamp, + (void *) &xf86GetGammaRampSize, + (void *) &xf86GetGammaRamp, + (void *) &xf86RegisterOffscreenManager, + (void *) &xf86InitFBManagerRegion, + (void *) &xf86InitFBManagerArea, + (void *) &xf86InitFBManager, + (void *) &xf86InitFBManagerLinear, + (void *) &xf86FBManagerRunning, + (void *) &xf86AllocateOffscreenArea, + (void *) &xf86AllocateLinearOffscreenArea, + (void *) &xf86AllocateOffscreenLinear, + (void *) &xf86FreeOffscreenArea, + (void *) &xf86FreeOffscreenLinear, + (void *) &xf86ResizeOffscreenArea, + (void *) &xf86ResizeOffscreenLinear, + (void *) &xf86RegisterFreeBoxCallback, + (void *) &xf86PurgeUnlockedOffscreenAreas, + (void *) &xf86QueryLargestOffscreenArea, + (void *) &xf86QueryLargestOffscreenLinear, + (void *) &inputInfo, + (void *) &CloseInputDevice, + (void *) &AddOtherInputDevices, + (void *) &OpenInputDevice, + (void *) &SetDeviceMode, + (void *) &SetDeviceValuators, + (void *) &ChangeDeviceControl, + (void *) &xf86InputDevs, + (void *) &xf86PostMotionEvent, + (void *) &xf86PostMotionEventP, + (void *) &xf86PostProximityEvent, + (void *) &xf86PostProximityEventP, + (void *) &xf86PostButtonEvent, + (void *) &xf86PostButtonEventP, + (void *) &xf86PostKeyEvent, + (void *) &xf86PostKeyEventP, + (void *) &xf86PostKeyboardEvent, + (void *) &xf86ActivateDevice, + (void *) &xf86FirstLocalDevice, + (void *) &xf86ScaleAxis, + (void *) &xf86XInputSetScreen, + (void *) &xf86ProcessCommonOptions, + (void *) &xf86InitValuatorAxisStruct, + (void *) &xf86InitValuatorDefaults, + (void *) &xf86AddEnabledDevice, + (void *) &xf86RemoveEnabledDevice, + (void *) &xf86DisableDevice, + (void *) &xf86EnableDevice, + (void *) &xf86AddInputDriver, + (void *) &xf86DeleteInputDriver, + (void *) &xf86AllocateInput, + (void *) &xf86LookupInputDriver, + (void *) &xf86LookupInput, + (void *) &xf86DeleteInput, + (void *) &xf86MotionHistoryAllocate, + (void *) &xf86CollectInputOptions, + (void *) &xf86VGAarbiterInit, + (void *) &xf86VGAarbiterFini, + (void *) &xf86VGAarbiterWrapFunctions, + (void *) &xf86VGAarbiterLock, + (void *) &xf86VGAarbiterUnlock, + (void *) &xf86VGAarbiterDeviceDecodes, + (void *) &xf86VGAarbiterAllowDRI, + (void *) &XisbNew, + (void *) &XisbFree, + (void *) &XisbRead, + (void *) &XisbWrite, + (void *) &XisbTrace, + (void *) &XisbBlockDuration, + (void *) &xf86XVScreenInit, + (void *) &xf86XVRegisterGenericAdaptorDriver, + (void *) &xf86XVListGenericAdaptors, + (void *) &xf86XVRegisterOffscreenImages, + (void *) &xf86XVQueryOffscreenImages, + (void *) &xf86XVAllocateVideoAdaptorRec, + (void *) &xf86XVFreeVideoAdaptorRec, + (void *) &xf86XVFillKeyHelper, + (void *) &xf86XVFillKeyHelperDrawable, + (void *) &xf86XVClipVideoHelper, + (void *) &xf86XVCopyYUV12ToPacked, + (void *) &xf86XVCopyPacked, + (void *) &XvGetScreenKeyProc, + (void *) &XvGetRTPortProc, + (void *) &XvScreenInitProc, + (void *) &xf86XvMCScreenInit, + (void *) &xf86XvMCCreateAdaptorRec, + (void *) &xf86XvMCDestroyAdaptorRec, + (void *) &XvMCScreenInitProc, + (void *) &XF86XvScreenKey, + (void *) &RamDacHWPrivateIndex, + (void *) &RamDacScreenPrivateIndex, + (void *) &RamDacCreateInfoRec, + (void *) &RamDacHelperCreateInfoRec, + (void *) &RamDacDestroyInfoRec, + (void *) &RamDacHelperDestroyInfoRec, + (void *) &RamDacInit, + (void *) &RamDacHandleColormaps, + (void *) &RamDacFreeRec, + (void *) &RamDacGetHWIndex, + (void *) &BTramdacProbe, + (void *) &BTramdacSave, + (void *) &BTramdacRestore, + (void *) &BTramdacSetBpp, + (void *) &IBMramdacProbe, + (void *) &IBMramdacSave, + (void *) &IBMramdacRestore, + (void *) &IBMramdac526SetBpp, + (void *) &IBMramdac640SetBpp, + (void *) &IBMramdac526CalculateMNPCForClock, + (void *) &IBMramdac640CalculateMNPCForClock, + (void *) &IBMramdac526HWCursorInit, + (void *) &IBMramdac640HWCursorInit, + (void *) &IBMramdac526SetBppWeak, + (void *) &TIramdacCalculateMNPForClock, + (void *) &TIramdacProbe, + (void *) &TIramdacSave, + (void *) &TIramdacRestore, + (void *) &TIramdac3026SetBpp, + (void *) &TIramdac3030SetBpp, + (void *) &TIramdacHWCursorInit, + (void *) &TIramdacLoadPalette, + (void *) &TIramdacLoadPaletteWeak, + (void *) &xf86LinearVidMem, + (void *) &xf86CheckMTRR, + (void *) &xf86MapVidMem, + (void *) &xf86UnMapVidMem, + (void *) &xf86MapReadSideEffects, + (void *) &xf86ReadBIOS, + (void *) &xf86EnableIO, + (void *) &xf86DisableIO, + (void *) &xf86OSRingBell, + (void *) &xf86SetReallySlowBcopy, + (void *) &xf86SlowBcopy, + (void *) &xf86OpenSerial, + (void *) &xf86SetSerial, + (void *) &xf86SetSerialSpeed, + (void *) &xf86ReadSerial, + (void *) &xf86WriteSerial, + (void *) &xf86CloseSerial, + (void *) &xf86FlushInput, + (void *) &xf86WaitForInput, + (void *) &xf86SerialSendBreak, + (void *) &xf86SetSerialModemState, + (void *) &xf86GetSerialModemState, + (void *) &xf86SerialModemSetBits, + (void *) &xf86SerialModemClearBits, + (void *) &xf86LoadKernelModule, + (void *) &xf86AgpGARTSupported, + (void *) &xf86GetAGPInfo, + (void *) &xf86AcquireGART, + (void *) &xf86ReleaseGART, + (void *) &xf86AllocateGARTMemory, + (void *) &xf86DeallocateGARTMemory, + (void *) &xf86BindGARTMemory, + (void *) &xf86UnbindGARTMemory, + (void *) &xf86EnableAGP, + (void *) &xf86GARTCloseScreen, + (void *) &xf86InstallSIGIOHandler, + (void *) &xf86RemoveSIGIOHandler, + (void *) &xf86BlockSIGIO, + (void *) &xf86UnblockSIGIO, + (void *) &xf86AssertBlockedSIGIO, + (void *) &xf86SIGIOSupported, + (void *) &miInitializeBanking, + (void *) &miScanLineWidth, + (void *) &miInstalledMaps, + (void *) &miListInstalledColormaps, + (void *) &miInstallColormap, + (void *) &miUninstallColormap, + (void *) &miResolveColor, + (void *) &miInitializeColormap, + (void *) &miExpandDirectColors, + (void *) &miCreateDefColormap, + (void *) &miClearVisualTypes, + (void *) &miSetVisualTypes, + (void *) &miSetPixmapDepths, + (void *) &miSetVisualTypesAndMasks, + (void *) &miGetDefaultVisualMask, + (void *) &miInitVisuals, + (void *) &miSetZeroLineBias, + (void *) &miZeroLineScreenKey, + (void *) &miZeroClipLine, + (void *) &miPolyArc, + (void *) &miCopyArea, + (void *) &miCopyPlane, + (void *) &miGetImage, + (void *) &miPutImage, + (void *) &miCopyRegion, + (void *) &miDoCopy, + (void *) &miRecolorCursor, + (void *) &miStepDash, + (void *) &mieqInit, + (void *) &mieqResizeEvents, + (void *) &mieqEnqueue, + (void *) &mieqSwitchScreen, + (void *) &mieqProcessDeviceEvent, + (void *) &mieqProcessInputEvents, + (void *) &CopyGetMasterEvent, + (void *) &miHandleExposures, + (void *) &miSendGraphicsExpose, + (void *) &miSendExposures, + (void *) &miWindowExposures, + (void *) &miPaintWindow, + (void *) &miClearDrawable, + (void *) &miPolyFillRect, + (void *) &miPolyGlyphBlt, + (void *) &miImageGlyphBlt, + (void *) &miFillPolygon, + (void *) &miFillConvexPoly, + (void *) &miFillGeneralPoly, + (void *) &miPolyPoint, + (void *) &miPolyRectangle, + (void *) &miPolySegment, + (void *) &miPolyText8, + (void *) &miPolyText16, + (void *) &miImageText8, + (void *) &miImageText16, + (void *) &miPushPixels, + (void *) &miRectAlloc, + (void *) &miRegionBroken, + (void *) &miModifyPixmapHeader, + (void *) &miCreateScreenResources, + (void *) &miScreenDevPrivateInit, + (void *) &miScreenInit, + (void *) &miAllocateGCPrivateIndex, + (void *) &miShapedWindowIn, + (void *) &miRegisterRedirectBorderClipProc, + (void *) &miValidateTree, + (void *) &miWideLine, + (void *) &miWideDash, + (void *) &miClearToBackground, + (void *) &miMarkWindow, + (void *) &miMarkOverlappedWindows, + (void *) &miHandleValidateExposures, + (void *) &miMoveWindow, + (void *) &miSlideAndSizeWindow, + (void *) &miGetLayerWindow, + (void *) &miSetShape, + (void *) &miChangeBorderWidth, + (void *) &miMarkUnrealizedWindow, + (void *) &miSegregateChildren, + (void *) &miZeroPolyArc, + (void *) &miZeroLine, + (void *) &miZeroDashLine, + (void *) &miPolyFillArc, + (void *) &miInitializeBackingStore, + (void *) &miChangeGC, + (void *) &miDestroyGC, + (void *) &miDestroyClip, + (void *) &miChangeClip, + (void *) &miCopyClip, + (void *) &miCopyGC, + (void *) &miComputeCompositeClip, + (void *) &miZeroArcSetup, + (void *) &miFillArcSetup, + (void *) &miFillArcSliceSetup, + (void *) &miInitSpanGroup, + (void *) &miAppendSpans, + (void *) &miFillUniqueSpanGroup, + (void *) &miFreeSpanGroup, + (void *) &miClipSpans, + (void *) &miFillSppPoly, + (void *) &miRoundJoinClip, + (void *) &miRoundCapClip, + (void *) &miPolyBuildEdge, + (void *) &miPolyBuildPoly, + (void *) &miInitOverlay, + (void *) &miOverlayGetPrivateClips, + (void *) &miOverlayCollectUnderlayRegions, + (void *) &miOverlayComputeCompositeClip, + (void *) &miOverlayCopyUnderlay, + (void *) &miOverlaySetTransFunction, + (void *) &miOverlaySetRootClip, + (void *) &RegionResType, + (void *) &XFixesErrorBase, + (void *) &XFixesRegionCopy, + (void *) &config_init, + (void *) &config_fini, + (void *) &SetCriticalEvent, + (void *) &GetSpriteCursor, + (void *) &ProcAllowEvents, + (void *) &MaybeDeliverEventsToClient, + (void *) &ProcWarpPointer, + (void *) &EventSelectForWindow, + (void *) &EventSuppressForWindow, + (void *) &ProcSetInputFocus, + (void *) &ProcGetInputFocus, + (void *) &ProcGrabPointer, + (void *) &ProcChangeActivePointerGrab, + (void *) &ProcUngrabPointer, + (void *) &ProcGrabKeyboard, + (void *) &ProcUngrabKeyboard, + (void *) &ProcQueryPointer, + (void *) &ProcSendEvent, + (void *) &ProcUngrabKey, + (void *) &ProcGrabKey, + (void *) &ProcGrabButton, + (void *) &ProcUngrabButton, + (void *) &ProcRecolorCursor, + (void *) &PostSyntheticMotion, + (void *) &SetDefaultFont, + (void *) &QueueFontWakeup, + (void *) &RemoveFontWakeup, + (void *) &FontWakeup, + (void *) &OpenFont, + (void *) &CloseFont, + (void *) &QueryFont, + (void *) &ListFonts, + (void *) &doListFontsWithInfo, + (void *) &doPolyText, + (void *) &PolyText, + (void *) &doImageText, + (void *) &ImageText, + (void *) &SetFontPath, + (void *) &SetDefaultFontPath, + (void *) &GetFontPath, + (void *) &DeleteClientFontStuff, + (void *) &InitFonts, + (void *) &FreeFonts, + (void *) &find_old_font, + (void *) &GetGlyphs, + (void *) &QueryGlyphExtents, + (void *) &QueryTextExtents, + (void *) &ParseGlyphCachingMode, + (void *) &InitGlyphCaching, + (void *) &SetGlyphCachingMode, + (void *) &BuiltinRegisterFpeFunctions, + (void *) &client_auth_generation, + (void *) &DeleteFontClientID, + (void *) &GetClientResolutions, + (void *) &GetDefaultPointSize, + (void *) &GetNewFontClientID, + (void *) &init_fs_handlers, + (void *) &RegisterFPEFunctions, + (void *) &remove_fs_handlers, + (void *) &StoreFontClientFont, + (void *) &CreateGrab, + (void *) &DeletePassiveGrab, + (void *) &GrabMatchesSecond, + (void *) &AddPassiveGrabToList, + (void *) &DeletePassiveGrabFromList, + (void *) &InitProximityClassDeviceStruct, + (void *) &InitValuatorAxisStruct, + (void *) &XIDeleteAllDeviceProperties, + (void *) &XIDeleteDeviceProperty, + (void *) &XIChangeDeviceProperty, + (void *) &XIGetDeviceProperty, + (void *) &XISetDevicePropertyDeletable, + (void *) &XIRegisterPropertyHandler, + (void *) &XIUnregisterPropertyHandler, + (void *) &XIGetKnownProperty, + (void *) &XIGetDevice, + (void *) &XIPropToInt, + (void *) &XIPropToFloat, + (void *) &RegisterOtherDevice, + (void *) &UpdateDeviceState, + (void *) &ProcessOtherEvent, + (void *) &DeviceFocusEvent, + (void *) &CheckGrabValues, + (void *) &GrabButton, + (void *) &GrabKey, + (void *) &GrabWindow, + (void *) &SelectForWindow, + (void *) &AddExtensionClient, + (void *) &RecalculateDeviceDeliverableEvents, + (void *) &InputClientGone, + (void *) &SendEvent, + (void *) &SetButtonMapping, + (void *) &ChangeKeyMapping, + (void *) &DeleteWindowFromAnyExtEvents, + (void *) &MaybeSendDeviceMotionNotifyHint, + (void *) &CheckDeviceGrabAndHintWindow, + (void *) &MaybeStopDeviceHint, + (void *) &DeviceEventSuppressForWindow, + (void *) &SendEventToAllWindows, + (void *) &XI2EventSwap, + (void *) &XIShouldNotify, + (void *) &XISendDeviceChangedEvent, + (void *) &XISetEventMask, + (void *) &XICheckInvalidMaskBits, + (void *) &XInputExtensionInit, + (void *) &AssignTypeAndName, + (void *) &InitVelocityData, + (void *) &InitTrackers, + (void *) &ProcessVelocityData2D, + (void *) &BasicComputeAcceleration, + (void *) &FreeVelocityData, + (void *) &InitializePredictableAccelerationProperties, + (void *) &SetAccelerationProfile, + (void *) &GetDevicePredictableAccelData, + (void *) &SetDeviceSpecificAccelerationProfile, + (void *) &AccelerationDefaultCleanup, + (void *) &acceleratePointerPredictable, + (void *) &acceleratePointerLightweight, + (void *) &RegisterResourceName, + (void *) &RegisterExtensionNames, + (void *) &LookupMajorName, + (void *) &LookupRequestName, + (void *) &LookupEventName, + (void *) &LookupErrorName, + (void *) &LookupResourceName, + (void *) &dixResetRegistry, + (void *) &dixLookupSelection, + (void *) &CurrentSelections, + (void *) &SelectionCallback, + (void *) &InitSelections, + (void *) &DeleteWindowFromAnySelections, + (void *) &DeleteClientFromAnySelections, + (void *) &Swap32Write, + (void *) &CopySwap32Write, + (void *) &CopySwap16Write, + (void *) &SGenericReply, + (void *) &SGetWindowAttributesReply, + (void *) &SGetGeometryReply, + (void *) &SQueryTreeReply, + (void *) &SInternAtomReply, + (void *) &SGetAtomNameReply, + (void *) &SGetPropertyReply, + (void *) &SListPropertiesReply, + (void *) &SGetSelectionOwnerReply, + (void *) &SQueryPointerReply, + (void *) &SwapTimeCoordWrite, + (void *) &SGetMotionEventsReply, + (void *) &STranslateCoordsReply, + (void *) &SGetInputFocusReply, + (void *) &SQueryKeymapReply, + (void *) &SQueryFontReply, + (void *) &SQueryTextExtentsReply, + (void *) &SListFontsReply, + (void *) &SListFontsWithInfoReply, + (void *) &SGetFontPathReply, + (void *) &SGetImageReply, + (void *) &SListInstalledColormapsReply, + (void *) &SAllocColorReply, + (void *) &SAllocNamedColorReply, + (void *) &SAllocColorCellsReply, + (void *) &SAllocColorPlanesReply, + (void *) &SQColorsExtend, + (void *) &SQueryColorsReply, + (void *) &SLookupColorReply, + (void *) &SQueryBestSizeReply, + (void *) &SListExtensionsReply, + (void *) &SGetKeyboardMappingReply, + (void *) &SGetPointerMappingReply, + (void *) &SGetModifierMappingReply, + (void *) &SGetKeyboardControlReply, + (void *) &SGetPointerControlReply, + (void *) &SGetScreenSaverReply, + (void *) &SLHostsExtend, + (void *) &SListHostsReply, + (void *) &SErrorEvent, + (void *) &SwapConnSetupInfo, + (void *) &WriteSConnectionInfo, + (void *) &SwapConnSetupPrefix, + (void *) &WriteSConnSetupPrefix, + (void *) &SCirculateEvent, + (void *) &SClientMessageEvent, + (void *) &SColormapEvent, + (void *) &SConfigureNotifyEvent, + (void *) &SConfigureRequestEvent, + (void *) &SCreateNotifyEvent, + (void *) &SDestroyNotifyEvent, + (void *) &SEnterLeaveEvent, + (void *) &SExposeEvent, + (void *) &SFocusEvent, + (void *) &SGraphicsExposureEvent, + (void *) &SGravityEvent, + (void *) &SKeyButtonPtrEvent, + (void *) &SKeymapNotifyEvent, + (void *) &SMapNotifyEvent, + (void *) &SMapRequestEvent, + (void *) &SMappingEvent, + (void *) &SNoExposureEvent, + (void *) &SPropertyEvent, + (void *) &SReparentEvent, + (void *) &SResizeRequestEvent, + (void *) &SSelectionClearEvent, + (void *) &SSelectionNotifyEvent, + (void *) &SSelectionRequestEvent, + (void *) &SUnmapNotifyEvent, + (void *) &SVisibilityEvent, + (void *) &SwapColorItem, + (void *) &SwapConnClientPrefix, + (void *) &SProcAllocColor, + (void *) &SProcAllocColorCells, + (void *) &SProcAllocColorPlanes, + (void *) &SProcAllocNamedColor, + (void *) &SProcChangeActivePointerGrab, + (void *) &SProcChangeGC, + (void *) &SProcChangeHosts, + (void *) &SProcChangeKeyboardControl, + (void *) &SProcChangeKeyboardMapping, + (void *) &SProcChangePointerControl, + (void *) &SProcChangeProperty, + (void *) &SProcChangeWindowAttributes, + (void *) &SProcClearToBackground, + (void *) &SProcConfigureWindow, + (void *) &SProcConvertSelection, + (void *) &SProcCopyArea, + (void *) &SProcCopyColormapAndFree, + (void *) &SProcCopyGC, + (void *) &SProcCopyPlane, + (void *) &SProcCreateColormap, + (void *) &SProcCreateCursor, + (void *) &SProcCreateGC, + (void *) &SProcCreateGlyphCursor, + (void *) &SProcCreatePixmap, + (void *) &SProcCreateWindow, + (void *) &SProcDeleteProperty, + (void *) &SProcFillPoly, + (void *) &SProcFreeColors, + (void *) &SProcGetImage, + (void *) &SProcGetMotionEvents, + (void *) &SProcGetProperty, + (void *) &SProcGrabButton, + (void *) &SProcGrabKey, + (void *) &SProcGrabKeyboard, + (void *) &SProcGrabPointer, + (void *) &SProcImageText, + (void *) &SProcInternAtom, + (void *) &SProcListFonts, + (void *) &SProcListFontsWithInfo, + (void *) &SProcLookupColor, + (void *) &SProcNoOperation, + (void *) &SProcOpenFont, + (void *) &SProcPoly, + (void *) &SProcPolyText, + (void *) &SProcPutImage, + (void *) &SProcQueryBestSize, + (void *) &SProcQueryColors, + (void *) &SProcQueryExtension, + (void *) &SProcRecolorCursor, + (void *) &SProcReparentWindow, + (void *) &SProcResourceReq, + (void *) &SProcRotateProperties, + (void *) &SProcSendEvent, + (void *) &SProcSetClipRectangles, + (void *) &SProcSetDashes, + (void *) &SProcSetFontPath, + (void *) &SProcSetInputFocus, + (void *) &SProcSetScreenSaver, + (void *) &SProcSetSelectionOwner, + (void *) &SProcSimpleReq, + (void *) &SProcStoreColors, + (void *) &SProcStoreNamedColor, + (void *) &SProcTranslateCoords, + (void *) &SProcUngrabButton, + (void *) &SProcUngrabKey, + (void *) &SProcWarpPointer, + (void *) &XaceHooks, + (void *) &XaceHook, + (void *) &XaceHookDispatch, + (void *) &XaceHookPropertyAccess, + (void *) &XaceHookSelectionAccess, + (void *) &XaceHookAuditEnd, + (void *) &XaceGetConnectionNumber, + (void *) &XaceIsLocal, + (void *) &XaceCensorImage, + (void *) &XkbIndentText, + (void *) &XkbAtomText, + (void *) &XkbKeysymText, + (void *) &XkbStringText, + (void *) &XkbKeyNameText, + (void *) &XkbModIndexText, + (void *) &XkbModMaskText, + (void *) &XkbVModIndexText, + (void *) &XkbVModMaskText, + (void *) &XkbConfigText, + (void *) &XkbSIMatchText, + (void *) &XkbIMWhichStateMaskText, + (void *) &XkbControlsMaskText, + (void *) &XkbGeomFPText, + (void *) &XkbDoodadTypeText, + (void *) &XkbActionTypeText, + (void *) &XkbActionText, + (void *) &XkbBehaviorText, + (void *) &_XkbKSCheckCase, + (void *) &XkbFindKeycodeByName, + (void *) &XkbInternAtom, + (void *) &XkbConvertGetByNameComponents, + (void *) &XkbNameMatchesPattern, + (void *) &XkbWriteXKBKeycodes, + (void *) &XkbWriteXKBKeyTypes, + (void *) &XkbWriteXKBCompatMap, + (void *) &XkbWriteXKBSymbols, + (void *) &XkbWriteXKBGeometry, + (void *) &XkbWriteXKBKeymapForNames, + (void *) &XkmProbe, + (void *) &XkmReadFile, + (void *) &xkbDevicePrivateKey, + (void *) &xkbUnwrapProc, + (void *) &XkbReqCode, + (void *) &XkbEventBase, + (void *) &XkbKeyboardErrorCode, + (void *) &XkbBaseDirectory, + (void *) &XkbBinDirectory, + (void *) &xkbDebugFlags, + (void *) &DeviceKeyPress, + (void *) &DeviceButtonPress, + (void *) &XkbUseMsg, + (void *) &XkbProcessArguments, + (void *) &XkbSetExtension, + (void *) &SrvXkbFreeCompatMap, + (void *) &SrvXkbFreeNames, + (void *) &_XkbLookupAnyDevice, + (void *) &_XkbLookupKeyboard, + (void *) &_XkbLookupBellDevice, + (void *) &_XkbLookupLedDevice, + (void *) &_XkbLookupButtonDevice, + (void *) &SrvXkbAllocKeyboard, + (void *) &SrvXkbAllocClientMap, + (void *) &SrvXkbAllocServerMap, + (void *) &SrvXkbFreeClientMap, + (void *) &SrvXkbFreeServerMap, + (void *) &SrvXkbAllocIndicatorMaps, + (void *) &SrvXkbAllocCompatMap, + (void *) &SrvXkbAllocNames, + (void *) &SrvXkbAllocControls, + (void *) &SrvXkbCopyKeyTypes, + (void *) &SrvXkbResizeKeyType, + (void *) &SrvXkbFreeKeyboard, + (void *) &XkbSetActionKeyMods, + (void *) &XkbMaskForVMask, + (void *) &SrvXkbVirtualModsToReal, + (void *) &XkbAdjustGroup, + (void *) &SrvXkbResizeKeySyms, + (void *) &SrvXkbResizeKeyActions, + (void *) &XkbUpdateKeyTypesFromCore, + (void *) &XkbUpdateDescActions, + (void *) &XkbUpdateActions, + (void *) &XkbGetCoreMap, + (void *) &XkbApplyMappingChange, + (void *) &XkbSetIndicators, + (void *) &XkbUpdateIndicators, + (void *) &XkbAllocSrvLedInfo, + (void *) &XkbCopySrvLedInfo, + (void *) &XkbFindSrvLedInfo, + (void *) &XkbApplyLedNameChanges, + (void *) &XkbApplyLedMapChanges, + (void *) &XkbApplyLedStateChanges, + (void *) &XkbFlushLedEvents, + (void *) &XkbIndicatorsToUpdate, + (void *) &XkbComputeDerivedState, + (void *) &XkbCheckSecondaryEffects, + (void *) &XkbCheckIndicatorMaps, + (void *) &XkbStateChangedFlags, + (void *) &XkbSendStateNotify, + (void *) &XkbSendMapNotify, + (void *) &XkbComputeControlsNotify, + (void *) &XkbSendControlsNotify, + (void *) &XkbSendCompatMapNotify, + (void *) &XkbHandleBell, + (void *) &XkbSendAccessXNotify, + (void *) &XkbSendNamesNotify, + (void *) &XkbSendActionMessage, + (void *) &XkbSendExtensionDeviceNotify, + (void *) &XkbSendNotification, + (void *) &XkbProcessKeyboardEvent, + (void *) &XkbHandleActions, + (void *) &XkbEnableDisableControls, + (void *) &AccessXInit, + (void *) &AccessXFilterPressEvent, + (void *) &AccessXFilterReleaseEvent, + (void *) &AccessXCancelRepeatKey, + (void *) &AccessXComputeCurveFactor, + (void *) &XkbFindClientResource, + (void *) &XkbAddClientResource, + (void *) &XkbRemoveResourceClient, + (void *) &XkbDDXAccessXBeep, + (void *) &XkbDDXUsesSoftRepeat, + (void *) &XkbDDXKeybdCtrlProc, + (void *) &XkbDDXChangeControls, + (void *) &XkbDDXUpdateDeviceIndicators, + (void *) &XkbDDXFakePointerMotion, + (void *) &XkbDDXFakeDeviceButton, + (void *) &XkbDDXTerminateServer, + (void *) &XkbDDXSwitchScreen, + (void *) &XkbDDXPrivate, + (void *) &XkbDisableComputedAutoRepeats, + (void *) &XkbSetRepeatKeys, + (void *) &SrvXkbLatchModifiers, + (void *) &SrvXkbLatchGroup, + (void *) &XkbClearAllLatchesAndLocks, + (void *) &XkbGetRulesDflts, + (void *) &XkbFreeRMLVOSet, + (void *) &XkbSetRulesDflts, + (void *) &XkbDeleteRulesDflts, + (void *) &SProcXkbDispatch, + (void *) &XkbLookupNamedGeometry, + (void *) &_XkbDupString, + (void *) &XkbConvertCase, + (void *) &SrvXkbChangeKeycodeRange, + (void *) &XkbFreeSrvLedInfo, + (void *) &XkbFreeInfo, + (void *) &SrvXkbChangeTypesOfKey, + (void *) &SrvXkbKeyTypesForCoreSymbols, + (void *) &SrvXkbApplyCompatMapToKey, + (void *) &SrvXkbApplyVirtualModChanges, + (void *) &XkbSendNewKeyboardNotify, + (void *) &XkbCopyKeymap, + (void *) &XkbCopyDeviceKeymap, + (void *) &XkbFilterEvents, + (void *) &XkbDDXList, + (void *) &XkbDDXLoadKeymapByNames, + (void *) &XkbDDXNamesFromRules, + (void *) &XkbCompileKeymap, +}; diff --git a/xorg-server/hw/xfree86/loader/sdksyms.sh b/xorg-server/hw/xfree86/loader/sdksyms.sh new file mode 100644 index 000000000..11865472f --- /dev/null +++ b/xorg-server/hw/xfree86/loader/sdksyms.sh @@ -0,0 +1,418 @@ +#!/bin/sh + +cat > sdksyms.c << EOF +/* This file is automatically generated by sdksyms.sh. */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + + +/* These must be included first */ +#include "misc.h" +#include "miscstruct.h" + + +/* render/Makefile.am */ +#include "picture.h" +#include "mipict.h" +#include "glyphstr.h" +#include "picturestr.h" +#include "renderedge.h" + + +/* fb/Makefile.am -- module */ +/* +#include "fb.h" +#include "fbrop.h" +#include "fboverlay.h" +#include "wfbrename.h" +#include "fbpict.h" + */ + + +/* miext/shadow/Makefile.am -- module */ +/* +#include "shadow.h" + */ + + +/* miext/damage/Makefile.am */ +#include "damage.h" +#include "damagestr.h" + + +/* Xext/Makefile.am -- half is module, half is builtin */ +/* +#include "xvdix.h" +#include "xvmcext.h" + */ +#include "geext.h" +#include "geint.h" +#include "shmint.h" +#if XINERAMA +# include "panoramiXsrv.h" +# include "panoramiX.h" +#endif + + +/* hw/xfree86/int10/Makefile.am -- module */ +/* +#include "xf86int10.h" + */ + + +/* hw/xfree86/i2c/Makefile.am -- "mostly" modules */ +#include "xf86i2c.h" +/* +#include "bt829.h" +#include "fi1236.h" +#include "msp3430.h" +#include "tda8425.h" +#include "tda9850.h" +#include "tda9885.h" +#include "uda1380.h" +#include "i2c_def.h" + */ + + +/* hw/xfree86/modes/Makefile.am */ +#include "xf86Crtc.h" +#include "xf86Modes.h" +#include "xf86RandR12.h" +/* #include "xf86Rename.h" */ + + +/* hw/xfree86/ddc/Makefile.am */ +#include "edid.h" +#include "xf86DDC.h" + + +/* hw/xfree86/dri2/Makefile.am -- module */ +/* +#if DRI2 +# include "dri2.h" +#endif + */ + + +/* hw/xfree86/vgahw/Makefile.am -- module */ +/* +#include "vgaHW.h" + */ + + +/* hw/xfree86/fbdevhw/Makefile.am -- module */ +/* +#include "fbdevhw.h" + */ + + +/* hw/xfree86/common/Makefile.am */ +#include "compiler.h" +#include "fourcc.h" +#include "xf86.h" +#include "xf86Module.h" +#include "xf86Opt.h" +#include "xf86PciInfo.h" +#include "xf86Priv.h" +#include "xf86Privstr.h" +#include "xf86cmap.h" +#include "xf86fbman.h" +#include "xf86str.h" +#include "xf86Xinput.h" +#include "xf86VGAarbiter.h" +#include "xisb.h" +#if XV +# include "xf86xv.h" +# include "xf86xvmc.h" +# include "xf86xvpriv.h" +#endif +/* XF86VidMode code is in libextmod module */ +/* +#if XF86VIDMODE +# include "vidmodeproc.h" +#endif + */ +#include "xorgVersion.h" +#if defined(__sparc__) || defined(__sparc) +# include "xf86sbusBus.h" +#endif + + +/* hw/xfree86/ramdac/Makefile.am */ +#include "BT.h" +#include "IBM.h" +#include "TI.h" +#include "xf86Cursor.h" +#include "xf86RamDac.h" + + +/* hw/xfree86/shadowfb/Makefile.am -- module */ +/* +#include "shadowfb.h" + */ + + +/* hw/xfree86/os-support/solaris/Makefile.am */ +#if defined(sun386) +# include "agpgart.h" +#endif + + +/* hw/xfree86/os-support/Makefile.am */ +#include "xf86_OSproc.h" +#include "xf86_OSlib.h" + + +/* hw/xfree86/os-support/bus/Makefile.am */ +#include "xf86Pci.h" +#if defined(__sparc__) || defined(__sparc) +# include "xf86Sbus.h" +#endif + + +/* hw/xfree86/xaa/Makefile.am -- module */ +/* +#include "xaa.h" +#include "xaalocal.h" +#include "xaarop.h" +#include "xaaWrapper.h" + */ + + +/* hw/xfree86/dixmods/extmod/Makefile.am -- module */ +/* +#include "dgaproc.h" + */ + + +/* hw/xfree86/parser/Makefile.am */ +#include "xf86Parser.h" +#include "xf86Optrec.h" + + +/* hw/xfree86/vbe/Makefile.am -- module */ +/* +#include "vbe.h" +#include "vbeModes.h" + */ + + +/* hw/xfree86/dri/Makefile.am -- module */ +/* +#if XF86DRI +# include "dri.h" +# include "sarea.h" +# include "dristruct.h" +#endif + */ + + +/* hw/xfree86/xf8_16bpp/Makefile.am -- module */ +/* +#include "cfb8_16.h" + */ + + +/* mi/Makefile.am */ +#include "mibank.h" +#include "micmap.h" +#include "miline.h" +#include "mipointer.h" +#include "mi.h" +#include "mibstore.h" +#include "migc.h" +#include "mipointrst.h" +#include "mizerarc.h" +#include "micoord.h" +#include "mifillarc.h" +#include "mispans.h" +#include "miwideline.h" +#include "mistruct.h" +#include "mifpoly.h" +#include "mioverlay.h" + + +/* randr/Makefile.am */ +#include "randrstr.h" +#include "rrtransform.h" + + +/* dbe/Makefile.am -- module */ +/* +#include "dbestruct.h" + */ + + +/* exa/Makefile.am -- module */ +/* +#include "exa.h" + */ + + +/* xfixes/Makefile.am */ +#include "xfixes.h" + + +/* include/Makefile.am */ +#include "XIstubs.h" +#include "bstore.h" +#include "bstorestr.h" +#include "closestr.h" +#include "closure.h" +#include "colormap.h" +#include "colormapst.h" +#include "hotplug.h" +#include "cursor.h" +#include "cursorstr.h" +#include "dix.h" +#include "dixaccess.h" +#include "dixevents.h" +#include "dixfont.h" +#include "dixfontstr.h" +#include "dixgrabs.h" +#include "dixstruct.h" +#include "exevents.h" +#include "extension.h" +#include "extinit.h" +#include "extnsionst.h" +#include "gc.h" +#include "gcstruct.h" +#include "globals.h" +#include "input.h" +#include "inputstr.h" +/* already included */ +/* +#include "misc.h" +#include "miscstruct.h" + */ +#include "opaque.h" +#include "os.h" +#include "pixmap.h" +#include "pixmapstr.h" +#include "privates.h" +#include "property.h" +#include "propertyst.h" +#include "ptrveloc.h" +#include "region.h" +#include "regionstr.h" +#include "registry.h" +#include "resource.h" +#include "rgb.h" +#include "screenint.h" +#include "scrnintstr.h" +#include "selection.h" +#include "servermd.h" +#include "site.h" +#include "swaprep.h" +#include "swapreq.h" +#include "validate.h" +#include "window.h" +#include "windowstr.h" +#include "xace.h" +#include "xkbfile.h" +#include "xkbsrv.h" +#include "xkbstr.h" +#include "xkbrules.h" +#include "xserver-properties.h" + +EOF + +topdir=$1 +shift +LC_ALL=C +export LC_ALL +${CPP:-cpp} "$@" -DXorgLoader sdksyms.c | ${AWK:-awk} -v topdir=$topdir ' +BEGIN { + sdk = 0; + print("/*"); + print(" * These symbols are referenced to ensure they"); + print(" * will be available in the X Server binary."); + print(" */"); + printf("/* topdir=%s */\n", topdir); + print("_X_HIDDEN void *xorg_symbols[] = {"); + + printf("sdksyms.c:") > "sdksyms.dep"; +} +/^# [0-9]+ "/ { + # Process text after a include in a relative path or when the + # processed file has a basename matching $top_srcdir. + # Note that indexing starts at 1; 0 means no match, and there + # is a starting ". + sdk = $3 !~ /^"\// || index($3, topdir) == 2; + + if (sdk && $3 ~ /\.h"$/) { + # remove quotes + gsub(/"/, "", $3); + if (! headers[$3]) { + printf(" \\\n %s", $3) >> "sdksyms.dep"; + headers[$3] = 1; + } + } +} + +/^extern[ ]/ { + if (sdk) { + n = 3; + + # skip attribute, if any + while ($n ~ /^(__attribute__|__global)/ || + # skip modifiers, if any + $n ~ /^\*?(unsigned|const|volatile|struct)$/ || + # skip pointer + $n ~ /\*$/) + n++; + + # type specifier may not be set, as in + # extern _X_EXPORT unsigned name(...) + if ($n !~ /[^a-zA-Z0-9_]/) + n++; + + # match + # extern _X_EXPORT type (* name[])(...) + if ($n ~ /^[^a-zA-Z0-9_]+$/) + n++; + + # match + # extern _X_EXPORT const name *const ... + if ($n ~ /^([^a-zA-Z0-9_]+)?const$/) + n++; + + # actual name may be in the next line, as in + # extern _X_EXPORT type + # possibly ending with a * + # name(...) + if ($n == "" || $n ~ /^\*+$/) { + getline; + n = 1; + } + + # dont modify $0 or $n + symbol = $n; + + # remove starting non word chars + sub(/^[^a-zA-Z0-9_]+/, "",symbol); + + # remove from first non word to end of line + sub(/[^a-zA-Z0-9_].*/, "", symbol); + + #print; + printf(" (void *) &%s,\n", symbol); + } +} + +END { + print("};"); + + print("") >> "sdksyms.dep"; +}' > _sdksyms.c + +STATUS=$? + +cat _sdksyms.c >> sdksyms.c +rm _sdksyms.c + +[ $? != 0 ] && exit $? + +exit $STATUS diff --git a/xorg-server/hw/xfree86/modes/Makefile.am b/xorg-server/hw/xfree86/modes/Makefile.am index 331e4061c..9236426bf 100644 --- a/xorg-server/hw/xfree86/modes/Makefile.am +++ b/xorg-server/hw/xfree86/modes/Makefile.am @@ -1,19 +1,24 @@ -noinst_LIBRARIES = libxf86modes.a +noinst_LTLIBRARIES = libxf86modes.la -libxf86modes_a_SOURCES = \ +if DGA +DGA_SRCS = xf86DiDGA.c +endif + +libxf86modes_la_SOURCES = \ xf86Crtc.c \ xf86Crtc.h \ xf86Cursors.c \ xf86cvt.c \ xf86gtf.c \ - xf86DiDGA.c \ + xf86DisplayIDModes.c \ xf86EdidModes.c \ xf86Modes.c \ xf86Modes.h \ xf86RandR12.c \ xf86RandR12.h \ xf86Rename.h \ - xf86Rotate.c + xf86Rotate.c \ + $(DGA_SRCS) INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ diff --git a/xorg-server/hw/xfree86/modes/Makefile.in b/xorg-server/hw/xfree86/modes/Makefile.in index 89ed8cadb..b094ff16d 100644 --- a/xorg-server/hw/xfree86/modes/Makefile.in +++ b/xorg-server/hw/xfree86/modes/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/modes DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,18 +53,21 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libxf86modes_a_AR = $(AR) $(ARFLAGS) -libxf86modes_a_LIBADD = -am_libxf86modes_a_OBJECTS = xf86Crtc.$(OBJEXT) xf86Cursors.$(OBJEXT) \ - xf86cvt.$(OBJEXT) xf86gtf.$(OBJEXT) xf86DiDGA.$(OBJEXT) \ - xf86EdidModes.$(OBJEXT) xf86Modes.$(OBJEXT) \ - xf86RandR12.$(OBJEXT) xf86Rotate.$(OBJEXT) -libxf86modes_a_OBJECTS = $(am_libxf86modes_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libxf86modes_la_LIBADD = +am__libxf86modes_la_SOURCES_DIST = xf86Crtc.c xf86Crtc.h xf86Cursors.c \ + xf86cvt.c xf86gtf.c xf86DisplayIDModes.c xf86EdidModes.c \ + xf86Modes.c xf86Modes.h xf86RandR12.c xf86RandR12.h \ + xf86Rename.h xf86Rotate.c xf86DiDGA.c +@DGA_TRUE@am__objects_1 = xf86DiDGA.lo +am_libxf86modes_la_OBJECTS = xf86Crtc.lo xf86Cursors.lo xf86cvt.lo \ + xf86gtf.lo xf86DisplayIDModes.lo xf86EdidModes.lo xf86Modes.lo \ + xf86RandR12.lo xf86Rotate.lo $(am__objects_1) +libxf86modes_la_OBJECTS = $(am_libxf86modes_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -72,8 +78,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libxf86modes_a_SOURCES) -DIST_SOURCES = $(libxf86modes_a_SOURCES) +SOURCES = $(libxf86modes_la_SOURCES) +DIST_SOURCES = $(am__libxf86modes_la_SOURCES_DIST) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -105,6 +111,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -125,9 +132,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -156,7 +166,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -165,9 +177,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -206,12 +222,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -231,7 +248,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -241,6 +257,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -254,11 +271,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -294,6 +310,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -318,7 +335,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -341,6 +357,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -372,27 +389,31 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libxf86modes.a -libxf86modes_a_SOURCES = \ +noinst_LTLIBRARIES = libxf86modes.la +@DGA_TRUE@DGA_SRCS = xf86DiDGA.c +libxf86modes_la_SOURCES = \ xf86Crtc.c \ xf86Crtc.h \ xf86Cursors.c \ xf86cvt.c \ xf86gtf.c \ - xf86DiDGA.c \ + xf86DisplayIDModes.c \ xf86EdidModes.c \ xf86Modes.c \ xf86Modes.h \ xf86RandR12.c \ xf86RandR12.h \ xf86Rename.h \ - xf86Rotate.c + xf86Rotate.c \ + $(DGA_SRCS) INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ @@ -442,12 +463,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libxf86modes.a: $(libxf86modes_a_OBJECTS) $(libxf86modes_a_DEPENDENCIES) - -rm -f libxf86modes.a - $(libxf86modes_a_AR) libxf86modes.a $(libxf86modes_a_OBJECTS) $(libxf86modes_a_LIBADD) - $(RANLIB) libxf86modes.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libxf86modes.la: $(libxf86modes_la_OBJECTS) $(libxf86modes_la_DEPENDENCIES) + $(LINK) $(libxf86modes_la_OBJECTS) $(libxf86modes_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -455,15 +480,16 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Crtc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursors.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DiDGA.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86EdidModes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Modes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR12.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Rotate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cvt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86gtf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Crtc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DiDGA.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DisplayIDModes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86EdidModes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Modes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR12.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Rotate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cvt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86gtf.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -596,7 +622,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -628,7 +654,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -700,7 +726,7 @@ uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c index e9bde36e3..8d636af48 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.c +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c @@ -40,8 +40,7 @@ #include "xf86Priv.h" #include "xf86RandR12.h" #include "X11/extensions/render.h" -#define DPMS_SERVER -#include "X11/extensions/dpms.h" +#include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" #ifdef RENDER #include "picturestr.h" @@ -55,7 +54,7 @@ int xf86CrtcConfigPrivateIndex = -1; -_X_EXPORT void +void xf86CrtcConfigInit (ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec *funcs) { @@ -70,7 +69,7 @@ xf86CrtcConfigInit (ScrnInfoPtr scrn, scrn->privates[xf86CrtcConfigPrivateIndex].ptr = config; } -_X_EXPORT void +void xf86CrtcSetSizeRange (ScrnInfoPtr scrn, int minWidth, int minHeight, int maxWidth, int maxHeight) @@ -86,7 +85,7 @@ xf86CrtcSetSizeRange (ScrnInfoPtr scrn, /* * Crtc functions */ -_X_EXPORT xf86CrtcPtr +xf86CrtcPtr xf86CrtcCreate (ScrnInfoPtr scrn, const xf86CrtcFuncsRec *funcs) { @@ -117,6 +116,16 @@ xf86CrtcCreate (ScrnInfoPtr scrn, crtc->desiredTransformPresent = FALSE; memset (&crtc->bounds, '\0', sizeof (crtc->bounds)); + /* Preallocate gamma at a sensible size. */ + crtc->gamma_size = 256; + crtc->gamma_red = malloc(3 * crtc->gamma_size * sizeof (CARD16)); + if (!crtc->gamma_red) { + xfree (crtc); + return NULL; + } + crtc->gamma_green = crtc->gamma_red + crtc->gamma_size; + crtc->gamma_blue = crtc->gamma_green + crtc->gamma_size; + if (xf86_config->crtc) crtcs = xrealloc (xf86_config->crtc, (xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr)); @@ -132,7 +141,7 @@ xf86CrtcCreate (ScrnInfoPtr scrn, return crtc; } -_X_EXPORT void +void xf86CrtcDestroy (xf86CrtcPtr crtc) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); @@ -150,6 +159,7 @@ xf86CrtcDestroy (xf86CrtcPtr crtc) } if (crtc->params) xfree (crtc->params); + free(crtc->gamma_red); xfree (crtc); } @@ -158,7 +168,7 @@ xf86CrtcDestroy (xf86CrtcPtr crtc) * Return whether any outputs are connected to the specified pipe */ -_X_EXPORT Bool +Bool xf86CrtcInUse (xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; @@ -171,7 +181,7 @@ xf86CrtcInUse (xf86CrtcPtr crtc) return FALSE; } -_X_EXPORT void +void xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen) { #ifdef RENDER @@ -239,7 +249,7 @@ xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen) /** * Sets the given video mode on the given crtc */ -_X_EXPORT Bool +Bool xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, RRTransformPtr transform, int x, int y) { @@ -257,9 +267,11 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati crtc->enabled = xf86CrtcInUse (crtc); + /* We only hit this if someone explicitly sends a "disabled" modeset. */ if (!crtc->enabled) { - /* XXX disable crtc? */ + /* Check everything for stuff that should be off. */ + xf86DisableUnusedFunctions(scrn); return TRUE; } @@ -341,6 +353,11 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati output->funcs->mode_set(output, mode, adjusted_mode); } + /* Only upload when needed, to avoid unneeded delays. */ + if (!crtc->active) + crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, + crtc->gamma_blue, crtc->gamma_size); + /* Now, enable the clocks, plane, pipe, and outputs that we set up. */ crtc->funcs->commit(crtc); for (i = 0; i < xf86_config->num_output; i++) @@ -350,13 +367,14 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati output->funcs->commit(output); } - /* XXX free adjustedmode */ ret = TRUE; - if (scrn->pScreen) - xf86CrtcSetScreenSubpixelOrder (scrn->pScreen); done: - if (!ret) { + if (ret) { + crtc->active = TRUE; + if (scrn->pScreen) + xf86CrtcSetScreenSubpixelOrder (scrn->pScreen); + } else { crtc->x = saved_x; crtc->y = saved_y; crtc->rotation = saved_rotation; @@ -366,6 +384,8 @@ done: crtc->transformPresent = saved_transform_present; } + free(adjusted_mode); + if (didLock) crtc->funcs->unlock (crtc); @@ -376,7 +396,7 @@ done: * Sets the given video mode on the given crtc, but without providing * a transform */ -_X_EXPORT Bool +Bool xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y) { @@ -386,7 +406,7 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, /** * Pans the screen, does not change the mode */ -_X_EXPORT void +void xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y) { crtc->x = x; @@ -420,6 +440,7 @@ typedef enum { OPTION_IGNORE, OPTION_ROTATE, OPTION_PANNING, + OPTION_PRIMARY, } OutputOpts; static OptionInfoRec xf86OutputOptions[] = { @@ -436,6 +457,7 @@ static OptionInfoRec xf86OutputOptions[] = { {OPTION_IGNORE, "Ignore", OPTV_BOOLEAN, {0}, FALSE }, {OPTION_ROTATE, "Rotate", OPTV_STRING, {0}, FALSE }, {OPTION_PANNING, "Panning", OPTV_STRING, {0}, FALSE }, + {OPTION_PRIMARY, "Primary", OPTV_BOOLEAN, {0}, FALSE }, {-1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -444,7 +466,7 @@ enum { }; static OptionInfoRec xf86DeviceOptions[] = { - {OPTION_MODEDEBUG, "ModeDebug", OPTV_STRING, {0}, FALSE }, + {OPTION_MODEDEBUG, "ModeDebug", OPTV_BOOLEAN, {0}, FALSE }, {-1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -560,7 +582,7 @@ xf86OutputInitialRotation (xf86OutputPtr output) return RR_Rotate_0; } -_X_EXPORT xf86OutputPtr +xf86OutputPtr xf86OutputCreate (ScrnInfoPtr scrn, const xf86OutputFuncsRec *funcs, const char *name) @@ -568,6 +590,7 @@ xf86OutputCreate (ScrnInfoPtr scrn, xf86OutputPtr output, *outputs; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int len; + Bool primary; if (name) len = strlen (name) + 1; @@ -613,14 +636,26 @@ xf86OutputCreate (ScrnInfoPtr scrn, xfree (output); return NULL; } - + xf86_config->output = outputs; - xf86_config->output[xf86_config->num_output++] = output; - + + if (xf86GetOptValBool (output->options, OPTION_PRIMARY, &primary) && primary) + { + memmove(xf86_config->output + 1, xf86_config->output, + xf86_config->num_output * sizeof (xf86OutputPtr)); + xf86_config->output[0] = output; + } + else + { + xf86_config->output[xf86_config->num_output] = output; + } + + xf86_config->num_output++; + return output; } -_X_EXPORT Bool +Bool xf86OutputRename (xf86OutputPtr output, const char *name) { int len = strlen(name) + 1; @@ -639,7 +674,7 @@ xf86OutputRename (xf86OutputPtr output, const char *name) return TRUE; } -_X_EXPORT void +void xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor) { if (use_screen_monitor != output->use_screen_monitor) @@ -649,7 +684,7 @@ xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor) } } -_X_EXPORT void +void xf86OutputDestroy (xf86OutputPtr output) { ScrnInfoPtr scrn = output->scrn; @@ -725,7 +760,6 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen) /* * Called at ScreenInit time to set up */ -_X_EXPORT #ifdef RANDR_13_INTERFACE int #else @@ -1484,7 +1518,7 @@ GuessRangeFromModes(MonPtr mon, DisplayModePtr mode) mon->vrefresh[0].lo = 58.0; } -_X_EXPORT void +void xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -1630,8 +1664,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) } if (add_default_modes) - default_modes = xf86GetDefaultModes (output->interlaceAllowed, - output->doubleScanAllowed); + default_modes = xf86GetDefaultModes (); /* * If this is not an RB monitor, remove RB modes from the default @@ -1668,11 +1701,17 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) output->probed_modes = xf86ModesAdd (output->probed_modes, default_modes); /* - * Check all modes against max size + * Check all modes against max size, interlace, and doublescan */ if (maxX && maxY) xf86ValidateModesSize (scrn, output->probed_modes, maxX, maxY, 0); + + { + int flags = (output->interlaceAllowed ? V_INTERLACE : 0) | + (output->doubleScanAllowed ? V_DBLSCAN : 0); + xf86ValidateModesFlags (scrn, output->probed_modes, flags); + } /* * Check all modes against output @@ -1745,7 +1784,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) */ /* XXX where does this function belong? Here? */ -_X_EXPORT void +void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr scrn, int *x, int *y); static DisplayModePtr @@ -1840,7 +1879,7 @@ SetCompatOutput(xf86CrtcConfigPtr config) return output; } -_X_EXPORT void +void xf86SetScrnInfoModes (ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -1885,7 +1924,8 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn) } static void -xf86EnableOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, Bool *enabled) +xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, + Bool *enabled) { Bool any_enabled = FALSE; int o; @@ -2181,6 +2221,99 @@ xf86TargetUserpref(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, return FALSE; } +static Bool +xf86CrtcSetInitialGamma(xf86CrtcPtr crtc, float gamma_red, float gamma_green, + float gamma_blue) +{ + int i, size = 256; + CARD16 *red, *green, *blue; + + red = malloc(3 * size * sizeof(CARD16)); + green = red + size; + blue = green + size; + + /* Only cause warning if user wanted gamma to be set. */ + if (!crtc->funcs->gamma_set && (gamma_red != 1.0 || gamma_green != 1.0 || gamma_blue != 1.0)) { + free(red); + return FALSE; + } else if (!crtc->funcs->gamma_set) { + free(red); + return TRUE; + } + + /* At this early stage none of the randr-interface stuff is up. + * So take the default gamma size for lack of something better. + */ + for (i = 0; i < size; i++) { + if (gamma_red == 1.0) + red[i] = i << 8; + else + red[i] = (CARD16)(pow((double)i/(double)(size - 1), + 1. / (double)gamma_red) * (double)(size - 1) * 256); + + if (gamma_green == 1.0) + green[i] = i << 8; + else + green[i] = (CARD16)(pow((double)i/(double)(size - 1), + 1. / (double)gamma_green) * (double)(size - 1) * 256); + + if (gamma_blue == 1.0) + blue[i] = i << 8; + else + blue[i] = (CARD16)(pow((double)i/(double)(size - 1), + 1. / (double)gamma_blue) * (double)(size - 1) * 256); + } + + /* Default size is 256, so anything else is failure. */ + if (size != crtc->gamma_size) { + free(red); + return FALSE; + } + + crtc->gamma_size = size; + memcpy (crtc->gamma_red, red, crtc->gamma_size * sizeof (CARD16)); + memcpy (crtc->gamma_green, green, crtc->gamma_size * sizeof (CARD16)); + memcpy (crtc->gamma_blue, blue, crtc->gamma_size * sizeof (CARD16)); + + /* Do not set gamma now, delay until the crtc is activated. */ + + free(red); + + return TRUE; +} + +static Bool +xf86OutputSetInitialGamma(xf86OutputPtr output) +{ + XF86ConfMonitorPtr mon = output->conf_monitor; + float gamma_red = 1.0, gamma_green = 1.0, gamma_blue = 1.0; + + if (!mon) + return TRUE; + + if (!output->crtc) + return FALSE; + + /* Get configured values, where they exist. */ + if (mon->mon_gamma_red >= GAMMA_MIN && + mon->mon_gamma_red <= GAMMA_MAX) + gamma_red = mon->mon_gamma_red; + + if (mon->mon_gamma_green >= GAMMA_MIN && + mon->mon_gamma_green <= GAMMA_MAX) + gamma_green = mon->mon_gamma_green; + + if (mon->mon_gamma_blue >= GAMMA_MIN && + mon->mon_gamma_blue <= GAMMA_MAX) + gamma_blue = mon->mon_gamma_blue; + + /* This avoids setting gamma 1.0 in case another cloned output on this crtc has a specific gamma. */ + if (gamma_red != 1.0 || gamma_green != 1.0 || gamma_blue != 1.0) { + xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "Output %s wants gamma correction (%.1f, %.1f, %.1f)\n", output->name, gamma_red, gamma_green, gamma_blue); + return xf86CrtcSetInitialGamma(output->crtc, gamma_red, gamma_green, gamma_blue); + }else + return TRUE; +} /** * Construct default screen configuration @@ -2196,7 +2329,7 @@ xf86TargetUserpref(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, * accordingly. */ -_X_EXPORT Bool +Bool xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -2231,7 +2364,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) modes = xnfcalloc (config->num_output, sizeof (DisplayModePtr)); enabled = xnfcalloc (config->num_output, sizeof (Bool)); - xf86EnableOutputs(scrn, config, enabled); + xf86CollectEnabledOutputs(scrn, config, enabled); if (xf86TargetUserpref(scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n"); @@ -2291,8 +2424,14 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) crtc->enabled = FALSE; memset (&crtc->desiredMode, '\0', sizeof (crtc->desiredMode)); + /* Set default gamma for all crtc's. */ + /* This is done to avoid problems later on with cloned outputs. */ + xf86CrtcSetInitialGamma(crtc, 1.0, 1.0, 1.0); } - + + if (xf86_crtc_supports_gamma(scrn)) + xf86DrvMsg(scrn->scrnIndex, X_INFO, "Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.\n"); + /* * Set initial configuration */ @@ -2310,17 +2449,17 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) crtc->desiredY = output->initial_y; crtc->desiredTransformPresent = FALSE; crtc->enabled = TRUE; - crtc->x = output->initial_x; - crtc->y = output->initial_y; memcpy (&crtc->panningTotalArea, &output->initialTotalArea, sizeof(BoxRec)); memcpy (&crtc->panningTrackingArea, &output->initialTrackingArea, sizeof(BoxRec)); memcpy (crtc->panningBorder, output->initialBorder, 4*sizeof(INT16)); output->crtc = crtc; + if (!xf86OutputSetInitialGamma(output)) + xf86DrvMsg (scrn->scrnIndex, X_WARNING, "Initial gamma correction for output %s: failed.\n", output->name); } else { output->crtc = NULL; } } - + if (scrn->display->virtualX == 0) { /* @@ -2429,7 +2568,7 @@ xf86PrepareCrtcs (ScrnInfoPtr scrn) * modes (used in EnterVT functions, or at server startup) */ -_X_EXPORT Bool +Bool xf86SetDesiredModes (ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -2507,7 +2646,7 @@ xf86SetDesiredModes (ScrnInfoPtr scrn) * - Closer in refresh rate to the requested mode. */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired) { DisplayModePtr best = NULL, scan = NULL; @@ -2570,7 +2709,7 @@ xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired) * mode across all outputs that are currently active. */ -_X_EXPORT Bool +Bool xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); @@ -2643,7 +2782,7 @@ xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation) * If the new mode is off, it will turn off outputs and then CRTCs. * Otherwise, it will affect CRTCs before outputs. */ -_X_EXPORT void +void xf86DPMSSet(ScrnInfoPtr scrn, int mode, int flags) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -2681,7 +2820,7 @@ xf86DPMSSet(ScrnInfoPtr scrn, int mode, int flags) * Even for monitors with no DPMS support, by the definition of our DPMS hooks, * the outputs will still get disabled (blanked). */ -_X_EXPORT Bool +Bool xf86SaveScreen(ScreenPtr pScreen, int mode) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -2697,7 +2836,7 @@ xf86SaveScreen(ScreenPtr pScreen, int mode) /** * Disable all inactive crtcs and outputs */ -_X_EXPORT void +void xf86DisableUnusedFunctions(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); @@ -2719,6 +2858,7 @@ xf86DisableUnusedFunctions(ScrnInfoPtr pScrn) crtc->funcs->dpms(crtc, DPMSModeOff); memset(&crtc->mode, 0, sizeof(crtc->mode)); xf86RotateDestroy(crtc); + crtc->active = FALSE; } } if (pScrn->pScreen) @@ -2727,7 +2867,7 @@ xf86DisableUnusedFunctions(ScrnInfoPtr pScrn) #ifdef RANDR_12_INTERFACE -#define EDID_ATOM_NAME "EDID_DATA" +#define EDID_ATOM_NAME "EDID" /** * Set the RandR EDID property @@ -2754,7 +2894,7 @@ xf86OutputSetEDIDProperty (xf86OutputPtr output, void *data, int data_len) /** * Set the EDID information for the specified output */ -_X_EXPORT void +void xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon) { ScrnInfoPtr scrn = output->scrn; @@ -2822,7 +2962,7 @@ xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon) * Return the list of modes supported by the EDID information * stored in 'output' */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86OutputGetEDIDModes (xf86OutputPtr output) { ScrnInfoPtr scrn = output->scrn; @@ -2834,7 +2974,7 @@ xf86OutputGetEDIDModes (xf86OutputPtr output) } /* maybe we should care about DDC1? meh. */ -_X_EXPORT xf86MonPtr +xf86MonPtr xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus) { ScrnInfoPtr scrn = output->scrn; @@ -2853,7 +2993,7 @@ static char *_xf86ConnectorNames[] = { "Component", "LFP", "Proprietary", "HDMI", "DisplayPort", }; -_X_EXPORT char * +char * xf86ConnectorGetName(xf86ConnectorType connector) { return _xf86ConnectorNames[connector]; @@ -2938,7 +3078,7 @@ xf86_covering_crtc(ScrnInfoPtr pScrn, * not that the video shouldn't be displayed */ -_X_EXPORT Bool +Bool xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, xf86CrtcPtr *crtc_ret, xf86CrtcPtr desired_crtc, @@ -3015,3 +3155,23 @@ xf86_crtc_notify(ScreenPtr screen) if (config->xf86_crtc_notify) config->xf86_crtc_notify(screen); } + +Bool +xf86_crtc_supports_gamma(ScrnInfoPtr pScrn) +{ + if (xf86CrtcConfigPrivateIndex != -1) { + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); + xf86CrtcPtr crtc; + + /* for multiple drivers loaded we need this */ + if (!xf86_config) + return FALSE; + if (xf86_config->num_crtc == 0) + return FALSE; + crtc = xf86_config->crtc[0]; + + return (crtc->funcs->gamma_set != NULL); + } + + return FALSE; +} diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.h b/xorg-server/hw/xfree86/modes/xf86Crtc.h index 0a596bc49..69afaa5d1 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.h +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.h @@ -216,13 +216,14 @@ typedef struct _xf86CrtcFuncs { /** * Callback for panning. Doesn't change the mode. + * Added in ABI version 2 */ void (*set_origin)(xf86CrtcPtr crtc, int x, int y); } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr; -#define XF86_CRTC_VERSION 2 +#define XF86_CRTC_VERSION 3 struct _xf86Crtc { /** @@ -236,9 +237,9 @@ struct _xf86Crtc { ScrnInfoPtr scrn; /** - * Active state of this CRTC + * Desired state of this CRTC * - * Set when this CRTC is driving one or more outputs + * Set when this CRTC should be driving one or more outputs */ Bool enabled; @@ -312,18 +313,19 @@ struct _xf86Crtc { * Current transformation matrix */ PictTransform crtc_to_framebuffer; - struct pict_f_transform f_crtc_to_framebuffer; - struct pict_f_transform f_framebuffer_to_crtc; - PictFilterPtr filter; - xFixed *params; - int nparams; - int filter_width; - int filter_height; + /* framebuffer_to_crtc was removed in ABI 2 */ + struct pict_f_transform f_crtc_to_framebuffer; /* ABI 2 */ + struct pict_f_transform f_framebuffer_to_crtc; /* ABI 2 */ + PictFilterPtr filter; /* ABI 2 */ + xFixed *params; /* ABI 2 */ + int nparams; /* ABI 2 */ + int filter_width; /* ABI 2 */ + int filter_height; /* ABI 2 */ Bool transform_in_use; - RRTransformRec transform; - Bool transformPresent; - RRTransformRec desiredTransform; - Bool desiredTransformPresent; + RRTransformRec transform; /* ABI 2 */ + Bool transformPresent; /* ABI 2 */ + RRTransformRec desiredTransform; /* ABI 2 */ + Bool desiredTransformPresent; /* ABI 2 */ /** * Bounding box in screen space */ @@ -333,10 +335,28 @@ struct _xf86Crtc { * TotalArea: total panning area, larger than CRTC's size * TrackingArea: Area of the pointer for which the CRTC is panned * border: Borders of the displayed CRTC area which induces panning if the pointer reaches them + * Added in ABI version 2 */ BoxRec panningTotalArea; BoxRec panningTrackingArea; INT16 panningBorder[4]; + + /** + * Current gamma, especially useful after initial config. + * Added in ABI version 3 + */ + CARD16 *gamma_red; + CARD16 *gamma_green; + CARD16 *gamma_blue; + int gamma_size; + + /** + * Actual state of this CRTC + * + * Set to TRUE after modesetting, set to FALSE if no outputs are connected + * Added in ABI version 3 + */ + Bool active; /** * Clear the shadow */ @@ -578,7 +598,10 @@ struct _xf86Output { #else void *randr_output; #endif - /** Desired initial panning */ + /** + * Desired initial panning + * Added in ABI version 2 + */ BoxRec initialTotalArea; BoxRec initialTrackingArea; INT16 initialBorder[4]; @@ -662,7 +685,7 @@ typedef struct _xf86CrtcConfig { } xf86CrtcConfigRec, *xf86CrtcConfigPtr; -extern int xf86CrtcConfigPrivateIndex; +extern _X_EXPORT int xf86CrtcConfigPrivateIndex; #define XF86_CRTC_CONFIG_PTR(p) ((xf86CrtcConfigPtr) ((p)->privates[xf86CrtcConfigPrivateIndex].ptr)) @@ -670,11 +693,11 @@ extern int xf86CrtcConfigPrivateIndex; * Initialize xf86CrtcConfig structure */ -void +extern _X_EXPORT void xf86CrtcConfigInit (ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec *funcs); -void +extern _X_EXPORT void xf86CrtcSetSizeRange (ScrnInfoPtr scrn, int minWidth, int minHeight, int maxWidth, int maxHeight); @@ -682,11 +705,11 @@ xf86CrtcSetSizeRange (ScrnInfoPtr scrn, /* * Crtc functions */ -xf86CrtcPtr +extern _X_EXPORT xf86CrtcPtr xf86CrtcCreate (ScrnInfoPtr scrn, const xf86CrtcFuncsRec *funcs); -void +extern _X_EXPORT void xf86CrtcDestroy (xf86CrtcPtr crtc); @@ -694,138 +717,142 @@ xf86CrtcDestroy (xf86CrtcPtr crtc); * Sets the given video mode on the given crtc */ -Bool +extern _X_EXPORT Bool xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, RRTransformPtr transform, int x, int y); -Bool +extern _X_EXPORT Bool xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y); -void +extern _X_EXPORT void xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y); /* * Assign crtc rotation during mode set */ -Bool +extern _X_EXPORT Bool xf86CrtcRotate (xf86CrtcPtr crtc); /* * Clean up any rotation data, used when a crtc is turned off * as well as when rotation is disabled. */ -void +extern _X_EXPORT void xf86RotateDestroy (xf86CrtcPtr crtc); /* * free shadow memory allocated for all crtcs */ -void +extern _X_EXPORT void xf86RotateFreeShadow(ScrnInfoPtr pScrn); /* * Clean up rotation during CloseScreen */ -void +extern _X_EXPORT void xf86RotateCloseScreen (ScreenPtr pScreen); /** * Return whether any output is assigned to the crtc */ -Bool +extern _X_EXPORT Bool xf86CrtcInUse (xf86CrtcPtr crtc); /* * Output functions */ -xf86OutputPtr +extern _X_EXPORT xf86OutputPtr xf86OutputCreate (ScrnInfoPtr scrn, const xf86OutputFuncsRec *funcs, const char *name); -void +extern _X_EXPORT void xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor); -Bool +extern _X_EXPORT Bool xf86OutputRename (xf86OutputPtr output, const char *name); -void +extern _X_EXPORT void xf86OutputDestroy (xf86OutputPtr output); -void +extern _X_EXPORT void xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY); -void +extern _X_EXPORT void xf86SetScrnInfoModes (ScrnInfoPtr pScrn); #ifdef RANDR_13_INTERFACE -int +# define ScreenInitRetType int #else -Bool +# define ScreenInitRetType Bool #endif + +extern _X_EXPORT ScreenInitRetType xf86CrtcScreenInit (ScreenPtr pScreen); -Bool +extern _X_EXPORT Bool xf86InitialConfiguration (ScrnInfoPtr pScrn, Bool canGrow); -void +extern _X_EXPORT void xf86DPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags); -Bool +extern _X_EXPORT Bool xf86SaveScreen(ScreenPtr pScreen, int mode); -void +extern _X_EXPORT void xf86DisableUnusedFunctions(ScrnInfoPtr pScrn); -DisplayModePtr +extern _X_EXPORT DisplayModePtr xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired); -Bool +extern _X_EXPORT Bool xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation); /** * Set the EDID information for the specified output */ -void +extern _X_EXPORT void xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon); /** * Return the list of modes supported by the EDID information * stored in 'output' */ -DisplayModePtr +extern _X_EXPORT DisplayModePtr xf86OutputGetEDIDModes (xf86OutputPtr output); -xf86MonPtr +extern _X_EXPORT xf86MonPtr xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus); /** * Initialize dga for this screen */ -Bool +#ifdef XFreeXDGA +extern _X_EXPORT Bool xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address); /** * Re-initialize dga for this screen (as when the set of modes changes) */ -Bool +extern _X_EXPORT Bool xf86DiDGAReInit (ScreenPtr pScreen); +#endif /* * Set the subpixel order reported for the screen using * the information from the outputs */ -void +extern _X_EXPORT void xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen); /* * Get a standard string name for a connector type */ -char * +extern _X_EXPORT char * xf86ConnectorGetName(xf86ConnectorType connector); /* @@ -833,7 +860,7 @@ xf86ConnectorGetName(xf86ConnectorType connector); * modes (used in EnterVT functions, or at server startup) */ -Bool +extern _X_EXPORT Bool xf86SetDesiredModes (ScrnInfoPtr pScrn); /** @@ -842,7 +869,7 @@ xf86SetDesiredModes (ScrnInfoPtr pScrn); * * Driver should call this from ScreenInit function */ -Bool +extern _X_EXPORT Bool xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags); /** @@ -852,25 +879,25 @@ xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags); * * Driver should call this from crtc commit function. */ -void +extern _X_EXPORT void xf86_reload_cursors (ScreenPtr screen); /** * Called from EnterVT to turn the cursors back on */ -void +extern _X_EXPORT void xf86_show_cursors (ScrnInfoPtr scrn); /** * Called by the driver to turn cursors off */ -void +extern _X_EXPORT void xf86_hide_cursors (ScrnInfoPtr scrn); /** * Clean up CRTC-based cursor code. Driver must call this at CloseScreen time. */ -void +extern _X_EXPORT void xf86_cursors_fini (ScreenPtr screen); /* @@ -879,7 +906,7 @@ xf86_cursors_fini (ScreenPtr screen); * wraps xf86XVClipVideoHelper() */ -Bool +extern _X_EXPORT Bool xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, xf86CrtcPtr *crtc_ret, xf86CrtcPtr desired_crtc, @@ -892,28 +919,20 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, INT32 width, INT32 height); -xf86_crtc_notify_proc_ptr +extern _X_EXPORT xf86_crtc_notify_proc_ptr xf86_wrap_crtc_notify (ScreenPtr pScreen, xf86_crtc_notify_proc_ptr new); -void +extern _X_EXPORT void xf86_unwrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr old); -void +extern _X_EXPORT void xf86_crtc_notify(ScreenPtr pScreen); /** - * Panning + * Gamma */ -Bool -xf86_crtc_get_panning(ScrnInfoPtr pScrn, - BoxPtr totalArea, - BoxPtr TrackingArea, - INT16 *border); - -Bool -xf86_crtc_set_panning(ScrnInfoPtr pScrn, - BoxPtr totalArea, - BoxPtr TrackingArea, - INT16 *border); + +extern _X_EXPORT Bool +xf86_crtc_supports_gamma(ScrnInfoPtr pScrn); #endif /* _XF86CRTC_H_ */ diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c index fbd61e9fd..fc4df8477 100644 --- a/xorg-server/hw/xfree86/modes/xf86Cursors.c +++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c @@ -39,8 +39,7 @@ #include "xf86RandR12.h" #include "xf86CursorPriv.h" #include "X11/extensions/render.h" -#define DPMS_SERVER -#include "X11/extensions/dpms.h" +#include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" #ifdef RENDER #include "picturestr.h" @@ -265,7 +264,7 @@ xf86_crtc_hide_cursor (xf86CrtcPtr crtc) } } -_X_EXPORT void +void xf86_hide_cursors (ScrnInfoPtr scrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -291,7 +290,7 @@ xf86_crtc_show_cursor (xf86CrtcPtr crtc) } } -_X_EXPORT void +void xf86_show_cursors (ScrnInfoPtr scrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -543,7 +542,7 @@ xf86_load_cursor_argb (ScrnInfoPtr scrn, CursorPtr cursor) } } -_X_EXPORT Bool +Bool xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags) { ScrnInfoPtr scrn = xf86Screens[screen->myNum]; @@ -594,7 +593,7 @@ xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags) * Reloads cursor images as needed, then adjusts cursor positions */ -_X_EXPORT void +void xf86_reload_cursors (ScreenPtr screen) { ScrnInfoPtr scrn; @@ -651,7 +650,7 @@ xf86_reload_cursors (ScreenPtr screen) /** * Clean up CRTC-based cursor code */ -_X_EXPORT void +void xf86_cursors_fini (ScreenPtr screen) { ScrnInfoPtr scrn = xf86Screens[screen->myNum]; diff --git a/xorg-server/hw/xfree86/modes/xf86DiDGA.c b/xorg-server/hw/xfree86/modes/xf86DiDGA.c index f40d0abef..0964cefa7 100644 --- a/xorg-server/hw/xfree86/modes/xf86DiDGA.c +++ b/xorg-server/hw/xfree86/modes/xf86DiDGA.c @@ -255,7 +255,7 @@ static DGAFunctionRec xf86_dga_funcs = { NULL }; -_X_EXPORT Bool +Bool xf86DiDGAReInit (ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; @@ -267,7 +267,7 @@ xf86DiDGAReInit (ScreenPtr pScreen) return DGAReInitModes (pScreen, xf86_config->dga_modes, xf86_config->dga_nmode); } -_X_EXPORT Bool +Bool xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address) { ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; diff --git a/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c new file mode 100644 index 000000000..182d43e0e --- /dev/null +++ b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c @@ -0,0 +1,437 @@ +/* + * Copyright 2009 Red Hat, Inc. + * + * 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 + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * them 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 MERCHANTIBILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS 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: + * Adam Jackson + */ + +#include "xorg-config.h" +#include "xf86.h" +#include "xf86str.h" +#include "edid.h" +#include "xf86DDC.h" + +typedef void (*did_proc)(int scrnIndex, unsigned char *data, void *closure); + +#define DID_PRODUCT_ID 0x00 +#define DID_DISPLAY_PARAMETERS 0x01 +#define DID_COLOR_INFO 0x02 +#define DID_TIMING_1_DETAILED 0x03 +#define DID_TIMING_2_DETAILED 0x04 +#define DID_TIMING_3_SHORT 0x05 +#define DID_TIMING_4_DMT 0x06 +#define DID_TIMING_VESA 0x07 +#define DID_TIMING_CEA 0x08 +#define DID_TIMING_RANGE_LIMITS 0x09 +#define DID_PRODUCT_SERIAL 0x0A +#define DID_ASCII_STRING 0x0B +#define DID_DISPLAY_DEVICE 0x0C +#define DID_POWER_SEQUENCING 0x0D +#define DID_TRANSFER_INFO 0x0E +#define DID_DISPLAY_INTERFACE 0x0F +#define DID_STEREO 0x10 +#define DID_VENDOR 0x7F + +#define extract_le16(x, i) ((x[i+1] << 8) + (x[i])) +#define extract_le24(x, i) ((x[i+2] << 16) + (x[i+1] << 8) + (x[i])) + +static DisplayModePtr +modeCalloc(void) +{ + return xcalloc(1, sizeof(DisplayModeRec)); +} + +/* + * How awesome is it to have two detailed timing formats, neither of which + * are compatible with the format in EDID? So awesome. + */ + +static void +didDetailedTiming1(int i, unsigned char *x, MonPtr mon) +{ + DisplayModePtr m = modeCalloc(); + + if (!m) + return; + + m->Clock = extract_le24(x, 0); + + m->HDisplay = extract_le16(x, 4); + m->HSyncStart = m->HDisplay + (extract_le16(x, 8) & 0x7f); + m->HSyncEnd = m->HSyncStart + extract_le16(x, 10); + m->HTotal = m->HDisplay + extract_le16(x, 6); + m->Flags |= (x[9] & 0x80) ? V_PHSYNC : V_NHSYNC; + + m->VDisplay = extract_le16(x, 12); + m->VSyncStart = m->VDisplay + (extract_le16(x, 16) & 0x7f); + m->VSyncEnd = m->VSyncStart + extract_le16(x, 18); + m->VTotal = m->VDisplay + extract_le16(x, 14); + m->Flags |= (x[17] & 0x80) ? V_PVSYNC : V_NVSYNC; + + m->type = M_T_DRIVER; + if (x[3] & 0x80) + m->type |= M_T_PREFERRED; + + /* XXX double check handling of this */ + if (x[3] & 0x10) + m->Flags |= V_INTERLACE; + + mon->Modes = xf86ModesAdd(mon->Modes, m); +} + +/* XXX no sync bits. what to do? */ +static void +didDetailedTiming2(int i, unsigned char *x, MonPtr mon) +{ + DisplayModePtr mode = modeCalloc(); + + if (!mode) + return; + + mode->Clock = extract_le24(x, 0); + + /* horiz sizes are in character cells, not pixels, hence * 8 */ + mode->HDisplay = ((extract_le16(x, 4) & 0x01ff) + 1) * 8; + mode->HSyncStart = mode->HDisplay + (((x[6] & 0xf0) >> 4) + 1) * 8; + mode->HSyncEnd = mode->HSyncStart + ((x[6] & 0x0f) + 1) * 8; + mode->HTotal = mode->HDisplay + ((x[5] >> 1) + 1) * 8; + + mode->VDisplay = extract_le16(x, 7) & 0x07ff; + mode->VSyncStart = mode->VDisplay + (x[10] >> 4) + 1; + mode->VSyncEnd = mode->VSyncStart + (x[10] & 0x0f) + 1; + mode->VTotal = mode->VDisplay + x[9]; + + mode->status = M_T_DRIVER; + if (x[3] & 0x80) + mode->status |= M_T_PREFERRED; + + /* XXX double check handling of this */ + if (x[3] & 0x10) + mode->Flags |= V_INTERLACE; + + mon->Modes = xf86ModesAdd(mon->Modes, mode); +} + +static void +didShortTiming(int i, unsigned char *x, MonPtr mon) +{ + DisplayModePtr m; + int w, h, r; + + w = (x[1] + 1) * 8; + switch (x[0] & 0x0f) { + case 0: + h = w; + break; + case 1: + h = (w * 4) / 5; + break; + case 2: + h = (w * 3) / 4; + break; + case 3: + h = (w * 9) / 15; + break; + case 4: + h = (w * 9) / 16; + break; + case 5: + h = (w * 10) / 16; + break; + default: + return; + } + r = (x[2] & 0x7f) + 1; + + m = xf86CVTMode(w, h, r, !!(x[0] & 0x10), !!(x[2] & 0x80)); + + m->type = M_T_DRIVER; + if (x[0] & 0x80) + m->type |= M_T_PREFERRED; + + mon->Modes = xf86ModesAdd(mon->Modes, m); +} + +static void +didDMTTiming(int i, unsigned char *x, void *closure) +{ + MonPtr mon = closure; + + mon->Modes = xf86ModesAdd(mon->Modes, + xf86DuplicateMode(DMTModes + *x)); +} + +#define RB 1 +#define INT 2 +static const struct did_dmt { + short w, h, r, f; +} did_dmt[] = { + /* byte 3 */ + { 640, 350, 85, 0 }, + { 640, 400, 85, 0 }, + { 720, 400, 85, 0 }, + { 640, 480, 60, 0 }, + { 640, 480, 72, 0 }, + { 640, 480, 75, 0 }, + { 640, 480, 85, 0 }, + { 800, 600, 56, 0 }, + /* byte 4 */ + { 800, 600, 60, 0 }, + { 800, 600, 72, 0 }, + { 800, 600, 75, 0 }, + { 800, 600, 85, 0 }, + { 800, 600, 120, RB }, + { 848, 480, 60, 0 }, + { 1024, 768, 43, INT }, + { 1024, 768, 60, 0 }, + /* byte 5 */ + { 1024, 768, 70, 0 }, + { 1024, 768, 75, 0 }, + { 1024, 768, 85, 0 }, + { 1024, 768, 120, RB }, + { 1152, 864, 75, 0 }, + { 1280, 768, 60, RB }, + { 1280, 768, 60, 0 }, + { 1280, 768, 75, 0 }, + /* byte 6 */ + { 1280, 768, 85, 0 }, + { 1280, 768, 120, RB }, + { 1280, 800, 60, RB }, + { 1280, 800, 60, 0 }, + { 1280, 800, 75, 0 }, + { 1280, 800, 85, 0 }, + { 1280, 800, 120, RB }, + { 1280, 960, 60, 0 }, + /* byte 7 */ + { 1280, 960, 85, 0 }, + { 1280, 960, 120, RB }, + { 1280, 1024, 60, 0 }, + { 1280, 1024, 75, 0 }, + { 1280, 1024, 85, 0 }, + { 1280, 1024, 120, RB }, + { 1360, 768, 60, 0 }, + { 1360, 768, 120, RB }, + /* byte 8 */ + { 1400, 1050, 60, RB }, + { 1400, 1050, 60, 0 }, + { 1400, 1050, 75, 0 }, + { 1400, 1050, 85, 0 }, + { 1400, 1050, 120, RB }, + { 1440, 900, 60, RB }, + { 1440, 900, 60, 0 }, + { 1440, 900, 75, 0 }, + /* byte 9 */ + { 1440, 900, 85, 0 }, + { 1440, 900, 120, RB }, + { 1600, 1200, 60, 0 }, + { 1600, 1200, 65, 0 }, + { 1600, 1200, 70, 0 }, + { 1600, 1200, 75, 0 }, + { 1600, 1200, 85, 0 }, + { 1600, 1200, 120, RB }, + /* byte a */ + { 1680, 1050, 60, RB }, + { 1680, 1050, 60, 0 }, + { 1680, 1050, 75, 0 }, + { 1680, 1050, 85, 0 }, + { 1680, 1050, 120, RB }, + { 1792, 1344, 60, 0 }, + { 1792, 1344, 75, 0 }, + { 1792, 1344, 120, RB }, + /* byte b */ + { 1856, 1392, 60, 0 }, + { 1856, 1392, 75, 0 }, + { 1856, 1392, 120, RB }, + { 1920, 1200, 60, RB }, + { 1920, 1200, 60, 0 }, + { 1920, 1200, 75, 0 }, + { 1920, 1200, 85, 0 }, + { 1920, 1200, 120, RB }, + /* byte c */ + { 1920, 1440, 60, 0 }, + { 1920, 1440, 75, 0 }, + { 1920, 1440, 120, RB }, + { 2560, 1600, 60, RB }, + { 2560, 1600, 60, 0 }, + { 2560, 1600, 75, 0 }, + { 2560, 1600, 85, 0 }, + { 2560, 1600, 120, RB }, +}; + +static void +didVesaTiming(int scrn, unsigned char *x, MonPtr mon) +{ + int i, j; + + x += 3; + + for (i = 0; i < 10; i++) + for (j = 0; j < 8; j++) + if (x[i] & (1 << j)) { + const struct did_dmt *d = &(did_dmt[i * 8 + j]); + if (d->f == INT) + continue; + mon->Modes = xf86ModesAdd(mon->Modes, + FindDMTMode(d->w, d->h, d->r, + d->f == RB)); + } + +} + +static void +handleDisplayIDBlock(int scrnIndex, unsigned char *x, void *closure) +{ + MonPtr mon = closure; + + switch (x[0]) { + case DID_DISPLAY_PARAMETERS: + /* w/h are in decimillimeters */ + mon->widthmm = (extract_le16(x, 3) + 5) / 10; + mon->heightmm = (extract_le16(x, 5) + 5) / 10; + /* XXX pixel count, feature flags, gamma, aspect, color depth */ + break; + + case DID_TIMING_RANGE_LIMITS: + { + int n; + + mon->maxPixClock = max(mon->maxPixClock, extract_le24(x, 6) * 10); + + n = mon->nHsync++; + if (n < MAX_HSYNC) { + mon->hsync[n].lo = x[9]; + mon->hsync[n].hi = x[10]; + } else { + n = MAX_HSYNC; + } + n = mon->nVrefresh++; + if (n < MAX_VREFRESH) { + mon->vrefresh[n].lo = x[13]; + mon->vrefresh[n].hi = x[14]; + } else { + n = MAX_VREFRESH; + } + break; + } + + case DID_TIMING_1_DETAILED: + { + int i; + for (i = 0; i < x[2]; i += 20) + didDetailedTiming1(scrnIndex, x + i + 3, mon); + break; + } + + case DID_TIMING_2_DETAILED: + { + int i; + for (i = 0; i < x[2]; i += 11) + didDetailedTiming2(scrnIndex, x + i + 3, mon); + break; + } + + case DID_TIMING_3_SHORT: + { + int i; + for (i = 0; i < x[2]; i += 3) + didShortTiming(scrnIndex, x + i + 3, mon); + break; + } + + case DID_TIMING_4_DMT: + { + int i; + for (i = 0; i < x[2]; i++) + didDMTTiming(scrnIndex, x + i + 3, mon); + break; + } + + case DID_TIMING_VESA: + didVesaTiming(scrnIndex, x, mon); + break; + + /* XXX pixel format, ar, orientation, subpixel, dot pitch, bit depth */ + case DID_DISPLAY_DEVICE: + + /* XXX interface, links, color encoding, ss, drm */ + case DID_DISPLAY_INTERFACE: + + /* XXX stereo */ + case DID_STEREO: + + /* nothing interesting in these */ + case DID_COLOR_INFO: + case DID_PRODUCT_SERIAL: + case DID_ASCII_STRING: + case DID_POWER_SEQUENCING: + case DID_TRANSFER_INFO: + case DID_VENDOR: + break; + + /* warn about anything else */ + default: + xf86DrvMsg(scrnIndex, X_WARNING, + "Unknown DisplayID block type %hx\n", x[0]); + break; + } +} + +static void +forEachDisplayIDBlock(int scrnIndex, unsigned char *did, did_proc proc, + void *closure) +{ + int num_extensions = did[3]; + int section_size = did[1]; + unsigned char *block; + + do { + if ((did[0] & 0xf0) != 0x10) /* not 1.x, abort */ + return; + /* XXX also, checksum */ + + block = did + 4; + + while (section_size > 0) { + int block_size = (block[2] + 2); + + proc(scrnIndex, block, closure); + + section_size -= block_size; + block += block_size; + } + + did += (did[1] + 5); + } while (num_extensions--); +} + +/* + * Fill out MonPtr with xf86MonPtr information. + */ +void +xf86DisplayIDMonitorSet(int scrnIndex, MonPtr mon, xf86MonPtr DDC) +{ + if (!mon || !DDC) + return; + + mon->DDC = DDC; + + forEachDisplayIDBlock(scrnIndex, DDC->rawData, handleDisplayIDBlock, mon); +} diff --git a/xorg-server/hw/xfree86/modes/xf86EdidModes.c b/xorg-server/hw/xfree86/modes/xf86EdidModes.c index 6256fda0e..6e11f9a3d 100644 --- a/xorg-server/hw/xfree86/modes/xf86EdidModes.c +++ b/xorg-server/hw/xfree86/modes/xf86EdidModes.c @@ -160,6 +160,11 @@ static Bool quirk_detailed_v_in_cm (int scrnIndex, xf86MonPtr DDC) DDC->vendor.prod_id == 47360) return TRUE; + /* Bug #21750: Samsung Syncmaster 2333HD */ + if (memcmp (DDC->vendor.name, "SAM", 4) == 0 && + DDC->vendor.prod_id == 1157) + return TRUE; + return FALSE; } @@ -333,7 +338,7 @@ DDCModesFromEstablished(int scrnIndex, struct established_timings *timing, } /* Autogenerated from the DMT spec */ -static const DisplayModeRec DMTModes[] = { +const DisplayModeRec DMTModes[] = { { MODEPREFIX, 31500, 640, 672, 736, 832, 0, 350, 382, 385, 445, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x350@85Hz */ { MODEPREFIX, 31500, 640, 672, 736, 832, 0, 400, 401, 404, 445, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 640x400@85Hz */ { MODEPREFIX, 35500, 720, 756, 828, 936, 0, 400, 401, 404, 446, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x400@85Hz */ @@ -443,7 +448,7 @@ ModeRefresh(const DisplayModeRec *mode) * part of the DMT pool. For the 'standard' EDID mode descriptor there's * no way to specify whether the mode should be RB or not. */ -static DisplayModePtr +DisplayModePtr FindDMTMode(int hsize, int vsize, int refresh, Bool rb) { int i; @@ -486,29 +491,37 @@ DDCModesFromStandardTiming(struct std_timings *timing, ddc_quirk_t quirks, int timing_level, Bool rb) { DisplayModePtr Modes = NULL, Mode = NULL; - int i; + int i, hsize, vsize, refresh; for (i = 0; i < STD_TIMINGS; i++) { - if (timing[i].hsize && timing[i].vsize && timing[i].refresh) { - Mode = FindDMTMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, rb); + hsize = timing[i].hsize; + vsize = timing[i].vsize; + refresh = timing[i].refresh; + + /* HDTV hack. Hooray. */ + if (hsize == 1360 && vsize == 765 && refresh == 60) { + Mode = xf86CVTMode(1366, 768, 60, FALSE, FALSE); + Mode->HDisplay = 1366; + Mode->VSyncStart--; + Mode->VSyncEnd--; + } else if (hsize && vsize && refresh) { + Mode = FindDMTMode(hsize, vsize, refresh, rb); if (!Mode) { if (timing_level == LEVEL_CVT) /* pass rb here too? */ - Mode = xf86CVTMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, FALSE, FALSE); + Mode = xf86CVTMode(hsize, vsize, refresh, FALSE, FALSE); else if (timing_level == LEVEL_GTF) - Mode = xf86GTFMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, FALSE, FALSE); + Mode = xf86GTFMode(hsize, vsize, refresh, FALSE, FALSE); } - if (!Mode) - continue; + } + if (Mode) { Mode->type = M_T_DRIVER; - Modes = xf86ModesAdd(Modes, Mode); - } + Modes = xf86ModesAdd(Modes, Mode); + } + Mode = NULL; } return Modes; @@ -853,7 +866,7 @@ xf86DDCSetPreferredRefresh(int scrnIndex, DisplayModePtr modes, best->type |= M_T_PREFERRED; } -_X_EXPORT DisplayModePtr +DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) { int i; @@ -929,8 +942,8 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) /* * Fill out MonPtr with xf86MonPtr information. */ -_X_EXPORT void -xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC) +void +xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC) { DisplayModePtr Modes = NULL, Mode; int i, clock; diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.c b/xorg-server/hw/xfree86/modes/xf86Modes.c index 1522fa731..d105b48ab 100644 --- a/xorg-server/hw/xfree86/modes/xf86Modes.c +++ b/xorg-server/hw/xfree86/modes/xf86Modes.c @@ -48,10 +48,8 @@ extern XF86ConfigPtr xf86configptr; /** * Calculates the horizontal sync rate of a mode. - * - * Exact copy of xf86Mode.c's. */ -_X_EXPORT double +double xf86ModeHSync(const DisplayModeRec *mode) { double hsync = 0.0; @@ -66,10 +64,8 @@ xf86ModeHSync(const DisplayModeRec *mode) /** * Calculates the vertical refresh rate of a mode. - * - * Exact copy of xf86Mode.c's. */ -_X_EXPORT double +double xf86ModeVRefresh(const DisplayModeRec *mode) { double refresh = 0.0; @@ -88,7 +84,7 @@ xf86ModeVRefresh(const DisplayModeRec *mode) return refresh; } -_X_EXPORT int +int xf86ModeWidth (const DisplayModeRec *mode, Rotation rotation) { switch (rotation & 0xf) { @@ -103,7 +99,7 @@ xf86ModeWidth (const DisplayModeRec *mode, Rotation rotation) } } -_X_EXPORT int +int xf86ModeHeight (const DisplayModeRec *mode, Rotation rotation) { switch (rotation & 0xf) { @@ -119,11 +115,11 @@ xf86ModeHeight (const DisplayModeRec *mode, Rotation rotation) } /** Calculates the memory bandwidth (in MiB/sec) of a mode. */ -_X_EXPORT unsigned int +unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth) { float a_active, a_total, active_percent, pixels_per_second; - int bytes_per_pixel = (depth + 7) / 8; + int bytes_per_pixel = bits_to_bytes(depth); if (!mode->HTotal || !mode->VTotal || !mode->Clock) return 0; @@ -137,7 +133,7 @@ xf86ModeBandwidth(DisplayModePtr mode, int depth) } /** Sets a default mode name of x on a mode. */ -_X_EXPORT void +void xf86SetModeDefaultName(DisplayModePtr mode) { if (mode->name != NULL) @@ -151,10 +147,8 @@ xf86SetModeDefaultName(DisplayModePtr mode) * * Initialises the Crtc parameters for a mode. The initialisation includes * adjustments for interlaced and double scan modes. - * - * Exact copy of xf86Mode.c's. */ -_X_EXPORT void +void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags) { if ((p == NULL) || ((p->type & M_T_CRTC_C) == M_T_BUILTIN)) @@ -205,7 +199,7 @@ xf86SetModeCrtc(DisplayModePtr p, int adjustFlags) /** * Allocates and returns a copy of pMode, including pointers within pMode. */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode) { DisplayModePtr pNew; @@ -229,7 +223,7 @@ xf86DuplicateMode(const DisplayModeRec *pMode) * * \param modeList doubly-linked mode list */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList) { DisplayModePtr first = NULL, last = NULL; @@ -260,10 +254,8 @@ xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList) * * This doesn't use Crtc values, as it might be used on ModeRecs without the * Crtc values set. So, it's assumed that the other numbers are enough. - * - * This isn't in xf86Modes.c, but it might deserve to be there. */ -_X_EXPORT Bool +Bool xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2) { if (pMode1->Clock == pMode2->Clock && @@ -285,7 +277,6 @@ xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2) } } -/* exact copy of xf86Mode.c */ static void add(char **p, char *new) { @@ -296,10 +287,8 @@ add(char **p, char *new) /** * Print out a modeline. - * - * Convenient VRefresh printing was added, though, compared to xf86Mode.c */ -_X_EXPORT void +void xf86PrintModeline(int scrnIndex,DisplayModePtr mode) { char tmp[256]; @@ -345,12 +334,15 @@ xf86PrintModeline(int scrnIndex,DisplayModePtr mode) * * \bug only V_INTERLACE and V_DBLSCAN are supported. Is that enough? */ -_X_EXPORT void +void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags) { DisplayModePtr mode; + if (flags == (V_INTERLACE | V_DBLSCAN)) + return; + for (mode = modeList; mode != NULL; mode = mode->next) { if (mode->Flags & V_INTERLACE && !(flags & V_INTERLACE)) mode->status = MODE_NO_INTERLACE; @@ -364,7 +356,7 @@ xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, * * \param modeList doubly-linked list of modes. */ -_X_EXPORT void +void xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, int maxX, int maxY, int maxPitch) { @@ -391,7 +383,7 @@ xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, * * \param modeList doubly-linked list of modes. */ -_X_EXPORT void +void xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, MonPtr mon) { @@ -436,7 +428,7 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, * \param max pointer to maximums of clock ranges * \param n_ranges number of ranges. */ -_X_EXPORT void +void xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, int *min, int *max, int n_ranges) { @@ -469,7 +461,7 @@ xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, * * \param modeList doubly-linked list of modes. */ -_X_EXPORT void +void xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList) { DisplayModePtr mode; @@ -501,7 +493,7 @@ xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList) * \param bandwidth bandwidth in MHz. * \param depth color depth. */ -_X_EXPORT void +void xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, unsigned int bandwidth, int depth) { @@ -535,20 +527,12 @@ xf86ModeIsReduced(const DisplayModeRec *mode) * * \param modeList doubly-linked list of modes. */ -_X_EXPORT void +void xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList) { - DisplayModePtr mode; - - for (mode = modeList; mode != NULL; mode = mode->next) { - /* gratuitous duplication from pre-randr validation code */ - if ((((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) && - ((mode->HTotal - mode->HDisplay) == 160) && - ((mode->HSyncEnd - mode->HDisplay) == 80) && - ((mode->HSyncEnd - mode->HSyncStart) == 32) && - ((mode->VSyncStart - mode->VDisplay) == 3)) - mode->status = MODE_NO_REDUCED; - } + for (; modeList != NULL; modeList = modeList->next) + if (xf86ModeIsReduced(modeList)) + modeList->status = MODE_NO_REDUCED; } /** @@ -558,7 +542,7 @@ xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList) * \param verbose determines whether the reason for mode invalidation is * printed. */ -_X_EXPORT void +void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList, Bool verbose) { @@ -592,7 +576,7 @@ xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList, * * \param modes doubly-linked mode list. */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new) { if (modes == NULL) @@ -658,7 +642,7 @@ xf86GetConfigModes (XF86ConfModeLinePtr conf_mode) /** * Build a mode list from a monitor configuration */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor) { DisplayModePtr modes = NULL; @@ -690,8 +674,8 @@ xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor) /** * Build a mode list containing all of the default modes */ -_X_EXPORT DisplayModePtr -xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed) +DisplayModePtr +xf86GetDefaultModes (void) { DisplayModePtr head = NULL, mode; int i; @@ -700,13 +684,7 @@ xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed) { const DisplayModeRec *defMode = &xf86DefaultModes[i]; - if (!interlaceAllowed && (defMode->Flags & V_INTERLACE)) - continue; - if (!doubleScanAllowed && (defMode->Flags & V_DBLSCAN)) - continue; - mode = xf86DuplicateMode(defMode); - head = xf86ModesAdd(head, mode); } return head; diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.h b/xorg-server/hw/xfree86/modes/xf86Modes.h index 2fb6a374d..908f59b48 100644 --- a/xorg-server/hw/xfree86/modes/xf86Modes.h +++ b/xorg-server/hw/xfree86/modes/xf86Modes.h @@ -40,75 +40,75 @@ #include "xf86Rename.h" #endif -double xf86ModeHSync(const DisplayModeRec *mode); -double xf86ModeVRefresh(const DisplayModeRec *mode); -unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth); +extern _X_EXPORT double xf86ModeHSync(const DisplayModeRec *mode); +extern _X_EXPORT double xf86ModeVRefresh(const DisplayModeRec *mode); +extern _X_EXPORT unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth); -int +extern _X_EXPORT int xf86ModeWidth (const DisplayModeRec *mode, Rotation rotation); -int +extern _X_EXPORT int xf86ModeHeight (const DisplayModeRec *mode, Rotation rotation); -DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); -DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, +extern _X_EXPORT DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); +extern _X_EXPORT DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); -void xf86SetModeDefaultName(DisplayModePtr mode); -void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); -Bool xf86ModesEqual(const DisplayModeRec *pMode1, +extern _X_EXPORT void xf86SetModeDefaultName(DisplayModePtr mode); +extern _X_EXPORT void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); +extern _X_EXPORT Bool xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2); -void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); -DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); +extern _X_EXPORT void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); +extern _X_EXPORT DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); -DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); -DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, +extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); +extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced); -DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins); +extern _X_EXPORT DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins); -Bool +extern _X_EXPORT Bool xf86ModeIsReduced(const DisplayModeRec *mode); -void +extern _X_EXPORT void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags); -void +extern _X_EXPORT void xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, int *min, int *max, int n_ranges); -void +extern _X_EXPORT void xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, int maxX, int maxY, int maxPitch); -void +extern _X_EXPORT void xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, MonPtr mon); -void +extern _X_EXPORT void xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, unsigned int bandwidth, int depth); -void +extern _X_EXPORT void xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList); -void +extern _X_EXPORT void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList, Bool verbose); -void +extern _X_EXPORT void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags); -void +extern _X_EXPORT void xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList); -DisplayModePtr +extern _X_EXPORT DisplayModePtr xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor); -DisplayModePtr -xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed); +extern _X_EXPORT DisplayModePtr +xf86GetDefaultModes (void); -void +extern _X_EXPORT void xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC); #endif /* _XF86MODES_H_ */ diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c index 454649213..c2465bce3 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.c +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c @@ -55,6 +55,13 @@ typedef struct _xf86RandR12Info { int pointerY; Rotation rotation; /* current mode */ Rotation supported_rotations; /* driver supported */ + + /* Used to wrap EnterVT so we can re-probe the outputs when a laptop unsuspends + * (actually, any time that we switch back into our VT). + * + * See https://bugs.freedesktop.org/show_bug.cgi?id=21554 + */ + xf86EnterVTProc *orig_EnterVT; } XF86RandRInfoRec, *XF86RandRInfoPtr; #ifdef RANDR_12_INTERFACE @@ -460,7 +467,9 @@ xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations) { xf86ProbeOutputModes (scrp, 0, 0); xf86SetScrnInfoModes (scrp); +#ifdef XFreeXDGA xf86DiDGAReInit (pScreen); +#endif } for (mode = scrp->modes; ; mode = mode->next) @@ -588,7 +597,7 @@ xf86RandR12SetMode (ScreenPtr pScreen, return ret; } -_X_EXPORT Bool +Bool xf86RandR12SetConfig (ScreenPtr pScreen, Rotation rotation, int rate, @@ -740,7 +749,7 @@ finish: return ret; } -_X_EXPORT Rotation +Rotation xf86RandR12GetRotation(ScreenPtr pScreen) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); @@ -748,7 +757,7 @@ xf86RandR12GetRotation(ScreenPtr pScreen) return randrp->rotation; } -_X_EXPORT Bool +Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -800,7 +809,6 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) else { xf86OutputPtr output = config->output[config->compat_output]; - xf86CrtcPtr crtc = output->crtc; if (output->conf_monitor && (output->conf_monitor->mon_width > 0 && @@ -812,17 +820,6 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) mmWidth = output->conf_monitor->mon_width; mmHeight = output->conf_monitor->mon_height; } - else if (crtc && crtc->mode.HDisplay && - output->mm_width && output->mm_height) - { - /* - * If the output has a mode and a declared size, use that - * to scale the screen size - */ - DisplayModePtr mode = &crtc->mode; - mmWidth = output->mm_width * width / mode->HDisplay; - mmHeight = output->mm_height * height / mode->VDisplay; - } else { /* @@ -868,7 +865,7 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) } -_X_EXPORT Bool +Bool xf86RandR12Init (ScreenPtr pScreen) { rrScrPrivPtr rp; @@ -926,7 +923,7 @@ xf86RandR12Init (ScreenPtr pScreen) return TRUE; } -_X_EXPORT void +void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) { XF86RandRInfoPtr randrp; @@ -952,7 +949,7 @@ xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) randrp->supported_rotations = rotations; } -_X_EXPORT void +void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms) { XF86RandRInfoPtr randrp; @@ -977,7 +974,7 @@ xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms) #endif } -_X_EXPORT void +void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y) { ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex]; @@ -1260,8 +1257,58 @@ xf86RandR12CrtcSetGamma (ScreenPtr pScreen, if (!crtc->scrn->vtSema) return TRUE; - crtc->funcs->gamma_set(crtc, randr_crtc->gammaRed, randr_crtc->gammaGreen, - randr_crtc->gammaBlue, randr_crtc->gammaSize); + /* Realloc local gamma if needed. */ + if (randr_crtc->gammaSize != crtc->gamma_size) { + CARD16 *tmp_ptr; + tmp_ptr = realloc(crtc->gamma_red, 3 * crtc->gamma_size * sizeof (CARD16)); + if (!tmp_ptr) + return FALSE; + crtc->gamma_red = tmp_ptr; + crtc->gamma_green = crtc->gamma_red + crtc->gamma_size; + crtc->gamma_blue = crtc->gamma_green + crtc->gamma_size; + } + + crtc->gamma_size = randr_crtc->gammaSize; + memcpy (crtc->gamma_red, randr_crtc->gammaRed, crtc->gamma_size * sizeof (CARD16)); + memcpy (crtc->gamma_green, randr_crtc->gammaGreen, crtc->gamma_size * sizeof (CARD16)); + memcpy (crtc->gamma_blue, randr_crtc->gammaBlue, crtc->gamma_size * sizeof (CARD16)); + + /* Only set it when the crtc is actually running. + * Otherwise it will be set when it's activated. + */ + if (crtc->active) + crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, + crtc->gamma_blue, crtc->gamma_size); + + return TRUE; +} + +static Bool +xf86RandR12CrtcGetGamma (ScreenPtr pScreen, + RRCrtcPtr randr_crtc) +{ + xf86CrtcPtr crtc = randr_crtc->devPrivate; + + if (!crtc->gamma_size) + return FALSE; + + if (!crtc->gamma_red || !crtc->gamma_green || !crtc->gamma_blue) + return FALSE; + + /* Realloc randr gamma if needed. */ + if (randr_crtc->gammaSize != crtc->gamma_size) { + CARD16 *tmp_ptr; + tmp_ptr = realloc(randr_crtc->gammaRed, 3 * crtc->gamma_size * sizeof (CARD16)); + if (!tmp_ptr) + return FALSE; + randr_crtc->gammaRed = tmp_ptr; + randr_crtc->gammaGreen = randr_crtc->gammaRed + crtc->gamma_size; + randr_crtc->gammaBlue = randr_crtc->gammaGreen + crtc->gamma_size; + } + randr_crtc->gammaSize = crtc->gamma_size; + memcpy (randr_crtc->gammaRed, crtc->gamma_red, crtc->gamma_size * sizeof (CARD16)); + memcpy (randr_crtc->gammaGreen, crtc->gamma_green, crtc->gamma_size * sizeof (CARD16)); + memcpy (randr_crtc->gammaBlue, crtc->gamma_blue, crtc->gamma_size * sizeof (CARD16)); return TRUE; } @@ -1481,7 +1528,9 @@ xf86RandR12GetInfo12 (ScreenPtr pScreen, Rotation *rotations) return TRUE; xf86ProbeOutputModes (pScrn, 0, 0); xf86SetScrnInfoModes (pScrn); +#ifdef XFreeXDGA xf86DiDGAReInit (pScreen); +#endif return xf86RandR12SetInfo12 (pScreen); } @@ -1549,7 +1598,7 @@ xf86RandR12CreateScreenResources12 (ScreenPtr pScreen) * to DGA, VidMode or hot key. Tell RandR */ -_X_EXPORT void +void xf86RandR12TellChanged (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -1647,16 +1696,83 @@ xf86RandR13SetPanning (ScreenPtr pScreen, } } +/* + * Compatibility with XF86VidMode's gamma changer. This necessarily clobbers + * any per-crtc setup. You asked for it... + */ + +static void +gamma_to_ramp(float gamma, CARD16 *ramp, int size) +{ + int i; + + for (i = 0; i < size; i++) { + if (gamma == 1.0) + ramp[i] = i << 8; + else + ramp[i] = (CARD16)(pow((double)i / (double)(size - 1), 1. / gamma) + * (double)(size - 1) * 256); + } +} + +static int +xf86RandR12ChangeGamma(int scrnIndex, Gamma gamma) +{ + CARD16 *points, *red, *green, *blue; + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + RRCrtcPtr crtc = config->output[config->compat_output]->crtc->randr_crtc; + int size = max(0, crtc->gammaSize); + + if (!size) + return Success; + + points = xcalloc(size, 3 * sizeof(CARD16)); + if (!points) + return BadAlloc; + + red = points; + green = points + size; + blue = points + 2 * size; + + gamma_to_ramp(gamma.red, red, size); + gamma_to_ramp(gamma.green, green, size); + gamma_to_ramp(gamma.blue, blue, size); + RRCrtcGammaSet(crtc, red, green, blue); + + xfree(points); + + pScrn->gamma = gamma; + + return Success; +} + +static Bool +xf86RandR12EnterVT (int screen_index, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[screen_index]; + XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); + + if (randrp->orig_EnterVT) { + if (!randrp->orig_EnterVT (screen_index, flags)) + return FALSE; + } + + return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */ +} + static Bool xf86RandR12Init12 (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; rrScrPrivPtr rp = rrGetScrPriv(pScreen); + XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); rp->rrGetInfo = xf86RandR12GetInfo12; rp->rrScreenSetSize = xf86RandR12ScreenSetSize; rp->rrCrtcSet = xf86RandR12CrtcSet; rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma; + rp->rrCrtcGetGamma = xf86RandR12CrtcGetGamma; rp->rrOutputSetProperty = xf86RandR12OutputSetProperty; rp->rrOutputValidateMode = xf86RandR12OutputValidateMode; #if RANDR_13_INTERFACE @@ -1667,6 +1783,11 @@ xf86RandR12Init12 (ScreenPtr pScreen) rp->rrModeDestroy = xf86RandR12ModeDestroy; rp->rrSetConfig = NULL; pScrn->PointerMoved = xf86RandR12PointerMoved; + pScrn->ChangeGamma = xf86RandR12ChangeGamma; + + randrp->orig_EnterVT = pScrn->EnterVT; + pScrn->EnterVT = xf86RandR12EnterVT; + if (!xf86RandR12CreateObjects12 (pScreen)) return FALSE; @@ -1680,7 +1801,7 @@ xf86RandR12Init12 (ScreenPtr pScreen) #endif -_X_EXPORT Bool +Bool xf86RandR12PreInit (ScrnInfoPtr pScrn) { return TRUE; diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.h b/xorg-server/hw/xfree86/modes/xf86RandR12.h index 17a2dcc7f..c8d9918cf 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.h +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.h @@ -28,15 +28,15 @@ #include "xf86Rename.h" #endif -Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen); -Bool xf86RandR12Init(ScreenPtr pScreen); -void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotation); -void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms); -Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate, +extern _X_EXPORT Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen); +extern _X_EXPORT Bool xf86RandR12Init(ScreenPtr pScreen); +extern _X_EXPORT void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotation); +extern _X_EXPORT void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms); +extern _X_EXPORT Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); -Rotation xf86RandR12GetRotation(ScreenPtr pScreen); -void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y); -Bool xf86RandR12PreInit (ScrnInfoPtr pScrn); -void xf86RandR12TellChanged (ScreenPtr pScreen); +extern _X_EXPORT Rotation xf86RandR12GetRotation(ScreenPtr pScreen); +extern _X_EXPORT void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y); +extern _X_EXPORT Bool xf86RandR12PreInit (ScrnInfoPtr pScrn); +extern _X_EXPORT void xf86RandR12TellChanged (ScreenPtr pScreen); #endif /* _XF86_RANDR_H_ */ diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c index bb17df431..d9face1cb 100644 --- a/xorg-server/hw/xfree86/modes/xf86Rotate.c +++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c @@ -40,8 +40,7 @@ #include "xf86Modes.h" #include "xf86RandR12.h" #include "X11/extensions/render.h" -#define DPMS_SERVER -#include "X11/extensions/dpms.h" +#include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" /* borrowed from composite extension, move to Render and publish? */ @@ -145,6 +144,37 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region) FreePicture (dst, None); } +static void +xf86CrtcShadowClear (xf86CrtcPtr crtc) +{ + PixmapPtr dst_pixmap = crtc->rotatedPixmap; + ScrnInfoPtr scrn = crtc->scrn; + ScreenPtr screen = scrn->pScreen; + PicturePtr dst; + PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]); + static xRenderColor black = { 0, 0, 0, 0 }; + xRectangle rect; + int error; + + if (!dst_pixmap) + return; + dst = CreatePicture (None, + &dst_pixmap->drawable, + format, + 0L, + NULL, + serverClient, + &error); + if (!dst) + return; + rect.x = 0; + rect.y = 0; + rect.width = dst_pixmap->drawable.width; + rect.height = dst_pixmap->drawable.height; + CompositeRects (PictOpSrc, dst, &black, 1, &rect); + FreePicture (dst, None); +} + static void xf86CrtcDamageShadow (xf86CrtcPtr crtc) { @@ -316,7 +346,7 @@ xf86RotateDestroy (xf86CrtcPtr crtc) } } -_X_EXPORT void +void xf86RotateFreeShadow(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); @@ -334,7 +364,7 @@ xf86RotateFreeShadow(ScrnInfoPtr pScrn) } } -_X_EXPORT void +void xf86RotateCloseScreen (ScreenPtr screen) { ScrnInfoPtr scrn = xf86Screens[screen->myNum]; @@ -374,7 +404,7 @@ xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb) 0 <= b.y1 && b.y2 <= pScrn->virtualY); } -_X_EXPORT Bool +Bool xf86CrtcRotate (xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; diff --git a/xorg-server/hw/xfree86/modes/xf86cvt.c b/xorg-server/hw/xfree86/modes/xf86cvt.c index e9c74aa62..1da5fe50b 100644 --- a/xorg-server/hw/xfree86/modes/xf86cvt.c +++ b/xorg-server/hw/xfree86/modes/xf86cvt.c @@ -63,7 +63,7 @@ * want that. -- libv * */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced) { diff --git a/xorg-server/hw/xfree86/modes/xf86gtf.c b/xorg-server/hw/xfree86/modes/xf86gtf.c index fed56bd12..9d5d50a2d 100644 --- a/xorg-server/hw/xfree86/modes/xf86gtf.c +++ b/xorg-server/hw/xfree86/modes/xf86gtf.c @@ -102,7 +102,7 @@ * XServer of fbset mode descriptions, from what I can tell). */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins) { DisplayModeRec *mode = xnfcalloc(1, sizeof(DisplayModeRec)); diff --git a/xorg-server/hw/xfree86/os-support/Makefile.in b/xorg-server/hw/xfree86/os-support/Makefile.in index c4873c87f..df03ad299 100644 --- a/xorg-server/hw/xfree86/os-support/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/os-support DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -138,6 +142,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -158,9 +163,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -189,7 +197,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -198,9 +208,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -239,12 +253,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -264,7 +279,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -274,6 +288,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -287,11 +302,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -327,6 +341,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -351,7 +366,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -374,6 +388,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -405,7 +420,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/os-support/bsd/Makefile.am b/xorg-server/hw/xfree86/os-support/bsd/Makefile.am index e52dac13b..b6ecdf1d1 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/bsd/Makefile.am @@ -17,9 +17,6 @@ else KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c endif -# FIXME: Non-i386/ia64 resource support. -RES_SOURCES = $(srcdir)/../shared/stdResource.c - if AGP AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c else diff --git a/xorg-server/hw/xfree86/os-support/bsd/Makefile.in b/xorg-server/hw/xfree86/os-support/bsd/Makefile.in index 4f5a15a06..9c8a8bedb 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/bsd/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/bsd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -62,7 +66,7 @@ am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/agp_noop.c $(srcdir)/../linux/lnx_agp.c \ $(srcdir)/../shared/pm_noop.c $(srcdir)/bsd_apm.c \ $(srcdir)/bsd_kqueue_apm.c $(srcdir)/../shared/kmod_noop.c \ - bsd_kmod.c $(srcdir)/../shared/stdResource.c + bsd_kmod.c @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@am__objects_1 = sparc64_video.lo \ @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@ ioperm_noop.lo @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_TRUE@am__objects_1 = ppc_video.lo @@ -77,10 +81,9 @@ am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \ @BSD_KQUEUE_APM_TRUE@am__objects_3 = bsd_kqueue_apm.lo @FREEBSD_KLDLOAD_FALSE@am__objects_4 = kmod_noop.lo @FREEBSD_KLDLOAD_TRUE@am__objects_4 = bsd_kmod.lo -am__objects_5 = stdResource.lo am_libbsd_la_OBJECTS = posix_tty.lo sigio.lo vidmem.lo bsd_VTsw.lo \ bsd_init.lo bsd_bell.lo $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) $(am__objects_4) $(am__objects_5) + $(am__objects_3) $(am__objects_4) libbsd_la_OBJECTS = $(am_libbsd_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -102,6 +105,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -122,9 +126,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -153,7 +160,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -162,9 +171,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -203,12 +216,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -228,7 +242,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -238,6 +251,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -251,11 +265,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -291,6 +304,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -315,7 +329,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -338,6 +351,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -369,7 +383,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -383,9 +399,6 @@ noinst_LTLIBRARIES = libbsd.la @BSD_KQUEUE_APM_TRUE@APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c @FREEBSD_KLDLOAD_FALSE@KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c @FREEBSD_KLDLOAD_TRUE@KMOD_SOURCES = bsd_kmod.c - -# FIXME: Non-i386/ia64 resource support. -RES_SOURCES = $(srcdir)/../shared/stdResource.c @AGP_FALSE@AGP_SOURCES = $(srcdir)/../shared/agp_noop.c @AGP_TRUE@AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c @@ -501,7 +514,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc64_video.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdResource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Axp.Plo@am__quote@ @@ -603,13 +615,6 @@ kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c -stdResource.lo: $(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdResource.lo -MD -MP -MF $(DEPDIR)/stdResource.Tpo -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdResource.Tpo $(DEPDIR)/stdResource.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/stdResource.c' object='stdResource.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c - mostlyclean-libtool: -rm -f *.lo diff --git a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c index 9de25f66b..18e1e0b67 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c @@ -162,10 +162,15 @@ memory_base(void) if (abw_count < 0) init_abw(); - if (abw_count > 0) { + if (abw_count > 1) { xf86Msg(X_INFO, "memory base = %#lx\n", abw[1].abw_abst.abst_sys_start); /* XXXX */ return abw[1].abw_abst.abst_sys_start; + } else if (abw_count == 1) { + /* assume memory_base == dense_base */ + xf86Msg(X_INFO, "memory base = %#lx\n", + abw[0].abw_abst.abst_sys_start); /* XXXX */ + return abw[0].abw_abst.abst_sys_start; } else { xf86Msg(X_INFO, "no memory base\n"); /* XXXX */ return 0; @@ -355,7 +360,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) * Read BIOS via mmap()ing DEV_MEM */ -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { @@ -400,7 +405,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, extern int ioperm(unsigned long from, unsigned long num, int on); -_X_EXPORT Bool +Bool xf86EnableIO() { if (!ioperm(0, 65536, TRUE)) @@ -408,7 +413,7 @@ xf86EnableIO() return FALSE; } -_X_EXPORT void +void xf86DisableIO() { return; @@ -693,22 +698,22 @@ writeSparseNB32(int Value, pointer Base, register unsigned long Offset) return; } -_X_EXPORT void (*xf86WriteMmio8)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio8)(int Value, pointer Base, unsigned long Offset) = writeDense8; -_X_EXPORT void (*xf86WriteMmio16)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio16)(int Value, pointer Base, unsigned long Offset) = writeDense16; -_X_EXPORT void (*xf86WriteMmio32)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio32)(int Value, pointer Base, unsigned long Offset) = writeDense32; -_X_EXPORT void (*xf86WriteMmioNB8)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB8)(int Value, pointer Base, unsigned long Offset) = writeDenseNB8; -_X_EXPORT void (*xf86WriteMmioNB16)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB16)(int Value, pointer Base, unsigned long Offset) = writeDenseNB16; -_X_EXPORT void (*xf86WriteMmioNB32)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB32)(int Value, pointer Base, unsigned long Offset) = writeDenseNB32; -_X_EXPORT int (*xf86ReadMmio8)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio8)(pointer Base, unsigned long Offset) = readDense8; -_X_EXPORT int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) = readDense16; -_X_EXPORT int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) = readDense32; diff --git a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c index a0ebdf2e6..466a8a0db 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c @@ -233,7 +233,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) * Read BIOS via mmap()ing DEV_MEM */ -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { @@ -450,7 +450,7 @@ armUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) #ifdef USE_DEV_IO static int IoFd = -1; -_X_EXPORT Bool +Bool xf86EnableIO() { if (IoFd >= 0) @@ -465,7 +465,7 @@ xf86EnableIO() return TRUE; } -_X_EXPORT void +void xf86DisableIO() { if (IoFd < 0) diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c index 43eda7421..73c88dca3 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c @@ -122,7 +122,7 @@ xf86OSPMOpen(void) } xf86PMGetEventFromOs = bsdPMGetEventFromOS; xf86PMConfirmEventToOs = bsdPMConfirmEventToOs; - APMihPtr = xf86AddInputHandler(fd, xf86HandlePMEvents, NULL); + APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); return bsdCloseAPM; } @@ -132,7 +132,7 @@ bsdCloseAPM(void) int fd; if (APMihPtr) { - fd = xf86RemoveInputHandler(APMihPtr); + fd = xf86RemoveGeneralHandler(APMihPtr); close(fd); APMihPtr = NULL; } diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c index cb10a9d40..77c87ce1d 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c @@ -36,7 +36,7 @@ static _AXP axpList[] = { {"lca",LCA}, {"t2",T2}, {"tsunami",TSUNAMI}, - {NULL,NONE} + {NULL,SYS_NONE} }; axpDevice @@ -65,7 +65,7 @@ bsdGetAXP(void) #endif for (i=0;;i++) { if (axpList[i].name == NULL) - return NONE; + return SYS_NONE; if (!strcmp(sysname, axpList[i].name)) return axpList[i].type; } diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c index 0d2420102..55eb75231 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c @@ -41,7 +41,7 @@ #define KBD_FD(i) ((i).kbdFd != -1 ? (i).kbdFd : (i).consoleFd) #endif -_X_EXPORT void +void xf86OSRingBell(int loudness, int pitch, int duration) { #ifdef WSCONS_SUPPORT diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c index b2141192e..31b364df3 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c @@ -13,6 +13,15 @@ #include "xf86_OSlib.h" #include "xf86OSpriv.h" +#include + +/* + * The following functions are used only on EV56 and greater CPUs, + * and the assembler requires going to EV56 mode in order to emit + * these instructions. + */ +__asm(".arch ev56"); + int readDense8(pointer Base, register unsigned long Offset); int readDense16(pointer Base, register unsigned long Offset); int readDense32(pointer Base, register unsigned long Offset); @@ -33,14 +42,14 @@ int readDense8(pointer Base, register unsigned long Offset) { mem_barrier(); - return *(volatile CARD8*) ((unsigned long)Base+(Offset)); + return (alpha_ldbu((pointer)((unsigned long)Base+(Offset)))); } int readDense16(pointer Base, register unsigned long Offset) { mem_barrier(); - return *(volatile CARD16*) ((unsigned long)Base+(Offset)); + return (alpha_ldwu((pointer)((unsigned long)Base+(Offset)))); } int @@ -53,13 +62,13 @@ readDense32(pointer Base, register unsigned long Offset) void writeDenseNB8(int Value, pointer Base, register unsigned long Offset) { - *(volatile CARD8*)((unsigned long)Base+(Offset)) = Value; + alpha_stb((pointer)((unsigned long)Base+(Offset)), Value); } void writeDenseNB16(int Value, pointer Base, register unsigned long Offset) { - *(volatile CARD16*)((unsigned long)Base + (Offset)) = Value; + alpha_stw((pointer)((unsigned long)Base + (Offset)), Value); } void @@ -72,14 +81,14 @@ void writeDense8(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - *(volatile CARD8 *)((unsigned long)Base+(Offset)) = Value; + alpha_stb((pointer)((unsigned long)Base+(Offset)), Value); } void writeDense16(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - *(volatile CARD16 *)((unsigned long)Base+(Offset)) = Value; + alpha_stw((pointer)((unsigned long)Base + (Offset)), Value); } void diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_kmod.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_kmod.c index b6c755852..34e434188 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_kmod.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_kmod.c @@ -19,7 +19,7 @@ * Return: * 0 for failure, 1 for success */ -_X_EXPORT int xf86LoadKernelModule(const char *modName) +int xf86LoadKernelModule(const char *modName) { if (kldload(modName) != -1) return 1; diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c index b37070c37..053619e1d 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c @@ -178,7 +178,7 @@ xf86OSPMOpen(void) xf86PMGetEventFromOs = bsdPMGetEventFromOS; xf86PMConfirmEventToOs = bsdPMConfirmEventToOs; - APMihPtr = xf86AddInputHandler(kq, xf86HandlePMEvents, NULL); + APMihPtr = xf86AddGeneralHandler(kq, xf86HandlePMEvents, NULL); return bsdCloseAPM; } @@ -188,7 +188,7 @@ bsdCloseAPM(void) int kq; if (APMihPtr) { - kq = xf86RemoveInputHandler(APMihPtr); + kq = xf86RemoveGeneralHandler(APMihPtr); close(devFd); devFd = -1; close(kq); diff --git a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c index 83dabc9c6..10db9c7b8 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c @@ -279,7 +279,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) * Read BIOS via mmap()ing DEV_MEM */ -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { @@ -331,7 +331,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, static Bool ExtendedEnabled = FALSE; -_X_EXPORT Bool +Bool xf86EnableIO() { if (ExtendedEnabled) @@ -353,7 +353,7 @@ xf86EnableIO() return TRUE; } -_X_EXPORT void +void xf86DisableIO() { if (!ExtendedEnabled) diff --git a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c index f1ff64c2a..7e3fcdb2c 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c @@ -68,7 +68,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) } -_X_EXPORT volatile unsigned char *ioBase = MAP_FAILED; +volatile unsigned char *ioBase = MAP_FAILED; static pointer ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) @@ -97,7 +97,7 @@ ppcUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) munmap(Base, Size); } -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { diff --git a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c index fe3b5e7f2..ea520c49e 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c @@ -82,7 +82,7 @@ sparc64UnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) munmap(Base, Size); } -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { diff --git a/xorg-server/hw/xfree86/os-support/bus/Makefile.in b/xorg-server/hw/xfree86/os-support/bus/Makefile.in index 2396d4123..e5ea2cf75 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/bus/Makefile.in @@ -42,8 +42,11 @@ subdir = hw/xfree86/os-support/bus DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -53,7 +56,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -109,6 +113,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -129,9 +134,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -160,7 +168,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -169,9 +179,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -210,12 +224,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -235,7 +250,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -245,6 +259,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -258,11 +273,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -298,6 +312,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -322,7 +337,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -345,6 +359,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -376,7 +391,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.c b/xorg-server/hw/xfree86/os-support/bus/Pci.c index 8ca2f1f9b..b7fa25f71 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Pci.c +++ b/xorg-server/hw/xfree86/os-support/bus/Pci.c @@ -138,29 +138,12 @@ /* Global data */ -pciBusFuncs_t *pciBusFuncs = NULL; - -_X_EXPORT ADDRESS -pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - if (pciBusFuncs && pciBusFuncs->pciAddrBusToHost) - return pciBusFuncs->pciAddrBusToHost(tag, type, addr); - else - return addr; -} - -_X_EXPORT PCITAG +PCITAG pciTag(int busnum, int devnum, int funcnum) { return(PCI_MAKE_TAG(busnum,devnum,funcnum)); } -ADDRESS -pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - return(addr); -} - Bool xf86scanpci(void) { @@ -168,13 +151,6 @@ xf86scanpci(void) success = (pci_system_init() == 0); - /* XXX */ -#if defined(DEBUGPCI) - if (DEBUGPCI >= xf86Verbose) { - xf86Verbose = DEBUGPCI; - } -#endif - /* choose correct platform/OS specific PCI init routine */ ARCH_PCI_INIT(); diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.h b/xorg-server/hw/xfree86/os-support/bus/Pci.h index 5feb73349..b52a6cfae 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Pci.h +++ b/xorg-server/hw/xfree86/os-support/bus/Pci.h @@ -150,26 +150,9 @@ #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) #define PCI_TAG_NO_DOMAIN(tag) ((tag) & 0x00ffff00u) -/* - * Debug Macros/Definitions - */ -/* #define DEBUGPCI 2 */ /* Disable/enable trace in PCI code */ - -#if defined(DEBUGPCI) - -# define PCITRACE(lvl,printfargs) \ - if (lvl > xf86Verbose) { \ - ErrorF printfargs; \ - } - -#else /* !defined(DEBUGPCI) */ - -# define PCITRACE(lvl,printfargs) - -#endif /* !defined(DEBUGPCI) */ - -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ - defined(__DragonFly__) || defined(__sun) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ + defined(__OpenBSD__) || defined(__NetBSD__) || \ + defined(__DragonFly__) || defined(__sun) || defined(__GNU__) #define ARCH_PCI_INIT bsdPciInit #endif @@ -183,17 +166,4 @@ extern void ARCH_PCI_INIT(void); -/* - * Table of functions used to access a specific PCI bus domain - * (e.g. a primary PCI bus and all of its secondaries) - */ -typedef struct pci_bus_funcs { - ADDRESS (*pciAddrBusToHost)(PCITAG, PciAddrType, ADDRESS); -} pciBusFuncs_t, *pciBusFuncs_p; - -/* Generic PCI service functions and helpers */ -ADDRESS pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS); - -extern pciBusFuncs_t *pciBusFuncs; - #endif /* _PCI_H */ diff --git a/xorg-server/hw/xfree86/os-support/bus/Sbus.c b/xorg-server/hw/xfree86/os-support/bus/Sbus.c index 1363d5746..0b6205f0b 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Sbus.c +++ b/xorg-server/hw/xfree86/os-support/bus/Sbus.c @@ -180,7 +180,7 @@ promIsP1275(void) #endif } -_X_EXPORT void +void sparcPromClose(void) { if (promOpenCount > 1) { @@ -198,7 +198,7 @@ sparcPromClose(void) promOpenCount = 0; } -_X_EXPORT int +int sparcPromInit(void) { if (promOpenCount) { @@ -224,7 +224,7 @@ sparcPromInit(void) return 0; } -_X_EXPORT char * +char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp) { if (promSetNode(pnode)) @@ -232,7 +232,7 @@ sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp) return promGetProperty(prop, lenp); } -_X_EXPORT int +int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop) { if (promSetNode(pnode)) @@ -609,7 +609,7 @@ sparcPromPathname2Node(const char *pathName) return i; } -_X_EXPORT pointer +pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size) { pointer ret; @@ -636,7 +636,7 @@ xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size) return (char *)ret + (offset - off); } -_X_EXPORT void +void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size) { unsigned long mask = getpagesize() - 1; @@ -647,7 +647,7 @@ xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size) } /* Tell OS that we are driving the HW cursor ourselves. */ -_X_EXPORT void +void xf86SbusHideOsHwCursor(sbusDevicePtr psdp) { struct fbcursor fbcursor; @@ -668,7 +668,7 @@ xf86SbusHideOsHwCursor(sbusDevicePtr psdp) } /* Set HW cursor colormap. */ -_X_EXPORT void +void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg) { struct fbcursor fbcursor; diff --git a/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c b/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c index 9b55d3a44..17b52db49 100644 --- a/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c +++ b/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c @@ -48,7 +48,7 @@ #include "pciaccess.h" -_X_EXPORT pointer +pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, ADDRESS Base, unsigned long Size) { diff --git a/xorg-server/hw/xfree86/os-support/bus/linuxPci.c b/xorg-server/hw/xfree86/os-support/bus/linuxPci.c index 263fd8ff1..920a14949 100644 --- a/xorg-server/hw/xfree86/os-support/bus/linuxPci.c +++ b/xorg-server/hw/xfree86/os-support/bus/linuxPci.c @@ -56,29 +56,6 @@ #include "Pci.h" #include -/* - * linux platform specific PCI access functions -- using /proc/bus/pci - * needs kernel version 2.2.x - */ -static ADDRESS linuxTransAddrBusToHost(PCITAG tag, PciAddrType type, ADDRESS addr); -#if defined(__powerpc__) -static ADDRESS linuxPpcBusAddrToHostAddr(PCITAG, PciAddrType, ADDRESS); -#endif - -static pciBusFuncs_t linuxFuncs0 = { -#if defined(__powerpc__) -/* pciAddrBusToHost */ linuxPpcBusAddrToHostAddr, -#else -/* linuxTransAddrBusToHost is busted on sparc64 but the PCI rework tree - * makes it all moot, so we kludge it for now */ -#if defined(__sparc__) -/* pciAddrBusToHost */ pciAddrNOOP, -#else -/* pciAddrBusToHost */ linuxTransAddrBusToHost, -#endif /* __sparc64__ */ -#endif -}; - static const struct pci_id_match match_host_bridge = { PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, (PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_HOST << 8), @@ -91,16 +68,7 @@ static pointer DomainMmappedIO[MAX_DOMAINS]; void linuxPciInit(void) { - struct stat st; - memset(DomainMmappedIO, 0, sizeof(DomainMmappedIO)); - - if (-1 == stat("/proc/bus/pci", &st)) { - /* when using this as default for all linux architectures, - we'll need a fallback for 2.0 kernels here */ - return; - } - pciBusFuncs = &linuxFuncs0; } /** @@ -177,53 +145,6 @@ linuxPciOpenFile(struct pci_device *dev, Bool write) return fd; } -/* - * This function will convert a BAR address into a host address - * suitable for passing into the mmap function of a /proc/bus - * device. - */ -ADDRESS linuxTransAddrBusToHost(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - ADDRESS ret = xf86GetOSOffsetFromPCI(tag, PCI_MEM|PCI_IO, addr); - - if (ret) - return ret; - - /* - * if it is not a BAR address, it must be legacy, (or wrong) - * return it as is.. - */ - return addr; -} - - -#if defined(__powerpc__) - -#ifndef __NR_pciconfig_iobase -#define __NR_pciconfig_iobase 200 -#endif - -static ADDRESS -linuxPpcBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - if (type == PCI_MEM) - { - ADDRESS membase = syscall(__NR_pciconfig_iobase, 1, - PCI_BUS_FROM_TAG(tag), PCI_DFN_FROM_TAG(tag)); - return (addr + membase); - } - else if (type == PCI_IO) - { - ADDRESS iobase = syscall(__NR_pciconfig_iobase, 2, - PCI_BUS_FROM_TAG(tag), PCI_DFN_FROM_TAG(tag)); - return (addr + iobase); - } - else return addr; -} - -#endif /* __powerpc__ */ - - /* * Compiling the following simply requires the presence of . * Actually running this is another matter altogether... @@ -464,7 +385,7 @@ linuxOpenLegacy(struct pci_device *dev, char *name) * returns a pointer to it. The pointer is saved for future use if it's in * the legacy ISA memory space (memory in a domain between 0 and 1MB). */ -_X_EXPORT pointer +pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, ADDRESS Base, unsigned long Size) { @@ -531,58 +452,3 @@ xf86MapLegacyIO(struct pci_device *dev) return (IOADDRESS)DomainMmappedIO[domain]; } -resPtr -xf86AccResFromOS(resPtr pRes) -{ - struct pci_device *dev; - struct pci_device_iterator *iter; - resRange range; - - iter = pci_id_match_iterator_create(& match_host_bridge); - while ((dev = pci_device_next(iter)) != NULL) { - const int domain = dev->domain; - const struct pciSizes * const sizes = linuxGetSizesStruct(dev); - - /* - * At minimum, the top and bottom resources must be claimed, so - * that resources that are (or appear to be) unallocated can be - * relocated. - */ - RANGE(range, 0x00000000u, 0x0009ffffu, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - RANGE(range, 0x000c0000u, 0x000effffu, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - RANGE(range, 0x000f0000u, 0x000fffffu, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, (ADDRESS)(sizes->mem_size - 1), - (ADDRESS)(sizes->mem_size - 1), - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, 0x00000000u, 0x00000000u, - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - RANGE(range, (IOADDRESS)(sizes->io_size - 1), - (IOADDRESS)(sizes->io_size - 1), - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - /* FIXME: The old code reserved domain 0 for a special purpose. The - * FIXME: new code just uses whatever domains the kernel tells it, - * FIXME: but there is no way to get a domain < 0. What should - * FIXME: happen here? - * - if (domain <= 0) - break; - */ - } - - pci_iterator_destroy(iter); - - return pRes; -} - diff --git a/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h b/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h index 3a73678b3..ce1336bf2 100644 --- a/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h +++ b/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h @@ -251,13 +251,12 @@ typedef enum { /* Public PCI access functions */ -ADDRESS pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr); -PCITAG pciTag(int busnum, int devnum, int funcnum); -Bool xf86scanpci(void); +extern _X_EXPORT PCITAG pciTag(int busnum, int devnum, int funcnum); +extern _X_EXPORT Bool xf86scanpci(void); /* Domain access functions. Some of these probably shouldn't be public */ -pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, +extern _X_EXPORT pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, ADDRESS Base, unsigned long Size); -IOADDRESS xf86MapLegacyIO(struct pci_device *dev); +extern _X_EXPORT IOADDRESS xf86MapLegacyIO(struct pci_device *dev); #endif /* _XF86PCI_H */ diff --git a/xorg-server/hw/xfree86/os-support/hurd/Makefile.am b/xorg-server/hw/xfree86/os-support/hurd/Makefile.am index b405b1f2a..3e8224753 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/hurd/Makefile.am @@ -4,7 +4,7 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \ hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ - $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/pm_noop.c \ $(srcdir)/../shared/kmod_noop.c \ diff --git a/xorg-server/hw/xfree86/os-support/hurd/Makefile.in b/xorg-server/hw/xfree86/os-support/hurd/Makefile.in index e09ad2617..187b4a2fd 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/hurd/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/hurd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,13 +51,14 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libhurd_la_LIBADD = am_libhurd_la_OBJECTS = hurd_bell.lo hurd_init.lo hurd_mmap.lo \ - hurd_video.lo VTsw_noop.lo posix_tty.lo stdResource.lo \ + hurd_video.lo VTsw_noop.lo posix_tty.lo vidmem.lo \ sigiostubs.lo pm_noop.lo kmod_noop.lo agp_noop.lo libhurd_la_OBJECTS = $(am_libhurd_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include @@ -77,6 +81,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -97,9 +102,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -128,7 +136,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -137,9 +147,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -178,12 +192,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -203,7 +218,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -213,6 +227,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -226,11 +241,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -266,6 +280,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -290,7 +305,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -313,6 +327,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -344,7 +359,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -355,7 +372,7 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \ hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ - $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/pm_noop.c \ $(srcdir)/../shared/kmod_noop.c \ @@ -425,7 +442,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigiostubs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdResource.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -462,12 +479,12 @@ posix_tty.lo: $(srcdir)/../shared/posix_tty.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c -stdResource.lo: $(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdResource.lo -MD -MP -MF $(DEPDIR)/stdResource.Tpo -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdResource.Tpo $(DEPDIR)/stdResource.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/stdResource.c' object='stdResource.lo' libtool=yes @AMDEPBACKSLASH@ +vidmem.lo: $(srcdir)/../shared/vidmem.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vidmem.Tpo $(DEPDIR)/vidmem.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/vidmem.c' object='vidmem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c sigiostubs.lo: $(srcdir)/../shared/sigiostubs.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigiostubs.lo -MD -MP -MF $(DEPDIR)/sigiostubs.Tpo -c -o sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.c diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c index 732a1cadb..33965a44c 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c +++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c @@ -30,7 +30,7 @@ #include "xf86.h" #include "xf86Priv.h" -_X_EXPORT void +void xf86OSRingBell(int loudness, int pitch, int duration) { return; diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_init.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_init.c index 8cd8f54d6..94e261553 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/hurd_init.c +++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_init.c @@ -43,19 +43,19 @@ #include #include -int +int xf86ProcessArgument( int argc,char **argv, int i ) { return 0; } -void +void xf86UseMsg() { return; } -void +void xf86OpenConsole() { if( serverGeneration == 1 ) @@ -81,7 +81,7 @@ xf86OpenConsole() return; } -void +void xf86CloseConsole() { close( xf86Info.consoleFd ); diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c index b814072cb..b8b00c892 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c +++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c @@ -41,8 +41,8 @@ /************************************************************************** * Video Memory Mapping section ***************************************************************************/ -pointer -xf86MapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size) +static pointer +mapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size) { mach_port_t device,iopl_dev; memory_object_t iopl_mem; @@ -95,8 +95,8 @@ xf86MapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size) return (pointer)addr; } -void -xf86UnMapVidMem(int ScreenNum,pointer Base,unsigned long Size) +static void +unmapVidMem(int ScreenNum,pointer Base,unsigned long Size) { kern_return_t err = vm_deallocate(mach_task_self(), (int)Base, Size); if( err ) @@ -107,12 +107,6 @@ xf86UnMapVidMem(int ScreenNum,pointer Base,unsigned long Size) return; } -Bool -xf86LinearVidMem() -{ - return(TRUE); -} - /************************************************************************** * I/O Permissions section ***************************************************************************/ @@ -143,14 +137,10 @@ xf86DisableIO() } void -xf86MapReadSideEffects(int ScreenNum, int Flags, pointer Base, - unsigned long Size) +xf86OSInitVidMem(VidMemInfoPtr pVidMem) { + pVidMem->linearSupported = TRUE; + pVidMem->mapMem = mapVidMem; + pVidMem->unmapMem = unmapVidMem; + pVidMem->initialised = TRUE; } - -Bool -xf86CheckMTRR(int s) -{ - return FALSE; -} - diff --git a/xorg-server/hw/xfree86/os-support/linux/Makefile.am b/xorg-server/hw/xfree86/os-support/linux/Makefile.am index da1dcf690..1239c8f6b 100644 --- a/xorg-server/hw/xfree86/os-support/linux/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/linux/Makefile.am @@ -26,13 +26,12 @@ XORG_CFLAGS += -DHAVE_APM endif liblinux_la_SOURCES = lnx_init.c lnx_video.c \ - lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ + lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c \ $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c \ - $(srcdir)/../shared/stdResource.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ $(PLATFORM_PCI_SUPPORT) diff --git a/xorg-server/hw/xfree86/os-support/linux/Makefile.in b/xorg-server/hw/xfree86/os-support/linux/Makefile.in index 51eb3a366..013662154 100644 --- a/xorg-server/hw/xfree86/os-support/linux/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/linux/Makefile.in @@ -40,8 +40,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/linux DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -51,26 +54,26 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @LINUX_ALPHA_TRUE@liblinux_la_DEPENDENCIES = liblinuxev56.la -am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_pci.c \ - lnx_agp.c lnx_kmod.c lnx_bell.c \ - $(srcdir)/../shared/bios_mmap.c $(srcdir)/../shared/VTsw_usl.c \ - $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/vidmem.c \ - $(srcdir)/../shared/sigio.c $(srcdir)/../shared/stdResource.c \ +am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_agp.c \ + lnx_kmod.c lnx_bell.c $(srcdir)/../shared/bios_mmap.c \ + $(srcdir)/../shared/VTsw_usl.c $(srcdir)/../shared/posix_tty.c \ + $(srcdir)/../shared/vidmem.c $(srcdir)/../shared/sigio.c \ lnx_acpi.c lnx_apm.c $(srcdir)/lnx_axp.c \ $(srcdir)/../shared/xf86Axp.c $(srcdir)/../shared/ia64Pci.c @LNXACPI_TRUE@am__objects_1 = lnx_acpi.lo lnx_apm.lo @LNXAPM_TRUE@am__objects_2 = lnx_apm.lo @LINUX_ALPHA_FALSE@@LINUX_IA64_TRUE@am__objects_3 = ia64Pci.lo @LINUX_ALPHA_TRUE@am__objects_3 = lnx_axp.lo xf86Axp.lo -am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_pci.lo \ - lnx_agp.lo lnx_kmod.lo lnx_bell.lo bios_mmap.lo VTsw_usl.lo \ - posix_tty.lo vidmem.lo sigio.lo stdResource.lo \ - $(am__objects_1) $(am__objects_2) $(am__objects_3) +am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_agp.lo \ + lnx_kmod.lo lnx_bell.lo bios_mmap.lo VTsw_usl.lo posix_tty.lo \ + vidmem.lo sigio.lo $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) liblinux_la_OBJECTS = $(am_liblinux_la_OBJECTS) liblinuxev56_la_LIBADD = am__liblinuxev56_la_SOURCES_DIST = lnx_ev56.c @@ -102,6 +105,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -122,9 +126,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -153,7 +160,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -162,9 +171,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -203,12 +216,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -228,7 +242,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -238,6 +251,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -251,11 +265,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -291,6 +304,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -315,7 +329,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -338,6 +351,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -369,7 +383,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -387,13 +403,12 @@ noinst_LTLIBRARIES = liblinux.la $(am__append_1) @LNXACPI_TRUE@ACPI_SRCS = lnx_acpi.c lnx_apm.c @LNXAPM_TRUE@APM_SRCS = lnx_apm.c liblinux_la_SOURCES = lnx_init.c lnx_video.c \ - lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ + lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c \ $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c \ - $(srcdir)/../shared/stdResource.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ $(PLATFORM_PCI_SUPPORT) @@ -476,11 +491,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_bell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_kmod.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_pci.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdResource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Axp.Plo@am__quote@ @@ -540,13 +553,6 @@ sigio.lo: $(srcdir)/../shared/sigio.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c -stdResource.lo: $(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdResource.lo -MD -MP -MF $(DEPDIR)/stdResource.Tpo -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdResource.Tpo $(DEPDIR)/stdResource.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/stdResource.c' object='stdResource.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c - lnx_axp.lo: $(srcdir)/lnx_axp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lnx_axp.lo -MD -MP -MF $(DEPDIR)/lnx_axp.Tpo -c -o lnx_axp.lo `test -f '$(srcdir)/lnx_axp.c' || echo '$(srcdir)/'`$(srcdir)/lnx_axp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lnx_axp.Tpo $(DEPDIR)/lnx_axp.Plo diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c index 8274bbbfb..0cf3507c3 100644 --- a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c +++ b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c @@ -115,9 +115,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) if ((!vidMem) || (!sysMem)) { if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if (!sysMem) { -#ifdef DEBUG - ErrorF("Mapping sys bios area\n"); -#endif + DebugF("Mapping sys bios area\n"); if ((sysMem = mmap((void *)(SYS_BIOS), BIOS_SIZE, PROT_READ | PROT_EXEC, MAP_SHARED | MAP_FIXED, fd, SYS_BIOS)) @@ -128,9 +126,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) } } if (!vidMem) { -#ifdef DEBUG - ErrorF("Mapping VRAM area\n"); -#endif + DebugF("Mapping VRAM area\n"); if ((vidMem = mmap((void *)(V_RAM), VRAM_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED | MAP_FIXED, fd, V_RAM)) @@ -162,9 +158,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) (pointer)xnfcalloc(1, ALLOC_ENTRIES(pagesize)); if (!xf86IsEntityPrimary(entityIndex)) { -#ifdef DEBUG - ErrorF("Mapping high memory area\n"); -#endif + DebugF("Mapping high memory area\n"); if ((high_mem = shmget(counter++, HIGH_MEM_SIZE, IPC_CREAT | SHM_R | SHM_W)) == -1) { if (errno == ENOSYS) @@ -176,9 +170,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) goto error1; } } else { -#ifdef DEBUG - ErrorF("Mapping Video BIOS\n"); -#endif + DebugF("Mapping Video BIOS\n"); videoBiosMapped = TRUE; if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if ((vMem = mmap((void *)(V_BIOS), SYS_BIOS - V_BIOS, @@ -195,9 +187,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) } ((linuxInt10Priv*)pInt->private)->highMem = high_mem; -#ifdef DEBUG - ErrorF("Mapping 640kB area\n"); -#endif + DebugF("Mapping 640kB area\n"); if ((low_mem = shmget(counter++, V_RAM, IPC_CREAT | SHM_R | SHM_W)) == -1) { xf86DrvMsg(screen, X_ERROR, @@ -229,16 +219,12 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) Int10Current = pInt; -#ifdef DEBUG - ErrorF("Mapping int area\n"); -#endif + DebugF("Mapping int area\n"); if (xf86ReadBIOS(0, 0, (unsigned char *)0, LOW_PAGE_SIZE) < 0) { xf86DrvMsg(screen, X_ERROR, "Cannot read int vect\n"); goto error3; } -#ifdef DEBUG - ErrorF("done\n"); -#endif + DebugF("done\n"); /* * Read in everything between V_BIOS and SYS_BIOS as some system BIOSes * have executable code there. Note that xf86ReadBIOS() can only bring in @@ -246,17 +232,13 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) */ if (!videoBiosMapped) { memset((pointer)V_BIOS, 0, SYS_BIOS - V_BIOS); -#ifdef DEBUG - ErrorF("Reading BIOS\n"); -#endif + DebugF("Reading BIOS\n"); for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE) xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x%06lX.\n", (long)cs); -#ifdef DEBUG - ErrorF("done\n"); -#endif + DebugF("done\n"); } if (xf86IsEntityPrimary(entityIndex) && !(initPrimary(options))) { diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c b/xorg-server/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c index 9412b07a4..34afd9502 100644 --- a/xorg-server/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c +++ b/xorg-server/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c @@ -172,9 +172,7 @@ vm86_GP_fault(xf86Int10InfoPtr pInt) break; case 0xf4: -#ifdef DEBUG - ErrorF("hlt at %p\n", lina); -#endif + DebugF("hlt at %p\n", lina); return FALSE; case 0x0f: diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c index bb975cc5d..5fad19451 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c @@ -133,23 +133,22 @@ lnxACPIOpen(void) int fd; struct sockaddr_un addr; int r = -1; + static int warned = 0; -#ifdef DEBUG - ErrorF("ACPI: OSPMOpen called\n"); -#endif + DebugF("ACPI: OSPMOpen called\n"); if (ACPIihPtr || !xf86Info.pmFlag) return NULL; -#ifdef DEBUG - ErrorF("ACPI: Opening device\n"); -#endif + DebugF("ACPI: Opening device\n"); if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) > -1) { memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; strcpy(addr.sun_path, ACPI_SOCKET); if ((r = connect(fd, (struct sockaddr*)&addr, sizeof(addr))) == -1) { - xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", ACPI_SOCKET, - strerror(errno)); + if (!warned) + xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", + ACPI_SOCKET, strerror(errno)); + warned = 1; shutdown(fd, 2); close(fd); return NULL; @@ -160,6 +159,7 @@ lnxACPIOpen(void) xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs; ACPIihPtr = xf86AddGeneralHandler(fd,xf86HandlePMEvents,NULL); xf86MsgVerb(X_INFO,3,"Open ACPI successful (%s)\n", ACPI_SOCKET); + warned = 0; return lnxCloseACPI; } @@ -168,10 +168,8 @@ static void lnxCloseACPI(void) { int fd; - -#ifdef DEBUG - ErrorF("ACPI: Closing device\n"); -#endif + + DebugF("ACPI: Closing device\n"); if (ACPIihPtr) { fd = xf86RemoveGeneralHandler(ACPIihPtr); shutdown(fd, 2); diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c b/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c index ded9e0fae..61437406d 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c @@ -43,7 +43,7 @@ static Bool initDone = FALSE; * Close /dev/agpgart. This frees all associated memory allocated during * this server generation. */ -_X_EXPORT Bool +Bool xf86GARTCloseScreen(int screenNum) { if(gartFd != -1) { @@ -116,13 +116,13 @@ GARTInit(int screenNum) return TRUE; } -_X_EXPORT Bool -xf86AgpGARTSupported() +Bool +xf86AgpGARTSupported(void) { return GARTInit(-1); } -_X_EXPORT AgpInfoPtr +AgpInfoPtr xf86GetAGPInfo(int screenNum) { struct _agp_info agpinf; @@ -155,7 +155,7 @@ xf86GetAGPInfo(int screenNum) info->systemPages = agpinf.pg_system; info->usedPages = agpinf.pg_used; - xf86DrvMsg(screenNum, X_INFO, "Kernel reported %d total, %d used\n", agpinf.pg_total, agpinf.pg_used); + xf86DrvMsg(screenNum, X_INFO, "Kernel reported %zu total, %zu used\n", agpinf.pg_total, agpinf.pg_used); return info; } @@ -165,7 +165,7 @@ xf86GetAGPInfo(int screenNum) * count instead of using acquiredScreen? */ -_X_EXPORT Bool +Bool xf86AcquireGART(int screenNum) { if (screenNum != -1 && !GARTInit(screenNum)) @@ -183,7 +183,7 @@ xf86AcquireGART(int screenNum) return TRUE; } -_X_EXPORT Bool +Bool xf86ReleaseGART(int screenNum) { if (screenNum != -1 && !GARTInit(screenNum)) @@ -213,7 +213,7 @@ xf86ReleaseGART(int screenNum) return FALSE; } -_X_EXPORT int +int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical) { @@ -251,7 +251,7 @@ xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, return alloc.key; } -_X_EXPORT Bool +Bool xf86DeallocateGARTMemory(int screenNum, int key) { if (!GARTInit(screenNum) || acquiredScreen != screenNum) @@ -278,7 +278,7 @@ xf86DeallocateGARTMemory(int screenNum, int key) } /* Bind GART memory with "key" at "offset" */ -_X_EXPORT Bool +Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { struct _agp_bind bind; @@ -321,7 +321,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset) /* Unbind GART memory with "key" */ -_X_EXPORT Bool +Bool xf86UnbindGARTMemory(int screenNum, int key) { struct _agp_unbind unbind; @@ -353,7 +353,7 @@ xf86UnbindGARTMemory(int screenNum, int key) /* XXX Interface may change. */ -_X_EXPORT Bool +Bool xf86EnableAGP(int screenNum, CARD32 mode) { agp_setup setup; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c index 16ac80db8..4ccc7d662 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c @@ -160,15 +160,11 @@ lnxAPMOpen(void) { int fd, pfd; -#ifdef DEBUG - ErrorF("APM: OSPMOpen called\n"); -#endif + DebugF("APM: OSPMOpen called\n"); if (APMihPtr || !xf86Info.pmFlag) return NULL; -#ifdef DEBUG - ErrorF("APM: Opening device\n"); -#endif + DebugF("APM: Opening device\n"); if ((fd = open( APM_DEVICE, O_RDWR )) > -1) { if (access( APM_PROC, R_OK ) || ((pfd = open( APM_PROC, O_RDONLY)) == -1)) { @@ -180,11 +176,10 @@ lnxAPMOpen(void) close(pfd); xf86PMGetEventFromOs = lnxPMGetEventFromOs; xf86PMConfirmEventToOs = lnxPMConfirmEventToOs; - APMihPtr = xf86AddInputHandler(fd,xf86HandlePMEvents,NULL); + APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); xf86MsgVerb(X_INFO,3,"Open APM successful\n"); return lnxCloseAPM; } - xf86MsgVerb(X_INFO,3,"No APM support in BIOS or kernel\n"); return NULL; } @@ -192,12 +187,10 @@ static void lnxCloseAPM(void) { int fd; - -#ifdef DEBUG - ErrorF("APM: Closing device\n"); -#endif + + DebugF("APM: Closing device\n"); if (APMihPtr) { - fd = xf86RemoveInputHandler(APMihPtr); + fd = xf86RemoveGeneralHandler(APMihPtr); close(fd); APMihPtr = NULL; } diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c b/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c index e8b6d4749..8571c048b 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c @@ -49,7 +49,7 @@ static AXP axpList[] = { {"Miata",NULL,NULL,PYXIS_CIA}, {"Ruffian",NULL,NULL,PYXIS_CIA}, {"Nautilus",NULL,NULL,IRONGATE}, - {NULL,NULL,NULL,NONE} + {NULL,NULL,NULL,SYS_NONE} }; @@ -69,21 +69,15 @@ lnxGetAXP(void) switch (count) { case 1: sscanf(res, "cpu model : %s",cpu); -#ifdef DEBUG - ErrorF("CPU %s\n",cpu); -#endif + DebugF("CPU %s\n",cpu); break; case 5: sscanf(res, "system type : %s",systype); -#ifdef DEBUG - ErrorF("system type : %s\n",systype); -#endif + DebugF("system type : %s\n",systype); break; case 6: sscanf(res, "system variation : %s",sysvari); -#ifdef DEBUG - ErrorF("system variation: %s\n",sysvari); -#endif + DebugF("system variation: %s\n",sysvari); break; } count++; @@ -131,12 +125,12 @@ extern unsigned int _dense_inb(unsigned long); extern unsigned int _dense_inw(unsigned long); extern unsigned int _dense_inl(unsigned long); -_X_EXPORT void (*_alpha_outb)(char, unsigned long) = _outb; -_X_EXPORT void (*_alpha_outw)(short, unsigned long) = _outw; -_X_EXPORT void (*_alpha_outl)(int, unsigned long) = _outl; -_X_EXPORT unsigned int (*_alpha_inb)(unsigned long) = _inb; -_X_EXPORT unsigned int (*_alpha_inw)(unsigned long) = _inw; -_X_EXPORT unsigned int (*_alpha_inl)(unsigned long) = _inl; +void (*_alpha_outb)(char, unsigned long) = _outb; +void (*_alpha_outw)(short, unsigned long) = _outw; +void (*_alpha_outl)(int, unsigned long) = _outl; +unsigned int (*_alpha_inb)(unsigned long) = _inb; +unsigned int (*_alpha_inw)(unsigned long) = _inw; +unsigned int (*_alpha_inl)(unsigned long) = _inl; static long _alpha_iobase_query(unsigned, int, int, int); long (*_iobase)(unsigned, int, int, int) = _alpha_iobase_query; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c index 702dfa675..75cdd3ebc 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c @@ -34,7 +34,7 @@ #include "xf86Priv.h" #include "xf86_OSproc.h" -_X_EXPORT void +void xf86OSRingBell(int loudness, int pitch, int duration) { if (xf86Info.consoleFd == -1 || !pitch || !loudness) diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_font.c b/xorg-server/hw/xfree86/os-support/linux/lnx_font.c index e9a5b6aef..d6fc283c0 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_font.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_font.c @@ -65,9 +65,7 @@ getfont(int *width, int *height, op.flags = 0; SYSCALL(result = ioctl(xf86Info.consoleFd, KDFONTOP, &op)); -#ifdef DEBUG - ErrorF("Console font read: h: %i count: %i\n",op.height,op.charcount); -#endif + DebugF("Console font read: h: %i count: %i\n",op.height,op.charcount); if (!result) { @@ -130,9 +128,7 @@ lnx_savefont(void) int fd; int width = 32, height = 32, charcount = 2048; -#ifdef DEBUG - ErrorF("SAVE font\n"); -#endif + DebugF("SAVE font\n"); #if CHECK_OS_VERSION /* Check if the kernel has full support for this */ @@ -172,7 +168,7 @@ lnx_savefont(void) return FALSE; } - size = (width + 7)/8 * 32 * charcount; + size = bits_to_bytes(width) * 32 * charcount; fontdata = (unsigned char *)xnfalloc(size); if (!fontdata) { xf86Msg(X_WARNING, @@ -247,9 +243,7 @@ lnx_restorefont(void) { if (lnxfont.data == NULL) return FALSE; -#ifdef DEBUG - ErrorF("RESTORE font\n"); -#endif + DebugF("RESTORE font\n"); #if 0 /* must wack the height to make the kernel reprogram the VGA registers */ if (!setfont(lnxfont.width, lnxfont.height + 1, lnxfont.charcount, diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c index 7f408573a..5a6db8081 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c @@ -39,12 +39,6 @@ #include -#ifdef USE_DEV_FB -extern char *getenv(const char *); -#include -char *fb_dev_name; -#endif - static Bool KeepTty = FALSE; static int VTnum = -1; static Bool VTSwitch = TRUE; @@ -80,9 +74,11 @@ saveVtPerms(void) static void restoreVtPerms(void) { - /* Set the terminal permissions back to before we started. */ - chown("/dev/tty0", vtPermSave[0], vtPermSave[1]); - chown(vtname, vtPermSave[2], vtPermSave[3]); + if (geteuid() == 0) { + /* Set the terminal permissions back to before we started. */ + (void)chown("/dev/tty0", vtPermSave[0], vtPermSave[1]); + (void)chown(vtname, vtPermSave[2], vtPermSave[3]); + } } static void *console_handler; @@ -100,10 +96,6 @@ xf86OpenConsole(void) struct vt_mode VT; struct vt_stat vts; MessageType from = X_PROBED; -#ifdef USE_DEV_FB - struct fb_var_screeninfo var; - int fbfd; -#endif char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL }; char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL }; @@ -150,22 +142,6 @@ xf86OpenConsole(void) close(fd); } -#ifdef USE_DEV_FB - if (!ShareVTs) - { - fb_dev_name=getenv("FRAMEBUFFER"); - if (!fb_dev_name) - fb_dev_name="/dev/fb0current"; - - if ((fbfd = open(fb_dev_name, O_RDONLY)) < 0) - FatalError("xf86OpenConsole: Cannot open %s (%s)\n", - fb_dev_name, strerror(errno)); - - if (ioctl(fbfd, FBIOGET_VSCREENINFO, &var) < 0) - FatalError("xf86OpenConsole: Unable to get screen info %s\n", - strerror(errno)); - } -#endif xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); if (!KeepTty) { @@ -210,20 +186,22 @@ xf86OpenConsole(void) xf86Msg(X_WARNING, "xf86OpenConsole: Could not save ownership of VT\n"); - /* change ownership of the vt */ - if (chown(vtname, getuid(), getgid()) < 0) - xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n", - vtname, strerror(errno)); - - /* - * the current VT device we're running on is not "console", we want - * to grab all consoles too - * - * Why is this needed?? - */ - if (chown("/dev/tty0", getuid(), getgid()) < 0) - xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n", - strerror(errno)); + if (geteuid() == 0) { + /* change ownership of the vt */ + if (chown(vtname, getuid(), getgid()) < 0) + xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n", + vtname, strerror(errno)); + + /* + * the current VT device we're running on is not + * "console", we want to grab all consoles too + * + * Why is this needed?? + */ + if (chown("/dev/tty0", getuid(), getgid()) < 0) + xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n", + strerror(errno)); + } } /* @@ -308,19 +286,7 @@ xf86OpenConsole(void) /* we really should have a InitOSInputDevices() function instead * of Init?$#*&Device(). So I just place it here */ - -#ifdef USE_DEV_FB - /* copy info to new console */ - var.yoffset=0; - var.xoffset=0; - if (ioctl(fbfd, FBIOPUT_VSCREENINFO, &var)) - FatalError("Unable to set screen info\n"); - close(fbfd); -#endif - } else { /* ShareVTs */ - close(xf86Info.consoleFd); } - signal(SIGUSR2, xf86ReloadInputDevs); } else { /* serverGeneration != 1 */ if (!ShareVTs && VTSwitch) { @@ -340,7 +306,7 @@ xf86OpenConsole(void) } void -xf86CloseConsole() +xf86CloseConsole(void) { struct vt_mode VT; #if defined(DO_OS_FONTRESTORE) @@ -348,7 +314,10 @@ xf86CloseConsole() int vtno = -1; #endif - if (ShareVTs) return; + if (ShareVTs) { + close(xf86Info.consoleFd); + return; + } if (console_handler) { xf86RemoveGeneralHandler(console_handler); @@ -447,7 +416,7 @@ xf86ProcessArgument(int argc, char *argv[], int i) } void -xf86UseMsg() +xf86UseMsg(void) { ErrorF("vtXX use the specified VT number\n"); ErrorF("-keeptty "); diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c index 4e6f2d25d..0b9493d27 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c @@ -36,7 +36,7 @@ * Return: * 0 for failure, 1 for success */ -_X_EXPORT int +int xf86LoadKernelModule(const char *modName) { char mpPath[MAX_PATH] = ""; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c index 688106af4..73409dfba 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c @@ -292,9 +292,7 @@ mtrr_add_wc_region(int screenNum, unsigned long base, unsigned long size, lbase = lbase >> 1, d_size <<= 1); while (d_size > n_size) d_size = d_size >> 1; -#ifdef DEBUG - ErrorF("WC_BASE: 0x%lx WC_END: 0x%lx\n",base,base+d_size-1); -#endif + DebugF("WC_BASE: 0x%lx WC_END: 0x%lx\n",base,base+d_size-1); n_base += d_size; n_size -= d_size; if (n_size) { @@ -424,11 +422,9 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) realBase = Base & ~(getpagesize() - 1); alignOff = Base - realBase; -#ifdef DEBUG - ErrorF("base: %lx, realBase: %lx, alignOff: %lx \n", + DebugF("base: %lx, realBase: %lx, alignOff: %lx \n", Base,realBase,alignOff); -#endif - + #if defined(__ia64__) || defined(__arm__) || defined(__s390__) #ifndef MAP_WRITECOMBINED #define MAP_WRITECOMBINED 0x00010000 @@ -469,9 +465,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) " (0x%08lx,0x%lx) (%s)\n", Base, Size, strerror(errno)); } -#ifdef DEBUG - ErrorF("base: %lx aligned base: %lx\n",base, base + alignOff); -#endif + DebugF("base: %lx aligned base: %lx\n",base, base + alignOff); return (char *)base + alignOff; } #endif /* !(__sparc__) */ @@ -481,10 +475,8 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) { memType alignOff = (memType)Base - ((memType)Base & ~(getpagesize() - 1)); - -#ifdef DEBUG - ErrorF("alignment offset: %lx\n",alignOff); -#endif + + DebugF("alignment offset: %lx\n",alignOff); munmap((caddr_t)((memType)Base - alignOff), (Size + alignOff)); } @@ -494,7 +486,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) /***************************************************************************/ #if defined(__powerpc__) -_X_EXPORT volatile unsigned char *ioBase = NULL; +volatile unsigned char *ioBase = NULL; #ifndef __NR_pciconfig_iobase #define __NR_pciconfig_iobase 200 @@ -502,7 +494,7 @@ _X_EXPORT volatile unsigned char *ioBase = NULL; #endif -_X_EXPORT Bool +Bool xf86EnableIO(void) { #if defined(__powerpc__) @@ -551,7 +543,7 @@ xf86EnableIO(void) return TRUE; } -_X_EXPORT void +void xf86DisableIO(void) { if (!ExtendedEnabled) @@ -869,23 +861,23 @@ writeSparseNB32(int Value, pointer Base, register unsigned long Offset) return; } -_X_EXPORT void (*xf86WriteMmio8)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio8)(int Value, pointer Base, unsigned long Offset) = writeDense8; -_X_EXPORT void (*xf86WriteMmio16)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio16)(int Value, pointer Base, unsigned long Offset) = writeDense16; -_X_EXPORT void (*xf86WriteMmio32)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio32)(int Value, pointer Base, unsigned long Offset) = writeDense32; -_X_EXPORT void (*xf86WriteMmioNB8)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB8)(int Value, pointer Base, unsigned long Offset) = writeDenseNB8; -_X_EXPORT void (*xf86WriteMmioNB16)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB16)(int Value, pointer Base, unsigned long Offset) = writeDenseNB16; -_X_EXPORT void (*xf86WriteMmioNB32)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB32)(int Value, pointer Base, unsigned long Offset) = writeDenseNB32; -_X_EXPORT int (*xf86ReadMmio8)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio8)(pointer Base, unsigned long Offset) = readDense8; -_X_EXPORT int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) = readDense16; -_X_EXPORT int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) = readDense32; #endif /* __alpha__ */ diff --git a/xorg-server/hw/xfree86/os-support/misc/Makefile.am b/xorg-server/hw/xfree86/os-support/misc/Makefile.am index 3d4b8ff0e..4bd3fc3e1 100644 --- a/xorg-server/hw/xfree86/os-support/misc/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/misc/Makefile.am @@ -1,7 +1,7 @@ noinst_LTLIBRARIES = libmisc.la -libmisc_la_SOURCES = Delay.c BUSmemcpy.c SlowBcopy.c +libmisc_la_SOURCES = SlowBcopy.c #AM_LDFLAGS = -r diff --git a/xorg-server/hw/xfree86/os-support/misc/Makefile.in b/xorg-server/hw/xfree86/os-support/misc/Makefile.in index e69b9ae8a..bf214ff3c 100644 --- a/xorg-server/hw/xfree86/os-support/misc/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/misc/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/misc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,12 +51,13 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmisc_la_LIBADD = -am_libmisc_la_OBJECTS = Delay.lo BUSmemcpy.lo SlowBcopy.lo +am_libmisc_la_OBJECTS = SlowBcopy.lo libmisc_la_OBJECTS = $(am_libmisc_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -75,6 +79,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -95,9 +100,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -126,7 +134,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -135,9 +145,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,12 +190,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -201,7 +216,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -211,6 +225,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -224,11 +239,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -264,6 +278,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -288,7 +303,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -311,6 +325,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -342,14 +357,16 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmisc.la -libmisc_la_SOURCES = Delay.c BUSmemcpy.c SlowBcopy.c +libmisc_la_SOURCES = SlowBcopy.c #AM_LDFLAGS = -r INCLUDES = $(XORG_INCS) @@ -407,8 +424,6 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BUSmemcpy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Delay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SlowBcopy.Plo@am__quote@ .c.o: diff --git a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c index be69b9dd1..8a5017e52 100644 --- a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c +++ b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c @@ -1,15 +1,8 @@ -/******************************************************************************* - for Alpha Linux -*******************************************************************************/ - /* * Create a dependency that should be immune from the effect of register * renaming as is commonly seen in superscalar processors. This should * insert a minimum of 100-ns delays between reads/writes at clock rates * up to 100 MHz---GGL - * - * Slowbcopy(char *src, char *dst, int count) - * */ #ifdef HAVE_XORG_CONFIG_H @@ -24,7 +17,7 @@ static int really_slow_bcopy; -_X_EXPORT void +void xf86SetReallySlowBcopy(void) { really_slow_bcopy = 1; @@ -42,7 +35,7 @@ static void xf86_really_slow_bcopy(unsigned char *src, unsigned char *dst, int l #endif /* The outb() isn't needed on my machine, but who knows ... -- ost */ -_X_EXPORT void +void xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len) { #if defined(__i386__) || defined(__amd64__) @@ -54,48 +47,3 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len) while(len--) *dst++ = *src++; } - -#ifdef __alpha__ - -#ifdef linux - -#define SPARSE (7) - -#else - -#define SPARSE 0 - -#endif - -_X_EXPORT void -xf86SlowBCopyFromBus(unsigned char *src, unsigned char *dst, int count) -{ - unsigned long addr; - long result; - - addr = (unsigned long) src; - while( count ){ - result = *(volatile int *) addr; - result >>= ((addr>>SPARSE) & 3) * 8; - *dst++ = (unsigned char) (0xffUL & result); - addr += 1<> 24) & 0xffffffff; } -_X_EXPORT void outb(unsigned long port, unsigned char val) +void outb(unsigned long port, unsigned char val) { int fd = ia64_port_to_fd(port); @@ -80,7 +80,7 @@ _X_EXPORT void outb(unsigned long port, unsigned char val) return; } -_X_EXPORT void outw(unsigned long port, unsigned short val) +void outw(unsigned long port, unsigned short val) { int fd = ia64_port_to_fd(port); @@ -100,7 +100,7 @@ _X_EXPORT void outw(unsigned long port, unsigned short val) return; } -_X_EXPORT void outl(unsigned long port, unsigned int val) +void outl(unsigned long port, unsigned int val) { int fd = ia64_port_to_fd(port); @@ -120,7 +120,7 @@ _X_EXPORT void outl(unsigned long port, unsigned int val) return; } -_X_EXPORT unsigned int inb(unsigned long port) +unsigned int inb(unsigned long port) { int fd = ia64_port_to_fd(port); unsigned char val; @@ -142,7 +142,7 @@ _X_EXPORT unsigned int inb(unsigned long port) return val; } -_X_EXPORT unsigned int inw(unsigned long port) +unsigned int inw(unsigned long port) { int fd = ia64_port_to_fd(port); unsigned short val; @@ -164,7 +164,7 @@ _X_EXPORT unsigned int inw(unsigned long port) return val; } -_X_EXPORT unsigned int inl(unsigned long port) +unsigned int inl(unsigned long port) { int fd = ia64_port_to_fd(port); unsigned int val; diff --git a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c index 1d7851a5b..805caccac 100644 --- a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c @@ -35,13 +35,13 @@ #include "xf86Priv.h" #include "xf86_OSlib.h" -_X_EXPORT Bool +Bool xf86EnableIO() { return TRUE; } -_X_EXPORT void +void xf86DisableIO() { return; diff --git a/xorg-server/hw/xfree86/os-support/shared/kmod_noop.c b/xorg-server/hw/xfree86/os-support/shared/kmod_noop.c index 6525e8414..e86d7472f 100644 --- a/xorg-server/hw/xfree86/os-support/shared/kmod_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/kmod_noop.c @@ -31,7 +31,7 @@ #include "xf86_OSproc.h" -_X_EXPORT int xf86LoadKernelModule(const char *pathname) +int xf86LoadKernelModule(const char *pathname) { (void) pathname; return 0; /* failure */ diff --git a/xorg-server/hw/xfree86/os-support/shared/posix_tty.c b/xorg-server/hw/xfree86/os-support/shared/posix_tty.c index 316526bdc..bf1bb03a3 100644 --- a/xorg-server/hw/xfree86/os-support/shared/posix_tty.c +++ b/xorg-server/hw/xfree86/os-support/shared/posix_tty.c @@ -111,7 +111,7 @@ GetBaud (int baudrate) return (0); } -_X_EXPORT int +int xf86OpenSerial (pointer options) { struct termios t; @@ -194,7 +194,7 @@ xf86OpenSerial (pointer options) return (fd); } -_X_EXPORT int +int xf86SetSerial (int fd, pointer options) { struct termios t; @@ -365,7 +365,7 @@ xf86SetSerial (int fd, pointer options) return (r); } -_X_EXPORT int +int xf86SetSerialSpeed (int fd, int speed) { struct termios t; @@ -396,41 +396,36 @@ xf86SetSerialSpeed (int fd, int speed) return (r); } -_X_EXPORT int +int xf86ReadSerial (int fd, void *buf, int count) { int r; -#ifdef DEBUG int i; -#endif + SYSCALL (r = read (fd, buf, count)); -#ifdef DEBUG - ErrorF("ReadingSerial: 0x%x", + DebugF("ReadingSerial: 0x%x", (unsigned char)*(((unsigned char *)buf))); for (i = 1; i < r; i++) - ErrorF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i)); - ErrorF("\n"); -#endif + DebugF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i)); + DebugF("\n"); return (r); } -_X_EXPORT int +int xf86WriteSerial (int fd, const void *buf, int count) { int r; -#ifdef DEBUG int i; - ErrorF("WritingSerial: 0x%x",(unsigned char)*(((unsigned char *)buf))); + DebugF("WritingSerial: 0x%x",(unsigned char)*(((unsigned char *)buf))); for (i = 1; i < count; i++) ErrorF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i)); - ErrorF("\n"); -#endif + DebugF("\n"); SYSCALL (r = write (fd, buf, count)); return (r); } -_X_EXPORT int +int xf86CloseSerial (int fd) { int r; @@ -439,7 +434,7 @@ xf86CloseSerial (int fd) return (r); } -_X_EXPORT int +int xf86WaitForInput (int fd, int timeout) { fd_set readfds; @@ -465,7 +460,7 @@ xf86WaitForInput (int fd, int timeout) return (r); } -_X_EXPORT int +int xf86SerialSendBreak (int fd, int duration) { int r; @@ -475,16 +470,14 @@ xf86SerialSendBreak (int fd, int duration) } -_X_EXPORT int +int xf86FlushInput(int fd) { fd_set fds; struct timeval timeout; char c[4]; -#ifdef DEBUG - ErrorF("FlushingSerial\n"); -#endif + DebugF("FlushingSerial\n"); if (tcflush(fd, TCIFLUSH) == 0) return 0; @@ -576,7 +569,7 @@ getOsStateMask(void) static int osStateMask = 0; -_X_EXPORT int +int xf86SetSerialModemState(int fd, int state) { int ret; @@ -609,7 +602,7 @@ xf86SetSerialModemState(int fd, int state) #endif } -_X_EXPORT int +int xf86GetSerialModemState(int fd) { int ret; @@ -632,7 +625,7 @@ xf86GetSerialModemState(int fd) #endif } -_X_EXPORT int +int xf86SerialModemSetBits(int fd, int bits) { int ret; @@ -654,7 +647,7 @@ xf86SerialModemSetBits(int fd, int bits) #endif } -_X_EXPORT int +int xf86SerialModemClearBits(int fd, int bits) { int ret; diff --git a/xorg-server/hw/xfree86/os-support/shared/sigio.c b/xorg-server/hw/xfree86/os-support/shared/sigio.c index 92bdd2988..44136ccfb 100644 --- a/xorg-server/hw/xfree86/os-support/shared/sigio.c +++ b/xorg-server/hw/xfree86/os-support/shared/sigio.c @@ -63,6 +63,10 @@ # include "xf86_OSlib.h" # include "inputstr.h" +#ifdef HAVE_STROPTS_H +# include +#endif + /* * Linux libc5 defines FASYNC, but not O_ASYNC. Don't know if it is * functional or not. @@ -71,11 +75,11 @@ # define O_ASYNC FASYNC #endif -#ifdef MAX_DEVICES -/* MAX_DEVICES represents the maximimum number of input devices usable +#ifdef MAXDEVICES +/* MAXDEVICES represents the maximimum number of input devices usable * at the same time plus one entry for DRM support. */ -# define MAX_FUNCS (MAX_DEVICES + 1) +# define MAX_FUNCS (MAXDEVICES + 1) #else # define MAX_FUNCS 16 #endif @@ -132,13 +136,14 @@ xf86IsPipe (int fd) return S_ISFIFO(buf.st_mode); } -_X_EXPORT int +int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) { struct sigaction sa; struct sigaction osa; int i; int blocked; + int installed = FALSE; for (i = 0; i < MAX_FUNCS; i++) { @@ -147,15 +152,30 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) if (xf86IsPipe (fd)) return 0; blocked = xf86BlockSIGIO(); +#ifdef O_ASYNC if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_ASYNC) == -1) { - xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n", + xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n", fd, strerror(errno)); - xf86UnblockSIGIO(blocked); - return 0; + } else { + if (fcntl(fd, F_SETOWN, getpid()) == -1) { + xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n", + fd, strerror(errno)); + } else { + installed = TRUE; + } } - if (fcntl(fd, F_SETOWN, getpid()) == -1) { - xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n", - fd, strerror(errno)); +#endif +#ifdef I_SETSIG /* System V Streams - used on Solaris for input devices */ + if (!installed && isastream(fd)) { + if (ioctl(fd, I_SETSIG, S_INPUT | S_ERROR | S_HANGUP) == -1) { + xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG): %s\n", + fd, strerror(errno)); + } else { + installed = TRUE; + } + } +#endif + if (!installed) { xf86UnblockSIGIO(blocked); return 0; } @@ -186,7 +206,7 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) return 0; } -_X_EXPORT int +int xf86RemoveSIGIOHandler(int fd) { struct sigaction sa; @@ -221,7 +241,17 @@ xf86RemoveSIGIOHandler(int fd) } if (ret) { +#ifdef O_ASYNC fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_ASYNC); +#endif +#ifdef I_SETSIG + if (isastream(fd)) { + if (ioctl(fd, I_SETSIG, 0) == -1) { + xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG, 0): %s\n", + fd, strerror(errno)); + } + } +#endif xf86SigIOMax = max; xf86SigIOMaxFd = maxfd; if (!max) @@ -236,7 +266,7 @@ xf86RemoveSIGIOHandler(int fd) return ret; } -_X_EXPORT int +int xf86BlockSIGIO (void) { sigset_t set, old; @@ -249,7 +279,7 @@ xf86BlockSIGIO (void) return ret; } -_X_EXPORT void +void xf86UnblockSIGIO (int wasset) { sigset_t set; diff --git a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c index 7113968c6..cecec37f7 100644 --- a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c +++ b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c @@ -34,25 +34,25 @@ # include "xf86Priv.h" # include "xf86_OSlib.h" -_X_EXPORT int +int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) { return 0; } -_X_EXPORT int +int xf86RemoveSIGIOHandler(int fd) { return 0; } -_X_EXPORT int +int xf86BlockSIGIO (void) { return 0; } -_X_EXPORT void +void xf86UnblockSIGIO (int wasset) { } diff --git a/xorg-server/hw/xfree86/os-support/shared/vidmem.c b/xorg-server/hw/xfree86/os-support/shared/vidmem.c index 0b4411604..803ce09bd 100644 --- a/xorg-server/hw/xfree86/os-support/shared/vidmem.c +++ b/xorg-server/hw/xfree86/os-support/shared/vidmem.c @@ -184,7 +184,7 @@ xf86InitVidMem(void) } } -_X_EXPORT pointer +pointer xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size) { pointer vbase = NULL; @@ -230,7 +230,7 @@ xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size) return vbase; } -_X_EXPORT void +void xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) { VidMapPtr vp; @@ -257,7 +257,7 @@ xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) removeMapping(vp, mp); } -_X_EXPORT Bool +Bool xf86CheckMTRR(int ScreenNum) { VidMapPtr vp = getVidMapRec(ScreenNum); @@ -274,14 +274,14 @@ xf86CheckMTRR(int ScreenNum) return FALSE; } -_X_EXPORT Bool -xf86LinearVidMem() +Bool +xf86LinearVidMem(void) { xf86InitVidMem(); return vidMemInfo.linearSupported; } -_X_EXPORT void +void xf86MapReadSideEffects(int ScreenNum, int Flags, pointer base, unsigned long Size) { diff --git a/xorg-server/hw/xfree86/os-support/solaris/Makefile.am b/xorg-server/hw/xfree86/os-support/solaris/Makefile.am index a4ef67b91..5163f4423 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/solaris/Makefile.am @@ -1,33 +1,32 @@ -if SOLARIS_USL_CONSOLE -VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c +if SOLARIS_VT +VTSW_SRC = sun_VTsw.c else VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c endif -# TODO: Don't build agpgart on SPARC -#if defined(i386Architecture) || defined(AMD64Architecture) +if AGP AGP_SRC = sun_agp.c -#else -#AGP_SRC = $(srcdir)/../shared/agp_noop.c -#endif +else +AGP_SRC = $(srcdir)/../shared/agp_noop.c +endif SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S - $(CPP) -P -DINLINE_ASM solaris-@SOLARIS_INOUT_ARCH@.S > $@ + $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@ noinst_LTLIBRARIES = libsolaris.la libsolaris_la_SOURCES = sun_init.c \ sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ $(srcdir)/../shared/kmod_noop.c \ - $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \ - $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/posix_tty.c \ + $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c \ $(VTSW_SRC) nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC) -sdk_HEADERS = agpgart.h +sdk_HEADERS = nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS) diff --git a/xorg-server/hw/xfree86/os-support/solaris/Makefile.in b/xorg-server/hw/xfree86/os-support/solaris/Makefile.in index 74baaea27..ced1ff70d 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/solaris/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/os-support/solaris DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,23 +53,25 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsolaris_la_LIBADD = am__libsolaris_la_SOURCES_DIST = sun_init.c sun_vid.c sun_bell.c \ - sun_agp.c sun_apm.c $(srcdir)/../shared/kmod_noop.c \ - $(srcdir)/../shared/posix_tty.c \ - $(srcdir)/../shared/sigiostubs.c \ - $(srcdir)/../shared/stdResource.c $(srcdir)/../shared/vidmem.c \ - $(srcdir)/../shared/VTsw_noop.c $(srcdir)/../shared/VTsw_usl.c -am__objects_1 = sun_agp.lo -@SOLARIS_USL_CONSOLE_FALSE@am__objects_2 = VTsw_noop.lo -@SOLARIS_USL_CONSOLE_TRUE@am__objects_2 = VTsw_usl.lo + $(srcdir)/../shared/agp_noop.c sun_agp.c sun_apm.c \ + $(srcdir)/../shared/kmod_noop.c \ + $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigio.c \ + $(srcdir)/../shared/vidmem.c $(srcdir)/../shared/VTsw_noop.c \ + sun_VTsw.c +@AGP_FALSE@am__objects_1 = agp_noop.lo +@AGP_TRUE@am__objects_1 = sun_agp.lo +@SOLARIS_VT_FALSE@am__objects_2 = VTsw_noop.lo +@SOLARIS_VT_TRUE@am__objects_2 = sun_VTsw.lo am_libsolaris_la_OBJECTS = sun_init.lo sun_vid.lo sun_bell.lo \ - $(am__objects_1) sun_apm.lo kmod_noop.lo posix_tty.lo \ - sigiostubs.lo stdResource.lo vidmem.lo $(am__objects_2) + $(am__objects_1) sun_apm.lo kmod_noop.lo posix_tty.lo sigio.lo \ + vidmem.lo $(am__objects_2) am__objects_3 = solaris-@SOLARIS_INOUT_ARCH@.lo nodist_libsolaris_la_OBJECTS = $(am__objects_3) libsolaris_la_OBJECTS = $(am_libsolaris_la_OBJECTS) \ @@ -119,6 +124,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -139,9 +145,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -170,7 +179,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -179,9 +190,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -220,12 +235,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -245,7 +261,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -255,6 +270,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -268,11 +284,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -308,6 +323,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -332,7 +348,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -355,6 +370,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -386,34 +402,31 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@SOLARIS_USL_CONSOLE_FALSE@VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c -@SOLARIS_USL_CONSOLE_TRUE@VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c - -# TODO: Don't build agpgart on SPARC -#if defined(i386Architecture) || defined(AMD64Architecture) -AGP_SRC = sun_agp.c -#else -#AGP_SRC = $(srcdir)/../shared/agp_noop.c -#endif +@SOLARIS_VT_FALSE@VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c +@SOLARIS_VT_TRUE@VTSW_SRC = sun_VTsw.c +@AGP_FALSE@AGP_SRC = $(srcdir)/../shared/agp_noop.c +@AGP_TRUE@AGP_SRC = sun_agp.c SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il noinst_LTLIBRARIES = libsolaris.la libsolaris_la_SOURCES = sun_init.c \ sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ $(srcdir)/../shared/kmod_noop.c \ - $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \ - $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/posix_tty.c \ + $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c \ $(VTSW_SRC) nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC) -sdk_HEADERS = agpgart.h +sdk_HEADERS = nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS) INCLUDES = $(XORG_INCS) @@ -473,12 +486,12 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_noop.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_usl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agp_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigiostubs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solaris-@SOLARIS_INOUT_ARCH@.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdResource.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_VTsw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_agp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_apm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_bell.Plo@am__quote@ @@ -528,6 +541,13 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +agp_noop.lo: $(srcdir)/../shared/agp_noop.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT agp_noop.lo -MD -MP -MF $(DEPDIR)/agp_noop.Tpo -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/agp_noop.Tpo $(DEPDIR)/agp_noop.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/agp_noop.c' object='agp_noop.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c + kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kmod_noop.lo -MD -MP -MF $(DEPDIR)/kmod_noop.Tpo -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/kmod_noop.Tpo $(DEPDIR)/kmod_noop.Plo @@ -542,19 +562,12 @@ posix_tty.lo: $(srcdir)/../shared/posix_tty.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c -sigiostubs.lo: $(srcdir)/../shared/sigiostubs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigiostubs.lo -MD -MP -MF $(DEPDIR)/sigiostubs.Tpo -c -o sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sigiostubs.Tpo $(DEPDIR)/sigiostubs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/sigiostubs.c' object='sigiostubs.lo' libtool=yes @AMDEPBACKSLASH@ +sigio.lo: $(srcdir)/../shared/sigio.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigio.lo -MD -MP -MF $(DEPDIR)/sigio.Tpo -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sigio.Tpo $(DEPDIR)/sigio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/sigio.c' object='sigio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.c - -stdResource.lo: $(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdResource.lo -MD -MP -MF $(DEPDIR)/stdResource.Tpo -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdResource.Tpo $(DEPDIR)/stdResource.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/stdResource.c' object='stdResource.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c vidmem.lo: $(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c @@ -570,13 +583,6 @@ VTsw_noop.lo: $(srcdir)/../shared/VTsw_noop.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c -VTsw_usl.lo: $(srcdir)/../shared/VTsw_usl.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VTsw_usl.lo -MD -MP -MF $(DEPDIR)/VTsw_usl.Tpo -c -o VTsw_usl.lo `test -f '$(srcdir)/../shared/VTsw_usl.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_usl.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/VTsw_usl.Tpo $(DEPDIR)/VTsw_usl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/VTsw_usl.c' object='VTsw_usl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VTsw_usl.lo `test -f '$(srcdir)/../shared/VTsw_usl.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_usl.c - mostlyclean-libtool: -rm -f *.lo @@ -828,7 +834,7 @@ uninstall-am: uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S - $(CPP) -P -DINLINE_ASM solaris-@SOLARIS_INOUT_ARCH@.S > $@ + $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@ # 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. diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S index 9f5e58cb0..4a0e0f48a 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S +++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S @@ -32,7 +32,7 @@ #define _ASM #include #define FUNCTION_START(f,n) ENTRY(f) -#define FUNCTION_END(f) SET_SIZE(f) +#define FUNCTION_END(f) ret; SET_SIZE(f) #endif FUNCTION_START(inb,4) diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S index e2d9cf60a..280154bab 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S +++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S @@ -32,7 +32,7 @@ #define _ASM #include #define FUNCTION_START(f,n) ENTRY(f) -#define FUNCTION_END(f) SET_SIZE(f) +#define FUNCTION_END(f) ret; SET_SIZE(f) #endif FUNCTION_START(inb,4) diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S index fb23942ef..dbaa0308b 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S +++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S @@ -33,7 +33,7 @@ #define _ASM #include #define FUNCTION_START(f,n) ENTRY(f) -#define FUNCTION_END(f) SET_SIZE(f) +#define FUNCTION_END(f) retl; nop; SET_SIZE(f) #endif /* Converted from common/compiler.h gcc inline format to Sun cc inline diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c b/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c new file mode 100644 index 000000000..0dc76b8b5 --- /dev/null +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c @@ -0,0 +1,110 @@ +/* + * Copyright 2009 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. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include + +#include "xf86.h" +#include "xf86Priv.h" +#include "xf86_OSlib.h" + +#include +#include + +/* + * Handle the VT-switching interface for Solaris/OpenSolaris + */ + +void +xf86VTRequest(int sig) +{ + if (xf86Info.vtPendingNum != -1) + { + ioctl(xf86Info.consoleFd, VT_RELDISP, 1); + xf86Info.vtPendingNum = -1; + + return; + } + + xf86Info.vtRequestsPending = TRUE; + return; +} + +Bool +xf86VTSwitchPending(void) +{ + return(xf86Info.vtRequestsPending ? TRUE : FALSE); +} + +Bool +xf86VTSwitchAway(void) +{ + int door_fd; + vt_cmd_arg_t vt_door_arg; + door_arg_t door_arg; + + xf86Info.vtRequestsPending = FALSE; + + vt_door_arg.vt_ev = VT_EV_HOTKEYS; + vt_door_arg.vt_num = xf86Info.vtPendingNum; + door_arg.data_ptr = (char *)&vt_door_arg; + door_arg.data_size = sizeof (vt_cmd_arg_t); + door_arg.rbuf = NULL; + door_arg.rsize = 0; + door_arg.desc_ptr = NULL; + door_arg.desc_num = 0; + + if ((door_fd = open(VT_DAEMON_DOOR_FILE, O_RDONLY)) < 0) + return (FALSE); + + if (door_call(door_fd, &door_arg) != 0) { + close(door_fd); + return (FALSE); + } + + close(door_fd); + return (TRUE); +} + +Bool +xf86VTSwitchTo(void) +{ + xf86Info.vtRequestsPending = FALSE; + if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) + { + return(FALSE); + } + else + { + return(TRUE); + } +} diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c index e97ab9ef9..376f98edd 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c @@ -34,8 +34,6 @@ * of the copyright holder. */ -#pragma ident "@(#)sun_agp.c 1.1 05/04/04 SMI" - #ifdef HAVE_XORG_CONFIG_H #include #endif @@ -49,11 +47,8 @@ #include #include #include -#include "agpgart.h" +#include -#ifndef AGP_DEVICE -#define AGP_DEVICE "/dev/agpgart" -#endif /* AGP page size is independent of the host page size. */ #ifndef AGP_PAGE_SIZE #define AGP_PAGE_SIZE 4096 @@ -66,7 +61,7 @@ static Bool initDone = FALSE; * Close /dev/agpgart. This frees all associated memory allocated during * this server generation. */ -_X_EXPORT Bool +Bool xf86GARTCloseScreen(int screenNum) { if (gartFd != -1) { @@ -110,14 +105,14 @@ GARTInit(int screenNum) return TRUE; } -_X_EXPORT Bool +Bool xf86AgpGARTSupported(void) { return (GARTInit(-1)); } -_X_EXPORT AgpInfoPtr +AgpInfoPtr xf86GetAGPInfo(int screenNum) { agp_info_t agpinf; @@ -150,7 +145,7 @@ xf86GetAGPInfo(int screenNum) return info; } -_X_EXPORT Bool +Bool xf86AcquireGART(int screenNum) { @@ -171,7 +166,7 @@ xf86AcquireGART(int screenNum) return TRUE; } -_X_EXPORT Bool +Bool xf86ReleaseGART(int screenNum) { @@ -200,7 +195,7 @@ xf86ReleaseGART(int screenNum) return FALSE; } -_X_EXPORT int +int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical) { @@ -238,7 +233,7 @@ xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, return alloc.agpa_key; } -_X_EXPORT Bool +Bool xf86DeallocateGARTMemory(int screenNum, int key) { if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) @@ -255,7 +250,7 @@ xf86DeallocateGARTMemory(int screenNum, int key) } /* Bind GART memory with "key" at "offset" */ -_X_EXPORT Bool +Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { agp_bind_t bind; @@ -291,7 +286,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset) } /* Unbind GART memory with "key" */ -_X_EXPORT Bool +Bool xf86UnbindGARTMemory(int screenNum, int key) { agp_unbind_t unbind; @@ -317,7 +312,7 @@ xf86UnbindGARTMemory(int screenNum, int key) /* XXX Interface may change. */ -_X_EXPORT Bool +Bool xf86EnableAGP(int screenNum, CARD32 mode) { agp_setup_t setup; diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c index 7decc900f..e128c13d0 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c @@ -215,7 +215,7 @@ xf86OSPMOpen(void) } xf86PMGetEventFromOs = sunPMGetEventFromOS; xf86PMConfirmEventToOs = sunPMConfirmEventToOs; - APMihPtr = xf86AddInputHandler(fd, xf86HandlePMEvents, NULL); + APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); return sunCloseAPM; } @@ -225,7 +225,7 @@ sunCloseAPM(void) int fd; if (APMihPtr) { - fd = xf86RemoveInputHandler(APMihPtr); + fd = xf86RemoveGeneralHandler(APMihPtr); close(fd); APMihPtr = NULL; } diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c b/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c index 29ecd7300..b25f40d8e 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c @@ -48,7 +48,7 @@ #define AUDIO_DEVICE "/dev/audio" -_X_EXPORT void +void xf86OSRingBell(int loudness, int pitch, int duration) { static short samples[BELL_SAMPLES]; diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c index 795b0c13c..2c569f02c 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c @@ -38,13 +38,15 @@ static Bool Protect0 = FALSE; #ifdef HAS_USL_VTS static int VTnum = -1; static int xf86StartVT = -1; +static int vtEnabled = 0; #endif -#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386)) -static char fb_dev[PATH_MAX] = "/dev/fb"; -#else -static char fb_dev[PATH_MAX] = "/dev/console"; -#endif +/* Device to open as xf86Info.consoleFd */ +static char consoleDev[PATH_MAX] = "/dev/fb"; + +/* Set by -dev argument on CLI + Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */ +_X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb"; void xf86OpenConsole(void) @@ -93,86 +95,101 @@ xf86OpenConsole(void) /* * Setup the virtual terminal manager */ - if (VTnum != -1) + if ((fd = open("/dev/vt/0",O_RDWR,0)) == -1) { - xf86Info.vtno = VTnum; - from = X_CMDLINE; + xf86ErrorF("xf86OpenConsole: Cannot open /dev/vt/0 (%s)\n", + strerror(errno)); + vtEnabled = 0; } else { - if ((fd = open("/dev/vt00",O_RDWR,0)) < 0) - FatalError("xf86OpenConsole: Cannot open /dev/vt00 (%s)\n", - strerror(errno)); + if (ioctl(fd, VT_ENABLED, &vtEnabled) < 0) + { + xf86ErrorF("xf86OpenConsole: VT_ENABLED failed (%s)\n", + strerror(errno)); + vtEnabled = 0; + } + } + + if (vtEnabled == 0) + { + /* VT not enabled - kernel too old or Sparc platforms + without visual_io support */ + xf86Msg(from, "VT infrastructure is not available\n"); + + xf86StartVT = 0; + xf86Info.vtno = 0; + strlcpy(consoleDev, xf86SolarisFbDev, sizeof(consoleDev)); + } + else + { if (ioctl(fd, VT_GETSTATE, &vtinfo) < 0) FatalError("xf86OpenConsole: Cannot determine current VT\n"); xf86StartVT = vtinfo.v_active; - /* - * There is a SEVERE problem with x86's VT's. The VT_OPENQRY - * ioctl() will panic the entire system if all 8 (7 VT's+Console) - * terminals are used. The only other way I've found to determine - * if there is a free VT is to try activating all the the available - * VT's and see if they all succeed - if they do, there there is no - * free VT, and the Xserver cannot continue without panic'ing the - * system. (It's ugly, but it seems to work.) Note there is a - * possible race condition here. - * - * David Holland 2/23/94 - */ - - FreeVTslot = 0; - for (i = 7; (i >= 0) && !FreeVTslot; i--) - if (ioctl(fd, VT_ACTIVATE, i) != 0) - FreeVTslot = 1; + if (VTnum != -1) + { + xf86Info.vtno = VTnum; + from = X_CMDLINE; + } + else + { + if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) || + (xf86Info.vtno == -1)) { + FatalError("xf86OpenConsole: Cannot find a free VT\n"); + } + } - if (!FreeVTslot || - (ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) || - (xf86Info.vtno == -1)) - FatalError("xf86OpenConsole: Cannot find a free VT\n"); + xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); + snprintf(consoleDev, PATH_MAX, "/dev/vt/%d", xf86Info.vtno); + } + if (fd != -1) { close(fd); } - xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); - - sprintf(fb_dev, "/dev/vt%02d", xf86Info.vtno); /* Solaris 2.1 x86 */ - #endif /* HAS_USL_VTS */ if (!KeepTty) setpgrp(); - if (((xf86Info.consoleFd = open(fb_dev, O_RDWR | O_NDELAY, 0)) < 0)) + if (((xf86Info.consoleFd = open(consoleDev, O_RDWR | O_NDELAY, 0)) < 0)) FatalError("xf86OpenConsole: Cannot open %s (%s)\n", - fb_dev, strerror(errno)); + consoleDev, strerror(errno)); #ifdef HAS_USL_VTS /* Change ownership of the vt */ - chown(fb_dev, getuid(), getgid()); + chown(consoleDev, getuid(), getgid()); - /* - * Now get the VT - */ - if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) - xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); + if (vtEnabled) + { + /* + * Now get the VT + */ + if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); + + if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); - if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) - xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); + if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) + FatalError("xf86OpenConsole: VT_GETMODE failed\n"); - if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) - FatalError("xf86OpenConsole: VT_GETMODE failed\n"); + OsSignal(SIGUSR1, xf86VTRequest); - signal(SIGUSR1, xf86VTRequest); + VT.mode = VT_PROCESS; + VT.relsig = SIGUSR1; + VT.acqsig = SIGUSR1; - VT.mode = VT_PROCESS; - VT.relsig = SIGUSR1; - VT.acqsig = SIGUSR1; + if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) + FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n"); - if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) - FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n"); + if (ioctl(xf86Info.consoleFd, VT_SETDISPINFO, atoi(display)) < 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_SETDISPINFO failed\n"); + } #endif #ifdef KDSETMODE @@ -180,30 +197,31 @@ xf86OpenConsole(void) if (i < 0) { xf86Msg(X_WARNING, "xf86OpenConsole: KDSETMODE KD_GRAPHICS failed on %s (%s)\n", - fb_dev, strerror(errno)); + consoleDev, strerror(errno)); } #endif } else /* serverGeneration != 1 */ { #ifdef HAS_USL_VTS - /* - * Now re-get the VT - */ - if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) - xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); - - if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) - xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); + if (vtEnabled) { + /* + * Now re-get the VT + */ + if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); - /* - * If the server doesn't have the VT when the reset occurs, - * this is to make sure we don't continue until the activate - * signal is received. - */ - if (!xf86Screens[0]->vtSema) - sleep(5); + if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); + /* + * If the server doesn't have the VT when the reset occurs, + * this is to make sure we don't continue until the activate + * signal is received. + */ + if (!xf86Screens[0]->vtSema) + sleep(5); + } #endif /* HAS_USL_VTS */ } @@ -218,7 +236,7 @@ xf86CloseConsole(void) #if !defined(__i386__) && !defined(__i386) && !defined(__x86) - if (!xf86DoProbe && !xf86DoConfigure) { + if (!xf86DoConfigure) { int fd; /* @@ -228,7 +246,7 @@ xf86CloseConsole(void) * at this point whether this should be done for all framebuffers in * the system, rather than only the console. */ - if ((fd = open("/dev/fb", O_RDWR, 0)) < 0) { + if ((fd = open(xf86SolarisFbDev, O_RDWR, 0)) < 0) { xf86Msg(X_WARNING, "xf86CloseConsole(): unable to open framebuffer (%s)\n", strerror(errno)); @@ -267,30 +285,16 @@ xf86CloseConsole(void) #endif #ifdef HAS_USL_VTS + if (vtEnabled == 1) { + if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) + { + VT.mode = VT_AUTO; /* Set default vt handling */ + ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); + } - /* - * Solaris 2.1 x86 doesn't seem to "switch" back to the console when the VT - * is relinquished and its mode is reset to auto. Also, Solaris 2.1 seems - * to associate vt00 with the console so I've opened the "console" back up - * and made it the active vt again in text mode and then closed it. There - * must be a better hack for this but I'm not aware of one at this time. - * - * Doug Anson 11/6/93 - * danson@lgc.com - * - * Fixed - 12/5/93 - David Holland - davidh@dorite.use.com - * Did the whole thing similarly to the way linux does it - */ - - if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) - { - VT.mode = VT_AUTO; /* Set default vt handling */ - ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); + /* Activate the VT that X was started on */ + ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86StartVT); } - - /* Activate the VT that X was started on */ - ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86StartVT); - #endif /* HAS_USL_VTS */ close(xf86Info.consoleFd); @@ -323,7 +327,7 @@ xf86ProcessArgument(int argc, char **argv, int i) if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { - if (sscanf(argv[i], "vt%2d", &VTnum) == 0) + if (sscanf(argv[i], "vt%d", &VTnum) == 0) { UseMsg(); VTnum = -1; @@ -337,8 +341,7 @@ xf86ProcessArgument(int argc, char **argv, int i) if ((i + 1) < argc) { if (!strcmp(argv[i], "-dev")) { - strncpy(fb_dev, argv[i+1], PATH_MAX); - fb_dev[PATH_MAX - 1] = '\0'; + strlcpy(xf86SolarisFbDev, argv[i+1], sizeof(xf86SolarisFbDev)); return 2; } } @@ -349,7 +352,7 @@ xf86ProcessArgument(int argc, char **argv, int i) void xf86UseMsg() { #ifdef HAS_USL_VTS - ErrorF("vtXX Use the specified VT number\n"); + ErrorF("vtX Use the specified VT number\n"); #endif ErrorF("-dev Framebuffer device\n"); ErrorF("-keeptty Don't detach controlling tty\n"); diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c index 3982f631f..2078646b1 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c @@ -186,7 +186,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) /* * Read BIOS via mmap()ing physical memory. */ -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { @@ -235,7 +235,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, static Bool ExtendedEnabled = FALSE; #endif -_X_EXPORT Bool +Bool xf86EnableIO(void) { #if defined(__i386__) || defined(__i386) || defined(__x86) @@ -251,7 +251,7 @@ xf86EnableIO(void) return TRUE; } -_X_EXPORT void +void xf86DisableIO(void) { #if defined(__i386__) || defined(__i386) || defined(__x86) diff --git a/xorg-server/hw/xfree86/os-support/sysv/Makefile.in b/xorg-server/hw/xfree86/os-support/sysv/Makefile.in index c2eff591c..394126c69 100644 --- a/xorg-server/hw/xfree86/os-support/sysv/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/sysv/Makefile.in @@ -36,8 +36,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/sysv DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,7 +50,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -58,6 +62,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -78,9 +83,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -109,7 +117,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -118,9 +128,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -159,12 +173,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -184,7 +199,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -194,6 +208,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -207,11 +222,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -247,6 +261,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -271,7 +286,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -294,6 +308,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -325,7 +340,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c b/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c index a9bbd6580..43c30621c 100644 --- a/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c +++ b/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c @@ -283,7 +283,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) static Bool ExtendedEnabled = FALSE; static Bool InitDone = FALSE; -_X_EXPORT Bool +Bool xf86EnableIO() { int i; @@ -302,7 +302,7 @@ xf86EnableIO() return TRUE; } -_X_EXPORT void +void xf86DisableIO() { if (!ExtendedEnabled) diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h index 48d922301..c53fc0dac 100644 --- a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h +++ b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h @@ -117,15 +117,9 @@ # include # endif /* SVR4 && !sun */ /* V86SC_IOPL was moved to on Solaris 7 and later */ -# if defined(sun) && defined (SVR4) /* Solaris? */ -# if defined(__i386__) || defined(__i386) || defined(__x86) /* on x86 or x64? */ -# if !defined(V86SC_IOPL) /* Solaris 7 or later? */ -# include /* Nope */ -# endif -# endif /* V86SC_IOPL */ -# else -# include /* Not solaris */ -# endif /* sun && i386 && SVR4 */ +# if !defined(V86SC_IOPL) /* Solaris 7 or later? */ +# include /* Nope */ +# endif # if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4) # include # endif @@ -140,7 +134,7 @@ # include /* MMAP driver header */ # endif -# if !defined(sun) || (!defined(sparc) && !defined(__SOL8__)) +# if !defined(sun) || defined(HAVE_SYS_VT_H) # define HAS_USL_VTS # endif # if !defined(sun) @@ -155,10 +149,14 @@ # define LED_NUM NLKED # define LED_SCR SLKED # elif defined(HAS_USL_VTS) -# include +# if !defined(sun) +# include +# endif # include # include -# elif defined(sun) +# endif + +# if defined(sun) # include # include # include @@ -198,9 +196,8 @@ # endif /* SVR4 */ -# if defined(sun) && (defined (__i386__) || defined(__i386)) && defined (SVR4) && !defined(__SOL8__) +# if defined(sun) && defined(HAS_USL_VTS) # define USE_VT_SYSREQ -# define VT_SYSREQ_DEFAULT TRUE # endif #endif /* (SYSV || SVR4) */ diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h index b4513d65f..c1a117334 100644 --- a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h +++ b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h @@ -68,10 +68,6 @@ #ifndef _XF86_OSPROC_H #define _XF86_OSPROC_H -#ifdef XF86_OS_PRIVS -#include "xf86Pci.h" -#endif - /* * The actual prototypes have been pulled into this seperate file so * that they can can be used without pulling in all of the OS specific @@ -110,10 +106,6 @@ #define XF86_M_RNG 0x080 /* ring */ #define XF86_M_DSR 0x100 /* data set ready */ -#ifdef XF86_OS_PRIVS -extern void xf86WrapperInit(void); -#endif - #ifndef NO_OSLIB_PROTOTYPES /* * This is to prevent re-entrancy to FatalError() when aborting. @@ -138,37 +130,35 @@ extern void xf86WrapperInit(void); _XFUNCPROTOBEGIN /* public functions */ -extern Bool xf86LinearVidMem(void); -extern Bool xf86CheckMTRR(int); -extern pointer xf86MapVidMem(int, int, unsigned long, unsigned long); -extern void xf86UnMapVidMem(int, pointer, unsigned long); -extern void xf86MapReadSideEffects(int, int, pointer, unsigned long); -extern int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int); -extern Bool xf86EnableIO(void); -extern void xf86DisableIO(void); -extern void xf86SetTVOut(int); -extern void xf86SetRGBOut(void); -extern void xf86OSRingBell(int, int, int); -extern void xf86BusToMem(unsigned char *, unsigned char *, int); -extern void xf86MemToBus(unsigned char *, unsigned char *, int); -extern void xf86UDelay(long usec); -extern void xf86SetReallySlowBcopy(void); -extern void xf86SlowBcopy(unsigned char *, unsigned char *, int); -extern int xf86OpenSerial(pointer options); -extern int xf86SetSerial(int fd, pointer options); -extern int xf86SetSerialSpeed(int fd, int speed); -extern int xf86ReadSerial(int fd, void *buf, int count); -extern int xf86WriteSerial(int fd, const void *buf, int count); -extern int xf86CloseSerial(int fd); -extern int xf86FlushInput(int fd); -extern int xf86WaitForInput(int fd, int timeout); -extern int xf86SerialSendBreak(int fd, int duration); -extern int xf86SetSerialModemState(int fd, int state); -extern int xf86GetSerialModemState(int fd); -extern int xf86SerialModemSetBits(int fd, int bits); -extern int xf86SerialModemClearBits(int fd, int bits); -extern int xf86LoadKernelModule(const char *pathname); -extern void xf86RingBell(int volume, int pitch, int duration); +extern _X_EXPORT Bool xf86LinearVidMem(void); +extern _X_EXPORT Bool xf86CheckMTRR(int); +extern _X_EXPORT pointer xf86MapVidMem(int, int, unsigned long, unsigned long); +extern _X_EXPORT void xf86UnMapVidMem(int, pointer, unsigned long); +extern _X_EXPORT void xf86MapReadSideEffects(int, int, pointer, unsigned long); +extern _X_EXPORT int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int); +extern _X_EXPORT Bool xf86EnableIO(void); +extern _X_EXPORT void xf86DisableIO(void); +#ifdef __NetBSD__ +extern _X_EXPORT void xf86SetTVOut(int); +extern _X_EXPORT void xf86SetRGBOut(void); +#endif +extern _X_EXPORT void xf86OSRingBell(int, int, int); +extern _X_EXPORT void xf86SetReallySlowBcopy(void); +extern _X_EXPORT void xf86SlowBcopy(unsigned char *, unsigned char *, int); +extern _X_EXPORT int xf86OpenSerial(pointer options); +extern _X_EXPORT int xf86SetSerial(int fd, pointer options); +extern _X_EXPORT int xf86SetSerialSpeed(int fd, int speed); +extern _X_EXPORT int xf86ReadSerial(int fd, void *buf, int count); +extern _X_EXPORT int xf86WriteSerial(int fd, const void *buf, int count); +extern _X_EXPORT int xf86CloseSerial(int fd); +extern _X_EXPORT int xf86FlushInput(int fd); +extern _X_EXPORT int xf86WaitForInput(int fd, int timeout); +extern _X_EXPORT int xf86SerialSendBreak(int fd, int duration); +extern _X_EXPORT int xf86SetSerialModemState(int fd, int state); +extern _X_EXPORT int xf86GetSerialModemState(int fd); +extern _X_EXPORT int xf86SerialModemSetBits(int fd, int bits); +extern _X_EXPORT int xf86SerialModemClearBits(int fd, int bits); +extern _X_EXPORT int xf86LoadKernelModule(const char *pathname); /* AGP GART interface */ @@ -182,55 +172,43 @@ typedef struct _AgpInfo { unsigned long usedPages; } AgpInfo, *AgpInfoPtr; -extern Bool xf86AgpGARTSupported(void); -extern AgpInfoPtr xf86GetAGPInfo(int screenNum); -extern Bool xf86AcquireGART(int screenNum); -extern Bool xf86ReleaseGART(int screenNum); -extern int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, +extern _X_EXPORT Bool xf86AgpGARTSupported(void); +extern _X_EXPORT AgpInfoPtr xf86GetAGPInfo(int screenNum); +extern _X_EXPORT Bool xf86AcquireGART(int screenNum); +extern _X_EXPORT Bool xf86ReleaseGART(int screenNum); +extern _X_EXPORT int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical); -extern Bool xf86DeallocateGARTMemory(int screenNum, int key); -extern Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset); -extern Bool xf86UnbindGARTMemory(int screenNum, int key); -extern Bool xf86EnableAGP(int screenNum, CARD32 mode); -extern Bool xf86GARTCloseScreen(int screenNum); +extern _X_EXPORT Bool xf86DeallocateGARTMemory(int screenNum, int key); +extern _X_EXPORT Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset); +extern _X_EXPORT Bool xf86UnbindGARTMemory(int screenNum, int key); +extern _X_EXPORT Bool xf86EnableAGP(int screenNum, CARD32 mode); +extern _X_EXPORT Bool xf86GARTCloseScreen(int screenNum); /* These routines are in shared/sigio.c and are not loaded as part of the module. These routines are small, and the code if very POSIX-signal (or OS-signal) specific, so it seemed better to provide more complex wrappers than to wrap each individual function called. */ -extern int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *); -extern int xf86RemoveSIGIOHandler(int fd); -extern int xf86BlockSIGIO (void); -extern void xf86UnblockSIGIO (int); -extern void xf86AssertBlockedSIGIO (char *); -extern Bool xf86SIGIOSupported (void); +extern _X_EXPORT int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *); +extern _X_EXPORT int xf86RemoveSIGIOHandler(int fd); +extern _X_EXPORT int xf86BlockSIGIO (void); +extern _X_EXPORT void xf86UnblockSIGIO (int); +extern _X_EXPORT void xf86AssertBlockedSIGIO (char *); +extern _X_EXPORT Bool xf86SIGIOSupported (void); #ifdef XF86_OS_PRIVS typedef void (*PMClose)(void); -extern void xf86OpenConsole(void); -extern void xf86CloseConsole(void); -extern Bool xf86VTSwitchPending(void); -extern Bool xf86VTSwitchAway(void); -extern Bool xf86VTSwitchTo(void); -extern void xf86VTRequest(int sig); -extern int xf86ProcessArgument(int, char **, int); -extern void xf86UseMsg(void); -extern void xf86ReloadInputDevs(int sig); -extern PMClose xf86OSPMOpen(void); - -#ifdef NEED_OS_RAC_PROTOS -/* RAC-related privs */ -/* internal to os-support layer */ -resPtr xf86StdAccResFromOS(resPtr ret); - -/* available to the common layer */ -resPtr xf86AccResFromOS(resPtr ret); -#endif /* NEED_OS_RAC_PROTOS */ - -extern unsigned long xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base); - -extern void xf86MakeNewMapping(int, int, unsigned long, unsigned long, pointer); -extern void xf86InitVidMem(void); +extern _X_EXPORT void xf86OpenConsole(void); +extern _X_EXPORT void xf86CloseConsole(void); +extern _X_EXPORT Bool xf86VTSwitchPending(void); +extern _X_EXPORT Bool xf86VTSwitchAway(void); +extern _X_EXPORT Bool xf86VTSwitchTo(void); +extern _X_EXPORT void xf86VTRequest(int sig); +extern _X_EXPORT int xf86ProcessArgument(int, char **, int); +extern _X_EXPORT void xf86UseMsg(void); +extern _X_EXPORT PMClose xf86OSPMOpen(void); + +extern _X_EXPORT void xf86MakeNewMapping(int, int, unsigned long, unsigned long, pointer); +extern _X_EXPORT void xf86InitVidMem(void); #endif /* XF86_OS_PRIVS */ diff --git a/xorg-server/hw/xfree86/parser/Configint.h b/xorg-server/hw/xfree86/parser/Configint.h index 815c1a376..cdc7be806 100644 --- a/xorg-server/hw/xfree86/parser/Configint.h +++ b/xorg-server/hw/xfree86/parser/Configint.h @@ -92,18 +92,14 @@ LexRec, *LexPtr; #include "configProcs.h" #include -#define xf86confmalloc malloc -#define xf86confrealloc realloc -#define xf86confcalloc calloc -#define xf86conffree free -#define TestFree(a) if (a) { xf86conffree (a); a = NULL; } +#define TestFree(a) if (a) { free (a); a = NULL; } #define parsePrologue(typeptr,typerec) typeptr ptr; \ -if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return NULL; } +if( (ptr=calloc(1,sizeof(typerec))) == NULL ) { return NULL; } #define parsePrologueVoid(typeptr,typerec) int token; typeptr ptr; \ -if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return; } +if( (ptr=calloc(1,sizeof(typerec))) == NULL ) { return; } #define HANDLE_RETURN(f,func)\ if ((ptr->f=func) == NULL)\ diff --git a/xorg-server/hw/xfree86/parser/DRI.c b/xorg-server/hw/xfree86/parser/DRI.c index 68a6db90b..12b8d1d1a 100644 --- a/xorg-server/hw/xfree86/parser/DRI.c +++ b/xorg-server/hw/xfree86/parser/DRI.c @@ -58,7 +58,7 @@ xf86freeBuffersList (XF86ConfBuffersPtr ptr) TestFree (ptr->buf_comment); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -183,5 +183,5 @@ xf86freeDRI (XF86ConfDRIPtr ptr) xf86freeBuffersList (ptr->dri_buffers_lst); TestFree (ptr->dri_comment); - xf86conffree (ptr); + free (ptr); } diff --git a/xorg-server/hw/xfree86/parser/Device.c b/xorg-server/hw/xfree86/parser/Device.c index 216789fc1..47ece07de 100644 --- a/xorg-server/hw/xfree86/parser/Device.c +++ b/xorg-server/hw/xfree86/parser/Device.c @@ -353,7 +353,7 @@ xf86freeDeviceList (XF86ConfDevicePtr ptr) prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -369,14 +369,3 @@ xf86findDevice (const char *ident, XF86ConfDevicePtr p) } return (NULL); } - -char * -xf86configStrdup (const char *s) -{ - char *tmp; - if (!s) return NULL; - tmp = xf86confmalloc (sizeof (char) * (strlen (s) + 1)); - if (tmp) - strcpy (tmp, s); - return (tmp); -} diff --git a/xorg-server/hw/xfree86/parser/Extensions.c b/xorg-server/hw/xfree86/parser/Extensions.c index b64f08111..4003b521a 100644 --- a/xorg-server/hw/xfree86/parser/Extensions.c +++ b/xorg-server/hw/xfree86/parser/Extensions.c @@ -107,5 +107,5 @@ xf86freeExtensions (XF86ConfExtensionsPtr ptr) xf86optionListFree (ptr->ext_option_lst); TestFree (ptr->extensions_comment); - xf86conffree (ptr); + free (ptr); } diff --git a/xorg-server/hw/xfree86/parser/Files.c b/xorg-server/hw/xfree86/parser/Files.c index c3523024d..0c718354e 100644 --- a/xorg-server/hw/xfree86/parser/Files.c +++ b/xorg-server/hw/xfree86/parser/Files.c @@ -70,11 +70,11 @@ static xf86ConfigSymTabRec FilesTab[] = {ENDSECTION, "endsection"}, {FONTPATH, "fontpath"}, {MODULEPATH, "modulepath"}, - {INPUTDEVICES, "inputdevices"}, {LOGFILEPATH, "logfile"}, {XKBDIR, "xkbdir"}, /* Obsolete keywords that aren't used but shouldn't cause errors: */ {OBSOLETE_TOKEN, "rgbpath"}, + {OBSOLETE_TOKEN, "inputdevices"}, {-1, ""}, }; @@ -103,7 +103,7 @@ xf86parseFilesSection (void) str = val.str; if (ptr->file_fontpath == NULL) { - ptr->file_fontpath = xf86confmalloc (1); + ptr->file_fontpath = malloc (1); ptr->file_fontpath[0] = '\0'; i = strlen (str) + 1; } @@ -117,12 +117,12 @@ xf86parseFilesSection (void) } } ptr->file_fontpath = - xf86confrealloc (ptr->file_fontpath, i); + realloc (ptr->file_fontpath, i); if (j) strcat (ptr->file_fontpath, ","); strcat (ptr->file_fontpath, str); - xf86conffree (val.str); + free (val.str); break; case MODULEPATH: if (xf86getSubToken (&(ptr->file_comment)) != STRING) @@ -131,7 +131,7 @@ xf86parseFilesSection (void) str = val.str; if (ptr->file_modulepath == NULL) { - ptr->file_modulepath = xf86confmalloc (1); + ptr->file_modulepath = malloc (1); ptr->file_modulepath[0] = '\0'; k = strlen (str) + 1; } @@ -144,39 +144,12 @@ xf86parseFilesSection (void) l = TRUE; } } - ptr->file_modulepath = xf86confrealloc (ptr->file_modulepath, k); + ptr->file_modulepath = realloc (ptr->file_modulepath, k); if (l) strcat (ptr->file_modulepath, ","); strcat (ptr->file_modulepath, str); - xf86conffree (val.str); - break; - case INPUTDEVICES: - if (xf86getSubToken (&(ptr->file_comment)) != STRING) - Error (QUOTE_MSG, "InputDevices"); - l = FALSE; - str = val.str; - if (ptr->file_inputdevs == NULL) - { - ptr->file_inputdevs = xf86confmalloc (1); - ptr->file_inputdevs[0] = '\0'; - k = strlen (str) + 1; - } - else - { - k = strlen (ptr->file_inputdevs) + strlen (str) + 1; - if (ptr->file_inputdevs[strlen (ptr->file_inputdevs) - 1] != ',') - { - k++; - l = TRUE; - } - } - ptr->file_inputdevs = xf86confrealloc (ptr->file_inputdevs, k); - if (l) - strcat (ptr->file_inputdevs, ","); - - strcat (ptr->file_inputdevs, str); - xf86conffree (val.str); + free (val.str); break; case LOGFILEPATH: if (xf86getSubToken (&(ptr->file_comment)) != STRING) @@ -237,21 +210,6 @@ xf86printFileSection (FILE * cf, XF86ConfFilesPtr ptr) } fprintf (cf, "\tModulePath \"%s\"\n", s); } - if (ptr->file_inputdevs) - { - s = ptr->file_inputdevs; - p = index (s, ','); - while (p) - { - *p = '\000'; - fprintf (cf, "\tInputDevices \"%s\"\n", s); - *p = ','; - s = p; - s++; - p = index (s, ','); - } - fprintf (cf, "\tInputDevices \"%s\"\n", s); - } if (ptr->file_fontpath) { s = ptr->file_fontpath; @@ -279,10 +237,9 @@ xf86freeFiles (XF86ConfFilesPtr p) TestFree (p->file_logfile); TestFree (p->file_modulepath); - TestFree (p->file_inputdevs); TestFree (p->file_fontpath); TestFree (p->file_comment); TestFree (p->file_xkbdir); - xf86conffree (p); + free (p); } diff --git a/xorg-server/hw/xfree86/parser/Flags.c b/xorg-server/hw/xfree86/parser/Flags.c index 19b9d1477..6865d3592 100644 --- a/xorg-server/hw/xfree86/parser/Flags.c +++ b/xorg-server/hw/xfree86/parser/Flags.c @@ -1,5 +1,4 @@ /* - * * Copyright (c) 1997 Metro Link Incorporated * * Permission is hereby granted, free of charge, to any person obtaining a @@ -134,7 +133,7 @@ xf86parseFlagsSection (void) { char *valstr = NULL; /* can't use strdup because it calls malloc */ - tmp = xf86configStrdup (ServerFlagsTab[i].name); + tmp = strdup (ServerFlagsTab[i].name); if (hasvalue) { tokentype = xf86getSubToken(&(ptr->flg_comment)); @@ -145,7 +144,7 @@ xf86parseFlagsSection (void) } else { if (tokentype != NUMBER) Error (NUMBER_MSG, tmp); - valstr = xf86confmalloc(16); + valstr = malloc(16); if (valstr) sprintf(valstr, "%d", val.num); } @@ -202,11 +201,11 @@ addNewOption2 (XF86OptionPtr head, char *name, char *val, int used) /* Don't allow duplicates, free old strings */ if (head != NULL && (old = xf86findOption(head, name)) != NULL) { new = old; - xf86conffree(new->opt_name); - xf86conffree(new->opt_val); + free(new->opt_name); + free(new->opt_val); } else - new = xf86confcalloc (1, sizeof (XF86OptionRec)); + new = calloc (1, sizeof (XF86OptionRec)); new->opt_name = name; new->opt_val = val; new->opt_used = used; @@ -229,21 +228,22 @@ xf86freeFlags (XF86ConfFlagsPtr flags) return; xf86optionListFree (flags->flg_option_lst); TestFree(flags->flg_comment); - xf86conffree (flags); + free (flags); } XF86OptionPtr xf86optionListDup (XF86OptionPtr opt) { XF86OptionPtr newopt = NULL; + char *val; while (opt) { - newopt = xf86addNewOption(newopt, xf86configStrdup(opt->opt_name), - xf86configStrdup(opt->opt_val)); + val = opt->opt_val ? strdup(opt->opt_val) : NULL; + newopt = xf86addNewOption(newopt, strdup(opt->opt_name), val); newopt->opt_used = opt->opt_used; if (opt->opt_comment) - newopt->opt_comment = xf86configStrdup(opt->opt_comment); + newopt->opt_comment = strdup(opt->opt_comment); opt = opt->list.next; } return newopt; @@ -261,7 +261,7 @@ xf86optionListFree (XF86OptionPtr opt) TestFree (opt->opt_comment); prev = opt; opt = opt->list.next; - xf86conffree (prev); + free (prev); } } @@ -286,7 +286,7 @@ xf86newOption(char *name, char *value) { XF86OptionPtr opt; - opt = xf86confcalloc(1, sizeof (XF86OptionRec)); + opt = calloc(1, sizeof (XF86OptionRec)); if (!opt) return NULL; @@ -331,7 +331,7 @@ xf86findOption (XF86OptionPtr list, const char *name) * returned. If the option is not found, a NULL is returned. */ -_X_EXPORT char * +char * xf86findOptionValue (XF86OptionPtr list, const char *name) { XF86OptionPtr p = xf86findOption (list, name); @@ -366,10 +366,10 @@ xf86optionListCreate( const char **options, int count, int used ) for (i = 0; i < count; i += 2) { /* can't use strdup because it calls malloc */ - t1 = xf86confmalloc (sizeof (char) * + t1 = malloc (sizeof (char) * (strlen (options[i]) + 1)); strcpy (t1, options[i]); - t2 = xf86confmalloc (sizeof (char) * + t2 = malloc (sizeof (char) * (strlen (options[i + 1]) + 1)); strcpy (t2, options[i + 1]); p = addNewOption2 (p, t1, t2, used); @@ -435,7 +435,7 @@ xf86uLongToString(unsigned long i) int l; l = (int)(ceil(log10((double)i) + 2.5)); - s = xf86confmalloc(l); + s = malloc(l); if (!s) return NULL; sprintf(s, "%lu", i); @@ -452,7 +452,7 @@ xf86parseOption(XF86OptionPtr head) if ((token = xf86getSubToken(&comment)) != STRING) { xf86parseError(BAD_OPTION_MSG, NULL); if (comment) - xf86conffree(comment); + free(comment); return (head); } @@ -479,10 +479,10 @@ xf86parseOption(XF86OptionPtr head) /* Don't allow duplicates */ if (head != NULL && (old = xf86findOption(head, name)) != NULL) { cnew = old; - xf86conffree(option->opt_name); + free(option->opt_name); TestFree(option->opt_val); TestFree(option->opt_comment); - xf86conffree(option); + free(option); } else cnew = option; diff --git a/xorg-server/hw/xfree86/parser/Input.c b/xorg-server/hw/xfree86/parser/Input.c index 3d9801968..4e3c04e53 100644 --- a/xorg-server/hw/xfree86/parser/Input.c +++ b/xorg-server/hw/xfree86/parser/Input.c @@ -163,7 +163,7 @@ xf86freeInputList (XF86ConfInputPtr ptr) prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/Layout.c b/xorg-server/hw/xfree86/parser/Layout.c index 5d1348acb..d548cd210 100644 --- a/xorg-server/hw/xfree86/parser/Layout.c +++ b/xorg-server/hw/xfree86/parser/Layout.c @@ -116,10 +116,10 @@ xf86parseLayoutSection (void) { XF86ConfInactivePtr iptr; - iptr = xf86confcalloc (1, sizeof (XF86ConfInactiveRec)); + iptr = calloc (1, sizeof (XF86ConfInactiveRec)); iptr->list.next = NULL; if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree (iptr); + free (iptr); Error (INACTIVE_MSG, NULL); } iptr->inactive_device_str = val.str; @@ -132,7 +132,7 @@ xf86parseLayoutSection (void) XF86ConfAdjacencyPtr aptr; int absKeyword = 0; - aptr = xf86confcalloc (1, sizeof (XF86ConfAdjacencyRec)); + aptr = calloc (1, sizeof (XF86ConfAdjacencyRec)); aptr->list.next = NULL; aptr->adj_scrnum = -1; aptr->adj_where = CONF_ADJ_OBSOLETE; @@ -145,7 +145,7 @@ xf86parseLayoutSection (void) xf86unGetToken (token); token = xf86getSubToken(&(ptr->lay_comment)); if (token != STRING) { - xf86conffree(aptr); + free(aptr); Error (SCREEN_MSG, NULL); } aptr->adj_screen_str = val.str; @@ -173,7 +173,7 @@ xf86parseLayoutSection (void) absKeyword = 1; break; case EOF_TOKEN: - xf86conffree(aptr); + free(aptr); Error (UNEXPECTED_EOF_MSG, NULL); break; default: @@ -194,13 +194,13 @@ xf86parseLayoutSection (void) aptr->adj_x = val.num; token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } aptr->adj_y = val.num; } else { if (absKeyword) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } else xf86unGetToken (token); @@ -213,7 +213,7 @@ xf86parseLayoutSection (void) case CONF_ADJ_RELATIVE: token = xf86getSubToken(&(ptr->lay_comment)); if (token != STRING) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } aptr->adj_refscreen = val.str; @@ -221,13 +221,13 @@ xf86parseLayoutSection (void) { token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } aptr->adj_x = val.num; token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } aptr->adj_y = val.num; @@ -239,21 +239,21 @@ xf86parseLayoutSection (void) /* bottom */ if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree(aptr); + free(aptr); Error (SCREEN_MSG, NULL); } aptr->adj_bottom_str = val.str; /* left */ if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree(aptr); + free(aptr); Error (SCREEN_MSG, NULL); } aptr->adj_left_str = val.str; /* right */ if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree(aptr); + free(aptr); Error (SCREEN_MSG, NULL); } aptr->adj_right_str = val.str; @@ -267,11 +267,11 @@ xf86parseLayoutSection (void) { XF86ConfInputrefPtr iptr; - iptr = xf86confcalloc (1, sizeof (XF86ConfInputrefRec)); + iptr = calloc (1, sizeof (XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree(iptr); + free(iptr); Error (INPUTDEV_MSG, NULL); } iptr->iref_inputdev_str = val.str; @@ -397,7 +397,7 @@ xf86freeAdjacencyList (XF86ConfAdjacencyPtr ptr) prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -413,7 +413,7 @@ xf86freeInputrefList (XF86ConfInputrefPtr ptr) xf86optionListFree (ptr->iref_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -431,7 +431,7 @@ xf86freeLayoutList (XF86ConfLayoutPtr ptr) xf86freeInputrefList (ptr->lay_input_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/Makefile.am b/xorg-server/hw/xfree86/parser/Makefile.am index a2774a47e..b8fab2835 100644 --- a/xorg-server/hw/xfree86/parser/Makefile.am +++ b/xorg-server/hw/xfree86/parser/Makefile.am @@ -1,10 +1,14 @@ if INSTALL_LIBXF86CONFIG +noinst_LTLIBRARIES = libxf86config_internal.la lib_LIBRARIES = libxf86config.a +LIBHEADERS = \ + xf86Optrec.h \ + xf86Parser.h else -noinst_LIBRARIES = libxf86config.a +noinst_LTLIBRARIES = libxf86config_internal.la endif -libxf86config_a_SOURCES = \ +INTERNAL_SOURCES= \ Device.c \ Files.c \ Flags.c \ @@ -22,13 +26,22 @@ libxf86config_a_SOURCES = \ DRI.c \ Extensions.c +libxf86config_internal_la_SOURCES = \ + $(INTERNAL_SOURCES) + +libxf86config_a_SOURCES = \ + $(INTERNAL_SOURCES) +libxf86config_a_CFLAGS = $(AM_CFLAGS) + AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ Configint.h \ configProcs.h \ + xf86Optrec.h \ + xf86Parser.h \ xf86tokens.h sdk_HEADERS = \ - xf86Optrec.h \ - xf86Parser.h + xf86Parser.h \ + xf86Optrec.h diff --git a/xorg-server/hw/xfree86/parser/Makefile.in b/xorg-server/hw/xfree86/parser/Makefile.in index e49c50837..123aa3479 100644 --- a/xorg-server/hw/xfree86/parser/Makefile.in +++ b/xorg-server/hw/xfree86/parser/Makefile.in @@ -16,6 +16,7 @@ @SET_MAKE@ + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -39,8 +40,11 @@ subdir = hw/xfree86/parser DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +54,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -75,17 +80,36 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sdkdir)" -LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES) +LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru libxf86config_a_AR = $(AR) $(ARFLAGS) libxf86config_a_LIBADD = -am_libxf86config_a_OBJECTS = Device.$(OBJEXT) Files.$(OBJEXT) \ - Flags.$(OBJEXT) Input.$(OBJEXT) Layout.$(OBJEXT) \ - Module.$(OBJEXT) Video.$(OBJEXT) Monitor.$(OBJEXT) \ - Pointer.$(OBJEXT) Screen.$(OBJEXT) Vendor.$(OBJEXT) \ - read.$(OBJEXT) scan.$(OBJEXT) write.$(OBJEXT) DRI.$(OBJEXT) \ - Extensions.$(OBJEXT) +am__objects_1 = libxf86config_a-Device.$(OBJEXT) \ + libxf86config_a-Files.$(OBJEXT) \ + libxf86config_a-Flags.$(OBJEXT) \ + libxf86config_a-Input.$(OBJEXT) \ + libxf86config_a-Layout.$(OBJEXT) \ + libxf86config_a-Module.$(OBJEXT) \ + libxf86config_a-Video.$(OBJEXT) \ + libxf86config_a-Monitor.$(OBJEXT) \ + libxf86config_a-Pointer.$(OBJEXT) \ + libxf86config_a-Screen.$(OBJEXT) \ + libxf86config_a-Vendor.$(OBJEXT) \ + libxf86config_a-read.$(OBJEXT) libxf86config_a-scan.$(OBJEXT) \ + libxf86config_a-write.$(OBJEXT) libxf86config_a-DRI.$(OBJEXT) \ + libxf86config_a-Extensions.$(OBJEXT) +am_libxf86config_a_OBJECTS = $(am__objects_1) libxf86config_a_OBJECTS = $(am_libxf86config_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libxf86config_internal_la_LIBADD = +am__objects_2 = Device.lo Files.lo Flags.lo Input.lo Layout.lo \ + Module.lo Video.lo Monitor.lo Pointer.lo Screen.lo Vendor.lo \ + read.lo scan.lo write.lo DRI.lo Extensions.lo +am_libxf86config_internal_la_OBJECTS = $(am__objects_2) +libxf86config_internal_la_OBJECTS = \ + $(am_libxf86config_internal_la_OBJECTS) +@INSTALL_LIBXF86CONFIG_FALSE@am_libxf86config_internal_la_rpath = +@INSTALL_LIBXF86CONFIG_TRUE@am_libxf86config_internal_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -96,8 +120,10 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libxf86config_a_SOURCES) -DIST_SOURCES = $(libxf86config_a_SOURCES) +SOURCES = $(libxf86config_a_SOURCES) \ + $(libxf86config_internal_la_SOURCES) +DIST_SOURCES = $(libxf86config_a_SOURCES) \ + $(libxf86config_internal_la_SOURCES) HEADERS = $(sdk_HEADERS) ETAGS = etags CTAGS = ctags @@ -107,6 +133,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -127,9 +154,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -158,7 +188,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -167,9 +199,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -208,12 +244,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -233,7 +270,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -243,6 +279,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -256,11 +293,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -296,6 +332,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -320,7 +357,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -343,6 +379,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -374,15 +411,22 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +@INSTALL_LIBXF86CONFIG_FALSE@noinst_LTLIBRARIES = libxf86config_internal.la +@INSTALL_LIBXF86CONFIG_TRUE@noinst_LTLIBRARIES = libxf86config_internal.la @INSTALL_LIBXF86CONFIG_TRUE@lib_LIBRARIES = libxf86config.a -@INSTALL_LIBXF86CONFIG_FALSE@noinst_LIBRARIES = libxf86config.a -libxf86config_a_SOURCES = \ +@INSTALL_LIBXF86CONFIG_TRUE@LIBHEADERS = \ +@INSTALL_LIBXF86CONFIG_TRUE@ xf86Optrec.h \ +@INSTALL_LIBXF86CONFIG_TRUE@ xf86Parser.h + +INTERNAL_SOURCES = \ Device.c \ Files.c \ Flags.c \ @@ -400,15 +444,24 @@ libxf86config_a_SOURCES = \ DRI.c \ Extensions.c +libxf86config_internal_la_SOURCES = \ + $(INTERNAL_SOURCES) + +libxf86config_a_SOURCES = \ + $(INTERNAL_SOURCES) + +libxf86config_a_CFLAGS = $(AM_CFLAGS) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ Configint.h \ configProcs.h \ + xf86Optrec.h \ + xf86Parser.h \ xf86tokens.h sdk_HEADERS = \ - xf86Optrec.h \ - xf86Parser.h + xf86Parser.h \ + xf86Optrec.h all: all-am @@ -476,36 +529,60 @@ uninstall-libLIBRARIES: clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libxf86config.a: $(libxf86config_a_OBJECTS) $(libxf86config_a_DEPENDENCIES) -rm -f libxf86config.a $(libxf86config_a_AR) libxf86config.a $(libxf86config_a_OBJECTS) $(libxf86config_a_LIBADD) $(RANLIB) libxf86config.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libxf86config_internal.la: $(libxf86config_internal_la_OBJECTS) $(libxf86config_internal_la_DEPENDENCIES) + $(LINK) $(am_libxf86config_internal_la_rpath) $(libxf86config_internal_la_OBJECTS) $(libxf86config_internal_la_LIBADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DRI.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Device.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Extensions.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Files.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Flags.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Input.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Layout.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Monitor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pointer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vendor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Video.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scan.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DRI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Device.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Extensions.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Files.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Flags.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Input.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Layout.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Module.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Monitor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pointer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vendor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Video.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-DRI.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Device.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Extensions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Files.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Flags.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Input.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Layout.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Monitor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Pointer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Screen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Vendor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Video.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-read.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-scan.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scan.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -528,6 +605,230 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +libxf86config_a-Device.o: Device.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Device.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Device.Tpo -c -o libxf86config_a-Device.o `test -f 'Device.c' || echo '$(srcdir)/'`Device.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Device.Tpo $(DEPDIR)/libxf86config_a-Device.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Device.c' object='libxf86config_a-Device.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Device.o `test -f 'Device.c' || echo '$(srcdir)/'`Device.c + +libxf86config_a-Device.obj: Device.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Device.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Device.Tpo -c -o libxf86config_a-Device.obj `if test -f 'Device.c'; then $(CYGPATH_W) 'Device.c'; else $(CYGPATH_W) '$(srcdir)/Device.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Device.Tpo $(DEPDIR)/libxf86config_a-Device.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Device.c' object='libxf86config_a-Device.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Device.obj `if test -f 'Device.c'; then $(CYGPATH_W) 'Device.c'; else $(CYGPATH_W) '$(srcdir)/Device.c'; fi` + +libxf86config_a-Files.o: Files.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Files.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Files.Tpo -c -o libxf86config_a-Files.o `test -f 'Files.c' || echo '$(srcdir)/'`Files.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Files.Tpo $(DEPDIR)/libxf86config_a-Files.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Files.c' object='libxf86config_a-Files.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Files.o `test -f 'Files.c' || echo '$(srcdir)/'`Files.c + +libxf86config_a-Files.obj: Files.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Files.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Files.Tpo -c -o libxf86config_a-Files.obj `if test -f 'Files.c'; then $(CYGPATH_W) 'Files.c'; else $(CYGPATH_W) '$(srcdir)/Files.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Files.Tpo $(DEPDIR)/libxf86config_a-Files.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Files.c' object='libxf86config_a-Files.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Files.obj `if test -f 'Files.c'; then $(CYGPATH_W) 'Files.c'; else $(CYGPATH_W) '$(srcdir)/Files.c'; fi` + +libxf86config_a-Flags.o: Flags.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Flags.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Flags.Tpo -c -o libxf86config_a-Flags.o `test -f 'Flags.c' || echo '$(srcdir)/'`Flags.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Flags.Tpo $(DEPDIR)/libxf86config_a-Flags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Flags.c' object='libxf86config_a-Flags.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Flags.o `test -f 'Flags.c' || echo '$(srcdir)/'`Flags.c + +libxf86config_a-Flags.obj: Flags.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Flags.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Flags.Tpo -c -o libxf86config_a-Flags.obj `if test -f 'Flags.c'; then $(CYGPATH_W) 'Flags.c'; else $(CYGPATH_W) '$(srcdir)/Flags.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Flags.Tpo $(DEPDIR)/libxf86config_a-Flags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Flags.c' object='libxf86config_a-Flags.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Flags.obj `if test -f 'Flags.c'; then $(CYGPATH_W) 'Flags.c'; else $(CYGPATH_W) '$(srcdir)/Flags.c'; fi` + +libxf86config_a-Input.o: Input.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Input.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Input.Tpo -c -o libxf86config_a-Input.o `test -f 'Input.c' || echo '$(srcdir)/'`Input.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Input.Tpo $(DEPDIR)/libxf86config_a-Input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Input.c' object='libxf86config_a-Input.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Input.o `test -f 'Input.c' || echo '$(srcdir)/'`Input.c + +libxf86config_a-Input.obj: Input.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Input.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Input.Tpo -c -o libxf86config_a-Input.obj `if test -f 'Input.c'; then $(CYGPATH_W) 'Input.c'; else $(CYGPATH_W) '$(srcdir)/Input.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Input.Tpo $(DEPDIR)/libxf86config_a-Input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Input.c' object='libxf86config_a-Input.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Input.obj `if test -f 'Input.c'; then $(CYGPATH_W) 'Input.c'; else $(CYGPATH_W) '$(srcdir)/Input.c'; fi` + +libxf86config_a-Layout.o: Layout.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Layout.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Layout.Tpo -c -o libxf86config_a-Layout.o `test -f 'Layout.c' || echo '$(srcdir)/'`Layout.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Layout.Tpo $(DEPDIR)/libxf86config_a-Layout.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Layout.c' object='libxf86config_a-Layout.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Layout.o `test -f 'Layout.c' || echo '$(srcdir)/'`Layout.c + +libxf86config_a-Layout.obj: Layout.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Layout.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Layout.Tpo -c -o libxf86config_a-Layout.obj `if test -f 'Layout.c'; then $(CYGPATH_W) 'Layout.c'; else $(CYGPATH_W) '$(srcdir)/Layout.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Layout.Tpo $(DEPDIR)/libxf86config_a-Layout.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Layout.c' object='libxf86config_a-Layout.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Layout.obj `if test -f 'Layout.c'; then $(CYGPATH_W) 'Layout.c'; else $(CYGPATH_W) '$(srcdir)/Layout.c'; fi` + +libxf86config_a-Module.o: Module.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Module.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Module.Tpo -c -o libxf86config_a-Module.o `test -f 'Module.c' || echo '$(srcdir)/'`Module.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Module.Tpo $(DEPDIR)/libxf86config_a-Module.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Module.c' object='libxf86config_a-Module.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Module.o `test -f 'Module.c' || echo '$(srcdir)/'`Module.c + +libxf86config_a-Module.obj: Module.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Module.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Module.Tpo -c -o libxf86config_a-Module.obj `if test -f 'Module.c'; then $(CYGPATH_W) 'Module.c'; else $(CYGPATH_W) '$(srcdir)/Module.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Module.Tpo $(DEPDIR)/libxf86config_a-Module.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Module.c' object='libxf86config_a-Module.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Module.obj `if test -f 'Module.c'; then $(CYGPATH_W) 'Module.c'; else $(CYGPATH_W) '$(srcdir)/Module.c'; fi` + +libxf86config_a-Video.o: Video.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Video.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Video.Tpo -c -o libxf86config_a-Video.o `test -f 'Video.c' || echo '$(srcdir)/'`Video.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Video.Tpo $(DEPDIR)/libxf86config_a-Video.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Video.c' object='libxf86config_a-Video.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Video.o `test -f 'Video.c' || echo '$(srcdir)/'`Video.c + +libxf86config_a-Video.obj: Video.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Video.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Video.Tpo -c -o libxf86config_a-Video.obj `if test -f 'Video.c'; then $(CYGPATH_W) 'Video.c'; else $(CYGPATH_W) '$(srcdir)/Video.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Video.Tpo $(DEPDIR)/libxf86config_a-Video.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Video.c' object='libxf86config_a-Video.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Video.obj `if test -f 'Video.c'; then $(CYGPATH_W) 'Video.c'; else $(CYGPATH_W) '$(srcdir)/Video.c'; fi` + +libxf86config_a-Monitor.o: Monitor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Monitor.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Monitor.Tpo -c -o libxf86config_a-Monitor.o `test -f 'Monitor.c' || echo '$(srcdir)/'`Monitor.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Monitor.Tpo $(DEPDIR)/libxf86config_a-Monitor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Monitor.c' object='libxf86config_a-Monitor.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Monitor.o `test -f 'Monitor.c' || echo '$(srcdir)/'`Monitor.c + +libxf86config_a-Monitor.obj: Monitor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Monitor.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Monitor.Tpo -c -o libxf86config_a-Monitor.obj `if test -f 'Monitor.c'; then $(CYGPATH_W) 'Monitor.c'; else $(CYGPATH_W) '$(srcdir)/Monitor.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Monitor.Tpo $(DEPDIR)/libxf86config_a-Monitor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Monitor.c' object='libxf86config_a-Monitor.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Monitor.obj `if test -f 'Monitor.c'; then $(CYGPATH_W) 'Monitor.c'; else $(CYGPATH_W) '$(srcdir)/Monitor.c'; fi` + +libxf86config_a-Pointer.o: Pointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Pointer.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Pointer.Tpo -c -o libxf86config_a-Pointer.o `test -f 'Pointer.c' || echo '$(srcdir)/'`Pointer.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Pointer.Tpo $(DEPDIR)/libxf86config_a-Pointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Pointer.c' object='libxf86config_a-Pointer.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Pointer.o `test -f 'Pointer.c' || echo '$(srcdir)/'`Pointer.c + +libxf86config_a-Pointer.obj: Pointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Pointer.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Pointer.Tpo -c -o libxf86config_a-Pointer.obj `if test -f 'Pointer.c'; then $(CYGPATH_W) 'Pointer.c'; else $(CYGPATH_W) '$(srcdir)/Pointer.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Pointer.Tpo $(DEPDIR)/libxf86config_a-Pointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Pointer.c' object='libxf86config_a-Pointer.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Pointer.obj `if test -f 'Pointer.c'; then $(CYGPATH_W) 'Pointer.c'; else $(CYGPATH_W) '$(srcdir)/Pointer.c'; fi` + +libxf86config_a-Screen.o: Screen.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Screen.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Screen.Tpo -c -o libxf86config_a-Screen.o `test -f 'Screen.c' || echo '$(srcdir)/'`Screen.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Screen.Tpo $(DEPDIR)/libxf86config_a-Screen.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Screen.c' object='libxf86config_a-Screen.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Screen.o `test -f 'Screen.c' || echo '$(srcdir)/'`Screen.c + +libxf86config_a-Screen.obj: Screen.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Screen.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Screen.Tpo -c -o libxf86config_a-Screen.obj `if test -f 'Screen.c'; then $(CYGPATH_W) 'Screen.c'; else $(CYGPATH_W) '$(srcdir)/Screen.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Screen.Tpo $(DEPDIR)/libxf86config_a-Screen.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Screen.c' object='libxf86config_a-Screen.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Screen.obj `if test -f 'Screen.c'; then $(CYGPATH_W) 'Screen.c'; else $(CYGPATH_W) '$(srcdir)/Screen.c'; fi` + +libxf86config_a-Vendor.o: Vendor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Vendor.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Vendor.Tpo -c -o libxf86config_a-Vendor.o `test -f 'Vendor.c' || echo '$(srcdir)/'`Vendor.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Vendor.Tpo $(DEPDIR)/libxf86config_a-Vendor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Vendor.c' object='libxf86config_a-Vendor.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Vendor.o `test -f 'Vendor.c' || echo '$(srcdir)/'`Vendor.c + +libxf86config_a-Vendor.obj: Vendor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Vendor.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Vendor.Tpo -c -o libxf86config_a-Vendor.obj `if test -f 'Vendor.c'; then $(CYGPATH_W) 'Vendor.c'; else $(CYGPATH_W) '$(srcdir)/Vendor.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Vendor.Tpo $(DEPDIR)/libxf86config_a-Vendor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Vendor.c' object='libxf86config_a-Vendor.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Vendor.obj `if test -f 'Vendor.c'; then $(CYGPATH_W) 'Vendor.c'; else $(CYGPATH_W) '$(srcdir)/Vendor.c'; fi` + +libxf86config_a-read.o: read.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-read.o -MD -MP -MF $(DEPDIR)/libxf86config_a-read.Tpo -c -o libxf86config_a-read.o `test -f 'read.c' || echo '$(srcdir)/'`read.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-read.Tpo $(DEPDIR)/libxf86config_a-read.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='read.c' object='libxf86config_a-read.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-read.o `test -f 'read.c' || echo '$(srcdir)/'`read.c + +libxf86config_a-read.obj: read.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-read.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-read.Tpo -c -o libxf86config_a-read.obj `if test -f 'read.c'; then $(CYGPATH_W) 'read.c'; else $(CYGPATH_W) '$(srcdir)/read.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-read.Tpo $(DEPDIR)/libxf86config_a-read.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='read.c' object='libxf86config_a-read.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-read.obj `if test -f 'read.c'; then $(CYGPATH_W) 'read.c'; else $(CYGPATH_W) '$(srcdir)/read.c'; fi` + +libxf86config_a-scan.o: scan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-scan.o -MD -MP -MF $(DEPDIR)/libxf86config_a-scan.Tpo -c -o libxf86config_a-scan.o `test -f 'scan.c' || echo '$(srcdir)/'`scan.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-scan.Tpo $(DEPDIR)/libxf86config_a-scan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan.c' object='libxf86config_a-scan.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-scan.o `test -f 'scan.c' || echo '$(srcdir)/'`scan.c + +libxf86config_a-scan.obj: scan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-scan.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-scan.Tpo -c -o libxf86config_a-scan.obj `if test -f 'scan.c'; then $(CYGPATH_W) 'scan.c'; else $(CYGPATH_W) '$(srcdir)/scan.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-scan.Tpo $(DEPDIR)/libxf86config_a-scan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan.c' object='libxf86config_a-scan.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-scan.obj `if test -f 'scan.c'; then $(CYGPATH_W) 'scan.c'; else $(CYGPATH_W) '$(srcdir)/scan.c'; fi` + +libxf86config_a-write.o: write.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-write.o -MD -MP -MF $(DEPDIR)/libxf86config_a-write.Tpo -c -o libxf86config_a-write.o `test -f 'write.c' || echo '$(srcdir)/'`write.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-write.Tpo $(DEPDIR)/libxf86config_a-write.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='write.c' object='libxf86config_a-write.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-write.o `test -f 'write.c' || echo '$(srcdir)/'`write.c + +libxf86config_a-write.obj: write.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-write.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-write.Tpo -c -o libxf86config_a-write.obj `if test -f 'write.c'; then $(CYGPATH_W) 'write.c'; else $(CYGPATH_W) '$(srcdir)/write.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-write.Tpo $(DEPDIR)/libxf86config_a-write.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='write.c' object='libxf86config_a-write.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-write.obj `if test -f 'write.c'; then $(CYGPATH_W) 'write.c'; else $(CYGPATH_W) '$(srcdir)/write.c'; fi` + +libxf86config_a-DRI.o: DRI.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-DRI.o -MD -MP -MF $(DEPDIR)/libxf86config_a-DRI.Tpo -c -o libxf86config_a-DRI.o `test -f 'DRI.c' || echo '$(srcdir)/'`DRI.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-DRI.Tpo $(DEPDIR)/libxf86config_a-DRI.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DRI.c' object='libxf86config_a-DRI.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-DRI.o `test -f 'DRI.c' || echo '$(srcdir)/'`DRI.c + +libxf86config_a-DRI.obj: DRI.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-DRI.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-DRI.Tpo -c -o libxf86config_a-DRI.obj `if test -f 'DRI.c'; then $(CYGPATH_W) 'DRI.c'; else $(CYGPATH_W) '$(srcdir)/DRI.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-DRI.Tpo $(DEPDIR)/libxf86config_a-DRI.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DRI.c' object='libxf86config_a-DRI.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-DRI.obj `if test -f 'DRI.c'; then $(CYGPATH_W) 'DRI.c'; else $(CYGPATH_W) '$(srcdir)/DRI.c'; fi` + +libxf86config_a-Extensions.o: Extensions.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Extensions.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Extensions.Tpo -c -o libxf86config_a-Extensions.o `test -f 'Extensions.c' || echo '$(srcdir)/'`Extensions.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Extensions.Tpo $(DEPDIR)/libxf86config_a-Extensions.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Extensions.c' object='libxf86config_a-Extensions.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Extensions.o `test -f 'Extensions.c' || echo '$(srcdir)/'`Extensions.c + +libxf86config_a-Extensions.obj: Extensions.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Extensions.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Extensions.Tpo -c -o libxf86config_a-Extensions.obj `if test -f 'Extensions.c'; then $(CYGPATH_W) 'Extensions.c'; else $(CYGPATH_W) '$(srcdir)/Extensions.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Extensions.Tpo $(DEPDIR)/libxf86config_a-Extensions.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Extensions.c' object='libxf86config_a-Extensions.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Extensions.obj `if test -f 'Extensions.c'; then $(CYGPATH_W) 'Extensions.c'; else $(CYGPATH_W) '$(srcdir)/Extensions.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -638,7 +939,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -671,7 +972,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-generic clean-libLIBRARIES clean-libtool \ - clean-noinstLIBRARIES mostlyclean-am + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -742,7 +1043,7 @@ uninstall-am: uninstall-libLIBRARIES uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLIBRARIES clean-libtool clean-noinstLIBRARIES ctags \ + clean-libLIBRARIES clean-libtool clean-noinstLTLIBRARIES ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ diff --git a/xorg-server/hw/xfree86/parser/Module.c b/xorg-server/hw/xfree86/parser/Module.c index 2012ce6d2..ca323fc5a 100644 --- a/xorg-server/hw/xfree86/parser/Module.c +++ b/xorg-server/hw/xfree86/parser/Module.c @@ -108,11 +108,11 @@ xf86parseModuleSubSection (XF86LoadPtr head, char *name) break; case EOF_TOKEN: xf86parseError (UNEXPECTED_EOF_MSG, NULL); - xf86conffree(ptr); + free(ptr); return NULL; default: xf86parseError (INVALID_KEYWORD_MSG, xf86tokenString ()); - xf86conffree(ptr); + free(ptr); return NULL; break; } @@ -233,7 +233,7 @@ xf86addNewLoadDirective (XF86LoadPtr head, char *name, int type, XF86OptionPtr o XF86LoadPtr new; int token; - new = xf86confcalloc (1, sizeof (XF86LoadRec)); + new = calloc (1, sizeof (XF86LoadRec)); new->load_name = name; new->load_type = type; new->load_opt = opts; @@ -263,7 +263,7 @@ xf86freeModules (XF86ConfModulePtr ptr) TestFree (lptr->load_comment); prev = lptr; lptr = lptr->list.next; - xf86conffree (prev); + free (prev); } lptr = ptr->mod_disable_lst; while (lptr) @@ -272,8 +272,8 @@ xf86freeModules (XF86ConfModulePtr ptr) TestFree (lptr->load_comment); prev = lptr; lptr = lptr->list.next; - xf86conffree (prev); + free (prev); } TestFree (ptr->mod_comment); - xf86conffree (ptr); + free (ptr); } diff --git a/xorg-server/hw/xfree86/parser/Monitor.c b/xorg-server/hw/xfree86/parser/Monitor.c index 9d533125e..50de091fc 100644 --- a/xorg-server/hw/xfree86/parser/Monitor.c +++ b/xorg-server/hw/xfree86/parser/Monitor.c @@ -134,7 +134,7 @@ xf86freeModeLineList (XF86ConfModeLinePtr ptr) TestFree (ptr->ml_comment); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -580,7 +580,7 @@ VertDone: /* add to the end of the list of modes sections referenced here */ - mptr = xf86confcalloc (1, sizeof (XF86ConfModesLinkRec)); + mptr = calloc (1, sizeof (XF86ConfModesLinkRec)); mptr->list.next = NULL; mptr->ml_modes_str = val.str; mptr->ml_modes = NULL; @@ -822,7 +822,7 @@ xf86freeMonitorList (XF86ConfMonitorPtr ptr) xf86freeModeLineList (ptr->mon_modeline_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -838,7 +838,7 @@ xf86freeModesList (XF86ConfModesPtr ptr) xf86freeModeLineList (ptr->mon_modeline_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/Pointer.c b/xorg-server/hw/xfree86/parser/Pointer.c index eeb0834bf..56a26ba74 100644 --- a/xorg-server/hw/xfree86/parser/Pointer.c +++ b/xorg-server/hw/xfree86/parser/Pointer.c @@ -115,19 +115,19 @@ xf86parsePointerSection (void) if (xf86getSubToken (&(ptr->inp_comment)) != STRING) Error (QUOTE_MSG, "Protocol"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Protocol"), + strdup("Protocol"), val.str); break; case PDEVICE: if (xf86getSubToken (&(ptr->inp_comment)) != STRING) Error (QUOTE_MSG, "Device"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Device"), + strdup("Device"), val.str); break; case EMULATE3: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Emulate3Buttons"), + strdup("Emulate3Buttons"), NULL); break; case EM3TIMEOUT: @@ -135,12 +135,12 @@ xf86parsePointerSection (void) Error (POSITIVE_INT_MSG, "Emulate3Timeout"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Emulate3Timeout"), + strdup("Emulate3Timeout"), s); break; case CHORDMIDDLE: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("ChordMiddle"), + strdup("ChordMiddle"), NULL); break; case PBUTTONS: @@ -148,36 +148,36 @@ xf86parsePointerSection (void) Error (POSITIVE_INT_MSG, "Buttons"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Buttons"), s); + strdup("Buttons"), s); break; case BAUDRATE: if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) Error (POSITIVE_INT_MSG, "BaudRate"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("BaudRate"), s); + strdup("BaudRate"), s); break; case SAMPLERATE: if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) Error (POSITIVE_INT_MSG, "SampleRate"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("SampleRate"), s); + strdup("SampleRate"), s); break; case PRESOLUTION: if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) Error (POSITIVE_INT_MSG, "Resolution"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Resolution"), s); + strdup("Resolution"), s); break; case CLEARDTR: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("ClearDTR"), NULL); + strdup("ClearDTR"), NULL); break; case CLEARRTS: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("ClearRTS"), NULL); + strdup("ClearRTS"), NULL); break; case ZAXISMAPPING: switch (xf86getToken(ZMapTab)) { @@ -186,28 +186,28 @@ xf86parsePointerSection (void) Error (ZAXISMAPPING_MSG, NULL); s1 = xf86uLongToString(val.num); if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) { - xf86conffree(s1); + free(s1); Error (ZAXISMAPPING_MSG, NULL); } s2 = xf86uLongToString(val.num); l = strlen(s1) + 1 + strlen(s2) + 1; - s = xf86confmalloc(l); + s = malloc(l); sprintf(s, "%s %s", s1, s2); - xf86conffree(s1); - xf86conffree(s2); + free(s1); + free(s2); break; case XAXIS: - s = xf86configStrdup("x"); + s = strdup("x"); break; case YAXIS: - s = xf86configStrdup("y"); + s = strdup("y"); break; default: Error (ZAXISMAPPING_MSG, NULL); break; } ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("ZAxisMapping"), + strdup("ZAxisMapping"), s); break; case ALWAYSCORE: @@ -221,10 +221,10 @@ xf86parsePointerSection (void) } } - ptr->inp_identifier = xf86configStrdup(CONF_IMPLICIT_POINTER); - ptr->inp_driver = xf86configStrdup("mouse"); + ptr->inp_identifier = strdup(CONF_IMPLICIT_POINTER); + ptr->inp_driver = strdup("mouse"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("CorePointer"), NULL); + strdup("CorePointer"), NULL); #ifdef DEBUG printf ("Pointer section parsed\n"); diff --git a/xorg-server/hw/xfree86/parser/Screen.c b/xorg-server/hw/xfree86/parser/Screen.c index dfc02bb72..b3b004df6 100644 --- a/xorg-server/hw/xfree86/parser/Screen.c +++ b/xorg-server/hw/xfree86/parser/Screen.c @@ -169,7 +169,7 @@ xf86parseDisplaySubSection (void) while ((token = xf86getSubTokenWithTab (&(ptr->disp_comment), DisplayTab)) == STRING) { - mptr = xf86confcalloc (1, sizeof (XF86ModeRec)); + mptr = calloc (1, sizeof (XF86ModeRec)); mptr->mode_name = val.str; mptr->list.next = NULL; ptr->disp_mode_lst = (XF86ModePtr) @@ -292,7 +292,7 @@ xf86parseScreenSection (void) if (aptr == NULL) { - aptr = xf86confcalloc (1, sizeof (XF86ConfAdaptorLinkRec)); + aptr = calloc (1, sizeof (XF86ConfAdaptorLinkRec)); aptr->list.next = NULL; aptr->al_adaptor_str = val.str; ptr->scrn_adaptor_lst = (XF86ConfAdaptorLinkPtr) @@ -315,7 +315,7 @@ xf86parseScreenSection (void) if (xf86getSubToken (&(ptr->scrn_comment)) != STRING) Error (QUOTE_MSG, "SubSection"); { - xf86conffree(val.str); + free(val.str); HANDLE_LIST (scrn_display_lst, xf86parseDisplaySubSection, XF86ConfDisplayPtr); } @@ -456,7 +456,7 @@ xf86freeScreenList (XF86ConfScreenPtr ptr) xf86freeDisplayList (ptr->scrn_display_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -470,7 +470,7 @@ xf86freeAdaptorLinkList (XF86ConfAdaptorLinkPtr ptr) TestFree (ptr->al_adaptor_str); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -485,7 +485,7 @@ xf86freeDisplayList (XF86ConfDisplayPtr ptr) xf86optionListFree (ptr->disp_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -499,7 +499,7 @@ xf86freeModeList (XF86ModePtr ptr) TestFree (ptr->mode_name); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -544,7 +544,7 @@ xf86validateScreen (XF86ConfigPtr p) return (FALSE); } - adaptor->al_adaptor->va_fwdref = xf86configStrdup(screen->scrn_identifier); + adaptor->al_adaptor->va_fwdref = strdup(screen->scrn_identifier); adaptor = adaptor->list.next; } diff --git a/xorg-server/hw/xfree86/parser/Vendor.c b/xorg-server/hw/xfree86/parser/Vendor.c index d1e608067..dce3f1ca1 100644 --- a/xorg-server/hw/xfree86/parser/Vendor.c +++ b/xorg-server/hw/xfree86/parser/Vendor.c @@ -223,7 +223,7 @@ xf86freeVendorList (XF86ConfVendorPtr p) TestFree (p->vnd_identifier); TestFree (p->vnd_comment); xf86optionListFree (p->vnd_option_lst); - xf86conffree (p); + free (p); } void @@ -239,6 +239,6 @@ xf86freeVendorSubList (XF86ConfVendSubPtr ptr) xf86optionListFree (ptr->vs_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/Video.c b/xorg-server/hw/xfree86/parser/Video.c index a8912cf44..beeb43e4f 100644 --- a/xorg-server/hw/xfree86/parser/Video.c +++ b/xorg-server/hw/xfree86/parser/Video.c @@ -86,7 +86,7 @@ xf86freeVideoPortList (XF86ConfVideoPortPtr ptr) xf86optionListFree (ptr->vp_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -278,7 +278,7 @@ xf86freeVideoAdaptorList (XF86ConfVideoAdaptorPtr ptr) xf86optionListFree (ptr->va_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/configProcs.h b/xorg-server/hw/xfree86/parser/configProcs.h index 3c9ce7a83..26ba40ebb 100644 --- a/xorg-server/hw/xfree86/parser/configProcs.h +++ b/xorg-server/hw/xfree86/parser/configProcs.h @@ -27,6 +27,9 @@ /* Private procs. Public procs are in xf86Parser.h and xf86Optrec.h */ +/* exported functions are/were used by the X Server, and need to be + * made public when installing libxf86config */ + /* Device.c */ XF86ConfDevicePtr xf86parseDeviceSection(void); void xf86printDeviceSection(FILE *cf, XF86ConfDevicePtr ptr); @@ -53,14 +56,14 @@ int xf86validateLayout(XF86ConfigPtr p); /* Module.c */ XF86ConfModulePtr xf86parseModuleSection(void); void xf86printModuleSection(FILE *cf, XF86ConfModulePtr ptr); -XF86LoadPtr xf86addNewLoadDirective(XF86LoadPtr head, char *name, int type, XF86OptionPtr opts); +extern _X_EXPORT XF86LoadPtr xf86addNewLoadDirective(XF86LoadPtr head, char *name, int type, XF86OptionPtr opts); void xf86freeModules(XF86ConfModulePtr ptr); /* Monitor.c */ XF86ConfMonitorPtr xf86parseMonitorSection(void); XF86ConfModesPtr xf86parseModesSection(void); void xf86printMonitorSection(FILE *cf, XF86ConfMonitorPtr ptr); void xf86printModesSection(FILE *cf, XF86ConfModesPtr ptr); -void xf86freeMonitorList(XF86ConfMonitorPtr ptr); +extern _X_EXPORT void xf86freeMonitorList(XF86ConfMonitorPtr ptr); void xf86freeModesList(XF86ConfModesPtr ptr); int xf86validateMonitor(XF86ConfigPtr p, XF86ConfScreenPtr screen); /* Pointer.c */ @@ -68,7 +71,7 @@ XF86ConfInputPtr xf86parsePointerSection(void); /* Screen.c */ XF86ConfScreenPtr xf86parseScreenSection(void); void xf86printScreenSection(FILE *cf, XF86ConfScreenPtr ptr); -void xf86freeScreenList(XF86ConfScreenPtr ptr); +extern _X_EXPORT void xf86freeScreenList(XF86ConfScreenPtr ptr); void xf86freeAdaptorLinkList(XF86ConfAdaptorLinkPtr ptr); void xf86freeDisplayList(XF86ConfDisplayPtr ptr); void xf86freeModeList(XF86ModePtr ptr); diff --git a/xorg-server/hw/xfree86/parser/read.c b/xorg-server/hw/xfree86/parser/read.c index b044a6af8..e965d209e 100644 --- a/xorg-server/hw/xfree86/parser/read.c +++ b/xorg-server/hw/xfree86/parser/read.c @@ -96,7 +96,7 @@ xf86readConfigFile (void) int token; XF86ConfigPtr ptr = NULL; - if ((ptr = xf86confcalloc (1, sizeof (XF86ConfigRec))) == NULL) + if ((ptr = calloc (1, sizeof (XF86ConfigRec))) == NULL) { return NULL; } @@ -118,107 +118,107 @@ xf86readConfigFile (void) xf86setSection (val.str); if (xf86nameCompare (val.str, "files") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_files, xf86parseFilesSection ()); } else if (xf86nameCompare (val.str, "serverflags") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_flags, xf86parseFlagsSection ()); } else if (xf86nameCompare (val.str, "pointer") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_input_lst, xf86parsePointerSection, XF86ConfInputPtr); } else if (xf86nameCompare (val.str, "videoadaptor") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_videoadaptor_lst, xf86parseVideoAdaptorSection, XF86ConfVideoAdaptorPtr); } else if (xf86nameCompare (val.str, "device") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_device_lst, xf86parseDeviceSection, XF86ConfDevicePtr); } else if (xf86nameCompare (val.str, "monitor") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_monitor_lst, xf86parseMonitorSection, XF86ConfMonitorPtr); } else if (xf86nameCompare (val.str, "modes") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_modes_lst, xf86parseModesSection, XF86ConfModesPtr); } else if (xf86nameCompare (val.str, "screen") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_screen_lst, xf86parseScreenSection, XF86ConfScreenPtr); } else if (xf86nameCompare(val.str, "inputdevice") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_input_lst, xf86parseInputSection, XF86ConfInputPtr); } else if (xf86nameCompare (val.str, "module") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_modules, xf86parseModuleSection ()); } else if (xf86nameCompare (val.str, "serverlayout") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_layout_lst, xf86parseLayoutSection, XF86ConfLayoutPtr); } else if (xf86nameCompare (val.str, "vendor") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_vendor_lst, xf86parseVendorSection, XF86ConfVendorPtr); } else if (xf86nameCompare (val.str, "dri") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_dri, xf86parseDRISection ()); } else if (xf86nameCompare (val.str, "extensions") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_extensions, xf86parseExtensionsSection ()); } else { Error (INVALID_SECTION_MSG, xf86tokenString ()); - xf86conffree(val.str); + free(val.str); val.str = NULL; } break; default: Error (INVALID_KEYWORD_MSG, xf86tokenString ()); - xf86conffree(val.str); + free(val.str); val.str = NULL; } } @@ -306,5 +306,5 @@ xf86freeConfig (XF86ConfigPtr p) xf86freeExtensions (p->conf_extensions); TestFree(p->conf_comment); - xf86conffree (p); + free (p); } diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c index 7f10c0daa..d2e8b6d2b 100644 --- a/xorg-server/hw/xfree86/parser/scan.c +++ b/xorg-server/hw/xfree86/parser/scan.c @@ -180,8 +180,8 @@ xf86getNextLine(void) if (configBufLen != CONFIG_BUF_LEN) { - tmpConfigBuf = xf86confmalloc(CONFIG_BUF_LEN); - tmpConfigRBuf = xf86confmalloc(CONFIG_BUF_LEN); + tmpConfigBuf = malloc(CONFIG_BUF_LEN); + tmpConfigRBuf = malloc(CONFIG_BUF_LEN); if (!tmpConfigBuf || !tmpConfigRBuf) { @@ -190,8 +190,8 @@ xf86getNextLine(void) * and free any partial allocations */ - xf86conffree(tmpConfigBuf); - xf86conffree(tmpConfigRBuf); + free(tmpConfigBuf); + free(tmpConfigRBuf); } else { @@ -202,8 +202,8 @@ xf86getNextLine(void) configBufLen = CONFIG_BUF_LEN; - xf86conffree(configBuf); - xf86conffree(configRBuf); + free(configBuf); + free(configRBuf); configBuf = tmpConfigBuf; configRBuf = tmpConfigRBuf; @@ -237,8 +237,8 @@ xf86getNextLine(void) if (!eolFound) { - tmpConfigBuf = xf86confrealloc(configBuf, configBufLen + CONFIG_BUF_LEN); - tmpConfigRBuf = xf86confrealloc(configRBuf, configBufLen + CONFIG_BUF_LEN); + tmpConfigBuf = realloc(configBuf, configBufLen + CONFIG_BUF_LEN); + tmpConfigRBuf = realloc(configRBuf, configBufLen + CONFIG_BUF_LEN); if (!tmpConfigBuf || !tmpConfigRBuf) { @@ -420,7 +420,7 @@ again: } while ((c != '\"') && (c != '\n') && (c != '\r') && (c != '\0')); configRBuf[i] = '\0'; - val.str = xf86confmalloc (strlen (configRBuf) + 1); + val.str = malloc (strlen (configRBuf) + 1); strcpy (val.str, configRBuf); /* private copy ! */ return (STRING); } @@ -595,7 +595,7 @@ xf86pathIsSafe(const char *path) #endif #define BAIL_OUT do { \ - xf86conffree(result); \ + free(result); \ return NULL; \ } while (0) @@ -632,7 +632,7 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot, if (envUsed) *envUsed = 0; - result = xf86confmalloc(PATH_MAX + 1); + result = malloc(PATH_MAX + 1); l = 0; for (i = 0; template[i]; i++) { if (template[i] != '%') { @@ -669,11 +669,11 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot, break; case 'H': if (!hostname) { - if ((hostname = xf86confmalloc(MAXHOSTNAMELEN + 1))) { + if ((hostname = malloc(MAXHOSTNAMELEN + 1))) { if (gethostname(hostname, MAXHOSTNAMELEN) == 0) { hostname[MAXHOSTNAMELEN] = '\0'; } else { - xf86conffree(hostname); + free(hostname); hostname = NULL; } } @@ -791,7 +791,7 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) if (!path || !path[0]) path = DEFAULT_CONF_PATH; - pathcopy = xf86confmalloc(strlen(path) + 1); + pathcopy = malloc(strlen(path) + 1); strcpy(pathcopy, path); if (!projroot || !projroot[0]) projroot = PROJECTROOT; @@ -811,7 +811,7 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) } } if (configPath && !configFile) { - xf86conffree(configPath); + free(configPath); configPath = NULL; } template = strtok(NULL, ","); @@ -834,21 +834,21 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) } } if (configPath && !configFile) { - xf86conffree(configPath); + free(configPath); configPath = NULL; } template = strtok(NULL, ","); } } - xf86conffree(pathcopy); + free(pathcopy); if (!configFile) { return NULL; } - configBuf = xf86confmalloc (CONFIG_BUF_LEN); - configRBuf = xf86confmalloc (CONFIG_BUF_LEN); + configBuf = malloc (CONFIG_BUF_LEN); + configRBuf = malloc (CONFIG_BUF_LEN); configBuf[0] = '\0'; /* sanity ... */ return configPath; @@ -857,11 +857,11 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) void xf86closeConfigFile (void) { - xf86conffree (configPath); + free (configPath); configPath = NULL; - xf86conffree (configRBuf); + free (configRBuf); configRBuf = NULL; - xf86conffree (configBuf); + free (configBuf); configBuf = NULL; if (configFile) { @@ -877,9 +877,9 @@ void xf86setBuiltinConfig(const char *config[]) { builtinConfig = config; - configPath = xf86configStrdup(""); - configBuf = xf86confmalloc (CONFIG_BUF_LEN); - configRBuf = xf86confmalloc (CONFIG_BUF_LEN); + configPath = strdup(""); + configBuf = malloc (CONFIG_BUF_LEN); + configRBuf = malloc (CONFIG_BUF_LEN); configBuf[0] = '\0'; /* sanity ... */ } @@ -915,8 +915,8 @@ void xf86setSection (char *section) { if (configSection) - xf86conffree(configSection); - configSection = xf86confmalloc(strlen (section) + 1); + free(configSection); + configSection = malloc(strlen (section) + 1); strcpy (configSection, section); } @@ -948,7 +948,7 @@ StringToToken (char *str, xf86ConfigSymTabRec * tab) * Compare two names. The characters '_', ' ', and '\t' are ignored * in the comparison. */ -_X_EXPORT int +int xf86nameCompare (const char *s1, const char *s2) { char c1, c2; @@ -1013,7 +1013,7 @@ xf86addComment(char *cur, char *add) endnewline = add[len - 1] == '\n'; len += 1 + iscomment + (!hasnewline) + (!endnewline) + eol_seen; - if ((str = xf86confrealloc(cur, len + curlen)) == NULL) + if ((str = realloc(cur, len + curlen)) == NULL) return (cur); cur = str; diff --git a/xorg-server/hw/xfree86/parser/xf86Optrec.h b/xorg-server/hw/xfree86/parser/xf86Optrec.h index 183b85720..5ccf7285b 100644 --- a/xorg-server/hw/xfree86/parser/xf86Optrec.h +++ b/xorg-server/hw/xfree86/parser/xf86Optrec.h @@ -64,6 +64,9 @@ #ifndef _xf86Optrec_h_ #define _xf86Optrec_h_ #include +#include + +#include /* * all records that need to be linked lists should contain a GenericList as @@ -89,24 +92,21 @@ typedef struct XF86OptionRec, *XF86OptionPtr; -XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val); -XF86OptionPtr xf86optionListDup(XF86OptionPtr opt); -void xf86optionListFree(XF86OptionPtr opt); -char *xf86optionName(XF86OptionPtr opt); -char *xf86optionValue(XF86OptionPtr opt); -XF86OptionPtr xf86newOption(char *name, char *value); -XF86OptionPtr xf86nextOption(XF86OptionPtr list); -XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name); -char *xf86findOptionValue(XF86OptionPtr list, const char *name); -int xf86findOptionBoolean (XF86OptionPtr, const char *, int); -XF86OptionPtr xf86optionListCreate(const char **options, int count, int used); -XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail); -char *xf86configStrdup (const char *s); -int xf86nameCompare (const char *s1, const char *s2); -char *xf86uLongToString(unsigned long i); -void xf86debugListOptions(XF86OptionPtr); -XF86OptionPtr xf86parseOption(XF86OptionPtr head); -void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs); +extern _X_EXPORT XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val); +extern _X_EXPORT XF86OptionPtr xf86optionListDup(XF86OptionPtr opt); +extern _X_EXPORT void xf86optionListFree(XF86OptionPtr opt); +extern _X_EXPORT char *xf86optionName(XF86OptionPtr opt); +extern _X_EXPORT char *xf86optionValue(XF86OptionPtr opt); +extern _X_EXPORT XF86OptionPtr xf86newOption(char *name, char *value); +extern _X_EXPORT XF86OptionPtr xf86nextOption(XF86OptionPtr list); +extern _X_EXPORT XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name); +extern _X_EXPORT char *xf86findOptionValue(XF86OptionPtr list, const char *name); +extern _X_EXPORT XF86OptionPtr xf86optionListCreate(const char **options, int count, int used); +extern _X_EXPORT XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail); +extern _X_EXPORT int xf86nameCompare (const char *s1, const char *s2); +extern _X_EXPORT char *xf86uLongToString(unsigned long i); +extern _X_EXPORT XF86OptionPtr xf86parseOption(XF86OptionPtr head); +extern _X_EXPORT void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs); #endif /* _xf86Optrec_h_ */ diff --git a/xorg-server/hw/xfree86/parser/xf86Parser.h b/xorg-server/hw/xfree86/parser/xf86Parser.h index 1c7b285c8..603080066 100644 --- a/xorg-server/hw/xfree86/parser/xf86Parser.h +++ b/xorg-server/hw/xfree86/parser/xf86Parser.h @@ -72,7 +72,6 @@ typedef struct { char *file_logfile; char *file_modulepath; - char *file_inputdevs; char *file_fontpath; char *file_comment; char *file_xkbdir; @@ -457,29 +456,29 @@ xf86ConfigSymTabRec, *xf86ConfigSymTabPtr; /* * prototypes for public functions */ -extern const char *xf86openConfigFile (const char *, const char *, +extern _X_EXPORT const char *xf86openConfigFile (const char *, const char *, const char *); -extern void xf86setBuiltinConfig(const char *config[]); -extern XF86ConfigPtr xf86readConfigFile (void); -extern void xf86closeConfigFile (void); -extern void xf86freeConfig (XF86ConfigPtr p); -extern int xf86writeConfigFile (const char *, XF86ConfigPtr); -XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p); -XF86ConfLayoutPtr xf86findLayout(const char *name, XF86ConfLayoutPtr list); -XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p); -XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p); -XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p); -XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p); -XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p); -XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p); -XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident, +extern _X_EXPORT void xf86setBuiltinConfig(const char *config[]); +extern _X_EXPORT XF86ConfigPtr xf86readConfigFile (void); +extern _X_EXPORT void xf86closeConfigFile (void); +extern _X_EXPORT void xf86freeConfig (XF86ConfigPtr p); +extern _X_EXPORT int xf86writeConfigFile (const char *, XF86ConfigPtr); +extern _X_EXPORT XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p); +extern _X_EXPORT XF86ConfLayoutPtr xf86findLayout(const char *name, XF86ConfLayoutPtr list); +extern _X_EXPORT XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p); +extern _X_EXPORT XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p); +extern _X_EXPORT XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p); +extern _X_EXPORT XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p); +extern _X_EXPORT XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p); +extern _X_EXPORT XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p); +extern _X_EXPORT XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident, XF86ConfVideoAdaptorPtr p); -GenericListPtr xf86addListItem(GenericListPtr head, GenericListPtr c_new); -int xf86itemNotSublist(GenericListPtr list_1, GenericListPtr list_2); +extern _X_EXPORT GenericListPtr xf86addListItem(GenericListPtr head, GenericListPtr c_new); +extern _X_EXPORT int xf86itemNotSublist(GenericListPtr list_1, GenericListPtr list_2); -int xf86pathIsAbsolute(const char *path); -int xf86pathIsSafe(const char *path); -char *xf86addComment(char *cur, char *add); +extern _X_EXPORT int xf86pathIsAbsolute(const char *path); +extern _X_EXPORT int xf86pathIsSafe(const char *path); +extern _X_EXPORT char *xf86addComment(char *cur, char *add); #endif /* _xf86Parser_h_ */ diff --git a/xorg-server/hw/xfree86/parser/xf86tokens.h b/xorg-server/hw/xfree86/parser/xf86tokens.h index b2d23508d..4c1d38c03 100644 --- a/xorg-server/hw/xfree86/parser/xf86tokens.h +++ b/xorg-server/hw/xfree86/parser/xf86tokens.h @@ -99,7 +99,6 @@ typedef enum { /* File tokens */ FONTPATH, MODULEPATH, - INPUTDEVICES, LOGFILEPATH, XKBDIR, diff --git a/xorg-server/hw/xfree86/ramdac/BT.h b/xorg-server/hw/xfree86/ramdac/BT.h index b3426bada..35d0bdbd9 100644 --- a/xorg-server/hw/xfree86/ramdac/BT.h +++ b/xorg-server/hw/xfree86/ramdac/BT.h @@ -1,10 +1,10 @@ #include "xf86RamDac.h" -RamDacHelperRecPtr BTramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); -void BTramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void BTramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void BTramdacSetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT RamDacHelperRecPtr BTramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); +extern _X_EXPORT void BTramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void BTramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void BTramdacSetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); #define ATT20C504_RAMDAC (VENDOR_BT << 16) | 0x00 #define ATT20C505_RAMDAC (VENDOR_BT << 16) | 0x01 diff --git a/xorg-server/hw/xfree86/ramdac/IBM.h b/xorg-server/hw/xfree86/ramdac/IBM.h index fdb0f5ad1..6fa18b219 100644 --- a/xorg-server/hw/xfree86/ramdac/IBM.h +++ b/xorg-server/hw/xfree86/ramdac/IBM.h @@ -1,24 +1,24 @@ #include -RamDacHelperRecPtr IBMramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); -void IBMramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void IBMramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void IBMramdac526SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); -void IBMramdac640SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); -unsigned long IBMramdac526CalculateMNPCForClock(unsigned long RefClock, +extern _X_EXPORT RamDacHelperRecPtr IBMramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); +extern _X_EXPORT void IBMramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void IBMramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void IBMramdac526SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void IBMramdac640SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT unsigned long IBMramdac526CalculateMNPCForClock(unsigned long RefClock, unsigned long ReqClock, char IsPixClock, unsigned long MinClock, unsigned long MaxClock, unsigned long *rM, unsigned long *rN, unsigned long *rP, unsigned long *rC); -unsigned long IBMramdac640CalculateMNPCForClock(unsigned long RefClock, +extern _X_EXPORT unsigned long IBMramdac640CalculateMNPCForClock(unsigned long RefClock, unsigned long ReqClock, char IsPixClock, unsigned long MinClock, unsigned long MaxClock, unsigned long *rM, unsigned long *rN, unsigned long *rP, unsigned long *rC); -void IBMramdac526HWCursorInit(xf86CursorInfoPtr infoPtr); -void IBMramdac640HWCursorInit(xf86CursorInfoPtr infoPtr); +extern _X_EXPORT void IBMramdac526HWCursorInit(xf86CursorInfoPtr infoPtr); +extern _X_EXPORT void IBMramdac640HWCursorInit(xf86CursorInfoPtr infoPtr); typedef void IBMramdac526SetBppProc(ScrnInfoPtr, RamDacRegRecPtr); -IBMramdac526SetBppProc *IBMramdac526SetBppWeak(void); +extern _X_EXPORT IBMramdac526SetBppProc *IBMramdac526SetBppWeak(void); #define IBM524_RAMDAC ((VENDOR_IBM << 16) | 0x00) #define IBM524A_RAMDAC ((VENDOR_IBM << 16) | 0x01) diff --git a/xorg-server/hw/xfree86/ramdac/Makefile.am b/xorg-server/hw/xfree86/ramdac/Makefile.am index 2b84cb4dd..98e367c88 100644 --- a/xorg-server/hw/xfree86/ramdac/Makefile.am +++ b/xorg-server/hw/xfree86/ramdac/Makefile.am @@ -1,6 +1,6 @@ -noinst_LIBRARIES = libramdac.a +noinst_LTLIBRARIES = libramdac.la -libramdac_a_SOURCES = xf86RamDac.c xf86RamDacCmap.c \ +libramdac_la_SOURCES = xf86RamDac.c xf86RamDacCmap.c \ xf86Cursor.c xf86HWCurs.c IBM.c BT.c TI.c \ xf86BitOrder.c diff --git a/xorg-server/hw/xfree86/ramdac/Makefile.in b/xorg-server/hw/xfree86/ramdac/Makefile.in index 7290a2e45..38dee136b 100644 --- a/xorg-server/hw/xfree86/ramdac/Makefile.in +++ b/xorg-server/hw/xfree86/ramdac/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/ramdac DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,17 +53,15 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libramdac_a_AR = $(AR) $(ARFLAGS) -libramdac_a_LIBADD = -am_libramdac_a_OBJECTS = xf86RamDac.$(OBJEXT) xf86RamDacCmap.$(OBJEXT) \ - xf86Cursor.$(OBJEXT) xf86HWCurs.$(OBJEXT) IBM.$(OBJEXT) \ - BT.$(OBJEXT) TI.$(OBJEXT) xf86BitOrder.$(OBJEXT) -libramdac_a_OBJECTS = $(am_libramdac_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libramdac_la_LIBADD = +am_libramdac_la_OBJECTS = xf86RamDac.lo xf86RamDacCmap.lo \ + xf86Cursor.lo xf86HWCurs.lo IBM.lo BT.lo TI.lo xf86BitOrder.lo +libramdac_la_OBJECTS = $(am_libramdac_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -71,8 +72,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libramdac_a_SOURCES) -DIST_SOURCES = $(libramdac_a_SOURCES) +SOURCES = $(libramdac_la_SOURCES) +DIST_SOURCES = $(libramdac_la_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -104,6 +105,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -124,9 +126,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -155,7 +160,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -164,9 +171,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -205,12 +216,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -230,7 +242,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -240,6 +251,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -253,11 +265,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -293,6 +304,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -317,7 +329,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -340,6 +351,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -371,14 +383,16 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libramdac.a -libramdac_a_SOURCES = xf86RamDac.c xf86RamDacCmap.c \ +noinst_LTLIBRARIES = libramdac.la +libramdac_la_SOURCES = xf86RamDac.c xf86RamDacCmap.c \ xf86Cursor.c xf86HWCurs.c IBM.c BT.c TI.c \ xf86BitOrder.c @@ -426,12 +440,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libramdac.a: $(libramdac_a_OBJECTS) $(libramdac_a_DEPENDENCIES) - -rm -f libramdac.a - $(libramdac_a_AR) libramdac.a $(libramdac_a_OBJECTS) $(libramdac_a_LIBADD) - $(RANLIB) libramdac.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libramdac.la: $(libramdac_la_OBJECTS) $(libramdac_la_DEPENDENCIES) + $(LINK) $(libramdac_la_OBJECTS) $(libramdac_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -439,14 +457,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BT.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IBM.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TI.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86BitOrder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86HWCurs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDac.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDacCmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BT.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IBM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86BitOrder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86HWCurs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDac.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDacCmap.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -579,7 +597,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -612,7 +630,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -684,7 +702,7 @@ uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/xfree86/ramdac/TI.c b/xorg-server/hw/xfree86/ramdac/TI.c index f421fc39a..1c541d76b 100644 --- a/xorg-server/hw/xfree86/ramdac/TI.c +++ b/xorg-server/hw/xfree86/ramdac/TI.c @@ -115,10 +115,8 @@ TIramdacCalculateMNPForClock( VCO = 8.0 * IntRef * best_m / best_n; ActualClock = VCO / ( 1 << p ); -#ifdef DEBUG - ErrorF( "f_out=%ld f_vco=%.1f n=%d m=%d p=%d\n", + DebugF( "f_out=%ld f_vco=%.1f n=%d m=%d p=%d\n", ActualClock, VCO, *rN, *rM, *rP); -#endif return (ActualClock); } diff --git a/xorg-server/hw/xfree86/ramdac/TI.h b/xorg-server/hw/xfree86/ramdac/TI.h index bc807f40c..f5499f903 100644 --- a/xorg-server/hw/xfree86/ramdac/TI.h +++ b/xorg-server/hw/xfree86/ramdac/TI.h @@ -1,26 +1,22 @@ #include -unsigned long TIramdacCalculateMNPForClock(unsigned long RefClock, +extern _X_EXPORT unsigned long TIramdacCalculateMNPForClock(unsigned long RefClock, unsigned long ReqClock, char IsPixClock, unsigned long MinClock, unsigned long MaxClock, unsigned long *rM, unsigned long *rN, unsigned long *rP); -RamDacHelperRecPtr TIramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); -void TIramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void TIramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void TIramdac3026SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); -void TIramdac3030SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); -unsigned long TIramdac3030CalculateMNPForClock(unsigned long RefClock, - unsigned long ReqClock, char IsPixClock, unsigned long MinClock, - unsigned long MaxClock, unsigned long *rM, unsigned long *rN, - unsigned long *rP); -void TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr); -void TIramdacLoadPalette( ScrnInfoPtr pScrn, int numColors, int *indices, +extern _X_EXPORT RamDacHelperRecPtr TIramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); +extern _X_EXPORT void TIramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void TIramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void TIramdac3026SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void TIramdac3030SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr); +extern _X_EXPORT void TIramdacLoadPalette( ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual); typedef void TIramdacLoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *, VisualPtr); -TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void); +extern _X_EXPORT TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void); #define TI3030_RAMDAC (VENDOR_TI << 16) | 0x00 #define TI3026_RAMDAC (VENDOR_TI << 16) | 0x01 diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c index 896ed3700..6b71f4677 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c +++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c @@ -303,7 +303,7 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ if (ScreenPriv->SWCursor || - !(pDev == inputInfo.pointer || !pDev->isMaster && pDev->u.master == inputInfo.pointer)) + !(GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer)) (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); else if (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, x, y); @@ -315,7 +315,7 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, /* only update for VCP, otherwise we get cursor jumps when removing a sprite. The second cursor is never HW rendered anyway. */ if (pDev == inputInfo.pointer || - (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + (!IsMaster(pDev) && pDev->u.master == inputInfo.pointer)) { ScreenPriv->CurrentCursor = pCurs; ScreenPriv->x = x; @@ -380,7 +380,7 @@ xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) /* only update coordinate state for first sprite, otherwise we get jumps when removing a sprite. The second sprite is never HW rendered anyway */ if (pDev == inputInfo.pointer || - (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + (!IsMaster(pDev) && pDev->u.master == inputInfo.pointer)) { ScreenPriv->x = x; ScreenPriv->y = y; diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.h b/xorg-server/hw/xfree86/ramdac/xf86Cursor.h index 469f48f01..3f3618b59 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.h +++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.h @@ -25,10 +25,10 @@ typedef struct _xf86CursorInfoRec { } xf86CursorInfoRec, *xf86CursorInfoPtr; -Bool xf86InitCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); -xf86CursorInfoPtr xf86CreateCursorInfoRec(void); -void xf86DestroyCursorInfoRec(xf86CursorInfoPtr); -void xf86ForceHWCursor (ScreenPtr pScreen, Bool on); +extern _X_EXPORT Bool xf86InitCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); +extern _X_EXPORT xf86CursorInfoPtr xf86CreateCursorInfoRec(void); +extern _X_EXPORT void xf86DestroyCursorInfoRec(xf86CursorInfoPtr); +extern _X_EXPORT void xf86ForceHWCursor (ScreenPtr pScreen, Bool on); #define HARDWARE_CURSOR_INVERT_MASK 0x00000001 #define HARDWARE_CURSOR_AND_SOURCE_WITH_MASK 0x00000002 diff --git a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h index f82be2edc..32be9c2f3 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h +++ b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h @@ -45,6 +45,6 @@ Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); CARD32 xf86ReverseBitOrder(CARD32 data); -extern DevPrivateKey xf86CursorScreenKey; +extern _X_EXPORT DevPrivateKey xf86CursorScreenKey; #endif /* _XF86CURSORPRIV_H */ diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c index 1dd3daf1b..bd4f3466a 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c @@ -37,7 +37,7 @@ int RamDacHWPrivateIndex = -1; int RamDacScreenPrivateIndex = -1; RamDacRecPtr -RamDacCreateInfoRec() +RamDacCreateInfoRec(void) { RamDacRecPtr infoRec; @@ -47,7 +47,7 @@ RamDacCreateInfoRec() } RamDacHelperRecPtr -RamDacHelperCreateInfoRec() +RamDacHelperCreateInfoRec(void) { RamDacHelperRecPtr infoRec; @@ -56,13 +56,13 @@ RamDacHelperCreateInfoRec() return infoRec; } -void +void RamDacDestroyInfoRec(RamDacRecPtr infoRec) { xfree(infoRec); } -void +void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec) { xfree(infoRec); @@ -86,7 +86,7 @@ RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv) } void -RamDacGetRecPrivate() +RamDacGetRecPrivate(void) { if (RamDacHWPrivateIndex < 0) RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); @@ -142,13 +142,13 @@ RamDacFreeRec(ScrnInfoPtr pScrn) } int -RamDacGetHWIndex() +RamDacGetHWIndex(void) { return RamDacHWPrivateIndex; } int -RamDacGetScreenIndex() +RamDacGetScreenIndex(void) { return RamDacScreenPrivateIndex; } diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDac.h b/xorg-server/hw/xfree86/ramdac/xf86RamDac.h index 1f03dfb99..4a3900b93 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDac.h +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDac.h @@ -101,23 +101,21 @@ typedef struct _RamdacScreenRec { } RamDacScreenRec, *RamDacScreenRecPtr; #define RAMDACSCRPTR(p) ((RamDacScreenRecPtr)((p)->privates[RamDacGetScreenIndex()].ptr))->RamDacRec -extern int RamDacHWPrivateIndex; -extern int RamDacScreenPrivateIndex; +extern _X_EXPORT int RamDacHWPrivateIndex; +extern _X_EXPORT int RamDacScreenPrivateIndex; typedef struct { int token; } RamDacSupportedInfoRec, *RamDacSupportedInfoRecPtr; -RamDacRecPtr RamDacCreateInfoRec(void); -RamDacHelperRecPtr RamDacHelperCreateInfoRec(void); -void RamDacDestroyInfoRec(RamDacRecPtr RamDacRec); -void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr RamDacRec); -Bool RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec); -void RamDacSetGamma(ScrnInfoPtr pScrn, Bool Real8BitDac); -void RamDacRestoreDACValues(ScrnInfoPtr pScrn); -Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits, +extern _X_EXPORT RamDacRecPtr RamDacCreateInfoRec(void); +extern _X_EXPORT RamDacHelperRecPtr RamDacHelperCreateInfoRec(void); +extern _X_EXPORT void RamDacDestroyInfoRec(RamDacRecPtr RamDacRec); +extern _X_EXPORT void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr RamDacRec); +extern _X_EXPORT Bool RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec); +extern _X_EXPORT Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits, unsigned int flags); -void RamDacFreeRec(ScrnInfoPtr pScrn); -int RamDacGetHWIndex(void); +extern _X_EXPORT void RamDacFreeRec(ScrnInfoPtr pScrn); +extern _X_EXPORT int RamDacGetHWIndex(void); #endif /* _XF86RAMDAC_H */ diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c index 600fe3f07..c6dc83157 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c @@ -39,9 +39,6 @@ #include "colormapst.h" #include "xf86RamDacPriv.h" -#include "xf86PciInfo.h" -#include "xf86Pci.h" - void RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual) diff --git a/xorg-server/hw/xfree86/shadowfb/Makefile.in b/xorg-server/hw/xfree86/shadowfb/Makefile.in index e81ab786a..7e5de6e1f 100644 --- a/xorg-server/hw/xfree86/shadowfb/Makefile.in +++ b/xorg-server/hw/xfree86/shadowfb/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/shadowfb DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -123,9 +128,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -154,7 +162,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -163,9 +173,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -204,12 +218,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -229,7 +244,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -292,6 +306,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -316,7 +331,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/shadowfb/shadow.c b/xorg-server/hw/xfree86/shadowfb/shadow.c index ff775efbd..9c9aa0d55 100644 --- a/xorg-server/hw/xfree86/shadowfb/shadow.c +++ b/xorg-server/hw/xfree86/shadowfb/shadow.c @@ -31,9 +31,6 @@ # include "picturestr.h" #endif -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) - static Bool ShadowCloseScreen (int i, ScreenPtr pScreen); static void ShadowCopyWindow( WindowPtr pWin, @@ -102,7 +99,7 @@ static DevPrivateKey ShadowGCKey = &ShadowGCKeyIndex; #define GET_SCREEN_PRIVATE(pScreen) \ (ShadowScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, ShadowScreenKey) #define GET_GC_PRIVATE(pGC) \ - (ShadowGCPtr)dixLookupPrivate(&(pGC)->devPrivates, ShadowGCKey); + (ShadowGCPtr)dixLookupPrivate(&(pGC)->devPrivates, ShadowGCKey) #define SHADOW_GC_FUNC_PROLOGUE(pGC)\ ShadowGCPtr pGCPriv = GET_GC_PRIVATE(pGC);\ @@ -1364,44 +1361,44 @@ ShadowFontToBox(BoxPtr BB, DrawablePtr pDrawable, GCPtr pGC, int x, int y, if (pFont->info.constantWidth) { int ascent, descent, left, right = 0; - ascent = MAX(pFont->info.fontAscent, pFont->info.maxbounds.ascent); - descent = MAX(pFont->info.fontDescent, pFont->info.maxbounds.descent); + ascent = max(pFont->info.fontAscent, pFont->info.maxbounds.ascent); + descent = max(pFont->info.fontDescent, pFont->info.maxbounds.descent); left = pFont->info.maxbounds.leftSideBearing; if (count > 0) { right = (count - 1) * pFont->info.maxbounds.characterWidth; } right += pFont->info.maxbounds.rightSideBearing; BB->x1 = - MAX(pDrawable->x + x - left, (REGION_EXTENTS(pGC->pScreen, + max(pDrawable->x + x - left, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->x1); BB->y1 = - MAX(pDrawable->y + y - ascent, + max(pDrawable->y + y - ascent, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->y1); BB->x2 = - MIN(pDrawable->x + x + right, + min(pDrawable->x + x + right, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->x2); BB->y2 = - MIN(pDrawable->y + y + descent, + min(pDrawable->y + y + descent, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->y2); } else { ShadowTextExtent(pFont, count, chars, wide ? (FONTLASTROW(pFont) == 0) ? Linear16Bit : TwoD16Bit : Linear8Bit, BB); BB->x1 = - MAX(pDrawable->x + x + BB->x1, (REGION_EXTENTS(pGC->pScreen, + max(pDrawable->x + x + BB->x1, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->x1); BB->y1 = - MAX(pDrawable->y + y + BB->y1, + max(pDrawable->y + y + BB->y1, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->y1); BB->x2 = - MIN(pDrawable->x + x + BB->x2, + min(pDrawable->x + x + BB->x2, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->x2); BB->y2 = - MIN(pDrawable->y + y + BB->y2, + min(pDrawable->y + y + BB->y2, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->y2); } diff --git a/xorg-server/hw/xfree86/shadowfb/shadowfb.h b/xorg-server/hw/xfree86/shadowfb/shadowfb.h index 6c9635879..56e0e86fe 100644 --- a/xorg-server/hw/xfree86/shadowfb/shadowfb.h +++ b/xorg-server/hw/xfree86/shadowfb/shadowfb.h @@ -19,7 +19,7 @@ typedef void (*RefreshAreaFuncPtr)(ScrnInfoPtr, int, BoxPtr); * * Returns FALSE in the event of an error. */ -Bool +extern _X_EXPORT Bool ShadowFBInit ( ScreenPtr pScreen, RefreshAreaFuncPtr refreshArea @@ -33,7 +33,7 @@ ShadowFBInit ( * * Returns FALSE in the event of an error */ -Bool +extern _X_EXPORT Bool ShadowFBInit2 ( ScreenPtr pScreen, RefreshAreaFuncPtr preRefreshArea, diff --git a/xorg-server/hw/xfree86/utils/Makefile.in b/xorg-server/hw/xfree86/utils/Makefile.in index 7c3f2313f..36c4401e6 100644 --- a/xorg-server/hw/xfree86/utils/Makefile.in +++ b/xorg-server/hw/xfree86/utils/Makefile.in @@ -36,8 +36,11 @@ host_triplet = @host@ subdir = hw/xfree86/utils DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,7 +50,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -98,6 +102,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -118,9 +123,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -149,7 +157,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -158,9 +168,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -199,12 +213,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -224,7 +239,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -234,6 +248,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -247,11 +262,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -287,6 +301,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -311,7 +326,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -334,6 +348,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -365,7 +380,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/utils/cvt/Makefile.am b/xorg-server/hw/xfree86/utils/cvt/Makefile.am index 4db175fbd..5db1d7cf9 100644 --- a/xorg-server/hw/xfree86/utils/cvt/Makefile.am +++ b/xorg-server/hw/xfree86/utils/cvt/Makefile.am @@ -31,12 +31,10 @@ bin_PROGRAMS = cvt INCLUDES = $(XORG_INCS) \ -I$(top_srcdir)/hw/xfree86/ddc \ -I$(top_srcdir)/hw/xfree86/parser -DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib # gah cvt_SOURCES = cvt.c $(top_srcdir)/hw/xfree86/modes/xf86cvt.c cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -cvt_LDADD = $(top_builddir)/hw/xfree86/dummylib/libdummy-nonserver.a man1_MANS = cvt.man diff --git a/xorg-server/hw/xfree86/utils/cvt/Makefile.in b/xorg-server/hw/xfree86/utils/cvt/Makefile.in index a5eba3dfa..6964e74b7 100644 --- a/xorg-server/hw/xfree86/utils/cvt/Makefile.in +++ b/xorg-server/hw/xfree86/utils/cvt/Makefile.in @@ -71,8 +71,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xfree86/utils/cvt ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -82,15 +85,15 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_cvt_OBJECTS = cvt-cvt.$(OBJEXT) cvt-xf86cvt.$(OBJEXT) cvt_OBJECTS = $(am_cvt_OBJECTS) -cvt_DEPENDENCIES = \ - $(top_builddir)/hw/xfree86/dummylib/libdummy-nonserver.a +cvt_LDADD = $(LDADD) cvt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(cvt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -138,6 +141,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -158,9 +162,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -189,7 +196,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -198,9 +207,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -239,12 +252,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -264,7 +278,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -274,6 +287,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -287,11 +301,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -327,6 +340,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -351,7 +365,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -374,6 +387,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -405,7 +419,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -415,12 +431,10 @@ INCLUDES = $(XORG_INCS) \ -I$(top_srcdir)/hw/xfree86/ddc \ -I$(top_srcdir)/hw/xfree86/parser -DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib # gah cvt_SOURCES = cvt.c $(top_srcdir)/hw/xfree86/modes/xf86cvt.c cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -cvt_LDADD = $(top_builddir)/hw/xfree86/dummylib/libdummy-nonserver.a man1_MANS = cvt.man CLEANFILES = $(man1_MANS) SUFFIXES = .pre .man .man.pre diff --git a/xorg-server/hw/xfree86/utils/cvt/cvt.c b/xorg-server/hw/xfree86/utils/cvt/cvt.c index fee4f7c3e..cf0a479f2 100644 --- a/xorg-server/hw/xfree86/utils/cvt/cvt.c +++ b/xorg-server/hw/xfree86/utils/cvt/cvt.c @@ -25,6 +25,34 @@ #include "xf86.h" +/* xnfalloc implementation used by the server code we built in */ +pointer +XNFalloc(unsigned long n) +{ + pointer r; + + r = malloc(n); + if (!r) { + perror("malloc failed"); + exit(1); + } + return r; +} + +/* xnfcalloc implementation used by the server code we built in */ +pointer +XNFcalloc(unsigned long n) +{ + pointer r; + + r = calloc(1, n); + if (!r) { + perror("calloc failed"); + exit(1); + } + return r; +} + /* * Quickly check wether this is a CVT standard mode. */ @@ -174,7 +202,7 @@ main (int argc, char *argv[]) if ((argc < 3) || (argc > 7)) { PrintUsage(argv[0]); - return 0; + return 1; } /* This doesn't filter out bad flags properly. Bad flags get passed down @@ -191,15 +219,30 @@ main (int argc, char *argv[]) else if (!strcmp(argv[n], "-h") || !strcmp(argv[n], "--help")) { PrintUsage(argv[0]); return 0; - } else if (!HDisplay) + } else if (!HDisplay) { HDisplay = atoi(argv[n]); - else if (!VDisplay) + if (!HDisplay) { + PrintUsage(argv[0]); + return 1; + } + } + else if (!VDisplay) { VDisplay = atoi(argv[n]); - else if (!VRefresh) + if (!VDisplay) { + PrintUsage(argv[0]); + return 1; + } + } + else if (!VRefresh) { VRefresh = atof(argv[n]); + if (!VRefresh) { + PrintUsage(argv[0]); + return 1; + } + } else { PrintUsage(argv[0]); - return 0; + return 1; } } @@ -218,11 +261,14 @@ main (int argc, char *argv[]) HDisplay += 8; } - if (Reduced && (VRefresh != 60.0)) { - fprintf(stderr, "\nERROR: 60Hz refresh rate required for reduced" - " blanking.\n"); - PrintUsage(argv[0]); - return 0; + if (Reduced) { + if ((VRefresh / 60.0) != floor(VRefresh / 60.0)) { + fprintf(stderr, + "\nERROR: Multiple of 60Hz refresh rate required for " + " reduced blanking.\n"); + PrintUsage(argv[0]); + return 0; + } } IsCVT = CVTCheckStandard(HDisplay, VDisplay, VRefresh, Reduced, Verbose); diff --git a/xorg-server/hw/xfree86/utils/gtf/Makefile.in b/xorg-server/hw/xfree86/utils/gtf/Makefile.in index 56114fc4c..6c62fef0e 100644 --- a/xorg-server/hw/xfree86/utils/gtf/Makefile.in +++ b/xorg-server/hw/xfree86/utils/gtf/Makefile.in @@ -72,8 +72,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xfree86/utils/gtf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -83,7 +86,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" @@ -136,6 +140,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -156,9 +161,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -187,7 +195,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -196,9 +206,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -237,12 +251,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -262,7 +277,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -272,6 +286,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -285,11 +300,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -325,6 +339,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -349,7 +364,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -372,6 +386,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -403,7 +418,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/vbe/Makefile.in b/xorg-server/hw/xfree86/vbe/Makefile.in index 94377082f..d394e6593 100644 --- a/xorg-server/hw/xfree86/vbe/Makefile.in +++ b/xorg-server/hw/xfree86/vbe/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/vbe DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -123,9 +128,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -154,7 +162,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -163,9 +173,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -204,12 +218,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -229,7 +244,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -292,6 +306,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -316,7 +331,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/vbe/vbe.c b/xorg-server/hw/xfree86/vbe/vbe.c index 4986b5b29..26f5911d5 100644 --- a/xorg-server/hw/xfree86/vbe/vbe.c +++ b/xorg-server/hw/xfree86/vbe/vbe.c @@ -18,8 +18,7 @@ #include "xf86.h" #include "vbe.h" #include -#define DPMS_SERVER -#include +#include #define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x) diff --git a/xorg-server/hw/xfree86/vbe/vbe.h b/xorg-server/hw/xfree86/vbe/vbe.h index de9237c9d..b1ec5a9fb 100644 --- a/xorg-server/hw/xfree86/vbe/vbe.h +++ b/xorg-server/hw/xfree86/vbe/vbe.h @@ -37,10 +37,10 @@ typedef struct { #define VBE_VERSION_MAJOR(x) *((CARD8*)(&x) + 1) #define VBE_VERSION_MINOR(x) (CARD8)(x) -vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex); -vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags); -void vbeFree(vbeInfoPtr pVbe); -xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule); +extern _X_EXPORT vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex); +extern _X_EXPORT vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags); +extern _X_EXPORT void vbeFree(vbeInfoPtr pVbe); +extern _X_EXPORT xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule); #pragma pack(1) @@ -99,8 +99,8 @@ struct _VbeInfoBlock { } __attribute__((packed)); /* Return Super VGA Information */ -VbeInfoBlock *VBEGetVBEInfo(vbeInfoPtr pVbe); -void VBEFreeVBEInfo(VbeInfoBlock *block); +extern _X_EXPORT VbeInfoBlock *VBEGetVBEInfo(vbeInfoPtr pVbe); +extern _X_EXPORT void VBEFreeVBEInfo(VbeInfoBlock *block); /* * INT 1 @@ -163,8 +163,8 @@ struct _VbeModeInfoBlock { } __attribute__((packed)); /* Return VBE Mode Information */ -VbeModeInfoBlock *VBEGetModeInfo(vbeInfoPtr pVbe, int mode); -void VBEFreeModeInfo(VbeModeInfoBlock *block); +extern _X_EXPORT VbeModeInfoBlock *VBEGetModeInfo(vbeInfoPtr pVbe, int mode); +extern _X_EXPORT void VBEFreeModeInfo(VbeModeInfoBlock *block); /* * INT2 @@ -189,13 +189,13 @@ struct _VbeCRTCInfoBlock { } __attribute__((packed)); /* VbeCRTCInfoBlock is in the VESA 3.0 specs */ -Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock *crtc); +extern _X_EXPORT Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock *crtc); /* * INT 3 */ -Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode); +extern _X_EXPORT Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode); /* * INT 4 @@ -217,7 +217,7 @@ typedef enum { MODE_RESTORE } vbeSaveRestoreFunction; -Bool +extern _X_EXPORT Bool VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction, pointer *memory, int *size, int *real_mode_pages); @@ -225,7 +225,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction, * INT 5 */ -Bool +extern _X_EXPORT Bool VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window); /* @@ -251,7 +251,7 @@ typedef enum { #define VBEGetMaxLogicalScanline(pVbe, pixels, bytes, max) \ VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET_MAX, 0, \ pixels, bytes, max) -Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, +extern _X_EXPORT Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command, int width, int *pixels, int *bytes, int *max); @@ -260,15 +260,15 @@ Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, */ /* 16 bit code */ -Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace); -Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y); +extern _X_EXPORT Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace); +extern _X_EXPORT Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y); /* * INT 8 */ /* if bits is 0, then it is a GET */ -int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); +extern _X_EXPORT int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); /* * INT 9 @@ -280,7 +280,7 @@ int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); * If setting a palette, it will return the pointer received on success, * NULL on failure. */ -CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, +extern _X_EXPORT CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, CARD32 *data, Bool secondary, Bool wait_retrace); #define VBEFreePaletteData(data) xfree(data) @@ -294,7 +294,7 @@ typedef struct _VBEpmi { int tbl_len; } VBEpmi; -VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe); +extern _X_EXPORT VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe); #define VESAFreeVBEpmi(pmi) xfree(pmi) /* high level helper functions */ @@ -307,12 +307,6 @@ typedef struct _vbeModeInfoRec { struct _vbeModeInfoRec *next; } vbeModeInfoRec, *vbeModeInfoPtr; -vbeModeInfoPtr VBEBuildVbeModeList(vbeInfoPtr pVbe, - VbeInfoBlock *vbe); - -unsigned short VBECalcVbeModeIndex(vbeModeInfoPtr m, - DisplayModePtr mode, int bpp); - typedef struct { CARD8 *state; CARD8 *pstate; @@ -321,12 +315,12 @@ typedef struct { int stateMode; } vbeSaveRestoreRec, *vbeSaveRestorePtr; -void +extern _X_EXPORT void VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr, vbeSaveRestoreFunction function); -int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock); -Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode); +extern _X_EXPORT int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock); +extern _X_EXPORT Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode); struct vbePanelID { short hsize; @@ -341,7 +335,7 @@ struct vbePanelID { char reserved[14]; }; -void VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data); -struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe); +extern _X_EXPORT void VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data); +extern _X_EXPORT struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe); #endif diff --git a/xorg-server/hw/xfree86/vbe/vbeModes.c b/xorg-server/hw/xfree86/vbe/vbeModes.c index fb730a708..1a4d2407c 100644 --- a/xorg-server/hw/xfree86/vbe/vbeModes.c +++ b/xorg-server/hw/xfree86/vbe/vbeModes.c @@ -414,11 +414,9 @@ VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe) data->block->PixelClock = best->Clock * 1000; /* XXX May not have this. */ clock = VBEGetPixelClock(pVbe, data->mode, data->block->PixelClock); -#ifdef DEBUG - ErrorF("Setting clock %.2fMHz, closest is %.2fMHz\n", + DebugF("Setting clock %.2fMHz, closest is %.2fMHz\n", (double)data->block->PixelClock / 1000000.0, (double)clock / 1000000.0); -#endif if (clock) data->block->PixelClock = clock; data->mode |= (1 << 11); diff --git a/xorg-server/hw/xfree86/vbe/vbeModes.h b/xorg-server/hw/xfree86/vbe/vbeModes.h index c28cdaa37..447798709 100644 --- a/xorg-server/hw/xfree86/vbe/vbeModes.h +++ b/xorg-server/hw/xfree86/vbe/vbeModes.h @@ -67,24 +67,24 @@ typedef struct _VbeModeInfoData { #define V_MODETYPE_VGA 0x02 #define V_MODETYPE_BAD 0x04 -extern int VBEFindSupportedDepths(vbeInfoPtr pVbe, VbeInfoBlock *vbe, +extern _X_EXPORT int VBEFindSupportedDepths(vbeInfoPtr pVbe, VbeInfoBlock *vbe, int *flags24, int modeTypes); -extern DisplayModePtr VBEGetModePool(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, +extern _X_EXPORT DisplayModePtr VBEGetModePool(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int modeTypes); -extern void VBESetModeNames(DisplayModePtr pMode); -extern void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe); +extern _X_EXPORT void VBESetModeNames(DisplayModePtr pMode); +extern _X_EXPORT void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe); /* * Note: These are alternatives to the standard helpers. They should * usually just wrap the standard helpers. */ -extern int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, +extern _X_EXPORT int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, int minHeight, int maxHeight, int virtualX, int virtualY, int apertureSize, LookupModeFlags strategy); -extern void VBEPrintModes(ScrnInfoPtr scrp); +extern _X_EXPORT void VBEPrintModes(ScrnInfoPtr scrp); #endif /* VBE_MODES_H */ diff --git a/xorg-server/hw/xfree86/vgahw/Makefile.in b/xorg-server/hw/xfree86/vgahw/Makefile.in index 37c6b68f6..cdd7468b5 100644 --- a/xorg-server/hw/xfree86/vgahw/Makefile.in +++ b/xorg-server/hw/xfree86/vgahw/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/vgahw DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -123,9 +128,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -154,7 +162,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -163,9 +173,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -204,12 +218,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -229,7 +244,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -292,6 +306,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -316,7 +331,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/vgahw/vgaCmap.c b/xorg-server/hw/xfree86/vgahw/vgaCmap.c index 44043c6c7..5bd38b468 100644 --- a/xorg-server/hw/xfree86/vgahw/vgaCmap.c +++ b/xorg-server/hw/xfree86/vgahw/vgaCmap.c @@ -36,8 +36,7 @@ #include "xf86.h" #include "vgaHW.h" -#define _XF86DGA_SERVER_ -#include +#include #include "dgaproc.h" @@ -277,8 +276,8 @@ vgaUninstallColormap(pmap) if ( pmap != miInstalledMaps[pmap->pScreen->myNum] ) return; - defColormap = (ColormapPtr) LookupIDByType( pmap->pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&defColormap, pmap->pScreen->defColormap, + RT_COLORMAP, serverClient, DixInstallAccess); if (defColormap == miInstalledMaps[pmap->pScreen->myNum]) return; diff --git a/xorg-server/hw/xfree86/vgahw/vgaHW.c b/xorg-server/hw/xfree86/vgahw/vgaHW.c index ccbd19574..025dde2da 100644 --- a/xorg-server/hw/xfree86/vgahw/vgaHW.c +++ b/xorg-server/hw/xfree86/vgahw/vgaHW.c @@ -793,7 +793,7 @@ vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore) if (hwp->FontInfo1) { hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */ hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */ - slowbcopy_tobus(hwp->FontInfo1, hwp->Base, FONT_AMOUNT); + xf86SlowBcopy(hwp->FontInfo1, hwp->Base, FONT_AMOUNT); } #endif @@ -801,7 +801,7 @@ vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore) if (hwp->FontInfo2) { hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */ hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */ - slowbcopy_tobus(hwp->FontInfo2, hwp->Base, FONT_AMOUNT); + xf86SlowBcopy(hwp->FontInfo2, hwp->Base, FONT_AMOUNT); } #endif @@ -809,10 +809,10 @@ vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore) if (hwp->TextInfo) { hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */ hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */ - slowbcopy_tobus(hwp->TextInfo, hwp->Base, TEXT_AMOUNT); + xf86SlowBcopy(hwp->TextInfo, hwp->Base, TEXT_AMOUNT); hwp->writeSeq(hwp, 0x02, 0x02); /* write to plane 1 */ hwp->writeGr(hwp, 0x04, 0x01); /* read plane 1 */ - slowbcopy_tobus((unsigned char *)hwp->TextInfo + TEXT_AMOUNT, + xf86SlowBcopy((unsigned char *)hwp->TextInfo + TEXT_AMOUNT, hwp->Base, TEXT_AMOUNT); } #endif @@ -971,24 +971,24 @@ vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save) if (hwp->FontInfo1 || (hwp->FontInfo1 = xalloc(FONT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */ hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */ - slowbcopy_frombus(hwp->Base, hwp->FontInfo1, FONT_AMOUNT); + xf86SlowBcopy(hwp->Base, hwp->FontInfo1, FONT_AMOUNT); } #endif /* SAVE_FONT1 */ #if SAVE_FONT2 if (hwp->FontInfo2 || (hwp->FontInfo2 = xalloc(FONT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */ hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */ - slowbcopy_frombus(hwp->Base, hwp->FontInfo2, FONT_AMOUNT); + xf86SlowBcopy(hwp->Base, hwp->FontInfo2, FONT_AMOUNT); } #endif /* SAVE_FONT2 */ #if SAVE_TEXT if (hwp->TextInfo || (hwp->TextInfo = xalloc(2 * TEXT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */ hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */ - slowbcopy_frombus(hwp->Base, hwp->TextInfo, TEXT_AMOUNT); + xf86SlowBcopy(hwp->Base, hwp->TextInfo, TEXT_AMOUNT); hwp->writeSeq(hwp, 0x02, 0x02); /* write to plane 1 */ hwp->writeGr(hwp, 0x04, 0x01); /* read plane 1 */ - slowbcopy_frombus(hwp->Base, + xf86SlowBcopy(hwp->Base, (unsigned char *)hwp->TextInfo + TEXT_AMOUNT, TEXT_AMOUNT); } #endif /* SAVE_TEXT */ @@ -1025,32 +1025,24 @@ vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save) for (i = 0; i < save->numCRTC; i++) { save->CRTC[i] = hwp->readCrtc(hwp, i); -#ifdef DEBUG - ErrorF("CRTC[0x%02x] = 0x%02x\n", i, save->CRTC[i]); -#endif + DebugF("CRTC[0x%02x] = 0x%02x\n", i, save->CRTC[i]); } hwp->enablePalette(hwp); for (i = 0; i < save->numAttribute; i++) { save->Attribute[i] = hwp->readAttr(hwp, i); -#ifdef DEBUG - ErrorF("Attribute[0x%02x] = 0x%02x\n", i, save->Attribute[i]); -#endif + DebugF("Attribute[0x%02x] = 0x%02x\n", i, save->Attribute[i]); } hwp->disablePalette(hwp); for (i = 0; i < save->numGraphics; i++) { save->Graphics[i] = hwp->readGr(hwp, i); -#ifdef DEBUG - ErrorF("Graphics[0x%02x] = 0x%02x\n", i, save->Graphics[i]); -#endif + DebugF("Graphics[0x%02x] = 0x%02x\n", i, save->Graphics[i]); } for (i = 1; i < save->numSequencer; i++) { save->Sequencer[i] = hwp->readSeq(hwp, i); -#ifdef DEBUG - ErrorF("Sequencer[0x%02x] = 0x%02x\n", i, save->Sequencer[i]); -#endif + DebugF("Sequencer[0x%02x] = 0x%02x\n", i, save->Sequencer[i]); } } @@ -1088,18 +1080,16 @@ vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save) hwp->writeDacReadAddr(hwp, 0x00); for (i = 0; i < 6; i++) { save->DAC[i] = hwp->readDacData(hwp); -#ifdef DEBUG switch (i % 3) { case 0: - ErrorF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); + DebugF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); break; case 1: - ErrorF("0x%02x, ", save->DAC[i]); + DebugF("0x%02x, ", save->DAC[i]); break; case 2: - ErrorF("0x%02x\n", save->DAC[i]); + DebugF("0x%02x\n", save->DAC[i]); } -#endif } /* @@ -1131,18 +1121,16 @@ vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save) for (i = 6; i < 768; i++) { save->DAC[i] = hwp->readDacData(hwp); DACDelay(hwp); -#ifdef DEBUG switch (i % 3) { case 0: - ErrorF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); + DebugF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); break; case 1: - ErrorF("0x%02x, ", save->DAC[i]); + DebugF("0x%02x, ", save->DAC[i]); break; case 2: - ErrorF("0x%02x\n", save->DAC[i]); + DebugF("0x%02x\n", save->DAC[i]); } -#endif } } @@ -1772,9 +1760,7 @@ vgaHWMapMem(ScrnInfoPtr scrp) * XXX This is not correct but we do it * for now. */ -#ifdef DEBUG - ErrorF("Mapping VGAMem\n"); -#endif + DebugF("Mapping VGAMem\n"); hwp->Base = xf86MapDomainMemory(scr_index, VIDMEM_MMIO_32BIT, hwp->dev, hwp->MapPhys, hwp->MapSize); return hwp->Base != NULL; @@ -1790,15 +1776,13 @@ vgaHWUnmapMem(ScrnInfoPtr scrp) if (hwp->Base == NULL) return; -#ifdef DEBUG - ErrorF("Unmapping VGAMem\n"); -#endif + DebugF("Unmapping VGAMem\n"); xf86UnMapVidMem(scr_index, hwp->Base, hwp->MapSize); hwp->Base = NULL; } int -vgaHWGetIndex() +vgaHWGetIndex(void) { return vgaHWPrivateIndex; } @@ -1999,6 +1983,13 @@ vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed) } } -DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void) { return vgaHWddc1SetSpeed; } +DDC1SetSpeedProc +vgaHWddc1SetSpeedWeak(void) +{ + return vgaHWddc1SetSpeed; +} -SaveScreenProcPtr vgaHWSaveScreenWeak(void) { return vgaHWSaveScreen; } +SaveScreenProcPtr vgaHWSaveScreenWeak(void) +{ + return vgaHWSaveScreen; +} diff --git a/xorg-server/hw/xfree86/vgahw/vgaHW.h b/xorg-server/hw/xfree86/vgahw/vgaHW.h index a38ea7559..7e63492d8 100644 --- a/xorg-server/hw/xfree86/vgahw/vgaHW.h +++ b/xorg-server/hw/xfree86/vgahw/vgaHW.h @@ -25,10 +25,9 @@ #include "xf86DDC.h" #include "globals.h" -#define DPMS_SERVER -#include +#include -extern int vgaHWGetIndex(void); +extern _X_EXPORT int vgaHWGetIndex(void); /* * access macro @@ -192,45 +191,45 @@ typedef struct _vgaHWRec { typedef void vgaHWProtectProc(ScrnInfoPtr, Bool); typedef void vgaHWBlankScreenProc(ScrnInfoPtr, Bool); -void vgaHWSetStdFuncs(vgaHWPtr hwp); -void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset); -void vgaHWProtect(ScrnInfoPtr pScrn, Bool on); -vgaHWProtectProc *vgaHWProtectWeak(void); -Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode); -void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on); -vgaHWBlankScreenProc *vgaHWBlankScreenWeak(void); -void vgaHWSeqReset(vgaHWPtr hwp, Bool start); -void vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore); -void vgaHWRestoreMode(ScrnInfoPtr scrninfp, vgaRegPtr restore); -void vgaHWRestoreColormap(ScrnInfoPtr scrninfp, vgaRegPtr restore); -void vgaHWRestore(ScrnInfoPtr scrninfp, vgaRegPtr restore, int flags); -void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save); -void vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save); -void vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save); -void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save, int flags); -Bool vgaHWInit(ScrnInfoPtr scrnp, DisplayModePtr mode); -Bool vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC, int numSequencer, +extern _X_EXPORT void vgaHWSetStdFuncs(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset); +extern _X_EXPORT void vgaHWProtect(ScrnInfoPtr pScrn, Bool on); +extern _X_EXPORT vgaHWProtectProc *vgaHWProtectWeak(void); +extern _X_EXPORT Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode); +extern _X_EXPORT void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on); +extern _X_EXPORT vgaHWBlankScreenProc *vgaHWBlankScreenWeak(void); +extern _X_EXPORT void vgaHWSeqReset(vgaHWPtr hwp, Bool start); +extern _X_EXPORT void vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore); +extern _X_EXPORT void vgaHWRestoreMode(ScrnInfoPtr scrninfp, vgaRegPtr restore); +extern _X_EXPORT void vgaHWRestoreColormap(ScrnInfoPtr scrninfp, vgaRegPtr restore); +extern _X_EXPORT void vgaHWRestore(ScrnInfoPtr scrninfp, vgaRegPtr restore, int flags); +extern _X_EXPORT void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save); +extern _X_EXPORT void vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save); +extern _X_EXPORT void vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save); +extern _X_EXPORT void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save, int flags); +extern _X_EXPORT Bool vgaHWInit(ScrnInfoPtr scrnp, DisplayModePtr mode); +extern _X_EXPORT Bool vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC, int numSequencer, int numGraphics, int numAttribute); -Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src); -Bool vgaHWGetHWRec(ScrnInfoPtr scrp); -void vgaHWFreeHWRec(ScrnInfoPtr scrp); -Bool vgaHWMapMem(ScrnInfoPtr scrp); -void vgaHWUnmapMem(ScrnInfoPtr scrp); -void vgaHWGetIOBase(vgaHWPtr hwp); -void vgaHWLock(vgaHWPtr hwp); -void vgaHWUnlock(vgaHWPtr hwp); -void vgaHWEnable(vgaHWPtr hwp); -void vgaHWDisable(vgaHWPtr hwp); -void vgaHWDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags); -Bool vgaHWHandleColormaps(ScreenPtr pScreen); -void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed); -CARD32 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, +extern _X_EXPORT Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src); +extern _X_EXPORT Bool vgaHWGetHWRec(ScrnInfoPtr scrp); +extern _X_EXPORT void vgaHWFreeHWRec(ScrnInfoPtr scrp); +extern _X_EXPORT Bool vgaHWMapMem(ScrnInfoPtr scrp); +extern _X_EXPORT void vgaHWUnmapMem(ScrnInfoPtr scrp); +extern _X_EXPORT void vgaHWGetIOBase(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWLock(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWUnlock(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWEnable(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWDisable(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags); +extern _X_EXPORT Bool vgaHWHandleColormaps(ScreenPtr pScreen); +extern _X_EXPORT void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed); +extern _X_EXPORT CARD32 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, unsigned int Flags); -CARD32 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, +extern _X_EXPORT CARD32 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, unsigned int Flags); -Bool vgaHWAllocDefaultRegs(vgaRegPtr regp); +extern _X_EXPORT Bool vgaHWAllocDefaultRegs(vgaRegPtr regp); -DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void); -SaveScreenProcPtr vgaHWSaveScreenWeak(void); +extern _X_EXPORT DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void); +extern _X_EXPORT SaveScreenProcPtr vgaHWSaveScreenWeak(void); #endif /* _VGAHW_H */ diff --git a/xorg-server/hw/xfree86/x86emu/Makefile.am b/xorg-server/hw/xfree86/x86emu/Makefile.am index acd249c7f..987ea8bd7 100644 --- a/xorg-server/hw/xfree86/x86emu/Makefile.am +++ b/xorg-server/hw/xfree86/x86emu/Makefile.am @@ -1,6 +1,6 @@ -noinst_LIBRARIES = libx86emu.a +noinst_LTLIBRARIES = libx86emu.la -libx86emu_a_SOURCES = debug.c \ +libx86emu_la_SOURCES = debug.c \ decode.c \ fpu.c \ ops2.c \ diff --git a/xorg-server/hw/xfree86/x86emu/Makefile.in b/xorg-server/hw/xfree86/x86emu/Makefile.in index 2de47a3c8..3ea8f4404 100644 --- a/xorg-server/hw/xfree86/x86emu/Makefile.in +++ b/xorg-server/hw/xfree86/x86emu/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/x86emu DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,17 +51,15 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libx86emu_a_AR = $(AR) $(ARFLAGS) -libx86emu_a_LIBADD = -am_libx86emu_a_OBJECTS = debug.$(OBJEXT) decode.$(OBJEXT) \ - fpu.$(OBJEXT) ops2.$(OBJEXT) ops.$(OBJEXT) prim_ops.$(OBJEXT) \ - sys.$(OBJEXT) -libx86emu_a_OBJECTS = $(am_libx86emu_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libx86emu_la_LIBADD = +am_libx86emu_la_OBJECTS = debug.lo decode.lo fpu.lo ops2.lo ops.lo \ + prim_ops.lo sys.lo +libx86emu_la_OBJECTS = $(am_libx86emu_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -69,8 +70,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libx86emu_a_SOURCES) -DIST_SOURCES = $(libx86emu_a_SOURCES) +SOURCES = $(libx86emu_la_SOURCES) +DIST_SOURCES = $(libx86emu_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -79,6 +80,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -99,9 +101,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -130,7 +135,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -139,9 +146,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -180,12 +191,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -205,7 +217,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -215,6 +226,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -228,11 +240,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -268,6 +279,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -292,7 +304,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -315,6 +326,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -346,14 +358,16 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libx86emu.a -libx86emu_a_SOURCES = debug.c \ +noinst_LTLIBRARIES = libx86emu.la +libx86emu_la_SOURCES = debug.c \ decode.c \ fpu.c \ ops2.c \ @@ -412,12 +426,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libx86emu.a: $(libx86emu_a_OBJECTS) $(libx86emu_a_DEPENDENCIES) - -rm -f libx86emu.a - $(libx86emu_a_AR) libx86emu.a $(libx86emu_a_OBJECTS) $(libx86emu_a_LIBADD) - $(RANLIB) libx86emu.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libx86emu.la: $(libx86emu_la_OBJECTS) $(libx86emu_la_DEPENDENCIES) + $(LINK) $(libx86emu_la_OBJECTS) $(libx86emu_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -425,13 +443,13 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prim_ops.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prim_ops.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -544,7 +562,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -573,7 +591,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -645,7 +663,7 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/xfree86/x86emu/sys.c b/xorg-server/hw/xfree86/x86emu/sys.c index e15fb0931..34d29db56 100644 --- a/xorg-server/hw/xfree86/x86emu/sys.c +++ b/xorg-server/hw/xfree86/x86emu/sys.c @@ -45,6 +45,7 @@ #include "x86emu/regs.h" #include "x86emu/debug.h" #include "x86emu/prim_ops.h" +#include "../common/compiler.h" #ifndef NO_SYS_HEADERS #include #endif @@ -53,164 +54,6 @@ X86EMU_sysEnv _X86EMU_env; /* Global emulator machine state */ X86EMU_intrFuncs _X86EMU_intrTab[256]; -/*----------------------------- Implementation ----------------------------*/ -#if defined(__alpha__) || defined(__alpha) -/* to cope with broken egcs-1.1.2 :-(((( */ - -#define ALPHA_UALOADS -/* - * inline functions to do unaligned accesses - * from linux/include/asm-alpha/unaligned.h - */ - -/* - * EGCS 1.1 knows about arbitrary unaligned loads. Define some - * packed structures to talk about such things with. - */ - -#if defined(__GNUC__) -struct __una_u64 { unsigned long x __attribute__((packed)); }; -struct __una_u32 { unsigned int x __attribute__((packed)); }; -struct __una_u16 { unsigned short x __attribute__((packed)); }; -#endif - -static __inline__ unsigned long ldq_u(unsigned long * r11) -{ -#if defined(__GNUC__) - const struct __una_u64 *ptr = (const struct __una_u64 *) r11; - return ptr->x; -#else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extql %0,%2,%0\n\t" - "extqh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(7+(char *) r11))); - return r1 | r2; -#endif -} - -static __inline__ unsigned long ldl_u(unsigned int * r11) -{ -#if defined(__GNUC__) - const struct __una_u32 *ptr = (const struct __una_u32 *) r11; - return ptr->x; -#else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extll %0,%2,%0\n\t" - "extlh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(3+(char *) r11))); - return r1 | r2; -#endif -} - -static __inline__ unsigned long ldw_u(unsigned short * r11) -{ -#if defined(__GNUC__) - const struct __una_u16 *ptr = (const struct __una_u16 *) r11; - return ptr->x; -#else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extwl %0,%2,%0\n\t" - "extwh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(1+(char *) r11))); - return r1 | r2; -#endif -} - -/* - * Elemental unaligned stores - */ - -static __inline__ void stq_u(unsigned long r5, unsigned long * r11) -{ -#if defined(__GNUC__) - struct __una_u64 *ptr = (struct __una_u64 *) r11; - ptr->x = r5; -#else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "insqh %6,%7,%5\n\t" - "insql %6,%7,%4\n\t" - "mskqh %3,%7,%3\n\t" - "mskql %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(7+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -#endif -} - -static __inline__ void stl_u(unsigned long r5, unsigned int * r11) -{ -#if defined(__GNUC__) - struct __una_u32 *ptr = (struct __una_u32 *) r11; - ptr->x = r5; -#else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "inslh %6,%7,%5\n\t" - "insll %6,%7,%4\n\t" - "msklh %3,%7,%3\n\t" - "mskll %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(3+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -#endif -} - -static __inline__ void stw_u(unsigned long r5, unsigned short * r11) -{ -#if defined(__GNUC__) - struct __una_u16 *ptr = (struct __una_u16 *) r11; - ptr->x = r5; -#else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "inswh %6,%7,%5\n\t" - "inswl %6,%7,%4\n\t" - "mskwh %3,%7,%3\n\t" - "mskwl %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(1+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -#endif -} -#endif - /**************************************************************************** PARAMETERS: addr - Emulator memory address to read @@ -262,13 +105,7 @@ u16 X86API rdw( } else #endif -#if defined(ALPHA_UALOADS) val = ldw_u((u16*)(M.mem_base + addr)); -#elif defined(IA64_UALOADS) - val = uldw((u16*)(M.mem_base + addr)); -#else - val = *(u16*)(M.mem_base + addr); -#endif DB( if (DEBUG_MEM_TRACE()) printk("%#08x 2 -> %#x\n", addr, val);) return val; @@ -301,13 +138,7 @@ u32 X86API rdl( } else #endif -#if defined(ALPHA_UALOADS) val = ldl_u((u32*)(M.mem_base + addr)); -#elif defined(IA64_UALOADS) - val = uldl((u32*)(M.mem_base + addr)); -#else - val = *(u32*)(M.mem_base + addr); -#endif DB( if (DEBUG_MEM_TRACE()) printk("%#08x 4 -> %#x\n", addr, val);) return val; @@ -359,13 +190,7 @@ DB( if (DEBUG_MEM_TRACE()) } else #endif -#if defined(ALPHA_UALOADS) stw_u(val,(u16*)(M.mem_base + addr)); -#elif defined(IA64_UALOADS) - ustw(val,(u16*)(M.mem_base + addr)); -#else - *(u16*)(M.mem_base + addr) = val; -#endif } /**************************************************************************** @@ -395,13 +220,7 @@ DB( if (DEBUG_MEM_TRACE()) } else #endif -#if defined(ALPHA_UALOADS) stl_u(val,(u32*)(M.mem_base + addr)); -#elif defined(IA64_UALOADS) - ustl(val,(u32*)(M.mem_base + addr)); -#else - *(u32*)(M.mem_base + addr) = val; -#endif } /**************************************************************************** diff --git a/xorg-server/hw/xfree86/xaa/Makefile.in b/xorg-server/hw/xfree86/xaa/Makefile.in index e57a4e759..6d1bcbea8 100644 --- a/xorg-server/hw/xfree86/xaa/Makefile.in +++ b/xorg-server/hw/xfree86/xaa/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/xaa DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -123,6 +127,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -143,9 +148,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -174,7 +182,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -183,9 +193,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -224,12 +238,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -249,7 +264,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -259,6 +273,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -272,11 +287,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -312,6 +326,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -336,7 +351,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -359,6 +373,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -390,7 +405,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/xaa/xaa.h b/xorg-server/hw/xfree86/xaa/xaa.h index d6ccc31e2..7db6b95d5 100644 --- a/xorg-server/hw/xfree86/xaa/xaa.h +++ b/xorg-server/hw/xfree86/xaa/xaa.h @@ -1379,22 +1379,22 @@ typedef struct _XAAInfoRec { #define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE -Bool +extern _X_EXPORT Bool XAAInit( ScreenPtr pScreen, XAAInfoRecPtr infoRec ); -XAAInfoRecPtr XAACreateInfoRec(void); +extern _X_EXPORT XAAInfoRecPtr XAACreateInfoRec(void); -void +extern _X_EXPORT void XAADestroyInfoRec( XAAInfoRecPtr infoRec ); typedef void (*DepthChangeFuncPtr) (ScrnInfoPtr pScrn, int depth); -Bool +extern _X_EXPORT Bool XAAInitDualFramebufferOverlay( ScreenPtr pScreen, DepthChangeFuncPtr callback diff --git a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c index 9dbd00f3c..9b124670d 100644 --- a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c +++ b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c @@ -4,7 +4,7 @@ #endif #include -CARD32 XAAReverseBitOrder(CARD32 v); +#include "xaalocal.h" CARD32 XAAReverseBitOrder(CARD32 v) diff --git a/xorg-server/hw/xfree86/xaa/xaaCpyArea.c b/xorg-server/hw/xfree86/xaa/xaaCpyArea.c index 6c991e100..6a898cd5f 100644 --- a/xorg-server/hw/xfree86/xaa/xaaCpyArea.c +++ b/xorg-server/hw/xfree86/xaa/xaaCpyArea.c @@ -252,7 +252,7 @@ XAADoImageRead( } -void +void XAAScreenToScreenBitBlt( ScrnInfoPtr pScrn, int nbox, diff --git a/xorg-server/hw/xfree86/xaa/xaaCpyWin.c b/xorg-server/hw/xfree86/xaa/xaaCpyWin.c index ecdc9a3be..31c421e65 100644 --- a/xorg-server/hw/xfree86/xaa/xaaCpyWin.c +++ b/xorg-server/hw/xfree86/xaa/xaaCpyWin.c @@ -21,7 +21,7 @@ Written by Harm Hanemaayer (H.Hanemaayer@inter.nl.net). */ -void +void XAACopyWindow( WindowPtr pWin, DDXPointRec ptOldOrg, diff --git a/xorg-server/hw/xfree86/xaa/xaaFillArc.c b/xorg-server/hw/xfree86/xaa/xaaFillArc.c index d3ebc22fc..d83922ce0 100644 --- a/xorg-server/hw/xfree86/xaa/xaaFillArc.c +++ b/xorg-server/hw/xfree86/xaa/xaaFillArc.c @@ -161,11 +161,7 @@ XAAFillArcSliceSolid(DrawablePtr pDraw, GCPtr pGC, xArc *arc) void -XAAPolyFillArcSolid(pDraw, pGC, narcs, parcs) - DrawablePtr pDraw; - GCPtr pGC; - int narcs; - xArc *parcs; +XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { register xArc *arc; register int i; diff --git a/xorg-server/hw/xfree86/xaa/xaaFillRect.c b/xorg-server/hw/xfree86/xaa/xaaFillRect.c index 55a30bbd6..0b83ef3ee 100644 --- a/xorg-server/hw/xfree86/xaa/xaaFillRect.c +++ b/xorg-server/hw/xfree86/xaa/xaaFillRect.c @@ -587,7 +587,7 @@ XAAFillColor8x8PatternRects( | Cache Blits | \***************/ -void +void XAAFillCacheBltRects( ScrnInfoPtr pScrn, int rop, @@ -709,7 +709,7 @@ XAAFillCacheBltRects( -void +void XAAFillCacheExpandRects( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -812,7 +812,7 @@ WriteColumn( src = pSrc + (yoff * srcwidth); - dwords = ((w * Bpp) + 3) >> 2; + dwords = bytes_to_int32(w * Bpp); if((infoRec->ImageWriteFlags & CPU_TRANSFER_PAD_QWORD) && ((dwords * h) & 0x01)) { @@ -873,7 +873,7 @@ WriteColumn( } } -void +void XAAFillImageWriteRects( ScrnInfoPtr pScrn, int rop, diff --git a/xorg-server/hw/xfree86/xaa/xaaImage.c b/xorg-server/hw/xfree86/xaa/xaaImage.c index 910c7e1e2..4933beea3 100644 --- a/xorg-server/hw/xfree86/xaa/xaaImage.c +++ b/xorg-server/hw/xfree86/xaa/xaaImage.c @@ -92,7 +92,7 @@ XAAWritePixmap32To24( int trans ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); - int count, dwords = ((w * 3) + 3) >> 2; + int count, dwords = bytes_to_int32(w * 3); CARD32 *src, *dst; Bool PlusOne = FALSE; @@ -172,7 +172,7 @@ XAAWritePixmap32To24( } -void +void XAAWritePixmap ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -227,7 +227,7 @@ XAAWritePixmap ( BAD_ALIGNMENT: - dwords = ((w * Bpp) + 3) >> 2; + dwords = bytes_to_int32(w * Bpp); if((infoRec->ImageWriteFlags & CPU_TRANSFER_PAD_QWORD) && ((dwords * h) & 0x01)) { @@ -305,7 +305,7 @@ BAD_ALIGNMENT: } -void +void XAAWritePixmapScanline ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -351,7 +351,7 @@ XAAWritePixmapScanline ( BAD_ALIGNMENT: - dwords = ((w * Bpp) + 3) >> 2; + dwords = bytes_to_int32(w * Bpp); (*infoRec->SetupForScanlineImageWrite)( pScrn, rop, planemask, trans, bpp, depth); diff --git a/xorg-server/hw/xfree86/xaa/xaaInit.c b/xorg-server/hw/xfree86/xaa/xaaInit.c index 8d3833e5a..2ce2d9085 100644 --- a/xorg-server/hw/xfree86/xaa/xaaInit.c +++ b/xorg-server/hw/xfree86/xaa/xaaInit.c @@ -65,7 +65,7 @@ DevPrivateKey XAAGetPixmapKey(void) { static Bool SwitchedOut = FALSE; XAAInfoRecPtr -XAACreateInfoRec() +XAACreateInfoRec(void) { XAAInfoRecPtr infoRec; @@ -76,7 +76,7 @@ XAACreateInfoRec() return infoRec; } -void +void XAADestroyInfoRec(XAAInfoRecPtr infoRec) { if(!infoRec) return; @@ -94,7 +94,7 @@ XAADestroyInfoRec(XAAInfoRecPtr infoRec) } -Bool +Bool XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; diff --git a/xorg-server/hw/xfree86/xaa/xaaInitAccel.c b/xorg-server/hw/xfree86/xaa/xaaInitAccel.c index 3b397dc4a..157325e4b 100644 --- a/xorg-server/hw/xfree86/xaa/xaaInitAccel.c +++ b/xorg-server/hw/xfree86/xaa/xaaInitAccel.c @@ -528,7 +528,9 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec) #define XAAMSG(s) do { if (serverGeneration == 1) xf86ErrorF(s); } while (0) if((infoRec->Flags & OFFSCREEN_PIXMAPS) && HaveScreenToScreenCopy && - xf86IsOptionSet(options, XAAOPT_HAS_DUMB_INVERTED_OPTION_SENSE)) + xf86ReturnOptValBool(options, + XAAOPT_HAS_DUMB_INVERTED_OPTION_SENSE, + FALSE)) { XAAMSG("\tOffscreen Pixmaps\n"); } else { diff --git a/xorg-server/hw/xfree86/xaa/xaaLineMisc.c b/xorg-server/hw/xfree86/xaa/xaaLineMisc.c index cefb59a8e..6cef4bcd5 100644 --- a/xorg-server/hw/xfree86/xaa/xaaLineMisc.c +++ b/xorg-server/hw/xfree86/xaa/xaaLineMisc.c @@ -15,7 +15,7 @@ #include "xaalocal.h" -void +void XAASolidHorVertLineAsRects( ScrnInfoPtr pScrn, int x, int y, int len, int dir @@ -29,7 +29,7 @@ XAASolidHorVertLineAsRects( } -void +void XAASolidHorVertLineAsTwoPoint( ScrnInfoPtr pScrn, int x, int y, int len, int dir @@ -44,7 +44,7 @@ XAASolidHorVertLineAsTwoPoint( (*infoRec->SubsequentSolidTwoPointLine)(pScrn, x, y, x, y + len, 0); } -void +void XAASolidHorVertLineAsBresenham( ScrnInfoPtr pScrn, int x, int y, int len, int dir diff --git a/xorg-server/hw/xfree86/xaa/xaaNonTEGlyph.c b/xorg-server/hw/xfree86/xaa/xaaNonTEGlyph.c index 556650fb0..7431ba2a0 100644 --- a/xorg-server/hw/xfree86/xaa/xaaNonTEGlyph.c +++ b/xorg-server/hw/xfree86/xaa/xaaNonTEGlyph.c @@ -37,7 +37,7 @@ /* if the backing rectangle and text are of the same dimensions then we can draw in one pass */ -void +void #ifdef TRIPLE_BITS EXPNAME(XAANonTEGlyphRenderer3)( #else @@ -90,7 +90,7 @@ EXPNAME(XAANonTEGlyphRenderer)( #ifndef FIXEDBASE /* Scanline version of above gets built for LSBFIRST and MSBFIRST */ -void +void #ifdef TRIPLE_BITS EXPNAME(XAANonTEGlyphRendererScanline3)( #else diff --git a/xorg-server/hw/xfree86/xaa/xaaOverlay.c b/xorg-server/hw/xfree86/xaa/xaaOverlay.c index 273183e10..2956a3dbf 100644 --- a/xorg-server/hw/xfree86/xaa/xaaOverlay.c +++ b/xorg-server/hw/xfree86/xaa/xaaOverlay.c @@ -112,7 +112,7 @@ XAASetColorKey8_32( SET_SYNC_FLAG(infoRec); } -void +void XAASetupOverlay8_32Planar(ScreenPtr pScreen) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); diff --git a/xorg-server/hw/xfree86/xaa/xaaPCache.c b/xorg-server/hw/xfree86/xaa/xaaPCache.c index d05aaf22c..7e3011bd5 100644 --- a/xorg-server/hw/xfree86/xaa/xaaPCache.c +++ b/xorg-server/hw/xfree86/xaa/xaaPCache.c @@ -630,7 +630,7 @@ GOT_EM: } -void +void XAAInitPixmapCache( ScreenPtr pScreen, RegionPtr areas, @@ -1556,7 +1556,7 @@ XAACacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix) } else funcNo = 2; pad = BitmapBytePad(pCache->w * bpp); - dwords = pad >> 2; + dwords = bytes_to_int32(pad); dstPtr = data = (unsigned char*)xalloc(pad * pCache->h); srcPtr = (unsigned char*)pPix->devPrivate.ptr; @@ -1658,7 +1658,10 @@ XAACachePlanarMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix) } XAACachePlanarMonoStippleProc -XAAGetCachePlanarMonoStipple(void) { return XAACachePlanarMonoStipple; } +XAAGetCachePlanarMonoStipple(void) +{ + return XAACachePlanarMonoStipple; +} XAACacheInfoPtr XAACacheStipple(ScrnInfoPtr pScrn, PixmapPtr pPix, int fg, int bg) @@ -1840,7 +1843,7 @@ XAACacheColor8x8Pattern(ScrnInfoPtr pScrn, PixmapPtr pPix, int fg, int bg) } -void +void XAAWriteBitmapToCache( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1854,7 +1857,7 @@ XAAWriteBitmapToCache( 0, fg, bg, GXcopy, ~0); } -void +void XAAWriteBitmapToCacheLinear( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1892,7 +1895,7 @@ XAAWriteBitmapToCacheLinear( } -void +void XAAWritePixmapToCache( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1908,7 +1911,7 @@ XAAWritePixmapToCache( -void +void XAAWritePixmapToCacheLinear( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1952,7 +1955,7 @@ XAAWritePixmapToCacheLinear( } -void +void XAAWriteMono8x8PatternToCache( ScrnInfoPtr pScrn, XAACacheInfoPtr pCache @@ -1994,7 +1997,7 @@ XAAWriteMono8x8PatternToCache( xfree(data); } -void +void XAAWriteColor8x8PatternToCache( ScrnInfoPtr pScrn, PixmapPtr pPix, @@ -2323,7 +2326,7 @@ static int RotateMasksY[4] = { 0xFFFFFFFF, 0x00FFFFFF, 0x0000FFFF, 0x000000FF }; -void +void XAARotateMonoPattern( int *pat0, int *pat1, int xorg, int yorg, diff --git a/xorg-server/hw/xfree86/xaa/xaaPict.c b/xorg-server/hw/xfree86/xaa/xaaPict.c index 784c649a4..e059d3d65 100644 --- a/xorg-server/hw/xfree86/xaa/xaaPict.c +++ b/xorg-server/hw/xfree86/xaa/xaaPict.c @@ -75,12 +75,18 @@ XAAGetPixelFromRGBA ( gshift = bbits; rshift = gshift + gbits; ashift = rshift + rbits; - } else { /* PICT_TYPE_ABGR */ + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { rshift = 0; gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; - } + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { + bshift = PICT_FORMAT_BPP(format) - bbits; + gshift = bshift - gbits; + rshift = gshift - rbits; + ashift = 0; + } else + return FALSE; *pixel |= ( blue >> (16 - bbits)) << bshift; *pixel |= ( red >> (16 - rbits)) << rshift; @@ -116,12 +122,18 @@ XAAGetRGBAFromPixel( gshift = bbits; rshift = gshift + gbits; ashift = rshift + rbits; - } else { /* PICT_TYPE_ABGR */ + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { rshift = 0; gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; - } + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { + bshift = PICT_FORMAT_BPP(format) - bbits; + gshift = bshift - gbits; + rshift = gshift - rbits; + ashift = 0; + } else + return FALSE; *red = ((pixel >> rshift ) & ((1 << rbits) - 1)) << (16 - rbits); while(rbits < 16) { diff --git a/xorg-server/hw/xfree86/xaa/xaaSpans.c b/xorg-server/hw/xfree86/xaa/xaaSpans.c index 7d0943d72..46d6d0740 100644 --- a/xorg-server/hw/xfree86/xaa/xaaSpans.c +++ b/xorg-server/hw/xfree86/xaa/xaaSpans.c @@ -396,7 +396,7 @@ XAARenderPixmapCopySpans( \****************/ -void +void XAAFillSolidSpans( ScrnInfoPtr pScrn, int fg, int rop, @@ -432,7 +432,7 @@ XAAFillSolidSpans( \***************/ -void +void XAAFillMono8x8PatternSpansScreenOrigin( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -491,7 +491,7 @@ XAAFillMono8x8PatternSpansScreenOrigin( } -void +void XAAFillMono8x8PatternSpans( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -559,7 +559,7 @@ XAAFillMono8x8PatternSpans( \****************/ -void +void XAAFillColor8x8PatternSpansScreenOrigin( ScrnInfoPtr pScrn, int rop, @@ -605,7 +605,7 @@ XAAFillColor8x8PatternSpansScreenOrigin( } -void +void XAAFillColor8x8PatternSpans( ScrnInfoPtr pScrn, int rop, @@ -654,7 +654,7 @@ XAAFillColor8x8PatternSpans( \*****************/ -void +void XAAFillCacheBltSpans( ScrnInfoPtr pScrn, int rop, @@ -713,7 +713,7 @@ XAAFillCacheBltSpans( \****************/ -void +void XAAFillCacheExpandSpans( ScrnInfoPtr pScrn, int fg, int bg, int rop, diff --git a/xorg-server/hw/xfree86/xaa/xaaStipple.c b/xorg-server/hw/xfree86/xaa/xaaStipple.c index 0dd8e9fcf..c1d6f8ab4 100644 --- a/xorg-server/hw/xfree86/xaa/xaaStipple.c +++ b/xorg-server/hw/xfree86/xaa/xaaStipple.c @@ -105,7 +105,7 @@ unsigned int XAAShiftMasks[32] = { #endif -void +void #ifdef TRIPLE_BITS EXPNAME(XAAFillColorExpandRects3)( #else @@ -241,7 +241,7 @@ SECOND_PASS: -void +void #ifdef TRIPLE_BITS EXPNAME(XAAFillColorExpandSpans3)( #else @@ -352,7 +352,7 @@ SECOND_PASS: #ifndef FIXEDBASE -void +void #ifdef TRIPLE_BITS EXPNAME(XAAFillScanlineColorExpandRects3)( #else @@ -465,7 +465,7 @@ SECOND_PASS: SET_SYNC_FLAG(infoRec); } -void +void #ifdef TRIPLE_BITS EXPNAME(XAAFillScanlineColorExpandSpans3)( #else diff --git a/xorg-server/hw/xfree86/xaa/xaaTEGlyph.c b/xorg-server/hw/xfree86/xaa/xaaTEGlyph.c index cb60266ea..41e638e5c 100644 --- a/xorg-server/hw/xfree86/xaa/xaaTEGlyph.c +++ b/xorg-server/hw/xfree86/xaa/xaaTEGlyph.c @@ -143,7 +143,7 @@ GlyphScanlineFuncPtr *glyph_get_scanline_func(void) { /* This gets built for MSBFIRST or LSBFIRST with FIXEDBASE or not. A total of 4 versions */ -void +void EXPNAME(XAATEGlyphRenderer)( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -239,7 +239,7 @@ THE_END: ********************************************************************/ -void +void EXPNAME(XAATEGlyphRenderer3)( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -340,7 +340,7 @@ THE_END: #ifndef FIXEDBASE /* Scanline version of above gets built for LSBFIRST and MSBFIRST */ -void +void EXPNAME(XAATEGlyphRendererScanline)( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -415,7 +415,7 @@ THE_END: SET_SYNC_FLAG(infoRec); } -void +void EXPNAME(XAATEGlyphRendererScanline3)( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, diff --git a/xorg-server/hw/xfree86/xaa/xaaTables.c b/xorg-server/hw/xfree86/xaa/xaaTables.c index 829527dd6..c7fa28af3 100644 --- a/xorg-server/hw/xfree86/xaa/xaaTables.c +++ b/xorg-server/hw/xfree86/xaa/xaaTables.c @@ -1,4 +1,4 @@ - +#include "xaalocal.h" /* * This is a table of 24-bit values, indexed with an 8-bit byte value, then * expands each bit to three consecutive bits. This is required for color diff --git a/xorg-server/hw/xfree86/xaa/xaaWrapper.h b/xorg-server/hw/xfree86/xaa/xaaWrapper.h index a141d8421..f554741c6 100644 --- a/xorg-server/hw/xfree86/xaa/xaaWrapper.h +++ b/xorg-server/hw/xfree86/xaa/xaaWrapper.h @@ -4,7 +4,7 @@ typedef void (*SyncFunc)(ScreenPtr); -Bool xaaSetupWrapper(ScreenPtr pScreen, +extern _X_EXPORT Bool xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *func); #endif diff --git a/xorg-server/hw/xfree86/xaa/xaalocal.h b/xorg-server/hw/xfree86/xaa/xaalocal.h index 69a59050c..5e3d373c6 100644 --- a/xorg-server/hw/xfree86/xaa/xaalocal.h +++ b/xorg-server/hw/xfree86/xaa/xaalocal.h @@ -97,18 +97,18 @@ typedef struct _XAAPixmap { } XAAPixmapRec, *XAAPixmapPtr; -Bool +extern _X_EXPORT Bool XAACreateGC( GCPtr pGC ); -Bool +extern _X_EXPORT Bool XAAInitAccel( ScreenPtr pScreen, XAAInfoRecPtr infoRec ); -RegionPtr +extern _X_EXPORT RegionPtr XAABitBlt( DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, @@ -123,7 +123,7 @@ XAABitBlt( unsigned long bitPlane ); -void +extern _X_EXPORT void XAAScreenToScreenBitBlt( ScrnInfoPtr pScrn, int nbox, @@ -135,7 +135,7 @@ XAAScreenToScreenBitBlt( unsigned int planemask ); -void +extern _X_EXPORT void XAADoBitBlt( DrawablePtr pSrc, DrawablePtr pDst, @@ -144,7 +144,7 @@ XAADoBitBlt( DDXPointPtr pptSrc ); -void +extern _X_EXPORT void XAADoImageWrite( DrawablePtr pSrc, DrawablePtr pDst, @@ -153,7 +153,7 @@ XAADoImageWrite( DDXPointPtr pptSrc ); -void +extern _X_EXPORT void XAADoImageRead( DrawablePtr pSrc, DrawablePtr pDst, @@ -162,7 +162,7 @@ XAADoImageRead( DDXPointPtr pptSrc ); -void +extern _X_EXPORT void XAACopyWindow( WindowPtr pWin, DDXPointRec ptOldOrg, @@ -170,7 +170,7 @@ XAACopyWindow( ); -RegionPtr +extern _X_EXPORT RegionPtr XAACopyArea( DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, @@ -183,56 +183,56 @@ XAACopyArea( int dsty ); -void +extern _X_EXPORT void XAAValidateCopyArea( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidatePutImage( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidateCopyPlane( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidatePushPixels( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidateFillSpans( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidatePolyGlyphBlt( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidateImageGlyphBlt( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidatePolylines( GCPtr pGC, unsigned long changes, @@ -240,7 +240,7 @@ XAAValidatePolylines( ); -RegionPtr +extern _X_EXPORT RegionPtr XAACopyPlaneColorExpansion( DrawablePtr pSrc, DrawablePtr pDst, @@ -255,7 +255,7 @@ XAACopyPlaneColorExpansion( ); -void +extern _X_EXPORT void XAAPushPixelsSolidColorExpansion( GCPtr pGC, PixmapPtr pBitMap, @@ -266,7 +266,7 @@ XAAPushPixelsSolidColorExpansion( int yOrg ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpandMSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -278,7 +278,7 @@ XAAWriteBitmapColorExpandMSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpand3MSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -290,7 +290,7 @@ XAAWriteBitmapColorExpand3MSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpandMSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -302,7 +302,7 @@ XAAWriteBitmapColorExpandMSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpand3MSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -314,7 +314,7 @@ XAAWriteBitmapColorExpand3MSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpandLSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -326,7 +326,7 @@ XAAWriteBitmapColorExpandLSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpand3LSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -338,7 +338,7 @@ XAAWriteBitmapColorExpand3LSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpandLSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -350,7 +350,7 @@ XAAWriteBitmapColorExpandLSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpand3LSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -363,7 +363,7 @@ XAAWriteBitmapColorExpand3LSBFirst ( ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpandMSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -375,7 +375,7 @@ XAAWriteBitmapScanlineColorExpandMSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpand3MSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -387,7 +387,7 @@ XAAWriteBitmapScanlineColorExpand3MSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpandMSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -399,7 +399,7 @@ XAAWriteBitmapScanlineColorExpandMSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpand3MSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -411,7 +411,7 @@ XAAWriteBitmapScanlineColorExpand3MSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpandLSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -423,7 +423,7 @@ XAAWriteBitmapScanlineColorExpandLSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpand3LSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -435,7 +435,7 @@ XAAWriteBitmapScanlineColorExpand3LSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpandLSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -447,7 +447,7 @@ XAAWriteBitmapScanlineColorExpandLSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpand3LSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -459,7 +459,7 @@ XAAWriteBitmapScanlineColorExpand3LSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWritePixmap ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -471,7 +471,7 @@ XAAWritePixmap ( int bpp, int depth ); -void +extern _X_EXPORT void XAAWritePixmapScanline ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -486,7 +486,7 @@ XAAWritePixmapScanline ( typedef void (*ClipAndRenderRectsFunc)(GCPtr, int, BoxPtr, int, int); -void +extern _X_EXPORT void XAAClipAndRenderRects( GCPtr pGC, ClipAndRenderRectsFunc func, @@ -499,7 +499,7 @@ XAAClipAndRenderRects( typedef void (*ClipAndRenderSpansFunc)(GCPtr, int, DDXPointPtr, int*, int, int, int); -void +extern _X_EXPORT void XAAClipAndRenderSpans( GCPtr pGC, DDXPointPtr ppt, @@ -512,7 +512,7 @@ XAAClipAndRenderSpans( ); -void +extern _X_EXPORT void XAAFillSolidRects( ScrnInfoPtr pScrn, int fg, int rop, @@ -521,7 +521,7 @@ XAAFillSolidRects( BoxPtr pBox ); -void +extern _X_EXPORT void XAAFillMono8x8PatternRects( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -532,7 +532,7 @@ XAAFillMono8x8PatternRects( int xorg, int yorg ); -void +extern _X_EXPORT void XAAFillMono8x8PatternRectsScreenOrigin( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -544,7 +544,7 @@ XAAFillMono8x8PatternRectsScreenOrigin( ); -void +extern _X_EXPORT void XAAFillColor8x8PatternRectsScreenOrigin( ScrnInfoPtr pScrn, int rop, @@ -555,7 +555,7 @@ XAAFillColor8x8PatternRectsScreenOrigin( XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAAFillColor8x8PatternRects( ScrnInfoPtr pScrn, int rop, @@ -566,7 +566,7 @@ XAAFillColor8x8PatternRects( XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAAFillCacheBltRects( ScrnInfoPtr pScrn, int rop, @@ -577,7 +577,7 @@ XAAFillCacheBltRects( XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAAFillCacheExpandRects( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -588,7 +588,7 @@ XAAFillCacheExpandRects( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillImageWriteRects( ScrnInfoPtr pScrn, int rop, @@ -599,7 +599,7 @@ XAAFillImageWriteRects( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAPolyFillRect( DrawablePtr pDraw, GCPtr pGC, @@ -608,7 +608,7 @@ XAAPolyFillRect( ); -void +extern _X_EXPORT void XAATEGlyphRendererMSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -616,7 +616,7 @@ XAATEGlyphRendererMSBFirstFixedBase ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRenderer3MSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -624,7 +624,7 @@ XAATEGlyphRenderer3MSBFirstFixedBase ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererMSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -632,7 +632,7 @@ XAATEGlyphRendererMSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRenderer3MSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -640,7 +640,7 @@ XAATEGlyphRenderer3MSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererLSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -649,7 +649,7 @@ XAATEGlyphRendererLSBFirstFixedBase ( ); -void +extern _X_EXPORT void XAATEGlyphRenderer3LSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -657,7 +657,7 @@ XAATEGlyphRenderer3LSBFirstFixedBase ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererLSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -665,7 +665,7 @@ XAATEGlyphRendererLSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRenderer3LSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -674,7 +674,7 @@ XAATEGlyphRenderer3LSBFirst ( ); -void +extern _X_EXPORT void XAATEGlyphRendererScanlineMSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -682,7 +682,7 @@ XAATEGlyphRendererScanlineMSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererScanline3MSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -690,7 +690,7 @@ XAATEGlyphRendererScanline3MSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererScanlineLSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -698,7 +698,7 @@ XAATEGlyphRendererScanlineLSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererScanline3LSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -707,28 +707,28 @@ XAATEGlyphRendererScanline3LSBFirst ( ); -extern CARD32 *(*XAAGlyphScanlineFuncMSBFirstFixedBase[32])( +extern _X_EXPORT CARD32 *(*XAAGlyphScanlineFuncMSBFirstFixedBase[32])( CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width ); -extern CARD32 *(*XAAGlyphScanlineFuncMSBFirst[32])( +extern _X_EXPORT CARD32 *(*XAAGlyphScanlineFuncMSBFirst[32])( CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width ); -extern CARD32 *(*XAAGlyphScanlineFuncLSBFirstFixedBase[32])( +extern _X_EXPORT CARD32 *(*XAAGlyphScanlineFuncLSBFirstFixedBase[32])( CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width ); -extern CARD32 *(*XAAGlyphScanlineFuncLSBFirst[32])( +extern _X_EXPORT CARD32 *(*XAAGlyphScanlineFuncLSBFirst[32])( CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width ); -GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirstFixedBase(void); -GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirst(void); -GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirstFixedBase(void); -GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirst(void); +extern _X_EXPORT GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirstFixedBase(void); +extern _X_EXPORT GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirst(void); +extern _X_EXPORT GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirstFixedBase(void); +extern _X_EXPORT GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirst(void); -void +extern _X_EXPORT void XAAFillColorExpandRectsLSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -739,7 +739,7 @@ XAAFillColorExpandRectsLSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRects3LSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -750,7 +750,7 @@ XAAFillColorExpandRects3LSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRectsLSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -761,7 +761,7 @@ XAAFillColorExpandRectsLSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRects3LSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -772,7 +772,7 @@ XAAFillColorExpandRects3LSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRectsMSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -783,7 +783,7 @@ XAAFillColorExpandRectsMSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRects3MSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -794,7 +794,7 @@ XAAFillColorExpandRects3MSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRectsMSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -805,7 +805,7 @@ XAAFillColorExpandRectsMSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRects3MSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -816,7 +816,7 @@ XAAFillColorExpandRects3MSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandRectsLSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -827,7 +827,7 @@ XAAFillScanlineColorExpandRectsLSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandRects3LSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -838,7 +838,7 @@ XAAFillScanlineColorExpandRects3LSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandRectsMSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -849,7 +849,7 @@ XAAFillScanlineColorExpandRectsMSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandRects3MSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -860,7 +860,7 @@ XAAFillScanlineColorExpandRects3MSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpansLSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -873,7 +873,7 @@ XAAFillColorExpandSpansLSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpans3LSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -886,7 +886,7 @@ XAAFillColorExpandSpans3LSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpansLSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -899,7 +899,7 @@ XAAFillColorExpandSpansLSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpans3LSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -912,7 +912,7 @@ XAAFillColorExpandSpans3LSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpansMSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -925,7 +925,7 @@ XAAFillColorExpandSpansMSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpans3MSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -938,7 +938,7 @@ XAAFillColorExpandSpans3MSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpansMSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -951,7 +951,7 @@ XAAFillColorExpandSpansMSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpans3MSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -964,7 +964,7 @@ XAAFillColorExpandSpans3MSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandSpansLSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -977,7 +977,7 @@ XAAFillScanlineColorExpandSpansLSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandSpans3LSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -990,7 +990,7 @@ XAAFillScanlineColorExpandSpans3LSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAPutImage( DrawablePtr pDraw, GCPtr pGC, @@ -1004,7 +1004,7 @@ XAAPutImage( char *pImage ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandSpansMSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1017,7 +1017,7 @@ XAAFillScanlineColorExpandSpansMSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandSpans3MSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1031,32 +1031,32 @@ XAAFillScanlineColorExpandSpans3MSBFirst( ); -extern CARD32 *(*XAAStippleScanlineFuncMSBFirstFixedBase[6])( +extern _X_EXPORT CARD32 *(*XAAStippleScanlineFuncMSBFirstFixedBase[6])( CARD32* base, CARD32* src, int offset, int width, int dwords ); -extern CARD32 *(*XAAStippleScanlineFuncMSBFirst[6])( +extern _X_EXPORT CARD32 *(*XAAStippleScanlineFuncMSBFirst[6])( CARD32* base, CARD32* src, int offset, int width, int dwords ); -extern CARD32 *(*XAAStippleScanlineFuncLSBFirstFixedBase[6])( +extern _X_EXPORT CARD32 *(*XAAStippleScanlineFuncLSBFirstFixedBase[6])( CARD32* base, CARD32* src, int offset, int width, int dwords ); -extern CARD32 *(*XAAStippleScanlineFuncLSBFirst[6])( +extern _X_EXPORT CARD32 *(*XAAStippleScanlineFuncLSBFirst[6])( CARD32* base, CARD32* src, int offset, int width, int dwords ); -StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirstFixedBase(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirst(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirstFixedBase(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirst(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirstFixedBase(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirst(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirstFixedBase(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirst(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirstFixedBase(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirst(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirstFixedBase(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirst(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirstFixedBase(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirst(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirstFixedBase(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirst(void); -int +extern _X_EXPORT int XAAPolyText8TEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1065,7 +1065,7 @@ XAAPolyText8TEColorExpansion( char *chars ); -int +extern _X_EXPORT int XAAPolyText16TEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1074,7 +1074,7 @@ XAAPolyText16TEColorExpansion( unsigned short *chars ); -void +extern _X_EXPORT void XAAImageText8TEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1083,7 +1083,7 @@ XAAImageText8TEColorExpansion( char *chars ); -void +extern _X_EXPORT void XAAImageText16TEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1092,7 +1092,7 @@ XAAImageText16TEColorExpansion( unsigned short *chars ); -void +extern _X_EXPORT void XAAImageGlyphBltTEColorExpansion( DrawablePtr pDrawable, GCPtr pGC, @@ -1102,7 +1102,7 @@ XAAImageGlyphBltTEColorExpansion( pointer pglyphBase ); -void +extern _X_EXPORT void XAAPolyGlyphBltTEColorExpansion( DrawablePtr pDrawable, GCPtr pGC, @@ -1113,7 +1113,7 @@ XAAPolyGlyphBltTEColorExpansion( ); -int +extern _X_EXPORT int XAAPolyText8NonTEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1122,7 +1122,7 @@ XAAPolyText8NonTEColorExpansion( char *chars ); -int +extern _X_EXPORT int XAAPolyText16NonTEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1131,7 +1131,7 @@ XAAPolyText16NonTEColorExpansion( unsigned short *chars ); -void +extern _X_EXPORT void XAAImageText8NonTEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1140,7 +1140,7 @@ XAAImageText8NonTEColorExpansion( char *chars ); -void +extern _X_EXPORT void XAAImageText16NonTEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1149,7 +1149,7 @@ XAAImageText16NonTEColorExpansion( unsigned short *chars ); -void +extern _X_EXPORT void XAAImageGlyphBltNonTEColorExpansion( DrawablePtr pDrawable, GCPtr pGC, @@ -1159,7 +1159,7 @@ XAAImageGlyphBltNonTEColorExpansion( pointer pglyphBase ); -void +extern _X_EXPORT void XAAPolyGlyphBltNonTEColorExpansion( DrawablePtr pDrawable, GCPtr pGC, @@ -1170,7 +1170,7 @@ XAAPolyGlyphBltNonTEColorExpansion( ); -void XAANonTEGlyphRenderer( +extern _X_EXPORT void XAANonTEGlyphRenderer( ScrnInfoPtr pScrn, int x, int y, int n, NonTEGlyphPtr glyphs, @@ -1179,7 +1179,7 @@ void XAANonTEGlyphRenderer( unsigned int planemask ); -void +extern _X_EXPORT void XAAFillSolidSpans( ScrnInfoPtr pScrn, int fg, int rop, @@ -1189,7 +1189,7 @@ XAAFillSolidSpans( int *pwidth, int fSorted ); -void +extern _X_EXPORT void XAAFillMono8x8PatternSpans( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1201,7 +1201,7 @@ XAAFillMono8x8PatternSpans( int xorg, int yorg ); -void +extern _X_EXPORT void XAAFillMono8x8PatternSpansScreenOrigin( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1213,7 +1213,7 @@ XAAFillMono8x8PatternSpansScreenOrigin( int xorg, int yorg ); -void +extern _X_EXPORT void XAAFillColor8x8PatternSpansScreenOrigin( ScrnInfoPtr pScrn, int rop, @@ -1225,7 +1225,7 @@ XAAFillColor8x8PatternSpansScreenOrigin( int xorigin, int yorigin ); -void +extern _X_EXPORT void XAAFillColor8x8PatternSpans( ScrnInfoPtr pScrn, int rop, @@ -1237,7 +1237,7 @@ XAAFillColor8x8PatternSpans( int xorigin, int yorigin ); -void +extern _X_EXPORT void XAAFillCacheBltSpans( ScrnInfoPtr pScrn, int rop, @@ -1250,7 +1250,7 @@ XAAFillCacheBltSpans( int xorg, int yorg ); -void +extern _X_EXPORT void XAAFillCacheExpandSpans( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1263,7 +1263,7 @@ XAAFillCacheExpandSpans( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillSpans( DrawablePtr pDrawable, GC *pGC, @@ -1274,14 +1274,14 @@ XAAFillSpans( ); -void +extern _X_EXPORT void XAAInitPixmapCache( ScreenPtr pScreen, RegionPtr areas, pointer data ); -void +extern _X_EXPORT void XAAWriteBitmapToCache( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1290,7 +1290,7 @@ XAAWriteBitmapToCache( int fg, int bg ); -void +extern _X_EXPORT void XAAWriteBitmapToCacheLinear( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1299,7 +1299,7 @@ XAAWriteBitmapToCacheLinear( int fg, int bg ); -void +extern _X_EXPORT void XAAWritePixmapToCache( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1308,7 +1308,7 @@ XAAWritePixmapToCache( int bpp, int depth ); -void +extern _X_EXPORT void XAAWritePixmapToCacheLinear( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1317,26 +1317,26 @@ XAAWritePixmapToCacheLinear( int bpp, int depth ); -void +extern _X_EXPORT void XAASolidHorVertLineAsRects( ScrnInfoPtr pScrn, int x, int y, int len, int dir ); -void +extern _X_EXPORT void XAASolidHorVertLineAsTwoPoint( ScrnInfoPtr pScrn, int x, int y, int len, int dir ); -void +extern _X_EXPORT void XAASolidHorVertLineAsBresenham( ScrnInfoPtr pScrn, int x, int y, int len, int dir ); -void +extern _X_EXPORT void XAAPolyRectangleThinSolid( DrawablePtr pDrawable, GCPtr pGC, @@ -1345,7 +1345,7 @@ XAAPolyRectangleThinSolid( ); -void +extern _X_EXPORT void XAAPolylinesWideSolid ( DrawablePtr pDrawable, GCPtr pGC, @@ -1354,7 +1354,7 @@ XAAPolylinesWideSolid ( DDXPointPtr pPts ); -void +extern _X_EXPORT void XAAFillPolygonSolid( DrawablePtr pDrawable, GCPtr pGC, @@ -1364,7 +1364,7 @@ XAAFillPolygonSolid( DDXPointPtr ptsIn ); -void +extern _X_EXPORT void XAAFillPolygonStippled( DrawablePtr pDrawable, GCPtr pGC, @@ -1375,7 +1375,7 @@ XAAFillPolygonStippled( ); -void +extern _X_EXPORT void XAAFillPolygonTiled( DrawablePtr pDrawable, GCPtr pGC, @@ -1386,7 +1386,7 @@ XAAFillPolygonTiled( ); -int +extern _X_EXPORT int XAAIsEasyPolygon( DDXPointPtr ptsIn, int count, @@ -1397,7 +1397,7 @@ XAAIsEasyPolygon( int shape ); -void +extern _X_EXPORT void XAAFillPolygonHelper( ScrnInfoPtr pScrn, DDXPointPtr ptsIn, @@ -1413,7 +1413,7 @@ XAAFillPolygonHelper( XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAAPolySegment( DrawablePtr pDrawable, GCPtr pGC, @@ -1421,7 +1421,7 @@ XAAPolySegment( xSegment *pSeg ); -void +extern _X_EXPORT void XAAPolyLines( DrawablePtr pDrawable, GCPtr pGC, @@ -1430,7 +1430,7 @@ XAAPolyLines( DDXPointPtr pptInit ); -void +extern _X_EXPORT void XAAPolySegmentDashed( DrawablePtr pDrawable, GCPtr pGC, @@ -1438,7 +1438,7 @@ XAAPolySegmentDashed( xSegment *pSeg ); -void +extern _X_EXPORT void XAAPolyLinesDashed( DrawablePtr pDrawable, GCPtr pGC, @@ -1448,44 +1448,44 @@ XAAPolyLinesDashed( ); -void +extern _X_EXPORT void XAAWriteMono8x8PatternToCache(ScrnInfoPtr pScrn, XAACacheInfoPtr pCache); -void +extern _X_EXPORT void XAAWriteColor8x8PatternToCache( ScrnInfoPtr pScrn, PixmapPtr pPix, XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAARotateMonoPattern( int *pat0, int *pat1, int xoffset, int yoffset, Bool msbfirst ); -void XAAComputeDash(GCPtr pGC); +extern _X_EXPORT void XAAComputeDash(GCPtr pGC); -void XAAMoveDWORDS_FixedBase( +extern _X_EXPORT void XAAMoveDWORDS_FixedBase( register CARD32* dest, register CARD32* src, register int dwords ); -void XAAMoveDWORDS_FixedSrc( +extern _X_EXPORT void XAAMoveDWORDS_FixedSrc( register CARD32* dest, register CARD32* src, register int dwords ); -void XAAMoveDWORDS( +extern _X_EXPORT void XAAMoveDWORDS( register CARD32* dest, register CARD32* src, register int dwords ); -int +extern _X_EXPORT int XAAGetRectClipBoxes( GCPtr pGC, BoxPtr pboxClippedBase, @@ -1493,54 +1493,54 @@ XAAGetRectClipBoxes( xRectangle *prectInit ); -void +extern _X_EXPORT void XAASetupOverlay8_32Planar(ScreenPtr); -void +extern _X_EXPORT void XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheTile(ScrnInfoPtr Scrn, PixmapPtr pPix); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheMonoStipple(ScrnInfoPtr Scrn, PixmapPtr pPix); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACachePlanarMonoStipple(ScrnInfoPtr Scrn, PixmapPtr pPix); typedef XAACacheInfoPtr (*XAACachePlanarMonoStippleProc)(ScrnInfoPtr, PixmapPtr); -XAACachePlanarMonoStippleProc XAAGetCachePlanarMonoStipple(void); +extern _X_EXPORT XAACachePlanarMonoStippleProc XAAGetCachePlanarMonoStipple(void); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheStipple(ScrnInfoPtr Scrn, PixmapPtr pPix, int fg, int bg); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheMono8x8Pattern(ScrnInfoPtr Scrn, int pat0, int pat1); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheColor8x8Pattern(ScrnInfoPtr Scrn, PixmapPtr pPix, int fg, int bg); -void +extern _X_EXPORT void XAATileCache(ScrnInfoPtr pScrn, XAACacheInfoPtr pCache, int w, int h); -void XAAClosePixmapCache(ScreenPtr pScreen); +extern _X_EXPORT void XAAClosePixmapCache(ScreenPtr pScreen); void XAAInvalidatePixmapCache(ScreenPtr pScreen); -Bool XAACheckStippleReducibility(PixmapPtr pPixmap); -Bool XAACheckTileReducibility(PixmapPtr pPixmap, Bool checkMono); +extern _X_EXPORT Bool XAACheckStippleReducibility(PixmapPtr pPixmap); +extern _X_EXPORT Bool XAACheckTileReducibility(PixmapPtr pPixmap, Bool checkMono); -int XAAStippledFillChooser(GCPtr pGC); -int XAAOpaqueStippledFillChooser(GCPtr pGC); -int XAATiledFillChooser(GCPtr pGC); +extern _X_EXPORT int XAAStippledFillChooser(GCPtr pGC); +extern _X_EXPORT int XAAOpaqueStippledFillChooser(GCPtr pGC); +extern _X_EXPORT int XAATiledFillChooser(GCPtr pGC); -void XAAMoveInOffscreenPixmaps(ScreenPtr pScreen); -void XAAMoveOutOffscreenPixmaps(ScreenPtr pScreen); -void XAARemoveAreaCallback(FBAreaPtr area); -void XAAMoveOutOffscreenPixmap(PixmapPtr pPix); -Bool XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec); +extern _X_EXPORT void XAAMoveInOffscreenPixmaps(ScreenPtr pScreen); +extern _X_EXPORT void XAAMoveOutOffscreenPixmaps(ScreenPtr pScreen); +extern _X_EXPORT void XAARemoveAreaCallback(FBAreaPtr area); +extern _X_EXPORT void XAAMoveOutOffscreenPixmap(PixmapPtr pPix); +extern _X_EXPORT Bool XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec); #ifdef RENDER -void +extern _X_EXPORT void XAAComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -1555,7 +1555,7 @@ XAAComposite (CARD8 op, CARD16 height); -Bool +extern _X_EXPORT Bool XAADoComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -1570,7 +1570,7 @@ XAADoComposite (CARD8 op, CARD16 height); -void +extern _X_EXPORT void XAAGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -1581,7 +1581,7 @@ XAAGlyphs (CARD8 op, GlyphListPtr list, GlyphPtr *glyphs); -Bool +extern _X_EXPORT Bool XAADoGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -1595,7 +1595,7 @@ XAADoGlyphs (CARD8 op, /* helpers */ -void +extern _X_EXPORT void XAA_888_plus_PICT_a8_to_8888 ( CARD32 color, CARD8 *alphaPtr, /* in bytes */ @@ -1606,7 +1606,7 @@ XAA_888_plus_PICT_a8_to_8888 ( int height ); -Bool +extern _X_EXPORT Bool XAAGetRGBAFromPixel( CARD32 pixel, CARD16 *red, @@ -1617,7 +1617,7 @@ XAAGetRGBAFromPixel( ); -Bool +extern _X_EXPORT Bool XAAGetPixelFromRGBA ( CARD32 *pixel, CARD16 red, @@ -1630,18 +1630,18 @@ XAAGetPixelFromRGBA ( #endif /* XXX should be static */ -extern GCOps XAAFallbackOps; -extern GCOps *XAAGetFallbackOps(void); -extern GCFuncs XAAGCFuncs; -extern DevPrivateKey XAAGetScreenKey(void); -extern DevPrivateKey XAAGetGCKey(void); -extern DevPrivateKey XAAGetPixmapKey(void); +extern _X_EXPORT GCOps XAAFallbackOps; +extern _X_EXPORT GCOps *XAAGetFallbackOps(void); +extern _X_EXPORT GCFuncs XAAGCFuncs; +extern _X_EXPORT DevPrivateKey XAAGetScreenKey(void); +extern _X_EXPORT DevPrivateKey XAAGetGCKey(void); +extern _X_EXPORT DevPrivateKey XAAGetPixmapKey(void); -extern unsigned int XAAShiftMasks[32]; +extern _X_EXPORT unsigned int XAAShiftMasks[32]; -extern unsigned int byte_expand3[256], byte_reversed_expand3[256]; +extern _X_EXPORT unsigned int byte_expand3[256], byte_reversed_expand3[256]; -CARD32 XAAReverseBitOrder(CARD32 data); +extern _X_EXPORT CARD32 XAAReverseBitOrder(CARD32 data); #define GET_XAASCREENPTR_FROM_SCREEN(pScreen)\ dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()) diff --git a/xorg-server/hw/xfree86/xaa/xaarop.h b/xorg-server/hw/xfree86/xaa/xaarop.h index 548993c49..edfd75aec 100644 --- a/xorg-server/hw/xfree86/xaa/xaarop.h +++ b/xorg-server/hw/xfree86/xaa/xaarop.h @@ -294,18 +294,18 @@ #define NO_SRC_ROP(rop) \ ((rop == GXnoop) || (rop == GXset) || (rop == GXclear) || (rop == GXinvert)) -int XAAHelpSolidROP(ScrnInfoPtr pScrn, int *fg, int pm, int *rop); -int XAAHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, int pm, int *rop); +extern _X_EXPORT int XAAHelpSolidROP(ScrnInfoPtr pScrn, int *fg, int pm, int *rop); +extern _X_EXPORT int XAAHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, int pm, int *rop); /* XXX These four should be static, but it breaks the 6.7.0 ABI. */ -extern int XAACopyROP[16]; -extern int XAACopyROP_PM[16]; -extern int XAAPatternROP[16]; -extern int XAAPatternROP_PM[16]; +extern _X_EXPORT int XAACopyROP[16]; +extern _X_EXPORT int XAACopyROP_PM[16]; +extern _X_EXPORT int XAAPatternROP[16]; +extern _X_EXPORT int XAAPatternROP_PM[16]; -extern int XAAGetCopyROP(int i); -extern int XAAGetCopyROP_PM(int i); -extern int XAAGetPatternROP(int i); -extern int XAAGetPatternROP_PM(int i); +extern _X_EXPORT int XAAGetCopyROP(int i); +extern _X_EXPORT int XAAGetCopyROP_PM(int i); +extern _X_EXPORT int XAAGetPatternROP(int i); +extern _X_EXPORT int XAAGetPatternROP_PM(int i); #endif /* _XAAROP_H */ diff --git a/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in b/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in index ff09fa56e..e1f401fde 100644 --- a/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in +++ b/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/xf8_16bpp DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -123,9 +128,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -154,7 +162,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -163,9 +173,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -204,12 +218,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -229,7 +244,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -292,6 +306,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -316,7 +331,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h b/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h index 3a3a68da7..b6ab955f3 100644 --- a/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h +++ b/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h @@ -4,9 +4,9 @@ * 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 - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, 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 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 @@ -14,10 +14,11 @@ * * 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 NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS 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. + * 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. */ #ifndef _CFB8_16_H @@ -28,7 +29,7 @@ /* this has to stay misnamed for ABI reasons */ -_X_EXPORT Bool +extern _X_EXPORT Bool cfb8_16ScreenInit(ScreenPtr pScreen, pointer pbits16, pointer pbits8, int xsize, int ysize, int dpix, int dpiy, int width16, int width8); diff --git a/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c b/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c index 1a739b040..6a4529ae8 100644 --- a/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c +++ b/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c @@ -4,9 +4,9 @@ * 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 - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, 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 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 @@ -14,10 +14,11 @@ * * 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 NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS 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. + * 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. */ #ifdef HAVE_XORG_CONFIG_H @@ -34,7 +35,7 @@ #include "fboverlay.h" #include "cfb8_16.h" -_X_EXPORT Bool +Bool cfb8_16ScreenInit(ScreenPtr pScreen, pointer pbits16, pointer pbits8, int xsize, int ysize, int dpix, int dpiy, int width16, int width8) diff --git a/xorg-server/hw/xfree86/xorgconf.cpp b/xorg-server/hw/xfree86/xorgconf.cpp index acf90f13f..d880180ae 100644 --- a/xorg-server/hw/xfree86/xorgconf.cpp +++ b/xorg-server/hw/xfree86/xorgconf.cpp @@ -1,4 +1,3 @@ -XCOMM $XdotOrg$ XCOMM XCOMM Copyright (c) 1994-1998 by The XFree86 Project, Inc. XCOMM @@ -29,15 +28,15 @@ XCOMM $XConsortium: XF86Conf.cpp /main/22 1996/10/23 11:43:51 kaleb $ XCOMM ********************************************************************** XCOMM This is a sample configuration file only, intended to illustrate -XCOMM what a config file might look like. Refer to the XF86Config(4/5) -XCOMM man page for details about the format of this file. This man page -XCOMM is installed as MANPAGE +XCOMM what a config file might look like. Refer to the __xconfigfile__(__filemansuffix__) +XCOMM man page for details about the format of this file. XCOMM ********************************************************************** -XCOMM The ordering of sections is not important in version 4.0 and later. +XCOMM The ordering of sections is not important in XFree86 4.0 and later, +XCOMM nor in any Xorg release. XCOMM ********************************************************************** -XCOMM Files section. This allows default font and rgb paths to be set +XCOMM Files section. This allows default font and module paths to be set XCOMM ********************************************************************** Section "Files" @@ -98,18 +97,18 @@ XCOMM provide a better stack trace in the core dump to aid in debugging XCOMM Option "NoTrapSignals" -XCOMM Uncomment this to disable the VT switch sequence +XCOMM Uncomment this to disable the VT switch sequence XCOMM (where n is 1 through 12). This allows clients to receive these key XCOMM events. XCOMM Option "DontVTSwitch" -XCOMM Uncomment this to disable the server abort sequence -XCOMM This allows clients to receive this key event. +XCOMM Uncomment this to enable the server abort sequence +XCOMM The default allows clients to receive this key event. -XCOMM Option "DontZap" +XCOMM Option "DontZap" "false" -XCOMM Uncomment this to disable the / mode switching +XCOMM Uncomment this to disable the / mode switching XCOMM sequences. This allows clients to receive these key events. XCOMM Option "DontZoom" @@ -148,14 +147,6 @@ XCOMM the driver supports it. Option "suspend time" "30" Option "off time" "60" -XCOMM On some platform the server needs to estimate the sizes of PCI -XCOMM memory and pio ranges. This is done by assuming that PCI ranges -XCOMM don't overlap. Some broken BIOSes tend to set ranges of inactive -XCOMM devices wrong. Here one can adjust how aggressive the assumptions -XCOMM should be. Default is 0. - -XCOMM Option "EstimateSizesAggresively" "0" - EndSection XCOMM ********************************************************************** @@ -218,7 +209,7 @@ XCOMM Option "XkbOptions" "ctrl:swapcaps" XCOMM These are the default XKB settings for xorg XCOMM XCOMM Option "XkbRules" "xorg" -XCOMM Option "XkbModel" "pc101" +XCOMM Option "XkbModel" "pc105" XCOMM Option "XkbLayout" "us" XCOMM Option "XkbVariant" "" XCOMM Option "XkbOptions" "" diff --git a/xorg-server/hw/xnest/Args.c b/xorg-server/hw/xnest/Args.c index b95f70093..cdc831133 100644 --- a/xorg-server/hw/xnest/Args.c +++ b/xorg-server/hw/xnest/Args.c @@ -174,7 +174,7 @@ ddxProcessArgument (int argc, char *argv[], int i) return 0; } -void ddxUseMsg() +void ddxUseMsg(void) { ErrorF("-display string display name of the real server\n"); ErrorF("-sync sinchronize with the real server\n"); diff --git a/xorg-server/hw/xnest/Color.c b/xorg-server/hw/xnest/Color.c index 5ba0bdbad..dc749478f 100644 --- a/xorg-server/hw/xnest/Color.c +++ b/xorg-server/hw/xnest/Color.c @@ -242,16 +242,16 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen) WindowPtr pWin; Visual *visual; ColormapPtr pCmap; - + pWin = xnestWindowPtr(icws.windows[0]); visual = xnestVisualFromID(pScreen, wVisual(pWin)); if (visual == xnestDefaultVisual(pScreen)) - pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), - RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin), + RT_COLORMAP, serverClient, DixUseAccess); else - pCmap = (ColormapPtr)LookupIDByType(pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, pScreen->defColormap, + RT_COLORMAP, serverClient, DixUseAccess); XSetWindowColormap(xnestDisplay, xnestDefaultWindows[pScreen->myNum], @@ -302,7 +302,8 @@ xnestDirectInstallColormaps(ScreenPtr pScreen) for (i = 0; i < n; i++) { ColormapPtr pCmap; - pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, pCmapIDs[i], RT_COLORMAP, + serverClient, DixInstallAccess); if (pCmap) XInstallColormap(xnestDisplay, xnestColormap(pCmap)); } @@ -321,7 +322,8 @@ xnestDirectUninstallColormaps(ScreenPtr pScreen) for (i = 0; i < n; i++) { ColormapPtr pCmap; - pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, pCmapIDs[i], RT_COLORMAP, + serverClient, DixUninstallAccess); if (pCmap) XUninstallColormap(xnestDisplay, xnestColormap(pCmap)); } @@ -365,8 +367,10 @@ xnestUninstallColormap(ColormapPtr pCmap) { if (pCmap->mid != pCmap->pScreen->defColormap) { - pCurCmap = (ColormapPtr)LookupIDByType(pCmap->pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCurCmap, + pCmap->pScreen->defColormap, + RT_COLORMAP, + serverClient, DixInstallAccess); (*pCmap->pScreen->InstallColormap)(pCurCmap); } } diff --git a/xorg-server/hw/xnest/Events.c b/xorg-server/hw/xnest/Events.c index 35ba43269..277718ba3 100644 --- a/xorg-server/hw/xnest/Events.c +++ b/xorg-server/hw/xnest/Events.c @@ -17,7 +17,6 @@ is" without express or implied warranty. #endif #include -#define NEED_EVENTS #include #include "screenint.h" #include "input.h" @@ -46,7 +45,7 @@ CARD32 lastEventTime = 0; extern EventList *xnestEvents; void -ProcessInputEvents() +ProcessInputEvents(void) { mieqProcessInputEvents(); } @@ -110,7 +109,7 @@ xnestQueueKeyEvent(int type, unsigned int keycode) lastEventTime = GetTimeInMillis(); n = GetKeyboardEvents(xnestEvents, xnestKeyboardDevice, type, keycode); for (i = 0; i < n; i++) - mieqEnqueue(xnestKeyboardDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestKeyboardDevice, (InternalEvent*)(xnestEvents + i)->event); } void @@ -139,7 +138,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonPress, X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event); break; case ButtonRelease: @@ -148,7 +147,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonRelease, X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event); break; case MotionNotify: @@ -158,7 +157,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event); break; case FocusIn: @@ -191,7 +190,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event); xnestDirectInstallColormaps(pScreen); } } diff --git a/xorg-server/hw/xnest/Font.c b/xorg-server/hw/xnest/Font.c index 26faf1633..7b388f0f4 100644 --- a/xorg-server/hw/xnest/Font.c +++ b/xorg-server/hw/xnest/Font.c @@ -40,7 +40,7 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) int nprops; FontPropPtr props; int i; - char *name; + const char *name; FontSetPrivate(pFont, xnestFontPrivateIndex, NULL); @@ -58,7 +58,7 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) if (!value_atom) return False; - name = (char *)NameForAtom(value_atom); + name = NameForAtom(value_atom); if (!name) return False; diff --git a/xorg-server/hw/xnest/Init.c b/xorg-server/hw/xnest/Init.c index f80bbd121..0765f73d0 100644 --- a/xorg-server/hw/xnest/Init.c +++ b/xorg-server/hw/xnest/Init.c @@ -89,13 +89,18 @@ InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) void InitInput(int argc, char *argv[]) { - xnestPointerDevice = AddInputDevice(serverClient, xnestPointerProc, TRUE); - xnestKeyboardDevice = AddInputDevice(serverClient, xnestKeyboardProc, TRUE); + int rc; + rc = AllocDevicePair(serverClient, "Xnest", + &xnestPointerDevice, + &xnestKeyboardDevice, + xnestPointerProc, + xnestKeyboardProc, + FALSE); - GetEventList(&xnestEvents); + if (rc != Success) + FatalError("Failed to init Xnest default devices.\n"); - RegisterPointerDevice(xnestPointerDevice); - RegisterKeyboardDevice(xnestKeyboardDevice); + GetEventList(&xnestEvents); mieqInit(); @@ -107,14 +112,14 @@ InitInput(int argc, char *argv[]) /* * DDX - specific abort routine. Called by AbortServer(). */ -void AbortDDX() +void AbortDDX(void) { xnestDoFullGeneration = True; xnestCloseDisplay(); } /* Called by GiveUp(). */ -void ddxGiveUp() +void ddxGiveUp(void) { AbortDDX(); } @@ -126,17 +131,19 @@ DarwinHandleGUI(int argc, char *argv[]) } #endif -void OsVendorInit() +void OsVendorInit(void) { return; } -void OsVendorFatalError() +void OsVendorFatalError(void) { return; } +#if defined(DDXBEFORERESET) void ddxBeforeReset(void) { return; } +#endif diff --git a/xorg-server/hw/xnest/Keyboard.c b/xorg-server/hw/xnest/Keyboard.c index 17d3e5ea6..1835c7071 100644 --- a/xorg-server/hw/xnest/Keyboard.c +++ b/xorg-server/hw/xnest/Keyboard.c @@ -12,7 +12,6 @@ is" without express or implied warranty. */ -#define NEED_EVENTS #ifdef HAVE_XNEST_CONFIG_H #include #endif @@ -34,9 +33,8 @@ is" without express or implied warranty. #include "Args.h" #include "Events.h" -#ifdef XKB #include -#include +#include "xkbsrv.h" #include extern Bool @@ -61,30 +59,6 @@ extern Status XkbGetControls( XkbDescPtr /* desc */ ); -#ifndef XKB_BASE_DIRECTORY -#define XKB_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb/" -#endif -#ifndef XKB_CONFIG_FILE -#define XKB_CONFIG_FILE "X0-config.keyboard" -#endif -#ifndef XKB_DFLT_RULES_FILE -#define XKB_DFLT_RULES_FILE __XKBDEFRULES__ -#endif -#ifndef XKB_DFLT_KB_LAYOUT -#define XKB_DFLT_KB_LAYOUT "us" -#endif -#ifndef XKB_DFLT_KB_MODEL -#define XKB_DFLT_KB_MODEL "pc101" -#endif -#ifndef XKB_DFLT_KB_VARIANT -#define XKB_DFLT_KB_VARIANT NULL -#endif -#ifndef XKB_DFLT_KB_OPTIONS -#define XKB_DFLT_KB_OPTIONS NULL -#endif - -#endif - DeviceIntPtr xnestKeyboardDevice = NULL; void @@ -140,19 +114,18 @@ xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) int xnestKeyboardProc(DeviceIntPtr pDev, int onoff) { - XModifierKeymap *modifier_keymap; KeySym *keymap; int mapWidth; int min_keycode, max_keycode; KeySymsRec keySyms; - CARD8 modmap[MAP_LENGTH]; - int i, j; + int i; XKeyboardState values; + XkbDescPtr xkb; + int op, event, error, major, minor; switch (onoff) { case DEVICE_INIT: - modifier_keymap = XGetModifierMapping(xnestDisplay); XDisplayKeycodes(xnestDisplay, &min_keycode, &max_keycode); #ifdef _XSERVER64 { @@ -175,67 +148,26 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff) &mapWidth); #endif - for (i = 0; i < MAP_LENGTH; i++) - modmap[i] = 0; - for (j = 0; j < 8; j++) - for(i = 0; i < modifier_keymap->max_keypermod; i++) { - CARD8 keycode; - if ((keycode = - modifier_keymap-> - modifiermap[j * modifier_keymap->max_keypermod + i])) - modmap[keycode] |= 1<public, &keySyms, modmap, - xnestBell, xnestChangeKeyboardControl); -#ifdef XKB - } else { - XkbComponentNamesRec names; - char *rules, *model, *layout, *variants, *options; - - XkbDescPtr xkb; - int op, event, error, major, minor; - - if (XkbQueryExtension(xnestDisplay, &op, &event, &error, &major, &minor) == 0) { - ErrorF("Unable to initialize XKEYBOARD extension.\n"); + if (XkbQueryExtension(xnestDisplay, &op, &event, &error, &major, &minor) == 0) { + ErrorF("Unable to initialize XKEYBOARD extension.\n"); goto XkbError; - } - xkb = XkbGetKeyboard(xnestDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); - if (xkb == NULL || xkb->geom == NULL) { + } + xkb = XkbGetKeyboard(xnestDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); + if (xkb == NULL || xkb->geom == NULL) { ErrorF("Couldn't get keyboard.\n"); - goto XkbError; - } - XkbGetControls(xnestDisplay, XkbAllControlsMask, xkb); - - memset(&names, 0, sizeof(XkbComponentNamesRec)); - rules = XKB_DFLT_RULES_FILE; - model = XKB_DFLT_KB_MODEL; - layout = XKB_DFLT_KB_LAYOUT; - variants = XKB_DFLT_KB_VARIANT; - options = XKB_DFLT_KB_OPTIONS; - - XkbSetRulesDflts(rules, model, layout, variants, options); - XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, modmap, - xnestBell, xnestChangeKeyboardControl); - XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls); - XkbFreeKeyboard(xkb, 0, False); + goto XkbError; } -#endif + XkbGetControls(xnestDisplay, XkbAllControlsMask, xkb); + + InitKeyboardDeviceStruct(pDev, NULL, + xnestBell, xnestChangeKeyboardControl); + XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls); + XkbFreeKeyboard(xkb, 0, False); xfree(keymap); break; case DEVICE_ON: @@ -252,6 +184,17 @@ XkbError: break; } return Success; + +XkbError: + XGetKeyboardControl(xnestDisplay, &values); + memmove((char *)defaultKeyboardControl.autoRepeats, + (char *)values.auto_repeats, + sizeof(values.auto_repeats)); + + InitKeyboardDeviceStruct(pDev, NULL, + xnestBell, xnestChangeKeyboardControl); + xfree(keymap); + return Success; } Bool @@ -267,10 +210,15 @@ xnestUpdateModifierState(unsigned int state) KeyClassPtr keyc = pDev->key; int i; CARD8 mask; + int xkb_state; + + if (!pDev) + return; + xkb_state = XkbStateFieldFromRec(&pDev->key->xkbInfo->state); state = state & 0xff; - if (keyc->state == state) + if (xkb_state == state) return; for (i = 0, mask = 1; i < 8; i++, mask <<= 1) { @@ -278,11 +226,11 @@ xnestUpdateModifierState(unsigned int state) /* Modifier is down, but shouldn't be */ - if ((keyc->state & mask) && !(state & mask)) { + if ((xkb_state & mask) && !(state & mask)) { int count = keyc->modifierKeyCount[i]; for (key = 0; key < MAP_LENGTH; key++) - if (keyc->modifierMap[key] & mask) { + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { int bit; BYTE *kptr; @@ -299,9 +247,9 @@ xnestUpdateModifierState(unsigned int state) /* Modifier shoud be down, but isn't */ - if (!(keyc->state & mask) && (state & mask)) + if (!(xkb_state & mask) && (state & mask)) for (key = 0; key < MAP_LENGTH; key++) - if (keyc->modifierMap[key] & mask) { + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { xnestQueueKeyEvent(KeyPress, key); break; } diff --git a/xorg-server/hw/xnest/Makefile.in b/xorg-server/hw/xnest/Makefile.in index a4c90c830..f37c324c6 100644 --- a/xorg-server/hw/xnest/Makefile.in +++ b/xorg-server/hw/xnest/Makefile.in @@ -45,8 +45,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xnest ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -56,7 +59,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) @@ -122,6 +126,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -142,9 +147,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -173,7 +181,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -182,9 +192,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -223,12 +237,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -248,7 +263,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -258,6 +272,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -271,11 +286,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -314,6 +328,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -338,7 +353,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -361,6 +375,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -392,7 +407,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xnest/Pointer.c b/xorg-server/hw/xnest/Pointer.c index 8f764a624..4de467391 100644 --- a/xorg-server/hw/xnest/Pointer.c +++ b/xorg-server/hw/xnest/Pointer.c @@ -33,6 +33,9 @@ is" without express or implied warranty. #include "Pointer.h" #include "Args.h" +#include "xserver-properties.h" +#include "exevents.h" /* For XIGetKnownProperty */ + DeviceIntPtr xnestPointerDevice = NULL; void @@ -46,6 +49,8 @@ int xnestPointerProc(DeviceIntPtr pDev, int onoff) { CARD8 map[MAXBUTTONS]; + Atom btn_labels[MAXBUTTONS] = {0}; + Atom axes_labels[2] = {0}; int nmap; int i; @@ -55,9 +60,21 @@ xnestPointerProc(DeviceIntPtr pDev, int onoff) nmap = XGetPointerMapping(xnestDisplay, map, MAXBUTTONS); for (i = 0; i <= nmap; i++) map[i] = i; /* buttons are already mapped */ - InitPointerDeviceStruct(&pDev->public, map, nmap, + + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); + btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); + btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); + btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + + InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels, xnestChangePointerControl, - GetMotionHistorySize(), 2); + GetMotionHistorySize(), 2, axes_labels); break; case DEVICE_ON: xnestEventMask |= XNEST_POINTER_EVENT_MASK; diff --git a/xorg-server/hw/xnest/Window.c b/xorg-server/hw/xnest/Window.c index ae3487f4a..48c870fac 100644 --- a/xorg-server/hw/xnest/Window.c +++ b/xorg-server/hw/xnest/Window.c @@ -93,7 +93,8 @@ xnestCreateWindow(WindowPtr pWin) visual = xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); mask |= CWColormap; if (pWin->optional->colormap) { - pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin), + RT_COLORMAP, serverClient, DixUseAccess); attributes.colormap = xnestColormap(pCmap); } else @@ -104,7 +105,8 @@ xnestCreateWindow(WindowPtr pWin) } else { /* root windows have their own colormaps at creation time */ visual = xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); - pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin), + RT_COLORMAP, serverClient, DixUseAccess); mask |= CWColormap; attributes.colormap = xnestColormap(pCmap); } @@ -338,7 +340,8 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) if (mask & CWColormap) { ColormapPtr pCmap; - pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin), RT_COLORMAP, + serverClient, DixUseAccess); attributes.colormap = xnestColormap(pCmap); diff --git a/xorg-server/hw/xquartz/GL/Makefile.am b/xorg-server/hw/xquartz/GL/Makefile.am index 8f4478fec..9b61305d6 100644 --- a/xorg-server/hw/xquartz/GL/Makefile.am +++ b/xorg-server/hw/xquartz/GL/Makefile.am @@ -3,8 +3,6 @@ AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/glx \ - -I$(top_srcdir)/GL/include \ - -I$(top_srcdir)/GL/mesa/glapi \ -I$(top_srcdir)/hw/xquartz \ -I$(top_srcdir)/hw/xquartz/xpr \ -I$(top_srcdir)/miext/damage diff --git a/xorg-server/hw/xquartz/GL/Makefile.in b/xorg-server/hw/xquartz/GL/Makefile.in index a401c73c2..0f18cf3ef 100644 --- a/xorg-server/hw/xquartz/GL/Makefile.in +++ b/xorg-server/hw/xquartz/GL/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xquartz/GL DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -76,6 +80,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -96,9 +101,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -127,7 +135,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -136,9 +146,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -177,12 +191,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -202,7 +217,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -212,6 +226,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -225,11 +240,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -265,6 +279,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -289,7 +304,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -312,6 +326,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -343,7 +358,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -354,8 +371,6 @@ AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/glx \ - -I$(top_srcdir)/GL/include \ - -I$(top_srcdir)/GL/mesa/glapi \ -I$(top_srcdir)/hw/xquartz \ -I$(top_srcdir)/hw/xquartz/xpr \ -I$(top_srcdir)/miext/damage diff --git a/xorg-server/hw/xquartz/GL/capabilities.c b/xorg-server/hw/xquartz/GL/capabilities.c index bc3966f4b..99b9eae61 100644 --- a/xorg-server/hw/xquartz/GL/capabilities.c +++ b/xorg-server/hw/xquartz/GL/capabilities.c @@ -425,7 +425,7 @@ static CGLError handleRendererDescriptions(CGLRendererInfoObj info, GLint r, handleAccumulationModes(c, flags); - return 0; + return kCGLNoError; } static void initCapabilities(struct glCapabilities *cap) { @@ -491,56 +491,36 @@ void freeGlCapabilities(struct glCapabilities *cap) { cap->configurations = NULL; } -enum { MAX_DISPLAYS = 3 }; - /*Return true if an error occured. */ bool getGlCapabilities(struct glCapabilities *cap) { - CGDirectDisplayID dspys[MAX_DISPLAYS]; - CGDisplayErr err; - CGOpenGLDisplayMask displayMask; - CGDisplayCount i, displayCount = 0; + CGLRendererInfoObj info; + CGLError err; + GLint numRenderers = 0, r; initCapabilities(cap); - - err = CGGetActiveDisplayList(MAX_DISPLAYS, dspys, &displayCount); - if(err) { - fprintf(stderr, "CGGetActiveDisplayList error: %s\n", CGLErrorString(err)); - return true; - } - - for(i = 0; i < displayCount; ++i) { - displayMask = CGDisplayIDToOpenGLDisplayMask(dspys[i]); - - CGLRendererInfoObj info; - GLint numRenderers = 0, r, renderCount = 0; - - err = CGLQueryRendererInfo(displayMask, &info, &numRenderers); - if(err) { + err = CGLQueryRendererInfo((GLuint)-1, &info, &numRenderers); + if(err) { fprintf(stderr, "CGLQueryRendererInfo error: %s\n", CGLErrorString(err)); - fprintf(stderr, "trying to continue...\n"); - continue; + return err; } - - CGLDescribeRenderer(info, 0, kCGLRPRendererCount, &renderCount); - for(r = 0; r < renderCount; ++r) { - CGLError derr; + for(r = 0; r < numRenderers; r++) { struct glCapabilitiesConfig tmpconf, *conf; initConfig(&tmpconf); - derr = handleRendererDescriptions(info, r, &tmpconf); - if(derr) { - fprintf(stderr, "error: %s\n", CGLErrorString(derr)); - fprintf(stderr, "trying to continue...\n"); - continue; + err = handleRendererDescriptions(info, r, &tmpconf); + if(err) { + fprintf(stderr, "handleRendererDescriptions returned error: %s\n", CGLErrorString(err)); + fprintf(stderr, "trying to continue...\n"); + continue; } conf = malloc(sizeof(*conf)); if(NULL == conf) { - perror("malloc"); - abort(); + perror("malloc"); + abort(); } /* Copy the struct. */ @@ -551,9 +531,8 @@ bool getGlCapabilities(struct glCapabilities *cap) { cap->configurations = conf; } - CGLDestroyRendererInfo(info); - } - + CGLDestroyRendererInfo(info); + /* No error occured. We are done. */ - return false; + return kCGLNoError; } diff --git a/xorg-server/hw/xquartz/GL/indirect.c b/xorg-server/hw/xquartz/GL/indirect.c index 0a60672b6..176282532 100644 --- a/xorg-server/hw/xquartz/GL/indirect.c +++ b/xorg-server/hw/xquartz/GL/indirect.c @@ -39,33 +39,92 @@ #include -/* - * These define seem questionable to me, but I'm not sure why they were here - * in the first place. - */ -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 -#define GL_EXT_histogram 1 -#define GL_EXT_polygon_offset 1 -#define GL_SGIS_pixel_texture 1 -#define GL_SGIX_pixel_texture 1 -#define GL_EXT_multisample 1 -#define GL_SGIS_multisample 1 -#define GL_EXT_vertex_array 1 -#define GL_ARB_point_parameters 1 -#define GL_NV_vertex_array_range 1 -#define GL_MESA_resize_buffers 1 -#define GL_ARB_window_pos 1 -#define GL_EXT_cull_vertex 1 -#define GL_NV_vertex_program 1 -#define GL_APPLE_fence 1 -#define GL_IBM_multimode_draw_arrays 1 -#define GL_EXT_fragment_shader 1 -#endif +#define GL_GLEXT_WUNDEF_SUPPORT #include #include -#include +/* These next few GL_EXT pre-processing blocks are to explicitly define + * these symbols to 0 if they are not set by OpenGL.framework. This + * prevents the X11 glext.h from setting them to 1. + */ + +#ifndef GL_EXT_fragment_shader +#define GL_EXT_fragment_shader 0 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate 0 +#endif + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate 0 +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test 0 +#endif + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array 0 +#endif + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex 0 +#endif + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord 0 +#endif + +#ifndef GL_EXT_framebuffer_blit +#define GL_EXT_framebuffer_blit 0 +#endif + +#ifndef GL_EXT_framebuffer_object +#define GL_EXT_framebuffer_object 0 +#endif + +#ifndef GL_EXT_gpu_program_parameters +#define GL_EXT_gpu_program_parameters 0 +#endif + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 0 +#endif + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 0 +#endif + +#ifndef GL_EXT_polygon_offset +#define GL_EXT_polygon_offset 0 +#endif + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color 0 +#endif + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side 0 +#endif + +#ifndef GL_EXT_timer_query +#define GL_EXT_timer_query 0 +#endif + +#ifndef GL_EXT_vertex_array +#define GL_EXT_vertex_array 0 +#endif + +/* Tiger PPC doesn't have the associated symbols, but glext.h says it does. Liars! + * http://trac.macports.org/ticket/20638 + */ +#if defined(__ppc__) && MAC_OS_X_VERSION_MIN_REQUIRED == 1040 +#undef GL_EXT_gpu_program_parameters +#define GL_EXT_gpu_program_parameters 0 +#endif + #include #include #include @@ -83,7 +142,8 @@ #include "x-hash.h" #include "x-list.h" -#include "capabilities.h" +//#include "capabilities.h" +#include "visualConfigs.h" typedef unsigned long long GLuint64EXT; typedef long long GLint64EXT; @@ -123,13 +183,6 @@ __GLXprovider __glXDRISWRastProvider = { NULL }; -__GLXprovider * -GlxGetDRISWRastProvider (void) -{ - GLAQUA_DEBUG_MSG("GlxGetDRISWRastProvider\n"); - return &__glXDRISWRastProvider; -} - typedef struct __GLXAquaScreen __GLXAquaScreen; typedef struct __GLXAquaContext __GLXAquaContext; typedef struct __GLXAquaDrawable __GLXAquaDrawable; @@ -167,7 +220,7 @@ __glXAquaScreenCreateContext(__GLXscreen *screen, GLAQUA_DEBUG_MSG("glXAquaScreenCreateContext\n"); - context = xalloc (sizeof (__GLXAquaContext)); + context = xcalloc(1, sizeof (__GLXAquaContext)); if (context == NULL) return NULL; @@ -418,7 +471,6 @@ static int __glXAquaContextForceCurrent(__GLXcontext *baseContext) } /* Drawing surface notification callbacks */ - static GLboolean __glXAquaDrawableSwapBuffers(__GLXdrawable *base) { CGLError err; __GLXAquaDrawable *drawable; @@ -515,190 +567,6 @@ static void __glXAquaScreenDestroy(__GLXscreen *screen) { xfree(screen); } -static __GLXconfig *CreateConfigs(int *numConfigsPtr, int screenNumber) { - __GLXconfig *c, *result; - struct glCapabilities cap; - struct glCapabilitiesConfig *conf = NULL; - int numConfigs = 0; - int i; - - if(getGlCapabilities(&cap)) - FatalError("error from getGlCapabilities() in %s\n", __func__); - - assert(NULL != cap.configurations); - - for(conf = cap.configurations; conf; conf = conf->next) { - if(conf->total_color_buffers <= 0) - continue; - - numConfigs += (conf->stereo ? 2 : 1) - * (conf->aux_buffers ? 2 : 1) - * conf->buffers - * ((conf->total_stencil_bit_depths > 0) ? - conf->total_stencil_bit_depths : 1) - * conf->total_color_buffers - * ((conf->total_accum_buffers > 0) ? conf->total_accum_buffers : 1) - * conf->total_depth_buffer_depths - * (conf->multisample_buffers + 1); - } - - *numConfigsPtr = numConfigs; - - c = xalloc(sizeof(*c) * numConfigs); - - if(NULL == c) - return NULL; - - - - result = c; - - memset(result, 0, sizeof(*c) * numConfigs); - - i = 0; - - for(conf = cap.configurations; conf; conf = conf->next) { - int stereo, aux, buffers, stencil, color, accum, depth, msample; - - for(stereo = 0; stereo < (conf->stereo ? 2 : 1); ++stereo) { - for(aux = 0; aux < (conf->aux_buffers ? 2 : 1); ++aux) { - for(buffers = 0; buffers < conf->buffers; ++buffers) { - for(stencil = 0; stencil < ((conf->total_stencil_bit_depths > 0) ? - conf->total_stencil_bit_depths : 1); ++stencil) { - for(color = 0; color < conf->total_color_buffers; ++color) { - for(accum = 0; accum < ((conf->total_accum_buffers > 0) ? - conf->total_accum_buffers : 1); ++accum) { - for(depth = 0; depth < conf->total_depth_buffer_depths; ++depth) { - for(msample = 0; msample < (conf->multisample_buffers + 1); ++msample) { - if((i + 1) < numConfigs) { - c->next = c + 1; - } else { - c->next = NULL; - } - - c->doubleBufferMode = buffers ? GL_TRUE : GL_FALSE; - c->stereoMode = stereo ? GL_TRUE : GL_FALSE; - - c->redBits = conf->color_buffers[color].r; - c->greenBits = conf->color_buffers[color].g; - c->blueBits = conf->color_buffers[color].b; - c->alphaBits = 0; - - if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->color_buffers[color].a) { - c->alphaBits = conf->color_buffers[color].a; - } - - c->redMask = -1; - c->greenMask = -1; - c->blueMask = -1; - c->alphaMask = -1; - - c->rgbBits = c->redBits + c->greenBits + c->blueBits + c->alphaBits; - c->indexBits = 0; - - c->accumRedBits = 0; - c->accumGreenBits = 0; - c->accumBlueBits = 0; - c->accumAlphaBits = 0; - - if(conf->total_accum_buffers > 0) { - c->accumRedBits = conf->accum_buffers[accum].r; - c->accumGreenBits = conf->accum_buffers[accum].g; - c->accumBlueBits = conf->accum_buffers[accum].b; - if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) { - c->accumAlphaBits = conf->accum_buffers[accum].a; - } - } - - c->depthBits = conf->depth_buffers[depth]; - - c->stencilBits = 0; - - if(conf->total_stencil_bit_depths > 0) { - c->stencilBits = conf->stencil_bit_depths[stencil]; - } - - - c->numAuxBuffers = aux ? conf->aux_buffers : 0; - - c->level = 0; - /*TODO what should this be? */ - c->pixmapMode = 0; - - c->visualID = -1; - c->visualType = GLX_TRUE_COLOR; - - if(conf->accelerated) { - c->visualRating = GLX_NONE; - } else { - c->visualRating = GLX_SLOW_VISUAL_EXT; - } - - c->transparentPixel = GLX_NONE; - c->transparentRed = GLX_NONE; - c->transparentGreen = GLX_NONE; - c->transparentAlpha = GLX_NONE; - c->transparentIndex = GLX_NONE; - - c->sampleBuffers = 0; - c->samples = 0; - - if(msample > 0) { - c->sampleBuffers = conf->multisample_buffers; - c->samples = conf->multisample_samples; - } - - /* SGIX_fbconfig / GLX 1.3 */ - c->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; - c->renderType = GLX_RGBA_BIT; - c->xRenderable = GL_TRUE; - c->fbconfigID = -1; - - /*TODO add querying code to capabilities.c for the Pbuffer maximums. - *I'm not sure we can even use CGL for Pbuffers yet... - */ - /* SGIX_pbuffer / GLX 1.3 */ - c->maxPbufferWidth = 0; - c->maxPbufferHeight = 0; - c->maxPbufferPixels = 0; - c->optimalPbufferWidth = 0; - c->optimalPbufferHeight = 0; - c->visualSelectGroup = 0; - - c->swapMethod = GLX_SWAP_UNDEFINED_OML; - - c->screen = screenNumber; - - /* EXT_texture_from_pixmap */ - c->bindToTextureRgb = 0; - c->bindToTextureRgba = 0; - c->bindToMipmapTexture = 0; - c->bindToTextureTargets = 0; - c->yInverted = 0; - - if(c->next) - c = c->next; - - ++i; - } - } - } - } - } - } - } - } - } - - if(i != numConfigs) - FatalError("The number of __GLXconfig generated does not match the initial calculation!\n"); - - - freeGlCapabilities(&cap); - - return result; -} - /* This is called by __glXInitScreens(). */ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) { __GLXAquaScreen *screen; @@ -708,7 +576,8 @@ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) { if (pScreen == NULL) return NULL; - screen = xalloc(sizeof *screen); + screen = xcalloc(1, sizeof *screen); + if(NULL == screen) return NULL; @@ -720,14 +589,10 @@ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) { screen->base.swapBarrierFuncs = NULL; screen->base.pScreen = pScreen; - screen->base.fbconfigs = CreateConfigs(&screen->base.numFBConfigs, - pScreen->myNum); - + screen->base.fbconfigs = __glXAquaCreateVisualConfigs(&screen->base.numFBConfigs, pScreen->myNum); + __glXScreenInit(&screen->base, pScreen); - /* __glXScreenInit initializes these, so the order here is important, if we need these... */ - // screen->base.GLextensions = ""; - // screen->base.GLXvendor = "Apple"; screen->base.GLXversion = xstrdup("1.4"); screen->base.GLXextensions = xstrdup("GLX_SGIX_fbconfig " "GLX_SGIS_multisample " @@ -740,11 +605,12 @@ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) { return &screen->base; } +#if 0 // unused static void __glXAquaDrawableCopySubBuffer (__GLXdrawable *drawable, int x, int y, int w, int h) { /*TODO finish me*/ } - +#endif static void __glXAquaDrawableDestroy(__GLXdrawable *base) { /* gstaplin: base is the head of the structure, so it's at the same @@ -815,735 +681,957 @@ GLuint __glFloorLog2(GLuint val) } void warn_func(void * p1, char *format, ...) { - va_list v; - va_start(v, format); - vfprintf(stderr, format, v); - va_end(v); + va_list v; + va_start(v, format); + vfprintf(stderr, format, v); + va_end(v); } static void setup_dispatch_table(void) { - struct _glapi_table *disp=_glapi_get_dispatch(); - _glapi_set_warning_func((_glapi_warning_func)warn_func); - _glapi_noop_enable_warnings(TRUE); - - SET_Accum(disp, glAccum); - SET_ActiveStencilFaceEXT(disp, glActiveStencilFaceEXT); - SET_ActiveTextureARB(disp, glActiveTextureARB); -//SET_AlphaFragmentOp1ATI(disp, glAlphaFragmentOp1EXT); // <-- EXT -> ATI -//SET_AlphaFragmentOp2ATI(disp, glAlphaFragmentOp2EXT); -//SET_AlphaFragmentOp3ATI(disp, glAlphaFragmentOp3EXT); - SET_AlphaFunc(disp, glAlphaFunc); -//SET_AreProgramsResidentNV(disp, glAreProgramsResidentNV); - SET_AreTexturesResident(disp, glAreTexturesResident); - SET_ArrayElement(disp, glArrayElement); - SET_AttachObjectARB(disp, glAttachObjectARB); - SET_Begin(disp, glBegin); -//SET_BeginFragmentShaderATI(disp, glBeginFragmentShaderEXT); // <-- EXT -> ATI - SET_BeginQueryARB(disp, glBeginQueryARB); - SET_BindAttribLocationARB(disp, glBindAttribLocationARB); - SET_BindBufferARB(disp, glBindBufferARB); -//SET_BindFragmentShaderATI(disp, glBindFragmentShaderEXT); // <-- EXT -> ATI - SET_BindFramebufferEXT(disp, glBindFramebufferEXT); -//SET_BindProgramNV(disp, glBindProgramNV); - SET_BindRenderbufferEXT(disp, glBindRenderbufferEXT); - SET_BindTexture(disp, glBindTexture); - SET_Bitmap(disp, glBitmap); - SET_BlendColor(disp, glBlendColor); - SET_BlendEquation(disp, glBlendEquation); - SET_BlendEquationSeparateEXT(disp, glBlendEquationSeparateEXT); - SET_BlendFunc(disp, glBlendFunc); - SET_BlendFuncSeparateEXT(disp, glBlendFuncSeparateEXT); -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 - SET_BlitFramebufferEXT(disp, glBlitFramebufferEXT); -#endif - SET_BufferDataARB(disp, glBufferDataARB); - SET_BufferSubDataARB(disp, glBufferSubDataARB); - SET_CallList(disp, glCallList); - SET_CallLists(disp, glCallLists); - SET_CheckFramebufferStatusEXT(disp, glCheckFramebufferStatusEXT); - SET_Clear(disp, glClear); - SET_ClearAccum(disp, glClearAccum); - SET_ClearColor(disp, glClearColor); - SET_ClearDepth(disp, glClearDepth); - SET_ClearIndex(disp, glClearIndex); - SET_ClearStencil(disp, glClearStencil); - SET_ClientActiveTextureARB(disp, glClientActiveTextureARB); - SET_ClipPlane(disp, glClipPlane); - SET_Color3b(disp, glColor3b); - SET_Color3bv(disp, glColor3bv); - SET_Color3d(disp, glColor3d); - SET_Color3dv(disp, glColor3dv); - SET_Color3f(disp, glColor3f); - SET_Color3fv(disp, glColor3fv); - SET_Color3i(disp, glColor3i); - SET_Color3iv(disp, glColor3iv); - SET_Color3s(disp, glColor3s); - SET_Color3sv(disp, glColor3sv); - SET_Color3ub(disp, glColor3ub); - SET_Color3ubv(disp, glColor3ubv); - SET_Color3ui(disp, glColor3ui); - SET_Color3uiv(disp, glColor3uiv); - SET_Color3us(disp, glColor3us); - SET_Color3usv(disp, glColor3usv); - SET_Color4b(disp, glColor4b); - SET_Color4bv(disp, glColor4bv); - SET_Color4d(disp, glColor4d); - SET_Color4dv(disp, glColor4dv); - SET_Color4f(disp, glColor4f); - SET_Color4fv(disp, glColor4fv); - SET_Color4i(disp, glColor4i); - SET_Color4iv(disp, glColor4iv); - SET_Color4s(disp, glColor4s); - SET_Color4sv(disp, glColor4sv); - SET_Color4ub(disp, glColor4ub); - SET_Color4ubv(disp, glColor4ubv); - SET_Color4ui(disp, glColor4ui); - SET_Color4uiv(disp, glColor4uiv); - SET_Color4us(disp, glColor4us); - SET_Color4usv(disp, glColor4usv); -//SET_ColorFragmentOp1ATI(disp, glColorFragmentOp1EXT); // <-- EXT -> ATI -//SET_ColorFragmentOp2ATI(disp, glColorFragmentOp2EXT); -//SET_ColorFragmentOp3ATI(disp, glColorFragmentOp3EXT); - SET_ColorMask(disp, glColorMask); - SET_ColorMaterial(disp, glColorMaterial); - SET_ColorPointer(disp, glColorPointer); -//SET_ColorPointerEXT(disp, glColorPointerEXT); - SET_ColorSubTable(disp, glColorSubTable); - SET_ColorTable(disp, glColorTable); - SET_ColorTableParameterfv(disp, glColorTableParameterfv); - SET_ColorTableParameteriv(disp, glColorTableParameteriv); - - -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 - SET_CombinerInputNV(disp, glCombinerInputNV); - SET_CombinerOutputNV(disp, glCombinerOutputNV); - SET_CombinerParameterfNV(disp, glCombinerParameterfNV); - SET_CombinerParameterfvNV(disp, glCombinerParameterfvNV); - SET_CombinerParameteriNV(disp, glCombinerParameteriNV); - SET_CombinerParameterivNV(disp, glCombinerParameterivNV); -#endif - SET_CompileShaderARB(disp, glCompileShaderARB); - SET_CompressedTexImage1DARB(disp, glCompressedTexImage1DARB); - SET_CompressedTexImage2DARB(disp, glCompressedTexImage2DARB); - SET_CompressedTexImage3DARB(disp, glCompressedTexImage3DARB); - SET_CompressedTexSubImage1DARB(disp, glCompressedTexSubImage1DARB); - SET_CompressedTexSubImage2DARB(disp, glCompressedTexSubImage2DARB); - SET_CompressedTexSubImage3DARB(disp, glCompressedTexSubImage3DARB); - SET_ConvolutionFilter1D(disp, glConvolutionFilter1D); - SET_ConvolutionFilter2D(disp, glConvolutionFilter2D); - SET_ConvolutionParameterf(disp, glConvolutionParameterf); - SET_ConvolutionParameterfv(disp, glConvolutionParameterfv); - SET_ConvolutionParameteri(disp, glConvolutionParameteri); - SET_ConvolutionParameteriv(disp, glConvolutionParameteriv); - SET_CopyColorSubTable(disp, glCopyColorSubTable); - SET_CopyColorTable(disp, glCopyColorTable); - SET_CopyConvolutionFilter1D(disp, glCopyConvolutionFilter1D); - SET_CopyConvolutionFilter2D(disp, glCopyConvolutionFilter2D); - SET_CopyPixels(disp, glCopyPixels); - SET_CopyTexImage1D(disp, glCopyTexImage1D); - SET_CopyTexImage2D(disp, glCopyTexImage2D); - SET_CopyTexSubImage1D(disp, glCopyTexSubImage1D); - SET_CopyTexSubImage2D(disp, glCopyTexSubImage2D); - SET_CopyTexSubImage3D(disp, glCopyTexSubImage3D); - SET_CreateProgramObjectARB(disp, glCreateProgramObjectARB); - SET_CreateShaderObjectARB(disp, glCreateShaderObjectARB); - SET_CullFace(disp, glCullFace); -//SET_CullParameterdvEXT(disp, glCullParameterdvEXT); -//SET_CullParameterfvEXT(disp, glCullParameterfvEXT); - SET_DeleteBuffersARB(disp, glDeleteBuffersARB); - SET_DeleteFencesNV(disp, glDeleteFencesAPPLE); -//SET_DeleteFragmentShaderATI(disp, glDeleteFragmentShaderEXT); // <-- EXT -> ATI - SET_DeleteFramebuffersEXT(disp, glDeleteFramebuffersEXT); - SET_DeleteLists(disp, glDeleteLists); - SET_DeleteObjectARB(disp, glDeleteObjectARB); -//SET_DeleteProgramsNV(disp, glDeleteProgramsNV); - SET_DeleteQueriesARB(disp, glDeleteQueriesARB); - SET_DeleteRenderbuffersEXT(disp, glDeleteRenderbuffersEXT); - SET_DeleteTextures(disp, glDeleteTextures); - SET_DepthBoundsEXT(disp, glDepthBoundsEXT); - SET_DepthFunc(disp, glDepthFunc); - SET_DepthMask(disp, glDepthMask); - SET_DepthRange(disp, glDepthRange); - SET_DetachObjectARB(disp, glDetachObjectARB); - SET_Disable(disp, glDisable); - SET_DisableClientState(disp, glDisableClientState); - SET_DisableVertexAttribArrayARB(disp, glDisableVertexAttribArrayARB); - SET_DrawArrays(disp, glDrawArrays); - SET_DrawBuffer(disp, glDrawBuffer); - SET_DrawBuffersARB(disp, glDrawBuffersARB); - SET_DrawElements(disp, glDrawElements); - SET_DrawPixels(disp, glDrawPixels); - SET_DrawRangeElements(disp, glDrawRangeElements); - SET_EdgeFlag(disp, glEdgeFlag); - SET_EdgeFlagPointer(disp, glEdgeFlagPointer); -//SET_EdgeFlagPointerEXT(disp, glEdgeFlagPointerEXT); - SET_EdgeFlagv(disp, glEdgeFlagv); - SET_Enable(disp, glEnable); - SET_EnableClientState(disp, glEnableClientState); - SET_EnableVertexAttribArrayARB(disp, glEnableVertexAttribArrayARB); - SET_End(disp, glEnd); -//SET_EndFragmentShaderATI(disp, glEndFragmentShaderEXT); // <-- EXT -> ATI - SET_EndList(disp, glEndList); - SET_EndQueryARB(disp, glEndQueryARB); - SET_EvalCoord1d(disp, glEvalCoord1d); - SET_EvalCoord1dv(disp, glEvalCoord1dv); - SET_EvalCoord1f(disp, glEvalCoord1f); - SET_EvalCoord1fv(disp, glEvalCoord1fv); - SET_EvalCoord2d(disp, glEvalCoord2d); - SET_EvalCoord2dv(disp, glEvalCoord2dv); - SET_EvalCoord2f(disp, glEvalCoord2f); - SET_EvalCoord2fv(disp, glEvalCoord2fv); - SET_EvalMesh1(disp, glEvalMesh1); - SET_EvalMesh2(disp, glEvalMesh2); - SET_EvalPoint1(disp, glEvalPoint1); - SET_EvalPoint2(disp, glEvalPoint2); -//SET_ExecuteProgramNV(disp, glExecuteProgramNV); - SET_FeedbackBuffer(disp, glFeedbackBuffer); - -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 - SET_FinalCombinerInputNV(disp, glFinalCombinerInputNV); -#endif - SET_Finish(disp, glFinish); - SET_FinishFenceNV(disp, glFinishFenceAPPLE); // <-- APPLE -> NV - SET_Flush(disp, glFlush); -//SET_FlushVertexArrayRangeNV(disp, glFlushVertexArrayRangeNV); - SET_FogCoordPointerEXT(disp, glFogCoordPointerEXT); - SET_FogCoorddEXT(disp, glFogCoorddEXT); - SET_FogCoorddvEXT(disp, glFogCoorddvEXT); - SET_FogCoordfEXT(disp, glFogCoordfEXT); - SET_FogCoordfvEXT(disp, glFogCoordfvEXT); - SET_Fogf(disp, glFogf); - SET_Fogfv(disp, glFogfv); - SET_Fogi(disp, glFogi); - SET_Fogiv(disp, glFogiv); - SET_FramebufferRenderbufferEXT(disp, glFramebufferRenderbufferEXT); - SET_FramebufferTexture1DEXT(disp, glFramebufferTexture1DEXT); - SET_FramebufferTexture2DEXT(disp, glFramebufferTexture2DEXT); - SET_FramebufferTexture3DEXT(disp, glFramebufferTexture3DEXT); - SET_FrontFace(disp, glFrontFace); - SET_Frustum(disp, glFrustum); - SET_GenBuffersARB(disp, glGenBuffersARB); - SET_GenFencesNV(disp, glGenFencesAPPLE); // <-- APPLE -> NV -//SET_GenFragmentShadersATI(disp, glGenFragmentShadersEXT); // <-- EXT -> ATI - SET_GenFramebuffersEXT(disp, glGenFramebuffersEXT); - SET_GenLists(disp, glGenLists); -//SET_GenProgramsNV(disp, glGenProgramsNV); - SET_GenQueriesARB(disp, glGenQueriesARB); - SET_GenRenderbuffersEXT(disp, glGenRenderbuffersEXT); - SET_GenTextures(disp, glGenTextures); - SET_GenerateMipmapEXT(disp, glGenerateMipmapEXT); - SET_GetActiveAttribARB(disp, glGetActiveAttribARB); - SET_GetActiveUniformARB(disp, glGetActiveUniformARB); - SET_GetAttachedObjectsARB(disp, glGetAttachedObjectsARB); - SET_GetAttribLocationARB(disp, glGetAttribLocationARB); - SET_GetBooleanv(disp, glGetBooleanv); - SET_GetBufferParameterivARB(disp, glGetBufferParameterivARB); - SET_GetBufferPointervARB(disp, glGetBufferPointervARB); - SET_GetBufferSubDataARB(disp, glGetBufferSubDataARB); - SET_GetClipPlane(disp, glGetClipPlane); - SET_GetColorTable(disp, glGetColorTable); - SET_GetColorTableParameterfv(disp, glGetColorTableParameterfv); - SET_GetColorTableParameteriv(disp, glGetColorTableParameteriv); -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 - SET_GetCombinerInputParameterfvNV(disp, glGetCombinerInputParameterfvNV); - SET_GetCombinerInputParameterivNV(disp, glGetCombinerInputParameterivNV); - SET_GetCombinerOutputParameterfvNV(disp, glGetCombinerOutputParameterfvNV); - SET_GetCombinerOutputParameterivNV(disp, glGetCombinerOutputParameterivNV); -#endif - SET_GetCompressedTexImageARB(disp, glGetCompressedTexImageARB); - SET_GetConvolutionFilter(disp, glGetConvolutionFilter); - SET_GetConvolutionParameterfv(disp, glGetConvolutionParameterfv); - SET_GetConvolutionParameteriv(disp, glGetConvolutionParameteriv); - SET_GetDoublev(disp, glGetDoublev); - SET_GetError(disp, glGetError); -//SET_GetFenceivNV(disp, glGetFenceivNV); -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 - SET_GetFinalCombinerInputParameterfvNV(disp, glGetFinalCombinerInputParameterfvNV); - SET_GetFinalCombinerInputParameterivNV(disp, glGetFinalCombinerInputParameterivNV); -#endif - SET_GetFloatv(disp, glGetFloatv); - SET_GetFramebufferAttachmentParameterivEXT(disp, glGetFramebufferAttachmentParameterivEXT); - SET_GetHandleARB(disp, glGetHandleARB); - SET_GetHistogram(disp, glGetHistogram); - SET_GetHistogramParameterfv(disp, glGetHistogramParameterfv); - SET_GetHistogramParameteriv(disp, glGetHistogramParameteriv); - SET_GetInfoLogARB(disp, glGetInfoLogARB); - SET_GetIntegerv(disp, glGetIntegerv); - SET_GetLightfv(disp, glGetLightfv); - SET_GetLightiv(disp, glGetLightiv); - SET_GetMapdv(disp, glGetMapdv); - SET_GetMapfv(disp, glGetMapfv); - SET_GetMapiv(disp, glGetMapiv); - SET_GetMaterialfv(disp, glGetMaterialfv); - SET_GetMaterialiv(disp, glGetMaterialiv); - SET_GetMinmax(disp, glGetMinmax); - SET_GetMinmaxParameterfv(disp, glGetMinmaxParameterfv); - SET_GetMinmaxParameteriv(disp, glGetMinmaxParameteriv); - SET_GetObjectParameterfvARB(disp, glGetObjectParameterfvARB); - SET_GetObjectParameterivARB(disp, glGetObjectParameterivARB); - SET_GetPixelMapfv(disp, glGetPixelMapfv); - SET_GetPixelMapuiv(disp, glGetPixelMapuiv); - SET_GetPixelMapusv(disp, glGetPixelMapusv); -//SET_GetPixelTexGenParameterfvSGIS(disp, glGetPixelTexGenParameterfvSGIS); -//SET_GetPixelTexGenParameterivSGIS(disp, glGetPixelTexGenParameterivSGIS); - SET_GetPointerv(disp, glGetPointerv); - SET_GetPolygonStipple(disp, glGetPolygonStipple); - SET_GetProgramEnvParameterdvARB(disp, glGetProgramEnvParameterdvARB); - SET_GetProgramEnvParameterfvARB(disp, glGetProgramEnvParameterfvARB); - SET_GetProgramLocalParameterdvARB(disp, glGetProgramLocalParameterdvARB); - SET_GetProgramLocalParameterfvARB(disp, glGetProgramLocalParameterfvARB); -//SET_GetProgramNamedParameterdvNV(disp, glGetProgramNamedParameterdvNV); -//SET_GetProgramNamedParameterfvNV(disp, glGetProgramNamedParameterfvNV); -//SET_GetProgramParameterdvNV(disp, glGetProgramParameterdvNV); -//SET_GetProgramParameterfvNV(disp, glGetProgramParameterfvNV); - SET_GetProgramStringARB(disp, glGetProgramStringARB); -//SET_GetProgramStringNV(disp, glGetProgramStringNV); - SET_GetProgramivARB(disp, glGetProgramivARB); -//SET_GetProgramivNV(disp, glGetProgramivNV); -//SET_GetQueryObjecti64vEXT(disp, glGetQueryObjecti64vEXT); - SET_GetQueryObjectivARB(disp, glGetQueryObjectivARB); -//SET_GetQueryObjectui64vEXT(disp, glGetQueryObjectui64vEXT); - SET_GetQueryObjectuivARB(disp, glGetQueryObjectuivARB); - SET_GetQueryivARB(disp, glGetQueryivARB); - SET_GetRenderbufferParameterivEXT(disp, glGetRenderbufferParameterivEXT); - SET_GetSeparableFilter(disp, glGetSeparableFilter); - SET_GetShaderSourceARB(disp, glGetShaderSourceARB); - SET_GetString(disp, glGetString); - SET_GetTexEnvfv(disp, glGetTexEnvfv); - SET_GetTexEnviv(disp, glGetTexEnviv); - SET_GetTexGendv(disp, glGetTexGendv); - SET_GetTexGenfv(disp, glGetTexGenfv); - SET_GetTexGeniv(disp, glGetTexGeniv); - SET_GetTexImage(disp, glGetTexImage); - SET_GetTexLevelParameterfv(disp, glGetTexLevelParameterfv); - SET_GetTexLevelParameteriv(disp, glGetTexLevelParameteriv); - SET_GetTexParameterfv(disp, glGetTexParameterfv); - SET_GetTexParameteriv(disp, glGetTexParameteriv); -//SET_GetTrackMatrixivNV(disp, glGetTrackMatrixivNV); - SET_GetUniformLocationARB(disp, glGetUniformLocationARB); - SET_GetUniformfvARB(disp, glGetUniformfvARB); - SET_GetUniformivARB(disp, glGetUniformivARB); -//SET_GetVertexAttribPointervNV(disp, glGetVertexAttribPointervNV); - SET_GetVertexAttribdvARB(disp, glGetVertexAttribdvARB); -//SET_GetVertexAttribdvNV(disp, glGetVertexAttribdvNV); - SET_GetVertexAttribfvARB(disp, glGetVertexAttribfvARB); -//SET_GetVertexAttribfvNV(disp, glGetVertexAttribfvNV); - SET_GetVertexAttribivARB(disp, glGetVertexAttribivARB); -//SET_GetVertexAttribivNV(disp, glGetVertexAttribivNV); - SET_Hint(disp, glHint); - SET_Histogram(disp, glHistogram); - SET_IndexMask(disp, glIndexMask); - SET_IndexPointer(disp, glIndexPointer); -//SET_IndexPointerEXT(disp, glIndexPointerEXT); - SET_Indexd(disp, glIndexd); - SET_Indexdv(disp, glIndexdv); - SET_Indexf(disp, glIndexf); - SET_Indexfv(disp, glIndexfv); - SET_Indexi(disp, glIndexi); - SET_Indexiv(disp, glIndexiv); - SET_Indexs(disp, glIndexs); - SET_Indexsv(disp, glIndexsv); - SET_Indexub(disp, glIndexub); - SET_Indexubv(disp, glIndexubv); - SET_InitNames(disp, glInitNames); - SET_InterleavedArrays(disp, glInterleavedArrays); - SET_IsBufferARB(disp, glIsBufferARB); - SET_IsEnabled(disp, glIsEnabled); - SET_IsFenceNV(disp, glIsFenceAPPLE); // <-- APPLE -> NV - SET_IsFramebufferEXT(disp, glIsFramebufferEXT); - SET_IsList(disp, glIsList); -//SET_IsProgramNV(disp, glIsProgramNV); - SET_IsQueryARB(disp, glIsQueryARB); - SET_IsRenderbufferEXT(disp, glIsRenderbufferEXT); - SET_IsTexture(disp, glIsTexture); - SET_LightModelf(disp, glLightModelf); - SET_LightModelfv(disp, glLightModelfv); - SET_LightModeli(disp, glLightModeli); - SET_LightModeliv(disp, glLightModeliv); - SET_Lightf(disp, glLightf); - SET_Lightfv(disp, glLightfv); - SET_Lighti(disp, glLighti); - SET_Lightiv(disp, glLightiv); - SET_LineStipple(disp, glLineStipple); - SET_LineWidth(disp, glLineWidth); - SET_LinkProgramARB(disp, glLinkProgramARB); - SET_ListBase(disp, glListBase); - SET_LoadIdentity(disp, glLoadIdentity); - SET_LoadMatrixd(disp, glLoadMatrixd); - SET_LoadMatrixf(disp, glLoadMatrixf); - SET_LoadName(disp, glLoadName); -//SET_LoadProgramNV(disp, glLoadProgramNV); - SET_LoadTransposeMatrixdARB(disp, glLoadTransposeMatrixdARB); - SET_LoadTransposeMatrixfARB(disp, glLoadTransposeMatrixfARB); - SET_LockArraysEXT(disp, glLockArraysEXT); - SET_LogicOp(disp, glLogicOp); - SET_Map1d(disp, glMap1d); - SET_Map1f(disp, glMap1f); - SET_Map2d(disp, glMap2d); - SET_Map2f(disp, glMap2f); - SET_MapBufferARB(disp, glMapBufferARB); - SET_MapGrid1d(disp, glMapGrid1d); - SET_MapGrid1f(disp, glMapGrid1f); - SET_MapGrid2d(disp, glMapGrid2d); - SET_MapGrid2f(disp, glMapGrid2f); - SET_Materialf(disp, glMaterialf); - SET_Materialfv(disp, glMaterialfv); - SET_Materiali(disp, glMateriali); - SET_Materialiv(disp, glMaterialiv); - SET_MatrixMode(disp, glMatrixMode); - SET_Minmax(disp, glMinmax); - SET_MultMatrixd(disp, glMultMatrixd); - SET_MultMatrixf(disp, glMultMatrixf); - SET_MultTransposeMatrixdARB(disp, glMultTransposeMatrixdARB); - SET_MultTransposeMatrixfARB(disp, glMultTransposeMatrixfARB); - SET_MultiDrawArraysEXT(disp, glMultiDrawArraysEXT); - SET_MultiDrawElementsEXT(disp, glMultiDrawElementsEXT); -//SET_MultiModeDrawArraysIBM(disp, glMultiModeDrawArraysIBM); -//SET_MultiModeDrawElementsIBM(disp, glMultiModeDrawElementsIBM); - SET_MultiTexCoord1dARB(disp, glMultiTexCoord1dARB); - SET_MultiTexCoord1dvARB(disp, glMultiTexCoord1dvARB); - SET_MultiTexCoord1fARB(disp, glMultiTexCoord1fARB); - SET_MultiTexCoord1fvARB(disp, glMultiTexCoord1fvARB); - SET_MultiTexCoord1iARB(disp, glMultiTexCoord1iARB); - SET_MultiTexCoord1ivARB(disp, glMultiTexCoord1ivARB); - SET_MultiTexCoord1sARB(disp, glMultiTexCoord1sARB); - SET_MultiTexCoord1svARB(disp, glMultiTexCoord1svARB); - SET_MultiTexCoord2dARB(disp, glMultiTexCoord2dARB); - SET_MultiTexCoord2dvARB(disp, glMultiTexCoord2dvARB); - SET_MultiTexCoord2fARB(disp, glMultiTexCoord2fARB); - SET_MultiTexCoord2fvARB(disp, glMultiTexCoord2fvARB); - SET_MultiTexCoord2iARB(disp, glMultiTexCoord2iARB); - SET_MultiTexCoord2ivARB(disp, glMultiTexCoord2ivARB); - SET_MultiTexCoord2sARB(disp, glMultiTexCoord2sARB); - SET_MultiTexCoord2svARB(disp, glMultiTexCoord2svARB); - SET_MultiTexCoord3dARB(disp, glMultiTexCoord3dARB); - SET_MultiTexCoord3dvARB(disp, glMultiTexCoord3dvARB); - SET_MultiTexCoord3fARB(disp, glMultiTexCoord3fARB); - SET_MultiTexCoord3fvARB(disp, glMultiTexCoord3fvARB); - SET_MultiTexCoord3iARB(disp, glMultiTexCoord3iARB); - SET_MultiTexCoord3ivARB(disp, glMultiTexCoord3ivARB); - SET_MultiTexCoord3sARB(disp, glMultiTexCoord3sARB); - SET_MultiTexCoord3svARB(disp, glMultiTexCoord3svARB); - SET_MultiTexCoord4dARB(disp, glMultiTexCoord4dARB); - SET_MultiTexCoord4dvARB(disp, glMultiTexCoord4dvARB); - SET_MultiTexCoord4fARB(disp, glMultiTexCoord4fARB); - SET_MultiTexCoord4fvARB(disp, glMultiTexCoord4fvARB); - SET_MultiTexCoord4iARB(disp, glMultiTexCoord4iARB); - SET_MultiTexCoord4ivARB(disp, glMultiTexCoord4ivARB); - SET_MultiTexCoord4sARB(disp, glMultiTexCoord4sARB); - SET_MultiTexCoord4svARB(disp, glMultiTexCoord4svARB); - SET_NewList(disp, glNewList); - SET_Normal3b(disp, glNormal3b); - SET_Normal3bv(disp, glNormal3bv); - SET_Normal3d(disp, glNormal3d); - SET_Normal3dv(disp, glNormal3dv); - SET_Normal3f(disp, glNormal3f); - SET_Normal3fv(disp, glNormal3fv); - SET_Normal3i(disp, glNormal3i); - SET_Normal3iv(disp, glNormal3iv); - SET_Normal3s(disp, glNormal3s); - SET_Normal3sv(disp, glNormal3sv); - SET_NormalPointer(disp, glNormalPointer); -//SET_NormalPointerEXT(disp, glNormalPointerEXT); - SET_Ortho(disp, glOrtho); -//SET_PassTexCoordATI(disp, glPassTexCoordEXT); // <-- EXT -> ATI - SET_PassThrough(disp, glPassThrough); - SET_PixelMapfv(disp, glPixelMapfv); - SET_PixelMapuiv(disp, glPixelMapuiv); - SET_PixelMapusv(disp, glPixelMapusv); - SET_PixelStoref(disp, glPixelStoref); - SET_PixelStorei(disp, glPixelStorei); -//SET_PixelTexGenParameterfSGIS(disp, glPixelTexGenParameterfSGIS); -//SET_PixelTexGenParameterfvSGIS(disp, glPixelTexGenParameterfvSGIS); -//SET_PixelTexGenParameteriSGIS(disp, glPixelTexGenParameteriSGIS); -//SET_PixelTexGenParameterivSGIS(disp, glPixelTexGenParameterivSGIS); -// SET_PixelTexGenSGIX(disp, glPixelTexGenSGIX); - SET_PixelTransferf(disp, glPixelTransferf); - SET_PixelTransferi(disp, glPixelTransferi); - SET_PixelZoom(disp, glPixelZoom); - SET_PointParameterfEXT(disp, glPointParameterfARB); // <-- ARB -> EXT - SET_PointParameterfvEXT(disp, glPointParameterfvARB); // <-- ARB -> EXT - SET_PointParameteriNV(disp, glPointParameteriNV); - SET_PointParameterivNV(disp, glPointParameterivNV); - SET_PointSize(disp, glPointSize); - SET_PolygonMode(disp, glPolygonMode); - SET_PolygonOffset(disp, glPolygonOffset); -//SET_PolygonOffsetEXT(disp, glPolygonOffsetEXT); - SET_PolygonStipple(disp, glPolygonStipple); - SET_PopAttrib(disp, glPopAttrib); - SET_PopClientAttrib(disp, glPopClientAttrib); - SET_PopMatrix(disp, glPopMatrix); - SET_PopName(disp, glPopName); - SET_PrioritizeTextures(disp, glPrioritizeTextures); - SET_ProgramEnvParameter4dARB(disp, glProgramEnvParameter4dARB); - SET_ProgramEnvParameter4dvARB(disp, glProgramEnvParameter4dvARB); - SET_ProgramEnvParameter4fARB(disp, glProgramEnvParameter4fARB); - SET_ProgramEnvParameter4fvARB(disp, glProgramEnvParameter4fvARB); - SET_ProgramLocalParameter4dARB(disp, glProgramLocalParameter4dARB); - SET_ProgramLocalParameter4dvARB(disp, glProgramLocalParameter4dvARB); - SET_ProgramLocalParameter4fARB(disp, glProgramLocalParameter4fARB); - SET_ProgramLocalParameter4fvARB(disp, glProgramLocalParameter4fvARB); -//SET_ProgramNamedParameter4dNV(disp, glProgramNamedParameter4dNV); -//SET_ProgramNamedParameter4dvNV(disp, glProgramNamedParameter4dvNV); -//SET_ProgramNamedParameter4fNV(disp, glProgramNamedParameter4fNV); -//SET_ProgramNamedParameter4fvNV(disp, glProgramNamedParameter4fvNV); -//SET_ProgramParameter4dNV(disp, glProgramParameter4dNV); -//SET_ProgramParameter4dvNV(disp, glProgramParameter4dvNV); -//SET_ProgramParameter4fNV(disp, glProgramParameter4fNV); -//SET_ProgramParameter4fvNV(disp, glProgramParameter4fvNV); -//SET_ProgramParameters4dvNV(disp, glProgramParameters4dvNV); -//SET_ProgramParameters4fvNV(disp, glProgramParameters4fvNV); - SET_ProgramStringARB(disp, glProgramStringARB); - SET_PushAttrib(disp, glPushAttrib); - SET_PushClientAttrib(disp, glPushClientAttrib); - SET_PushMatrix(disp, glPushMatrix); - SET_PushName(disp, glPushName); - SET_RasterPos2d(disp, glRasterPos2d); - SET_RasterPos2dv(disp, glRasterPos2dv); - SET_RasterPos2f(disp, glRasterPos2f); - SET_RasterPos2fv(disp, glRasterPos2fv); - SET_RasterPos2i(disp, glRasterPos2i); - SET_RasterPos2iv(disp, glRasterPos2iv); - SET_RasterPos2s(disp, glRasterPos2s); - SET_RasterPos2sv(disp, glRasterPos2sv); - SET_RasterPos3d(disp, glRasterPos3d); - SET_RasterPos3dv(disp, glRasterPos3dv); - SET_RasterPos3f(disp, glRasterPos3f); - SET_RasterPos3fv(disp, glRasterPos3fv); - SET_RasterPos3i(disp, glRasterPos3i); - SET_RasterPos3iv(disp, glRasterPos3iv); - SET_RasterPos3s(disp, glRasterPos3s); - SET_RasterPos3sv(disp, glRasterPos3sv); - SET_RasterPos4d(disp, glRasterPos4d); - SET_RasterPos4dv(disp, glRasterPos4dv); - SET_RasterPos4f(disp, glRasterPos4f); - SET_RasterPos4fv(disp, glRasterPos4fv); - SET_RasterPos4i(disp, glRasterPos4i); - SET_RasterPos4iv(disp, glRasterPos4iv); - SET_RasterPos4s(disp, glRasterPos4s); - SET_RasterPos4sv(disp, glRasterPos4sv); - SET_ReadBuffer(disp, glReadBuffer); - SET_ReadPixels(disp, glReadPixels); - SET_Rectd(disp, glRectd); - SET_Rectdv(disp, glRectdv); - SET_Rectf(disp, glRectf); - SET_Rectfv(disp, glRectfv); - SET_Recti(disp, glRecti); - SET_Rectiv(disp, glRectiv); - SET_Rects(disp, glRects); - SET_Rectsv(disp, glRectsv); - SET_RenderMode(disp, glRenderMode); - SET_RenderbufferStorageEXT(disp, glRenderbufferStorageEXT); -//SET_RequestResidentProgramsNV(disp, glRequestResidentProgramsNV); - SET_ResetHistogram(disp, glResetHistogram); - SET_ResetMinmax(disp, glResetMinmax); -//SET_ResizeBuffersMESA(disp, glResizeBuffersMESA); - SET_Rotated(disp, glRotated); - SET_Rotatef(disp, glRotatef); - SET_SampleCoverageARB(disp, glSampleCoverageARB); -//SET_SampleMapATI(disp, glSampleMapEXT); // <-- EXT -> ATI -//SET_SampleMaskSGIS(disp, glSampleMaskSGIS); -//SET_SamplePatternSGIS(disp, glSamplePatternSGIS); - SET_Scaled(disp, glScaled); - SET_Scalef(disp, glScalef); - SET_Scissor(disp, glScissor); - SET_SecondaryColor3bEXT(disp, glSecondaryColor3bEXT); - SET_SecondaryColor3bvEXT(disp, glSecondaryColor3bvEXT); - SET_SecondaryColor3dEXT(disp, glSecondaryColor3dEXT); - SET_SecondaryColor3dvEXT(disp, glSecondaryColor3dvEXT); - SET_SecondaryColor3fEXT(disp, glSecondaryColor3fEXT); - SET_SecondaryColor3fvEXT(disp, glSecondaryColor3fvEXT); - SET_SecondaryColor3iEXT(disp, glSecondaryColor3iEXT); - SET_SecondaryColor3ivEXT(disp, glSecondaryColor3ivEXT); - SET_SecondaryColor3sEXT(disp, glSecondaryColor3sEXT); - SET_SecondaryColor3svEXT(disp, glSecondaryColor3svEXT); - SET_SecondaryColor3ubEXT(disp, glSecondaryColor3ubEXT); - SET_SecondaryColor3ubvEXT(disp, glSecondaryColor3ubvEXT); - SET_SecondaryColor3uiEXT(disp, glSecondaryColor3uiEXT); - SET_SecondaryColor3uivEXT(disp, glSecondaryColor3uivEXT); - SET_SecondaryColor3usEXT(disp, glSecondaryColor3usEXT); - SET_SecondaryColor3usvEXT(disp, glSecondaryColor3usvEXT); - SET_SecondaryColorPointerEXT(disp, glSecondaryColorPointerEXT); - SET_SelectBuffer(disp, glSelectBuffer); - SET_SeparableFilter2D(disp, glSeparableFilter2D); - SET_SetFenceNV(disp, glSetFenceAPPLE); // <-- APPLE -> NV -//SET_SetFragmentShaderConstantATI(disp, glSetFragmentShaderConstantEXT); // <-- EXT -> ATI - SET_ShadeModel(disp, glShadeModel); - SET_ShaderSourceARB(disp, glShaderSourceARB); - SET_StencilFunc(disp, glStencilFunc); - SET_StencilFuncSeparate(disp, glStencilFuncSeparate); - SET_StencilMask(disp, glStencilMask); - SET_StencilMaskSeparate(disp, glStencilMaskSeparate); - SET_StencilOp(disp, glStencilOp); - SET_StencilOpSeparate(disp, glStencilOpSeparate); - SET_TestFenceNV(disp, glTestFenceAPPLE); // <-- APPLE -> NV - SET_TexCoord1d(disp, glTexCoord1d); - SET_TexCoord1dv(disp, glTexCoord1dv); - SET_TexCoord1f(disp, glTexCoord1f); - SET_TexCoord1fv(disp, glTexCoord1fv); - SET_TexCoord1i(disp, glTexCoord1i); - SET_TexCoord1iv(disp, glTexCoord1iv); - SET_TexCoord1s(disp, glTexCoord1s); - SET_TexCoord1sv(disp, glTexCoord1sv); - SET_TexCoord2d(disp, glTexCoord2d); - SET_TexCoord2dv(disp, glTexCoord2dv); - SET_TexCoord2f(disp, glTexCoord2f); - SET_TexCoord2fv(disp, glTexCoord2fv); - SET_TexCoord2i(disp, glTexCoord2i); - SET_TexCoord2iv(disp, glTexCoord2iv); - SET_TexCoord2s(disp, glTexCoord2s); - SET_TexCoord2sv(disp, glTexCoord2sv); - SET_TexCoord3d(disp, glTexCoord3d); - SET_TexCoord3dv(disp, glTexCoord3dv); - SET_TexCoord3f(disp, glTexCoord3f); - SET_TexCoord3fv(disp, glTexCoord3fv); - SET_TexCoord3i(disp, glTexCoord3i); - SET_TexCoord3iv(disp, glTexCoord3iv); - SET_TexCoord3s(disp, glTexCoord3s); - SET_TexCoord3sv(disp, glTexCoord3sv); - SET_TexCoord4d(disp, glTexCoord4d); - SET_TexCoord4dv(disp, glTexCoord4dv); - SET_TexCoord4f(disp, glTexCoord4f); - SET_TexCoord4fv(disp, glTexCoord4fv); - SET_TexCoord4i(disp, glTexCoord4i); - SET_TexCoord4iv(disp, glTexCoord4iv); - SET_TexCoord4s(disp, glTexCoord4s); - SET_TexCoord4sv(disp, glTexCoord4sv); - SET_TexCoordPointer(disp, glTexCoordPointer); -//SET_TexCoordPointerEXT(disp, glTexCoordPointerEXT); - SET_TexEnvf(disp, glTexEnvf); - SET_TexEnvfv(disp, glTexEnvfv); - SET_TexEnvi(disp, glTexEnvi); - SET_TexEnviv(disp, glTexEnviv); - SET_TexGend(disp, glTexGend); - SET_TexGendv(disp, glTexGendv); - SET_TexGenf(disp, glTexGenf); - SET_TexGenfv(disp, glTexGenfv); - SET_TexGeni(disp, glTexGeni); - SET_TexGeniv(disp, glTexGeniv); - SET_TexImage1D(disp, glTexImage1D); - SET_TexImage2D(disp, glTexImage2D); - SET_TexImage3D(disp, glTexImage3D); - SET_TexParameterf(disp, glTexParameterf); - SET_TexParameterfv(disp, glTexParameterfv); - SET_TexParameteri(disp, glTexParameteri); - SET_TexParameteriv(disp, glTexParameteriv); - SET_TexSubImage1D(disp, glTexSubImage1D); - SET_TexSubImage2D(disp, glTexSubImage2D); - SET_TexSubImage3D(disp, glTexSubImage3D); -//SET_TrackMatrixNV(disp, glTrackMatrixNV); - SET_Translated(disp, glTranslated); - SET_Translatef(disp, glTranslatef); - SET_Uniform1fARB(disp, glUniform1fARB); - SET_Uniform1fvARB(disp, glUniform1fvARB); - SET_Uniform1iARB(disp, glUniform1iARB); - SET_Uniform1ivARB(disp, glUniform1ivARB); - SET_Uniform2fARB(disp, glUniform2fARB); - SET_Uniform2fvARB(disp, glUniform2fvARB); - SET_Uniform2iARB(disp, glUniform2iARB); - SET_Uniform2ivARB(disp, glUniform2ivARB); - SET_Uniform3fARB(disp, glUniform3fARB); - SET_Uniform3fvARB(disp, glUniform3fvARB); - SET_Uniform3iARB(disp, glUniform3iARB); - SET_Uniform3ivARB(disp, glUniform3ivARB); - SET_Uniform4fARB(disp, glUniform4fARB); - SET_Uniform4fvARB(disp, glUniform4fvARB); - SET_Uniform4iARB(disp, glUniform4iARB); - SET_Uniform4ivARB(disp, glUniform4ivARB); - SET_UniformMatrix2fvARB(disp, glUniformMatrix2fvARB); - SET_UniformMatrix3fvARB(disp, glUniformMatrix3fvARB); - SET_UniformMatrix4fvARB(disp, glUniformMatrix4fvARB); - SET_UnlockArraysEXT(disp, glUnlockArraysEXT); - SET_UnmapBufferARB(disp, glUnmapBufferARB); - SET_UseProgramObjectARB(disp, glUseProgramObjectARB); - SET_ValidateProgramARB(disp, glValidateProgramARB); - SET_Vertex2d(disp, glVertex2d); - SET_Vertex2dv(disp, glVertex2dv); - SET_Vertex2f(disp, glVertex2f); - SET_Vertex2fv(disp, glVertex2fv); - SET_Vertex2i(disp, glVertex2i); - SET_Vertex2iv(disp, glVertex2iv); - SET_Vertex2s(disp, glVertex2s); - SET_Vertex2sv(disp, glVertex2sv); - SET_Vertex3d(disp, glVertex3d); - SET_Vertex3dv(disp, glVertex3dv); - SET_Vertex3f(disp, glVertex3f); - SET_Vertex3fv(disp, glVertex3fv); - SET_Vertex3i(disp, glVertex3i); - SET_Vertex3iv(disp, glVertex3iv); - SET_Vertex3s(disp, glVertex3s); - SET_Vertex3sv(disp, glVertex3sv); - SET_Vertex4d(disp, glVertex4d); - SET_Vertex4dv(disp, glVertex4dv); - SET_Vertex4f(disp, glVertex4f); - SET_Vertex4fv(disp, glVertex4fv); - SET_Vertex4i(disp, glVertex4i); - SET_Vertex4iv(disp, glVertex4iv); - SET_Vertex4s(disp, glVertex4s); - SET_Vertex4sv(disp, glVertex4sv); -//SET_VertexArrayRangeNV(disp, glVertexArrayRangeNV); - SET_VertexAttrib1dARB(disp, glVertexAttrib1dARB); - SET_VertexAttrib1dvARB(disp, glVertexAttrib1dvARB); - SET_VertexAttrib1fARB(disp, glVertexAttrib1fARB); - SET_VertexAttrib1fvARB(disp, glVertexAttrib1fvARB); - SET_VertexAttrib1sARB(disp, glVertexAttrib1sARB); - SET_VertexAttrib1svARB(disp, glVertexAttrib1svARB); - SET_VertexAttrib2dARB(disp, glVertexAttrib2dARB); - SET_VertexAttrib2dvARB(disp, glVertexAttrib2dvARB); - SET_VertexAttrib2fARB(disp, glVertexAttrib2fARB); - SET_VertexAttrib2fvARB(disp, glVertexAttrib2fvARB); - SET_VertexAttrib2sARB(disp, glVertexAttrib2sARB); - SET_VertexAttrib2svARB(disp, glVertexAttrib2svARB); - SET_VertexAttrib3dARB(disp, glVertexAttrib3dARB); - SET_VertexAttrib3dvARB(disp, glVertexAttrib3dvARB); - SET_VertexAttrib3fARB(disp, glVertexAttrib3fARB); - SET_VertexAttrib3fvARB(disp, glVertexAttrib3fvARB); - SET_VertexAttrib3sARB(disp, glVertexAttrib3sARB); - SET_VertexAttrib3svARB(disp, glVertexAttrib3svARB); - SET_VertexAttrib4NbvARB(disp, glVertexAttrib4NbvARB); - SET_VertexAttrib4NivARB(disp, glVertexAttrib4NivARB); - SET_VertexAttrib4NsvARB(disp, glVertexAttrib4NsvARB); - SET_VertexAttrib4NubARB(disp, glVertexAttrib4NubARB); - SET_VertexAttrib4NubvARB(disp, glVertexAttrib4NubvARB); - SET_VertexAttrib4NuivARB(disp, glVertexAttrib4NuivARB); - SET_VertexAttrib4NusvARB(disp, glVertexAttrib4NusvARB); - SET_VertexAttrib4bvARB(disp, glVertexAttrib4bvARB); - SET_VertexAttrib4dARB(disp, glVertexAttrib4dARB); - SET_VertexAttrib4dvARB(disp, glVertexAttrib4dvARB); - SET_VertexAttrib4fARB(disp, glVertexAttrib4fARB); - SET_VertexAttrib4fvARB(disp, glVertexAttrib4fvARB); - SET_VertexAttrib4ivARB(disp, glVertexAttrib4ivARB); - SET_VertexAttrib4sARB(disp, glVertexAttrib4sARB); - SET_VertexAttrib4svARB(disp, glVertexAttrib4svARB); - SET_VertexAttrib4ubvARB(disp, glVertexAttrib4ubvARB); - SET_VertexAttrib4uivARB(disp, glVertexAttrib4uivARB); - SET_VertexAttrib4usvARB(disp, glVertexAttrib4usvARB); - SET_VertexAttribPointerARB(disp, glVertexAttribPointerARB); - SET_VertexPointer(disp, glVertexPointer); -// SET_VertexPointerEXT(disp, glVertexPointerEXT); - SET_Viewport(disp, glViewport); - SET_WindowPos2dMESA(disp, glWindowPos2dARB); - SET_WindowPos2dvMESA(disp, glWindowPos2dvARB); - SET_WindowPos2fMESA(disp, glWindowPos2fARB); - SET_WindowPos2fvMESA(disp, glWindowPos2fvARB); - SET_WindowPos2iMESA(disp, glWindowPos2iARB); - SET_WindowPos2ivMESA(disp, glWindowPos2ivARB); - SET_WindowPos2sMESA(disp, glWindowPos2sARB); - SET_WindowPos2svMESA(disp, glWindowPos2svARB); - SET_WindowPos3dMESA(disp, glWindowPos3dARB); - SET_WindowPos3dvMESA(disp, glWindowPos3dvARB); - SET_WindowPos3fMESA(disp, glWindowPos3fARB); - SET_WindowPos3fvMESA(disp, glWindowPos3fvARB); - SET_WindowPos3iMESA(disp, glWindowPos3iARB); - SET_WindowPos3ivMESA(disp, glWindowPos3ivARB); - SET_WindowPos3sMESA(disp, glWindowPos3sARB); - SET_WindowPos3svMESA(disp, glWindowPos3svARB); -//SET_WindowPos4dMESA(disp, glWindowPos4dMESA); -//SET_WindowPos4dvMESA(disp, glWindowPos4dvMESA); -//SET_WindowPos4fMESA(disp, glWindowPos4fMESA); -//SET_WindowPos4fvMESA(disp, glWindowPos4fvMESA); -//SET_WindowPos4iMESA(disp, glWindowPos4iMESA); -//SET_WindowPos4ivMESA(disp, glWindowPos4ivMESA); -//SET_WindowPos4sMESA(disp, glWindowPos4sMESA); -//SET_WindowPos4svMESA(disp, glWindowPos4svMESA); + struct _glapi_table *disp=_glapi_get_dispatch(); + _glapi_set_warning_func((_glapi_warning_func)warn_func); + _glapi_noop_enable_warnings(TRUE); + + /* to update: + * for f in $(grep 'define SET_' ../../../glx/dispatch.h | cut -f2 -d' ' | cut -f1 -d\( | sort -u); do grep -q $f indirect.c || echo $f ; done | grep -v by_offset | sed 's:SET_\(.*\)$:SET_\1(disp, gl\1)\;:' | pbcopy + */ + + SET_Accum(disp, glAccum); + SET_AlphaFunc(disp, glAlphaFunc); + SET_AreTexturesResident(disp, glAreTexturesResident); + SET_ArrayElement(disp, glArrayElement); + SET_Begin(disp, glBegin); + SET_BindTexture(disp, glBindTexture); + SET_Bitmap(disp, glBitmap); + SET_BlendColor(disp, glBlendColor); + SET_BlendEquation(disp, glBlendEquation); + SET_BlendFunc(disp, glBlendFunc); + SET_CallList(disp, glCallList); + SET_CallLists(disp, glCallLists); + SET_Clear(disp, glClear); + SET_ClearAccum(disp, glClearAccum); + SET_ClearColor(disp, glClearColor); + SET_ClearDepth(disp, glClearDepth); + SET_ClearIndex(disp, glClearIndex); + SET_ClearStencil(disp, glClearStencil); + SET_ClipPlane(disp, glClipPlane); + SET_Color3b(disp, glColor3b); + SET_Color3bv(disp, glColor3bv); + SET_Color3d(disp, glColor3d); + SET_Color3dv(disp, glColor3dv); + SET_Color3f(disp, glColor3f); + SET_Color3fv(disp, glColor3fv); + SET_Color3i(disp, glColor3i); + SET_Color3iv(disp, glColor3iv); + SET_Color3s(disp, glColor3s); + SET_Color3sv(disp, glColor3sv); + SET_Color3ub(disp, glColor3ub); + SET_Color3ubv(disp, glColor3ubv); + SET_Color3ui(disp, glColor3ui); + SET_Color3uiv(disp, glColor3uiv); + SET_Color3us(disp, glColor3us); + SET_Color3usv(disp, glColor3usv); + SET_Color4b(disp, glColor4b); + SET_Color4bv(disp, glColor4bv); + SET_Color4d(disp, glColor4d); + SET_Color4dv(disp, glColor4dv); + SET_Color4f(disp, glColor4f); + SET_Color4fv(disp, glColor4fv); + SET_Color4i(disp, glColor4i); + SET_Color4iv(disp, glColor4iv); + SET_Color4s(disp, glColor4s); + SET_Color4sv(disp, glColor4sv); + SET_Color4ub(disp, glColor4ub); + SET_Color4ubv(disp, glColor4ubv); + SET_Color4ui(disp, glColor4ui); + SET_Color4uiv(disp, glColor4uiv); + SET_Color4us(disp, glColor4us); + SET_Color4usv(disp, glColor4usv); + SET_ColorMask(disp, glColorMask); + SET_ColorMaterial(disp, glColorMaterial); + SET_ColorPointer(disp, glColorPointer); + SET_ColorSubTable(disp, glColorSubTable); + SET_ColorTable(disp, glColorTable); + SET_ColorTableParameterfv(disp, glColorTableParameterfv); + SET_ColorTableParameteriv(disp, glColorTableParameteriv); + SET_ConvolutionFilter1D(disp, glConvolutionFilter1D); + SET_ConvolutionFilter2D(disp, glConvolutionFilter2D); + SET_ConvolutionParameterf(disp, glConvolutionParameterf); + SET_ConvolutionParameterfv(disp, glConvolutionParameterfv); + SET_ConvolutionParameteri(disp, glConvolutionParameteri); + SET_ConvolutionParameteriv(disp, glConvolutionParameteriv); + SET_CopyColorSubTable(disp, glCopyColorSubTable); + SET_CopyColorTable(disp, glCopyColorTable); + SET_CopyConvolutionFilter1D(disp, glCopyConvolutionFilter1D); + SET_CopyConvolutionFilter2D(disp, glCopyConvolutionFilter2D); + SET_CopyPixels(disp, glCopyPixels); + SET_CopyTexImage1D(disp, glCopyTexImage1D); + SET_CopyTexImage2D(disp, glCopyTexImage2D); + SET_CopyTexSubImage1D(disp, glCopyTexSubImage1D); + SET_CopyTexSubImage2D(disp, glCopyTexSubImage2D); + SET_CopyTexSubImage3D(disp, glCopyTexSubImage3D); + SET_CullFace(disp, glCullFace); + SET_DeleteLists(disp, glDeleteLists); + SET_DeleteTextures(disp, glDeleteTextures); + SET_DepthFunc(disp, glDepthFunc); + SET_DepthMask(disp, glDepthMask); + SET_DepthRange(disp, glDepthRange); + SET_Disable(disp, glDisable); + SET_DisableClientState(disp, glDisableClientState); + SET_DrawArrays(disp, glDrawArrays); + SET_DrawBuffer(disp, glDrawBuffer); + SET_DrawElements(disp, glDrawElements); + SET_DrawPixels(disp, glDrawPixels); + SET_DrawRangeElements(disp, glDrawRangeElements); + SET_EdgeFlag(disp, glEdgeFlag); + SET_EdgeFlagPointer(disp, glEdgeFlagPointer); + SET_EdgeFlagv(disp, glEdgeFlagv); + SET_Enable(disp, glEnable); + SET_EnableClientState(disp, glEnableClientState); + SET_End(disp, glEnd); + SET_EndList(disp, glEndList); + SET_EvalCoord1d(disp, glEvalCoord1d); + SET_EvalCoord1dv(disp, glEvalCoord1dv); + SET_EvalCoord1f(disp, glEvalCoord1f); + SET_EvalCoord1fv(disp, glEvalCoord1fv); + SET_EvalCoord2d(disp, glEvalCoord2d); + SET_EvalCoord2dv(disp, glEvalCoord2dv); + SET_EvalCoord2f(disp, glEvalCoord2f); + SET_EvalCoord2fv(disp, glEvalCoord2fv); + SET_EvalMesh1(disp, glEvalMesh1); + SET_EvalMesh2(disp, glEvalMesh2); + SET_EvalPoint1(disp, glEvalPoint1); + SET_EvalPoint2(disp, glEvalPoint2); + SET_FeedbackBuffer(disp, glFeedbackBuffer); + SET_Finish(disp, glFinish); + SET_Flush(disp, glFlush); + SET_Fogf(disp, glFogf); + SET_Fogfv(disp, glFogfv); + SET_Fogi(disp, glFogi); + SET_Fogiv(disp, glFogiv); + SET_FrontFace(disp, glFrontFace); + SET_Frustum(disp, glFrustum); + SET_GenLists(disp, glGenLists); + SET_GenTextures(disp, glGenTextures); + SET_GetBooleanv(disp, glGetBooleanv); + SET_GetClipPlane(disp, glGetClipPlane); + SET_GetColorTable(disp, glGetColorTable); + SET_GetColorTableParameterfv(disp, glGetColorTableParameterfv); + SET_GetColorTableParameteriv(disp, glGetColorTableParameteriv); + SET_GetConvolutionFilter(disp, glGetConvolutionFilter); + SET_GetConvolutionParameterfv(disp, glGetConvolutionParameterfv); + SET_GetConvolutionParameteriv(disp, glGetConvolutionParameteriv); + SET_GetDoublev(disp, glGetDoublev); + SET_GetError(disp, glGetError); + SET_GetFloatv(disp, glGetFloatv); + SET_GetHistogram(disp, glGetHistogram); + SET_GetHistogramParameterfv(disp, glGetHistogramParameterfv); + SET_GetHistogramParameteriv(disp, glGetHistogramParameteriv); + SET_GetIntegerv(disp, glGetIntegerv); + SET_GetLightfv(disp, glGetLightfv); + SET_GetLightiv(disp, glGetLightiv); + SET_GetMapdv(disp, glGetMapdv); + SET_GetMapfv(disp, glGetMapfv); + SET_GetMapiv(disp, glGetMapiv); + SET_GetMaterialfv(disp, glGetMaterialfv); + SET_GetMaterialiv(disp, glGetMaterialiv); + SET_GetMinmax(disp, glGetMinmax); + SET_GetMinmaxParameterfv(disp, glGetMinmaxParameterfv); + SET_GetMinmaxParameteriv(disp, glGetMinmaxParameteriv); + SET_GetPixelMapfv(disp, glGetPixelMapfv); + SET_GetPixelMapuiv(disp, glGetPixelMapuiv); + SET_GetPixelMapusv(disp, glGetPixelMapusv); + SET_GetPointerv(disp, glGetPointerv); + SET_GetPolygonStipple(disp, glGetPolygonStipple); + SET_GetSeparableFilter(disp, glGetSeparableFilter); + SET_GetString(disp, glGetString); + SET_GetTexEnvfv(disp, glGetTexEnvfv); + SET_GetTexEnviv(disp, glGetTexEnviv); + SET_GetTexGendv(disp, glGetTexGendv); + SET_GetTexGenfv(disp, glGetTexGenfv); + SET_GetTexGeniv(disp, glGetTexGeniv); + SET_GetTexImage(disp, glGetTexImage); + SET_GetTexLevelParameterfv(disp, glGetTexLevelParameterfv); + SET_GetTexLevelParameteriv(disp, glGetTexLevelParameteriv); + SET_GetTexParameterfv(disp, glGetTexParameterfv); + SET_GetTexParameteriv(disp, glGetTexParameteriv); + SET_Hint(disp, glHint); + SET_Histogram(disp, glHistogram); + SET_IndexMask(disp, glIndexMask); + SET_IndexPointer(disp, glIndexPointer); + SET_Indexd(disp, glIndexd); + SET_Indexdv(disp, glIndexdv); + SET_Indexf(disp, glIndexf); + SET_Indexfv(disp, glIndexfv); + SET_Indexi(disp, glIndexi); + SET_Indexiv(disp, glIndexiv); + SET_Indexs(disp, glIndexs); + SET_Indexsv(disp, glIndexsv); + SET_Indexub(disp, glIndexub); + SET_Indexubv(disp, glIndexubv); + SET_InitNames(disp, glInitNames); + SET_InterleavedArrays(disp, glInterleavedArrays); + SET_IsEnabled(disp, glIsEnabled); + SET_IsList(disp, glIsList); + SET_IsTexture(disp, glIsTexture); + SET_LightModelf(disp, glLightModelf); + SET_LightModelfv(disp, glLightModelfv); + SET_LightModeli(disp, glLightModeli); + SET_LightModeliv(disp, glLightModeliv); + SET_Lightf(disp, glLightf); + SET_Lightfv(disp, glLightfv); + SET_Lighti(disp, glLighti); + SET_Lightiv(disp, glLightiv); + SET_LineStipple(disp, glLineStipple); + SET_LineWidth(disp, glLineWidth); + SET_ListBase(disp, glListBase); + SET_LoadIdentity(disp, glLoadIdentity); + SET_LoadMatrixd(disp, glLoadMatrixd); + SET_LoadMatrixf(disp, glLoadMatrixf); + SET_LoadName(disp, glLoadName); + SET_LogicOp(disp, glLogicOp); + SET_Map1d(disp, glMap1d); + SET_Map1f(disp, glMap1f); + SET_Map2d(disp, glMap2d); + SET_Map2f(disp, glMap2f); + SET_MapGrid1d(disp, glMapGrid1d); + SET_MapGrid1f(disp, glMapGrid1f); + SET_MapGrid2d(disp, glMapGrid2d); + SET_MapGrid2f(disp, glMapGrid2f); + SET_Materialf(disp, glMaterialf); + SET_Materialfv(disp, glMaterialfv); + SET_Materiali(disp, glMateriali); + SET_Materialiv(disp, glMaterialiv); + SET_MatrixMode(disp, glMatrixMode); + SET_Minmax(disp, glMinmax); + SET_MultMatrixd(disp, glMultMatrixd); + SET_MultMatrixf(disp, glMultMatrixf); + SET_NewList(disp, glNewList); + SET_Normal3b(disp, glNormal3b); + SET_Normal3bv(disp, glNormal3bv); + SET_Normal3d(disp, glNormal3d); + SET_Normal3dv(disp, glNormal3dv); + SET_Normal3f(disp, glNormal3f); + SET_Normal3fv(disp, glNormal3fv); + SET_Normal3i(disp, glNormal3i); + SET_Normal3iv(disp, glNormal3iv); + SET_Normal3s(disp, glNormal3s); + SET_Normal3sv(disp, glNormal3sv); + SET_NormalPointer(disp, glNormalPointer); + SET_Ortho(disp, glOrtho); + SET_PassThrough(disp, glPassThrough); + SET_PixelMapfv(disp, glPixelMapfv); + SET_PixelMapuiv(disp, glPixelMapuiv); + SET_PixelMapusv(disp, glPixelMapusv); + SET_PixelStoref(disp, glPixelStoref); + SET_PixelStorei(disp, glPixelStorei); + SET_PixelTransferf(disp, glPixelTransferf); + SET_PixelTransferi(disp, glPixelTransferi); + SET_PixelZoom(disp, glPixelZoom); + SET_PointSize(disp, glPointSize); + SET_PolygonMode(disp, glPolygonMode); + SET_PolygonOffset(disp, glPolygonOffset); + SET_PolygonStipple(disp, glPolygonStipple); + SET_PopAttrib(disp, glPopAttrib); + SET_PopClientAttrib(disp, glPopClientAttrib); + SET_PopMatrix(disp, glPopMatrix); + SET_PopName(disp, glPopName); + SET_PrioritizeTextures(disp, glPrioritizeTextures); + SET_PushAttrib(disp, glPushAttrib); + SET_PushClientAttrib(disp, glPushClientAttrib); + SET_PushMatrix(disp, glPushMatrix); + SET_PushName(disp, glPushName); + SET_RasterPos2d(disp, glRasterPos2d); + SET_RasterPos2dv(disp, glRasterPos2dv); + SET_RasterPos2f(disp, glRasterPos2f); + SET_RasterPos2fv(disp, glRasterPos2fv); + SET_RasterPos2i(disp, glRasterPos2i); + SET_RasterPos2iv(disp, glRasterPos2iv); + SET_RasterPos2s(disp, glRasterPos2s); + SET_RasterPos2sv(disp, glRasterPos2sv); + SET_RasterPos3d(disp, glRasterPos3d); + SET_RasterPos3dv(disp, glRasterPos3dv); + SET_RasterPos3f(disp, glRasterPos3f); + SET_RasterPos3fv(disp, glRasterPos3fv); + SET_RasterPos3i(disp, glRasterPos3i); + SET_RasterPos3iv(disp, glRasterPos3iv); + SET_RasterPos3s(disp, glRasterPos3s); + SET_RasterPos3sv(disp, glRasterPos3sv); + SET_RasterPos4d(disp, glRasterPos4d); + SET_RasterPos4dv(disp, glRasterPos4dv); + SET_RasterPos4f(disp, glRasterPos4f); + SET_RasterPos4fv(disp, glRasterPos4fv); + SET_RasterPos4i(disp, glRasterPos4i); + SET_RasterPos4iv(disp, glRasterPos4iv); + SET_RasterPos4s(disp, glRasterPos4s); + SET_RasterPos4sv(disp, glRasterPos4sv); + SET_ReadBuffer(disp, glReadBuffer); + SET_ReadPixels(disp, glReadPixels); + SET_Rectd(disp, glRectd); + SET_Rectdv(disp, glRectdv); + SET_Rectf(disp, glRectf); + SET_Rectfv(disp, glRectfv); + SET_Recti(disp, glRecti); + SET_Rectiv(disp, glRectiv); + SET_Rects(disp, glRects); + SET_Rectsv(disp, glRectsv); + SET_RenderMode(disp, glRenderMode); + SET_ResetHistogram(disp, glResetHistogram); + SET_ResetMinmax(disp, glResetMinmax); + SET_Rotated(disp, glRotated); + SET_Rotatef(disp, glRotatef); + SET_Scaled(disp, glScaled); + SET_Scalef(disp, glScalef); + SET_Scissor(disp, glScissor); + SET_SelectBuffer(disp, glSelectBuffer); + SET_SeparableFilter2D(disp, glSeparableFilter2D); + SET_ShadeModel(disp, glShadeModel); + SET_StencilFunc(disp, glStencilFunc); + SET_StencilMask(disp, glStencilMask); + SET_StencilOp(disp, glStencilOp); + SET_TexCoord1d(disp, glTexCoord1d); + SET_TexCoord1dv(disp, glTexCoord1dv); + SET_TexCoord1f(disp, glTexCoord1f); + SET_TexCoord1fv(disp, glTexCoord1fv); + SET_TexCoord1i(disp, glTexCoord1i); + SET_TexCoord1iv(disp, glTexCoord1iv); + SET_TexCoord1s(disp, glTexCoord1s); + SET_TexCoord1sv(disp, glTexCoord1sv); + SET_TexCoord2d(disp, glTexCoord2d); + SET_TexCoord2dv(disp, glTexCoord2dv); + SET_TexCoord2f(disp, glTexCoord2f); + SET_TexCoord2fv(disp, glTexCoord2fv); + SET_TexCoord2i(disp, glTexCoord2i); + SET_TexCoord2iv(disp, glTexCoord2iv); + SET_TexCoord2s(disp, glTexCoord2s); + SET_TexCoord2sv(disp, glTexCoord2sv); + SET_TexCoord3d(disp, glTexCoord3d); + SET_TexCoord3dv(disp, glTexCoord3dv); + SET_TexCoord3f(disp, glTexCoord3f); + SET_TexCoord3fv(disp, glTexCoord3fv); + SET_TexCoord3i(disp, glTexCoord3i); + SET_TexCoord3iv(disp, glTexCoord3iv); + SET_TexCoord3s(disp, glTexCoord3s); + SET_TexCoord3sv(disp, glTexCoord3sv); + SET_TexCoord4d(disp, glTexCoord4d); + SET_TexCoord4dv(disp, glTexCoord4dv); + SET_TexCoord4f(disp, glTexCoord4f); + SET_TexCoord4fv(disp, glTexCoord4fv); + SET_TexCoord4i(disp, glTexCoord4i); + SET_TexCoord4iv(disp, glTexCoord4iv); + SET_TexCoord4s(disp, glTexCoord4s); + SET_TexCoord4sv(disp, glTexCoord4sv); + SET_TexCoordPointer(disp, glTexCoordPointer); + SET_TexEnvf(disp, glTexEnvf); + SET_TexEnvfv(disp, glTexEnvfv); + SET_TexEnvi(disp, glTexEnvi); + SET_TexEnviv(disp, glTexEnviv); + SET_TexGend(disp, glTexGend); + SET_TexGendv(disp, glTexGendv); + SET_TexGenf(disp, glTexGenf); + SET_TexGenfv(disp, glTexGenfv); + SET_TexGeni(disp, glTexGeni); + SET_TexGeniv(disp, glTexGeniv); + + /* Pointer Incompatability: + * internalformat is a GLenum according to /System/Library/Frameworks/OpenGL.framework/Headers/gl.h + * extern void glTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); + * extern void glTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); + * extern void glTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); + * + * and it's a GLint in glx/glapitable.h and according to the man page + * void ( * TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); + * void ( * TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); + * void ( * TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); + * + * gl.h contains incorrect prototypes for glTexImage[123]D + */ + + SET_TexImage1D(disp, (void *)glTexImage1D); + SET_TexImage2D(disp, (void *)glTexImage2D); + SET_TexImage3D(disp, (void *)glTexImage3D); + SET_TexParameterf(disp, glTexParameterf); + SET_TexParameterfv(disp, glTexParameterfv); + SET_TexParameteri(disp, glTexParameteri); + SET_TexParameteriv(disp, glTexParameteriv); + SET_TexSubImage1D(disp, glTexSubImage1D); + SET_TexSubImage2D(disp, glTexSubImage2D); + SET_TexSubImage3D(disp, glTexSubImage3D); + SET_Translated(disp, glTranslated); + SET_Translatef(disp, glTranslatef); + SET_Vertex2d(disp, glVertex2d); + SET_Vertex2dv(disp, glVertex2dv); + SET_Vertex2f(disp, glVertex2f); + SET_Vertex2fv(disp, glVertex2fv); + SET_Vertex2i(disp, glVertex2i); + SET_Vertex2iv(disp, glVertex2iv); + SET_Vertex2s(disp, glVertex2s); + SET_Vertex2sv(disp, glVertex2sv); + SET_Vertex3d(disp, glVertex3d); + SET_Vertex3dv(disp, glVertex3dv); + SET_Vertex3f(disp, glVertex3f); + SET_Vertex3fv(disp, glVertex3fv); + SET_Vertex3i(disp, glVertex3i); + SET_Vertex3iv(disp, glVertex3iv); + SET_Vertex3s(disp, glVertex3s); + SET_Vertex3sv(disp, glVertex3sv); + SET_Vertex4d(disp, glVertex4d); + SET_Vertex4dv(disp, glVertex4dv); + SET_Vertex4f(disp, glVertex4f); + SET_Vertex4fv(disp, glVertex4fv); + SET_Vertex4i(disp, glVertex4i); + SET_Vertex4iv(disp, glVertex4iv); + SET_Vertex4s(disp, glVertex4s); + SET_Vertex4sv(disp, glVertex4sv); + SET_VertexPointer(disp, glVertexPointer); + SET_Viewport(disp, glViewport); + +#if GL_VERSION_2_0 + SET_AttachShader(disp, glAttachShader); + SET_DeleteShader(disp, glDeleteShader); + SET_DetachShader(disp, glDetachShader); + SET_GetAttachedShaders(disp, glGetAttachedShaders); + SET_GetProgramInfoLog(disp, glGetProgramInfoLog); + SET_GetShaderInfoLog(disp, glGetShaderInfoLog); + SET_GetShaderiv(disp, glGetShaderiv); + SET_IsShader(disp, glIsShader); + SET_StencilFuncSeparate(disp, glStencilFuncSeparate); + SET_StencilMaskSeparate(disp, glStencilMaskSeparate); + SET_StencilOpSeparate(disp, glStencilOpSeparate); +#endif + +#if GL_VERSION_2_1 + SET_UniformMatrix2x3fv(disp, glUniformMatrix2x3fv); + SET_UniformMatrix2x4fv(disp, glUniformMatrix2x4fv); + SET_UniformMatrix3x2fv(disp, glUniformMatrix3x2fv); + SET_UniformMatrix3x4fv(disp, glUniformMatrix3x4fv); + SET_UniformMatrix4x2fv(disp, glUniformMatrix4x2fv); + SET_UniformMatrix4x3fv(disp, glUniformMatrix4x3fv); +#endif + +#if GL_APPLE_vertex_array_object + SET_BindVertexArrayAPPLE(disp, glBindVertexArrayAPPLE); + SET_DeleteVertexArraysAPPLE(disp, glDeleteVertexArraysAPPLE); + SET_GenVertexArraysAPPLE(disp, glGenVertexArraysAPPLE); + SET_IsVertexArrayAPPLE(disp, glIsVertexArrayAPPLE); +#endif + +#if GL_ARB_draw_buffers + SET_DrawBuffersARB(disp, glDrawBuffersARB); +#endif + +#if GL_ARB_multisample + SET_SampleCoverageARB(disp, glSampleCoverageARB); +#endif + +#if GL_ARB_multitexture + SET_ActiveTextureARB(disp, glActiveTextureARB); + SET_ClientActiveTextureARB(disp, glClientActiveTextureARB); + SET_MultiTexCoord1dARB(disp, glMultiTexCoord1dARB); + SET_MultiTexCoord1dvARB(disp, glMultiTexCoord1dvARB); + SET_MultiTexCoord1fARB(disp, glMultiTexCoord1fARB); + SET_MultiTexCoord1fvARB(disp, glMultiTexCoord1fvARB); + SET_MultiTexCoord1iARB(disp, glMultiTexCoord1iARB); + SET_MultiTexCoord1ivARB(disp, glMultiTexCoord1ivARB); + SET_MultiTexCoord1sARB(disp, glMultiTexCoord1sARB); + SET_MultiTexCoord1svARB(disp, glMultiTexCoord1svARB); + SET_MultiTexCoord2dARB(disp, glMultiTexCoord2dARB); + SET_MultiTexCoord2dvARB(disp, glMultiTexCoord2dvARB); + SET_MultiTexCoord2fARB(disp, glMultiTexCoord2fARB); + SET_MultiTexCoord2fvARB(disp, glMultiTexCoord2fvARB); + SET_MultiTexCoord2iARB(disp, glMultiTexCoord2iARB); + SET_MultiTexCoord2ivARB(disp, glMultiTexCoord2ivARB); + SET_MultiTexCoord2sARB(disp, glMultiTexCoord2sARB); + SET_MultiTexCoord2svARB(disp, glMultiTexCoord2svARB); + SET_MultiTexCoord3dARB(disp, glMultiTexCoord3dARB); + SET_MultiTexCoord3dvARB(disp, glMultiTexCoord3dvARB); + SET_MultiTexCoord3fARB(disp, glMultiTexCoord3fARB); + SET_MultiTexCoord3fvARB(disp, glMultiTexCoord3fvARB); + SET_MultiTexCoord3iARB(disp, glMultiTexCoord3iARB); + SET_MultiTexCoord3ivARB(disp, glMultiTexCoord3ivARB); + SET_MultiTexCoord3sARB(disp, glMultiTexCoord3sARB); + SET_MultiTexCoord3svARB(disp, glMultiTexCoord3svARB); + SET_MultiTexCoord4dARB(disp, glMultiTexCoord4dARB); + SET_MultiTexCoord4dvARB(disp, glMultiTexCoord4dvARB); + SET_MultiTexCoord4fARB(disp, glMultiTexCoord4fARB); + SET_MultiTexCoord4fvARB(disp, glMultiTexCoord4fvARB); + SET_MultiTexCoord4iARB(disp, glMultiTexCoord4iARB); + SET_MultiTexCoord4ivARB(disp, glMultiTexCoord4ivARB); + SET_MultiTexCoord4sARB(disp, glMultiTexCoord4sARB); + SET_MultiTexCoord4svARB(disp, glMultiTexCoord4svARB); +#endif + +#if GL_ARB_occlusion_query + SET_BeginQueryARB(disp, glBeginQueryARB); + SET_DeleteQueriesARB(disp, glDeleteQueriesARB); + SET_EndQueryARB(disp, glEndQueryARB); + SET_GenQueriesARB(disp, glGenQueriesARB); + SET_GetQueryObjectivARB(disp, glGetQueryObjectivARB); + SET_GetQueryObjectuivARB(disp, glGetQueryObjectuivARB); + SET_GetQueryivARB(disp, glGetQueryivARB); + SET_IsQueryARB(disp, glIsQueryARB); +#endif + +#if GL_ARB_shader_objects + SET_AttachObjectARB(disp, glAttachObjectARB); + SET_CompileShaderARB(disp, glCompileShaderARB); + SET_DeleteObjectARB(disp, glDeleteObjectARB); + SET_GetHandleARB(disp, glGetHandleARB); + SET_DetachObjectARB(disp, glDetachObjectARB); + SET_CreateProgramObjectARB(disp, glCreateProgramObjectARB); + SET_CreateShaderObjectARB(disp, glCreateShaderObjectARB); + SET_GetInfoLogARB(disp, glGetInfoLogARB); + SET_GetActiveUniformARB(disp, glGetActiveUniformARB); + SET_GetAttachedObjectsARB(disp, glGetAttachedObjectsARB); + SET_GetObjectParameterfvARB(disp, glGetObjectParameterfvARB); + SET_GetObjectParameterivARB(disp, glGetObjectParameterivARB); + SET_GetShaderSourceARB(disp, glGetShaderSourceARB); + SET_GetUniformLocationARB(disp, glGetUniformLocationARB); + SET_GetUniformfvARB(disp, glGetUniformfvARB); + SET_GetUniformivARB(disp, glGetUniformivARB); + SET_LinkProgramARB(disp, glLinkProgramARB); + SET_ShaderSourceARB(disp, glShaderSourceARB); + SET_Uniform1fARB(disp, glUniform1fARB); + SET_Uniform1fvARB(disp, glUniform1fvARB); + SET_Uniform1iARB(disp, glUniform1iARB); + SET_Uniform1ivARB(disp, glUniform1ivARB); + SET_Uniform2fARB(disp, glUniform2fARB); + SET_Uniform2fvARB(disp, glUniform2fvARB); + SET_Uniform2iARB(disp, glUniform2iARB); + SET_Uniform2ivARB(disp, glUniform2ivARB); + SET_Uniform3fARB(disp, glUniform3fARB); + SET_Uniform3fvARB(disp, glUniform3fvARB); + SET_Uniform3iARB(disp, glUniform3iARB); + SET_Uniform3ivARB(disp, glUniform3ivARB); + SET_Uniform4fARB(disp, glUniform4fARB); + SET_Uniform4fvARB(disp, glUniform4fvARB); + SET_Uniform4iARB(disp, glUniform4iARB); + SET_Uniform4ivARB(disp, glUniform4ivARB); + SET_UniformMatrix2fvARB(disp, glUniformMatrix2fvARB); + SET_UniformMatrix3fvARB(disp, glUniformMatrix3fvARB); + SET_UniformMatrix4fvARB(disp, glUniformMatrix4fvARB); + SET_UseProgramObjectARB(disp, glUseProgramObjectARB); + SET_ValidateProgramARB(disp, glValidateProgramARB); +#endif + +#if GL_ARB_texture_compression + SET_CompressedTexImage1DARB(disp, glCompressedTexImage1DARB); + SET_CompressedTexImage2DARB(disp, glCompressedTexImage2DARB); + SET_CompressedTexImage3DARB(disp, glCompressedTexImage3DARB); + SET_CompressedTexSubImage1DARB(disp, glCompressedTexSubImage1DARB); + SET_CompressedTexSubImage2DARB(disp, glCompressedTexSubImage2DARB); + SET_CompressedTexSubImage3DARB(disp, glCompressedTexSubImage3DARB); + SET_GetCompressedTexImageARB(disp, glGetCompressedTexImageARB); +#endif + +#if GL_ARB_transpose_matrix + SET_LoadTransposeMatrixdARB(disp, glLoadTransposeMatrixdARB); + SET_LoadTransposeMatrixfARB(disp, glLoadTransposeMatrixfARB); + SET_MultTransposeMatrixdARB(disp, glMultTransposeMatrixdARB); + SET_MultTransposeMatrixfARB(disp, glMultTransposeMatrixfARB); +#endif + +#if GL_ARB_vertex_buffer_object + SET_BindBufferARB(disp, glBindBufferARB); + SET_BufferDataARB(disp, glBufferDataARB); + SET_BufferSubDataARB(disp, glBufferSubDataARB); + SET_DeleteBuffersARB(disp, glDeleteBuffersARB); + SET_GenBuffersARB(disp, glGenBuffersARB); + SET_GetBufferParameterivARB(disp, glGetBufferParameterivARB); + SET_GetBufferPointervARB(disp, glGetBufferPointervARB); + SET_GetBufferSubDataARB(disp, glGetBufferSubDataARB); + SET_IsBufferARB(disp, glIsBufferARB); + SET_MapBufferARB(disp, glMapBufferARB); + SET_UnmapBufferARB(disp, glUnmapBufferARB); +#endif + +#if GL_ARB_vertex_program + SET_DisableVertexAttribArrayARB(disp, glDisableVertexAttribArrayARB); + SET_EnableVertexAttribArrayARB(disp, glEnableVertexAttribArrayARB); + SET_GetProgramEnvParameterdvARB(disp, glGetProgramEnvParameterdvARB); + SET_GetProgramEnvParameterfvARB(disp, glGetProgramEnvParameterfvARB); + SET_GetProgramLocalParameterdvARB(disp, glGetProgramLocalParameterdvARB); + SET_GetProgramLocalParameterfvARB(disp, glGetProgramLocalParameterfvARB); + SET_GetProgramStringARB(disp, glGetProgramStringARB); + SET_GetProgramivARB(disp, glGetProgramivARB); + SET_GetVertexAttribdvARB(disp, glGetVertexAttribdvARB); + SET_GetVertexAttribfvARB(disp, glGetVertexAttribfvARB); + SET_GetVertexAttribivARB(disp, glGetVertexAttribivARB); + SET_ProgramEnvParameter4dARB(disp, glProgramEnvParameter4dARB); + SET_ProgramEnvParameter4dvARB(disp, glProgramEnvParameter4dvARB); + SET_ProgramEnvParameter4fARB(disp, glProgramEnvParameter4fARB); + SET_ProgramEnvParameter4fvARB(disp, glProgramEnvParameter4fvARB); + SET_ProgramLocalParameter4dARB(disp, glProgramLocalParameter4dARB); + SET_ProgramLocalParameter4dvARB(disp, glProgramLocalParameter4dvARB); + SET_ProgramLocalParameter4fARB(disp, glProgramLocalParameter4fARB); + SET_ProgramLocalParameter4fvARB(disp, glProgramLocalParameter4fvARB); + SET_ProgramStringARB(disp, glProgramStringARB); + SET_VertexAttrib1dARB(disp, glVertexAttrib1dARB); + SET_VertexAttrib1dvARB(disp, glVertexAttrib1dvARB); + SET_VertexAttrib1fARB(disp, glVertexAttrib1fARB); + SET_VertexAttrib1fvARB(disp, glVertexAttrib1fvARB); + SET_VertexAttrib1sARB(disp, glVertexAttrib1sARB); + SET_VertexAttrib1svARB(disp, glVertexAttrib1svARB); + SET_VertexAttrib2dARB(disp, glVertexAttrib2dARB); + SET_VertexAttrib2dvARB(disp, glVertexAttrib2dvARB); + SET_VertexAttrib2fARB(disp, glVertexAttrib2fARB); + SET_VertexAttrib2fvARB(disp, glVertexAttrib2fvARB); + SET_VertexAttrib2sARB(disp, glVertexAttrib2sARB); + SET_VertexAttrib2svARB(disp, glVertexAttrib2svARB); + SET_VertexAttrib3dARB(disp, glVertexAttrib3dARB); + SET_VertexAttrib3dvARB(disp, glVertexAttrib3dvARB); + SET_VertexAttrib3fARB(disp, glVertexAttrib3fARB); + SET_VertexAttrib3fvARB(disp, glVertexAttrib3fvARB); + SET_VertexAttrib3sARB(disp, glVertexAttrib3sARB); + SET_VertexAttrib3svARB(disp, glVertexAttrib3svARB); + SET_VertexAttrib4NbvARB(disp, glVertexAttrib4NbvARB); + SET_VertexAttrib4NivARB(disp, glVertexAttrib4NivARB); + SET_VertexAttrib4NsvARB(disp, glVertexAttrib4NsvARB); + SET_VertexAttrib4NubARB(disp, glVertexAttrib4NubARB); + SET_VertexAttrib4NubvARB(disp, glVertexAttrib4NubvARB); + SET_VertexAttrib4NuivARB(disp, glVertexAttrib4NuivARB); + SET_VertexAttrib4NusvARB(disp, glVertexAttrib4NusvARB); + SET_VertexAttrib4bvARB(disp, glVertexAttrib4bvARB); + SET_VertexAttrib4dARB(disp, glVertexAttrib4dARB); + SET_VertexAttrib4dvARB(disp, glVertexAttrib4dvARB); + SET_VertexAttrib4fARB(disp, glVertexAttrib4fARB); + SET_VertexAttrib4fvARB(disp, glVertexAttrib4fvARB); + SET_VertexAttrib4ivARB(disp, glVertexAttrib4ivARB); + SET_VertexAttrib4sARB(disp, glVertexAttrib4sARB); + SET_VertexAttrib4svARB(disp, glVertexAttrib4svARB); + SET_VertexAttrib4ubvARB(disp, glVertexAttrib4ubvARB); + SET_VertexAttrib4uivARB(disp, glVertexAttrib4uivARB); + SET_VertexAttrib4usvARB(disp, glVertexAttrib4usvARB); + SET_VertexAttribPointerARB(disp, glVertexAttribPointerARB); +#endif + +#if GL_ARB_vertex_shader + SET_BindAttribLocationARB(disp, glBindAttribLocationARB); + SET_GetActiveAttribARB(disp, glGetActiveAttribARB); + SET_GetAttribLocationARB(disp, glGetAttribLocationARB); +#endif + +#if GL_ARB_window_pos + SET_WindowPos2dMESA(disp, glWindowPos2dARB); + SET_WindowPos2dvMESA(disp, glWindowPos2dvARB); + SET_WindowPos2fMESA(disp, glWindowPos2fARB); + SET_WindowPos2fvMESA(disp, glWindowPos2fvARB); + SET_WindowPos2iMESA(disp, glWindowPos2iARB); + SET_WindowPos2ivMESA(disp, glWindowPos2ivARB); + SET_WindowPos2sMESA(disp, glWindowPos2sARB); + SET_WindowPos2svMESA(disp, glWindowPos2svARB); + SET_WindowPos3dMESA(disp, glWindowPos3dARB); + SET_WindowPos3dvMESA(disp, glWindowPos3dvARB); + SET_WindowPos3fMESA(disp, glWindowPos3fARB); + SET_WindowPos3fvMESA(disp, glWindowPos3fvARB); + SET_WindowPos3iMESA(disp, glWindowPos3iARB); + SET_WindowPos3ivMESA(disp, glWindowPos3ivARB); + SET_WindowPos3sMESA(disp, glWindowPos3sARB); + SET_WindowPos3svMESA(disp, glWindowPos3svARB); +#endif + +#if GL_ATI_fragment_shader + SET_AlphaFragmentOp1ATI(disp, glAlphaFragmentOp1ATI); + SET_AlphaFragmentOp2ATI(disp, glAlphaFragmentOp2ATI); + SET_AlphaFragmentOp3ATI(disp, glAlphaFragmentOp3ATI); + SET_BeginFragmentShaderATI(disp, glBeginFragmentShaderATI); + SET_BindFragmentShaderATI(disp, glBindFragmentShaderATI); + SET_ColorFragmentOp1ATI(disp, glColorFragmentOp1ATI); + SET_ColorFragmentOp2ATI(disp, glColorFragmentOp2ATI); + SET_ColorFragmentOp3ATI(disp, glColorFragmentOp3ATI); + SET_DeleteFragmentShaderATI(disp, glDeleteFragmentShaderATI); + SET_EndFragmentShaderATI(disp, glEndFragmentShaderATI); + SET_GenFragmentShadersATI(disp, glGenFragmentShadersATI); + SET_PassTexCoordATI(disp, glPassTexCoordATI); + SET_SampleMapATI(disp, glSampleMapATI); + SET_SetFragmentShaderConstantATI(disp, glSetFragmentShaderConstantATI); +#elif GL_EXT_fragment_shader + SET_AlphaFragmentOp1ATI(disp, glAlphaFragmentOp1EXT); + SET_AlphaFragmentOp2ATI(disp, glAlphaFragmentOp2EXT); + SET_AlphaFragmentOp3ATI(disp, glAlphaFragmentOp3EXT); + SET_BeginFragmentShaderATI(disp, glBeginFragmentShaderEXT); + SET_BindFragmentShaderATI(disp, glBindFragmentShaderEXT); + SET_ColorFragmentOp1ATI(disp, glColorFragmentOp1EXT); + SET_ColorFragmentOp2ATI(disp, glColorFragmentOp2EXT); + SET_ColorFragmentOp3ATI(disp, glColorFragmentOp3EXT); + SET_DeleteFragmentShaderATI(disp, glDeleteFragmentShaderEXT); + SET_EndFragmentShaderATI(disp, glEndFragmentShaderEXT); + SET_GenFragmentShadersATI(disp, glGenFragmentShadersEXT); + SET_PassTexCoordATI(disp, glPassTexCoordEXT); + SET_SampleMapATI(disp, glSampleMapEXT); + SET_SetFragmentShaderConstantATI(disp, glSetFragmentShaderConstantEXT); +#endif + +#if GL_ATI_separate_stencil + SET_StencilFuncSeparateATI(disp, glStencilFuncSeparateATI); +#endif + +#if GL_EXT_blend_equation_separate + SET_BlendEquationSeparateEXT(disp, glBlendEquationSeparateEXT); +#endif + +#if GL_EXT_blend_func_separate + SET_BlendFuncSeparateEXT(disp, glBlendFuncSeparateEXT); +#endif + +#if GL_EXT_depth_bounds_test + SET_DepthBoundsEXT(disp, glDepthBoundsEXT); +#endif + +#if GL_EXT_compiled_vertex_array + SET_LockArraysEXT(disp, glLockArraysEXT); + SET_UnlockArraysEXT(disp, glUnlockArraysEXT); +#endif + +#if GL_EXT_cull_vertex + SET_CullParameterdvEXT(disp, glCullParameterdvEXT); + SET_CullParameterfvEXT(disp, glCullParameterfvEXT); +#endif + +#if GL_EXT_fog_coord + SET_FogCoordPointerEXT(disp, glFogCoordPointerEXT); + SET_FogCoorddEXT(disp, glFogCoorddEXT); + SET_FogCoorddvEXT(disp, glFogCoorddvEXT); + SET_FogCoordfEXT(disp, glFogCoordfEXT); + SET_FogCoordfvEXT(disp, glFogCoordfvEXT); +#endif + +#if GL_EXT_framebuffer_blit + SET_BlitFramebufferEXT(disp, glBlitFramebufferEXT); +#endif + +#if GL_EXT_framebuffer_object + SET_BindFramebufferEXT(disp, glBindFramebufferEXT); + SET_BindRenderbufferEXT(disp, glBindRenderbufferEXT); + SET_CheckFramebufferStatusEXT(disp, glCheckFramebufferStatusEXT); + SET_DeleteFramebuffersEXT(disp, glDeleteFramebuffersEXT); + SET_DeleteRenderbuffersEXT(disp, glDeleteRenderbuffersEXT); + SET_FramebufferRenderbufferEXT(disp, glFramebufferRenderbufferEXT); + SET_FramebufferTexture1DEXT(disp, glFramebufferTexture1DEXT); + SET_FramebufferTexture2DEXT(disp, glFramebufferTexture2DEXT); + SET_FramebufferTexture3DEXT(disp, glFramebufferTexture3DEXT); + SET_GenerateMipmapEXT(disp, glGenerateMipmapEXT); + SET_GenFramebuffersEXT(disp, glGenFramebuffersEXT); + SET_GenRenderbuffersEXT(disp, glGenRenderbuffersEXT); + SET_GetFramebufferAttachmentParameterivEXT(disp, glGetFramebufferAttachmentParameterivEXT); + SET_GetRenderbufferParameterivEXT(disp, glGetRenderbufferParameterivEXT); + SET_IsFramebufferEXT(disp, glIsFramebufferEXT); + SET_IsRenderbufferEXT(disp, glIsRenderbufferEXT); + SET_RenderbufferStorageEXT(disp, glRenderbufferStorageEXT); +#endif + +#if GL_EXT_gpu_program_parameters + SET_ProgramEnvParameters4fvEXT(disp, glProgramEnvParameters4fvEXT); + SET_ProgramLocalParameters4fvEXT(disp, glProgramLocalParameters4fvEXT); +#endif + +#if GL_EXT_multi_draw_arrays + /* Pointer Incompatability: + * This warning can be safely ignored. OpenGL.framework adds const to the + * two pointers. + * + * extern void glMultiDrawArraysEXT (GLenum, const GLint *, const GLsizei *, GLsizei); + * + * void ( * MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); + */ + SET_MultiDrawArraysEXT(disp, (void *)glMultiDrawArraysEXT); + SET_MultiDrawElementsEXT(disp, glMultiDrawElementsEXT); +#endif + +#if GL_EXT_point_parameters + SET_PointParameterfEXT(disp, glPointParameterfEXT); + SET_PointParameterfvEXT(disp, glPointParameterfvEXT); +#elif GL_ARB_point_parameters + SET_PointParameterfEXT(disp, glPointParameterfARB); + SET_PointParameterfvEXT(disp, glPointParameterfvARB); +#endif + +#if GL_EXT_polygon_offset + SET_PolygonOffsetEXT(disp, glPolygonOffsetEXT); +#endif + +#if GL_EXT_secondary_color + SET_SecondaryColor3bEXT(disp, glSecondaryColor3bEXT); + SET_SecondaryColor3bvEXT(disp, glSecondaryColor3bvEXT); + SET_SecondaryColor3dEXT(disp, glSecondaryColor3dEXT); + SET_SecondaryColor3dvEXT(disp, glSecondaryColor3dvEXT); + SET_SecondaryColor3fEXT(disp, glSecondaryColor3fEXT); + SET_SecondaryColor3fvEXT(disp, glSecondaryColor3fvEXT); + SET_SecondaryColor3iEXT(disp, glSecondaryColor3iEXT); + SET_SecondaryColor3ivEXT(disp, glSecondaryColor3ivEXT); + SET_SecondaryColor3sEXT(disp, glSecondaryColor3sEXT); + SET_SecondaryColor3svEXT(disp, glSecondaryColor3svEXT); + SET_SecondaryColor3ubEXT(disp, glSecondaryColor3ubEXT); + SET_SecondaryColor3ubvEXT(disp, glSecondaryColor3ubvEXT); + SET_SecondaryColor3uiEXT(disp, glSecondaryColor3uiEXT); + SET_SecondaryColor3uivEXT(disp, glSecondaryColor3uivEXT); + SET_SecondaryColor3usEXT(disp, glSecondaryColor3usEXT); + SET_SecondaryColor3usvEXT(disp, glSecondaryColor3usvEXT); + SET_SecondaryColorPointerEXT(disp, glSecondaryColorPointerEXT); +#endif + +#if GL_EXT_stencil_two_side + SET_ActiveStencilFaceEXT(disp, glActiveStencilFaceEXT); +#endif + +#if GL_EXT_timer_query + SET_GetQueryObjecti64vEXT(disp, glGetQueryObjecti64vEXT); + SET_GetQueryObjectui64vEXT(disp, glGetQueryObjectui64vEXT); +#endif + +#if GL_EXT_vertex_array + SET_ColorPointerEXT(disp, glColorPointerEXT); + SET_EdgeFlagPointerEXT(disp, glEdgeFlagPointerEXT); + SET_IndexPointerEXT(disp, glIndexPointerEXT); + SET_NormalPointerEXT(disp, glNormalPointerEXT); + SET_TexCoordPointerEXT(disp, glTexCoordPointerEXT); + SET_VertexPointerEXT(disp, glVertexPointerEXT); +#endif + +#if GL_IBM_multimode_draw_arrays + SET_MultiModeDrawArraysIBM(disp, glMultiModeDrawArraysIBM); + SET_MultiModeDrawElementsIBM(disp, glMultiModeDrawElementsIBM); +#endif + +#if GL_MESA_resize_buffers + SET_ResizeBuffersMESA(disp, glResizeBuffersMESA); +#endif + +#if GL_MESA_window_pos + SET_WindowPos4dMESA(disp, glWindowPos4dMESA); + SET_WindowPos4dvMESA(disp, glWindowPos4dvMESA); + SET_WindowPos4fMESA(disp, glWindowPos4fMESA); + SET_WindowPos4fvMESA(disp, glWindowPos4fvMESA); + SET_WindowPos4iMESA(disp, glWindowPos4iMESA); + SET_WindowPos4ivMESA(disp, glWindowPos4ivMESA); + SET_WindowPos4sMESA(disp, glWindowPos4sMESA); + SET_WindowPos4svMESA(disp, glWindowPos4svMESA); +#endif + +#if GL_NV_fence + SET_DeleteFencesNV(disp, glDeleteFencesNV); + SET_FinishFenceNV(disp, glFinishFenceNV); + SET_GenFencesNV(disp, glGenFencesNV); + SET_GetFenceivNV(disp, glGetFenceivNV); + SET_IsFenceNV(disp, glIsFenceNV); + SET_SetFenceNV(disp, glSetFenceNV); + SET_TestFenceNV(disp, glTestFenceNV); +#endif + +#if GL_NV_fragment_program + SET_GetProgramNamedParameterdvNV(disp, glGetProgramNamedParameterdvNV); + SET_GetProgramNamedParameterfvNV(disp, glGetProgramNamedParameterfvNV); + SET_ProgramNamedParameter4dNV(disp, glProgramNamedParameter4dNV); + SET_ProgramNamedParameter4dvNV(disp, glProgramNamedParameter4dvNV); + SET_ProgramNamedParameter4fNV(disp, glProgramNamedParameter4fNV); + SET_ProgramNamedParameter4fvNV(disp, glProgramNamedParameter4fvNV); +#endif + +#if GL_NV_geometry_program4 + SET_FramebufferTextureLayerEXT(disp, glFramebufferTextureLayerEXT); +#endif + +#if GL_NV_point_sprite + SET_PointParameteriNV(disp, glPointParameteriNV); + SET_PointParameterivNV(disp, glPointParameterivNV); +#endif + +#if GL_NV_register_combiners + SET_CombinerInputNV(disp, glCombinerInputNV); + SET_CombinerOutputNV(disp, glCombinerOutputNV); + SET_CombinerParameterfNV(disp, glCombinerParameterfNV); + SET_CombinerParameterfvNV(disp, glCombinerParameterfvNV); + SET_CombinerParameteriNV(disp, glCombinerParameteriNV); + SET_CombinerParameterivNV(disp, glCombinerParameterivNV); + SET_FinalCombinerInputNV(disp, glFinalCombinerInputNV); + SET_GetCombinerInputParameterfvNV(disp, glGetCombinerInputParameterfvNV); + SET_GetCombinerInputParameterivNV(disp, glGetCombinerInputParameterivNV); + SET_GetCombinerOutputParameterfvNV(disp, glGetCombinerOutputParameterfvNV); + SET_GetCombinerOutputParameterivNV(disp, glGetCombinerOutputParameterivNV); + SET_GetFinalCombinerInputParameterfvNV(disp, glGetFinalCombinerInputParameterfvNV); + SET_GetFinalCombinerInputParameterivNV(disp, glGetFinalCombinerInputParameterivNV); +#endif + +#if GL_NV_vertex_array_range + SET_FlushVertexArrayRangeNV(disp, glFlushVertexArrayRangeNV); + SET_VertexArrayRangeNV(disp, glVertexArrayRangeNV); +#endif + +#if GL_NV_vertex_program + SET_AreProgramsResidentNV(disp, glAreProgramsResidentNV); + SET_BindProgramNV(disp, glBindProgramNV); + SET_DeleteProgramsNV(disp, glDeleteProgramsNV); + SET_ExecuteProgramNV(disp, glExecuteProgramNV); + SET_GenProgramsNV(disp, glGenProgramsNV); + SET_GetProgramParameterdvNV(disp, glGetProgramParameterdvNV); + SET_GetProgramParameterfvNV(disp, glGetProgramParameterfvNV); + SET_GetProgramStringNV(disp, glGetProgramStringNV); + SET_GetProgramivNV(disp, glGetProgramivNV); + SET_GetTrackMatrixivNV(disp, glGetTrackMatrixivNV); + SET_GetVertexAttribPointervNV(disp, glGetVertexAttribPointervNV); + SET_GetVertexAttribdvNV(disp, glGetVertexAttribdvNV); + SET_GetVertexAttribfvNV(disp, glGetVertexAttribfvNV); + SET_GetVertexAttribivNV(disp, glGetVertexAttribivNV); + SET_IsProgramNV(disp, glIsProgramNV); + SET_LoadProgramNV(disp, glLoadProgramNV); + SET_ProgramParameters4dvNV(disp, glProgramParameters4dvNV); + SET_ProgramParameters4fvNV(disp, glProgramParameters4fvNV); + SET_RequestResidentProgramsNV(disp, glRequestResidentProgramsNV); + SET_TrackMatrixNV(disp, glTrackMatrixNV); + SET_VertexAttrib1dNV(disp, glVertexAttrib1dNV) + SET_VertexAttrib1dvNV(disp, glVertexAttrib1dvNV) + SET_VertexAttrib1fNV(disp, glVertexAttrib1fNV) + SET_VertexAttrib1fvNV(disp, glVertexAttrib1fvNV) + SET_VertexAttrib1sNV(disp, glVertexAttrib1sNV) + SET_VertexAttrib1svNV(disp, glVertexAttrib1svNV) + SET_VertexAttrib2dNV(disp, glVertexAttrib2dNV) + SET_VertexAttrib2dvNV(disp, glVertexAttrib2dvNV) + SET_VertexAttrib2fNV(disp, glVertexAttrib2fNV) + SET_VertexAttrib2fvNV(disp, glVertexAttrib2fvNV) + SET_VertexAttrib2sNV(disp, glVertexAttrib2sNV) + SET_VertexAttrib2svNV(disp, glVertexAttrib2svNV) + SET_VertexAttrib3dNV(disp, glVertexAttrib3dNV) + SET_VertexAttrib3dvNV(disp, glVertexAttrib3dvNV) + SET_VertexAttrib3fNV(disp, glVertexAttrib3fNV) + SET_VertexAttrib3fvNV(disp, glVertexAttrib3fvNV) + SET_VertexAttrib3sNV(disp, glVertexAttrib3sNV) + SET_VertexAttrib3svNV(disp, glVertexAttrib3svNV) + SET_VertexAttrib4dNV(disp, glVertexAttrib4dNV) + SET_VertexAttrib4dvNV(disp, glVertexAttrib4dvNV) + SET_VertexAttrib4fNV(disp, glVertexAttrib4fNV) + SET_VertexAttrib4fvNV(disp, glVertexAttrib4fvNV) + SET_VertexAttrib4sNV(disp, glVertexAttrib4sNV) + SET_VertexAttrib4svNV(disp, glVertexAttrib4svNV) + SET_VertexAttrib4ubNV(disp, glVertexAttrib4ubNV) + SET_VertexAttrib4ubvNV(disp, glVertexAttrib4ubvNV) + SET_VertexAttribPointerNV(disp, glVertexAttribPointerNV) + SET_VertexAttribs1dvNV(disp, glVertexAttribs1dvNV) + SET_VertexAttribs1fvNV(disp, glVertexAttribs1fvNV) + SET_VertexAttribs1svNV(disp, glVertexAttribs1svNV) + SET_VertexAttribs2dvNV(disp, glVertexAttribs2dvNV) + SET_VertexAttribs2fvNV(disp, glVertexAttribs2fvNV) + SET_VertexAttribs2svNV(disp, glVertexAttribs2svNV) + SET_VertexAttribs3dvNV(disp, glVertexAttribs3dvNV) + SET_VertexAttribs3fvNV(disp, glVertexAttribs3fvNV) + SET_VertexAttribs3svNV(disp, glVertexAttribs3svNV) + SET_VertexAttribs4dvNV(disp, glVertexAttribs4dvNV) + SET_VertexAttribs4fvNV(disp, glVertexAttribs4fvNV) + SET_VertexAttribs4svNV(disp, glVertexAttribs4svNV) + SET_VertexAttribs4ubvNV(disp, glVertexAttribs4ubvNV) +#endif + +#if GL_SGIS_multisample + SET_SampleMaskSGIS(disp, glSampleMaskSGIS); + SET_SamplePatternSGIS(disp, glSamplePatternSGIS); +#endif + +#if GL_SGIS_pixel_texture + SET_GetPixelTexGenParameterfvSGIS(disp, glGetPixelTexGenParameterfvSGIS); + SET_GetPixelTexGenParameterivSGIS(disp, glGetPixelTexGenParameterivSGIS); + SET_PixelTexGenParameterfSGIS(disp, glPixelTexGenParameterfSGIS); + SET_PixelTexGenParameterfvSGIS(disp, glPixelTexGenParameterfvSGIS); + SET_PixelTexGenParameteriSGIS(disp, glPixelTexGenParameteriSGIS); + SET_PixelTexGenParameterivSGIS(disp, glPixelTexGenParameterivSGIS); + SET_PixelTexGenSGIX(disp, glPixelTexGenSGIX); +#endif } diff --git a/xorg-server/hw/xquartz/GL/visualConfigs.c b/xorg-server/hw/xquartz/GL/visualConfigs.c index 81f88fb3c..fee665d1d 100644 --- a/xorg-server/hw/xquartz/GL/visualConfigs.c +++ b/xorg-server/hw/xquartz/GL/visualConfigs.c @@ -55,55 +55,54 @@ #include "capabilities.h" #include "visualConfigs.h" +#include "darwinfb.h" /* Based originally on code from indirect.c which was based on code from i830_dri.c. */ -void setVisualConfigs(void) { +__GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber) { int numConfigs = 0; - __GLXvisualConfig *visualConfigs = NULL; - void **visualPrivates = NULL; + __GLXconfig *visualConfigs, *c; struct glCapabilities caps; struct glCapabilitiesConfig *conf = NULL; int stereo, depth, aux, buffers, stencil, accum, color, msample; - int i = 0; if(getGlCapabilities(&caps)) { - ErrorF("error from getGlCapabilities()!\n"); - return; + ErrorF("error from getGlCapabilities()!\n"); + return NULL; } /* - conf->stereo is 0 or 1, but we need at least 1 iteration of the loop, - so we treat a true conf->stereo as 2. - - The depth size is 0 or 24. Thus we do 2 iterations for that. - - conf->aux_buffers (when available/non-zero) result in 2 iterations instead of 1. - - conf->buffers indicates whether we have single or double buffering. + conf->stereo is 0 or 1, but we need at least 1 iteration of the loop, + so we treat a true conf->stereo as 2. + + The depth size is 0 or 24. Thus we do 2 iterations for that. + + conf->aux_buffers (when available/non-zero) result in 2 iterations instead of 1. + + conf->buffers indicates whether we have single or double buffering. + + conf->total_stencil_bit_depths + + conf->total_color_buffers indicates the RGB/RGBA color depths. + + conf->total_accum_buffers iterations for accum (with at least 1 if equal to 0) + + conf->total_depth_buffer_depths + + conf->multisample_buffers iterations (with at least 1 if equal to 0). We add 1 + for the 0 multisampling config. - conf->total_stencil_bit_depths - - conf->total_color_buffers indicates the RGB/RGBA color depths. - - conf->total_accum_buffers iterations for accum (with at least 1 if equal to 0) - - conf->total_depth_buffer_depths - - conf->multisample_buffers iterations (with at least 1 if equal to 0). We add 1 - for the 0 multisampling config. - */ - + assert(NULL != caps.configurations); conf = caps.configurations; - + numConfigs = 0; - + for(conf = caps.configurations; conf; conf = conf->next) { - if(conf->total_color_buffers <= 0) - continue; - - numConfigs += (conf->stereo ? 2 : 1) + if(conf->total_color_buffers <= 0) + continue; + + numConfigs += (conf->stereo ? 2 : 1) * (conf->aux_buffers ? 2 : 1) * conf->buffers * ((conf->total_stencil_bit_depths > 0) ? conf->total_stencil_bit_depths : 1) @@ -112,144 +111,175 @@ void setVisualConfigs(void) { * conf->total_depth_buffer_depths * (conf->multisample_buffers + 1); } - + + if(numConfigsPtr) + *numConfigsPtr = numConfigs; + visualConfigs = xcalloc(sizeof(*visualConfigs), numConfigs); - - if(NULL == visualConfigs) { - ErrorF("xcalloc failure when allocating visualConfigs\n"); - freeGlCapabilities(&caps); - return; - } - visualPrivates = xcalloc(sizeof(void *), numConfigs); - - if(NULL == visualPrivates) { - ErrorF("xcalloc failure when allocating visualPrivates"); - freeGlCapabilities(&caps); - xfree(visualConfigs); - return; + if(NULL == visualConfigs) { + ErrorF("xcalloc failure when allocating visualConfigs\n"); + freeGlCapabilities(&caps); + return NULL; } - i = 0; /* current buffer */ + c = visualConfigs; /* current buffer */ for(conf = caps.configurations; conf; conf = conf->next) { - for(stereo = 0; stereo < (conf->stereo ? 2 : 1); ++stereo) { - for(aux = 0; aux < (conf->aux_buffers ? 2 : 1); ++aux) { - for(buffers = 0; buffers < conf->buffers; ++buffers) { - for(stencil = 0; stencil < ((conf->total_stencil_bit_depths > 0) ? - conf->total_stencil_bit_depths : 1); ++stencil) { - for(color = 0; color < conf->total_color_buffers; ++color) { - for(accum = 0; accum < ((conf->total_accum_buffers > 0) ? - conf->total_accum_buffers : 1); ++accum) { - for(depth = 0; depth < conf->total_depth_buffer_depths; ++depth) { - for(msample = 0; msample < (conf->multisample_buffers + 1); ++msample) { - visualConfigs[i].vid = (VisualID)(-1); - visualConfigs[i].class = TrueColor; - - visualConfigs[i].rgba = true; - visualConfigs[i].redSize = conf->color_buffers[color].r; - visualConfigs[i].greenSize = conf->color_buffers[color].g; - visualConfigs[i].blueSize = conf->color_buffers[color].b; + for(stereo = 0; stereo < (conf->stereo ? 2 : 1); ++stereo) { + for(aux = 0; aux < (conf->aux_buffers ? 2 : 1); ++aux) { + for(buffers = 0; buffers < conf->buffers; ++buffers) { + for(stencil = 0; stencil < ((conf->total_stencil_bit_depths > 0) ? + conf->total_stencil_bit_depths : 1); ++stencil) { + for(color = 0; color < conf->total_color_buffers; ++color) { + for(accum = 0; accum < ((conf->total_accum_buffers > 0) ? + conf->total_accum_buffers : 1); ++accum) { + for(depth = 0; depth < conf->total_depth_buffer_depths; ++depth) { + for(msample = 0; msample < (conf->multisample_buffers + 1); ++msample) { + + // Global + c->visualID = -1; + c->visualType = GLX_TRUE_COLOR; + c->next = c + 1; + + c->screen = screenNumber; + + c->level = 0; + c->indexBits = 0; + c->pixmapMode = 0; // TODO: What should this be? + + if(conf->accelerated) { + c->visualRating = GLX_NONE; + } else { + c->visualRating = GLX_SLOW_VISUAL_EXT; + } + + c->transparentPixel = GLX_NONE; + c->transparentRed = GLX_NONE; + c->transparentGreen = GLX_NONE; + c->transparentBlue = GLX_NONE; + c->transparentAlpha = GLX_NONE; + c->transparentIndex = GLX_NONE; + + c->visualSelectGroup = 0; + + c->swapMethod = GLX_SWAP_UNDEFINED_OML; + + // Stereo + c->stereoMode = stereo ? TRUE : FALSE; + + // Aux buffers + c->numAuxBuffers = aux ? conf->aux_buffers : 0; + + // Double Buffered + c->doubleBufferMode = buffers ? TRUE : FALSE; - if(GLCAPS_COLOR_BUF_INVALID_VALUE == conf->color_buffers[color].a) { - /* This visual has no alpha. */ - visualConfigs[i].alphaSize = 0; - } else { - visualConfigs[i].alphaSize = conf->color_buffers[color].a; - } - - /* - * If the .a/alpha value is unset, then don't add it to the - * bufferSize specification. The INVALID_VALUE indicates that it - * was unset. - * - * This prevents odd bufferSizes, such as 14. - */ - if(GLCAPS_COLOR_BUF_INVALID_VALUE == conf->color_buffers[color].a) { - visualConfigs[i].bufferSize = conf->color_buffers[color].r + - conf->color_buffers[color].g + conf->color_buffers[color].b; - } else { - visualConfigs[i].bufferSize = conf->color_buffers[color].r + - conf->color_buffers[color].g + conf->color_buffers[color].b + - conf->color_buffers[color].a; - } + // Stencil Buffer + if(conf->total_stencil_bit_depths > 0) { + c->stencilBits = conf->stencil_bit_depths[stencil]; + } else { + c->stencilBits = 0; + } + + // Color + if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->color_buffers[color].a) { + c->alphaBits = conf->color_buffers[color].a; + } else { + c->alphaBits = 0; + } + c->redBits = conf->color_buffers[color].r; + c->greenBits = conf->color_buffers[color].g; + c->blueBits = conf->color_buffers[color].b; + + c->rgbBits = c->alphaBits + c->redBits + c->greenBits + c->blueBits; - /* - * I'm uncertain about these masks. - * I don't think we actually care what the values are in our - * libGL, so it doesn't seem to make a difference. - */ - visualConfigs[i].redMask = -1; - visualConfigs[i].greenMask = -1; - visualConfigs[i].blueMask = -1; - visualConfigs[i].alphaMask = -1; - - if(conf->total_accum_buffers > 0) { - visualConfigs[i].accumRedSize = conf->accum_buffers[accum].r; - visualConfigs[i].accumGreenSize = conf->accum_buffers[accum].g; - visualConfigs[i].accumBlueSize = conf->accum_buffers[accum].b; - if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) { - visualConfigs[i].accumAlphaSize = conf->accum_buffers[accum].a; - } else { - visualConfigs[i].accumAlphaSize = 0; - } - } else { - visualConfigs[i].accumRedSize = 0; - visualConfigs[i].accumGreenSize = 0; - visualConfigs[i].accumBlueSize = 0; - visualConfigs[i].accumAlphaSize = 0; - } - - visualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE; - visualConfigs[i].stereo = stereo ? TRUE : FALSE; + c->alphaMask = AM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits); + c->redMask = RM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits); + c->greenMask = GM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits); + c->blueMask = BM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits); + + // Accumulation Buffers + if(conf->total_accum_buffers > 0) { + c->accumRedBits = conf->accum_buffers[accum].r; + c->accumGreenBits = conf->accum_buffers[accum].g; + c->accumBlueBits = conf->accum_buffers[accum].b; + if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) { + c->accumAlphaBits = conf->accum_buffers[accum].a; + } else { + c->accumAlphaBits = 0; + } + } else { + c->accumRedBits = 0; + c->accumGreenBits = 0; + c->accumBlueBits = 0; + c->accumAlphaBits = 0; + } - visualConfigs[i].depthSize = conf->depth_buffers[depth]; - - if(conf->total_stencil_bit_depths > 0) { - visualConfigs[i].stencilSize = conf->stencil_bit_depths[stencil]; - } else { - visualConfigs[i].stencilSize = 0; - } - visualConfigs[i].auxBuffers = aux ? conf->aux_buffers : 0; - visualConfigs[i].level = 0; - - if(conf->accelerated) { - visualConfigs[i].visualRating = GLX_NONE; - } else { - visualConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT; - } - - visualConfigs[i].transparentPixel = GLX_NONE; - visualConfigs[i].transparentRed = GLX_NONE; - visualConfigs[i].transparentGreen = GLX_NONE; - visualConfigs[i].transparentBlue = GLX_NONE; - visualConfigs[i].transparentAlpha = GLX_NONE; - visualConfigs[i].transparentIndex = GLX_NONE; - - if(msample > 0) { - visualConfigs[i].multiSampleSize = conf->multisample_samples; - visualConfigs[i].nMultiSampleBuffers = conf->multisample_buffers; - } else { - visualConfigs[i].multiSampleSize = 0; - visualConfigs[i].nMultiSampleBuffers = 0; - } + // Depth + c->depthBits = conf->depth_buffers[depth]; + + // MultiSample + if(msample > 0) { + c->samples = conf->multisample_samples; + c->sampleBuffers = conf->multisample_buffers; + } else { + c->samples = 0; + c->sampleBuffers = 0; + } - ++i; - } - } - } - } - } - } - } - } + /* + * The Apple libGL supports GLXPixmaps and + * GLXPbuffers in direct mode. + */ + /* SGIX_fbconfig / GLX 1.3 */ + c->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT; + c->renderType = GLX_RGBA_BIT; + c->xRenderable = GL_TRUE; + c->fbconfigID = -1; + + /* SGIX_pbuffer / GLX 1.3 */ + + /* + * The CGL layer provides a way of retrieving + * the maximum pbuffer width/height, but only + * if we create a context and call glGetIntegerv. + * + * The following values are from a test program + * that does so. + */ + c->maxPbufferWidth = 8192; + c->maxPbufferHeight = 8192; + c->maxPbufferPixels = /*Do we need this?*/ 0; + /* + * There is no introspection for this sort of thing + * with CGL. What should we do realistically? + */ + c->optimalPbufferWidth = 0; + c->optimalPbufferHeight = 0; + + /* EXT_texture_from_pixmap */ + c->bindToTextureRgb = 0; + c->bindToTextureRgba = 0; + c->bindToMipmapTexture = 0; + c->bindToTextureTargets = 0; + c->yInverted = 0; + + c = c->next; + } + } + } + } + } + } + } + } } - if (i != numConfigs) { - ErrorF("numConfigs calculation error in setVisualConfigs! numConfigs is %d i is %d\n", numConfigs, i); - abort(); - } + (c-1)->next = NULL; + if (c - visualConfigs != numConfigs) { + FatalError("numConfigs calculation error in setVisualConfigs! numConfigs is %d i is %d\n", numConfigs, c - visualConfigs); + } + freeGlCapabilities(&caps); - - GlxSetVisualConfigs(numConfigs, visualConfigs, visualPrivates); + return visualConfigs; } diff --git a/xorg-server/hw/xquartz/GL/visualConfigs.h b/xorg-server/hw/xquartz/GL/visualConfigs.h index b9e6ae756..2e1a1b3fd 100644 --- a/xorg-server/hw/xquartz/GL/visualConfigs.h +++ b/xorg-server/hw/xquartz/GL/visualConfigs.h @@ -23,6 +23,6 @@ #ifndef VISUAL_CONFIGS_H #define VISUAL_CONFIGS_H -void setVisualConfigs(void); +__GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber); #endif diff --git a/xorg-server/hw/xquartz/Makefile.am b/xorg-server/hw/xquartz/Makefile.am index e5e2e9e37..ae8aa7f53 100644 --- a/xorg-server/hw/xquartz/Makefile.am +++ b/xorg-server/hw/xquartz/Makefile.am @@ -41,8 +41,8 @@ EXTRA_DIST = \ X11Application.h \ X11Controller.h \ applewmExt.h \ - darwinClut8.h \ darwin.h \ + darwinfb.h \ darwinEvents.h \ keysym2ucs.h \ pseudoramiX.h \ diff --git a/xorg-server/hw/xquartz/Makefile.in b/xorg-server/hw/xquartz/Makefile.in index 639385400..20c13af9b 100644 --- a/xorg-server/hw/xquartz/Makefile.in +++ b/xorg-server/hw/xquartz/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xquartz DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -122,6 +126,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -142,9 +147,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -173,7 +181,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -182,9 +192,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -223,12 +237,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -248,7 +263,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -258,6 +272,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -271,11 +286,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -311,6 +325,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -335,7 +350,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -358,6 +372,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -389,7 +404,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -433,8 +450,8 @@ EXTRA_DIST = \ X11Application.h \ X11Controller.h \ applewmExt.h \ - darwinClut8.h \ darwin.h \ + darwinfb.h \ darwinEvents.h \ keysym2ucs.h \ pseudoramiX.h \ diff --git a/xorg-server/hw/xquartz/X11Application.h b/xorg-server/hw/xquartz/X11Application.h index 80aee5932..5e828a440 100644 --- a/xorg-server/hw/xquartz/X11Application.h +++ b/xorg-server/hw/xquartz/X11Application.h @@ -47,6 +47,7 @@ - (const char *) prefs_get_string:(NSString *)key default:(const char *)def; - (float) prefs_get_float:(NSString *)key default:(float)def; - (int) prefs_get_boolean:(NSString *)key default:(int)def; +- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def; - (NSArray *) prefs_get_array:(NSString *)key; - (void) prefs_set_integer:(NSString *)key value:(int)value; - (void) prefs_set_float:(NSString *)key value:(float)value; @@ -55,6 +56,7 @@ - (void) prefs_set_string:(NSString *)key value:(NSString *)value; - (void) prefs_synchronize; +- (X11Controller *) controller; - (OSX_BOOL) x_active; @end @@ -95,6 +97,7 @@ extern int quartzHasRoot, quartzEnableRootless, quartzFullscreenMenu; #define PREFS_TEST_EXTENSIONS "enable_test_extensions" #define PREFS_XP_OPTIONS "xp_options" #define PREFS_LOGIN_SHELL "login_shell" +#define PREFS_UPDATE_FEED "update_feed" #define PREFS_CLICK_THROUGH "wm_click_through" #define PREFS_FFM "wm_ffm" #define PREFS_FOCUS_ON_NEW_WINDOW "wm_focus_on_new_window" diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m index 9f4738c47..9fb192648 100644 --- a/xorg-server/hw/xquartz/X11Application.m +++ b/xorg-server/hw/xquartz/X11Application.m @@ -41,9 +41,9 @@ #include "darwinEvents.h" #include "quartzKeyboard.h" #include "quartz.h" -#define _APPLEWM_SERVER_ -#include "X11/extensions/applewm.h" +#include #include "micmap.h" +#include "exglobals.h" #include #include @@ -60,12 +60,8 @@ extern BOOL xpbproxy_init (void); #define XSERVER_VERSION "?" #endif -#define ProximityIn 0 -#define ProximityOut 1 - /* Stuck modifier / button state... force release when we context switch */ static NSEventType keyState[NUM_KEYCODES]; -static int modifierFlagsMask; int X11EnableKeyEquivalents = TRUE, quartzFullscreenMenu = FALSE; int quartzHasRoot = FALSE, quartzEnableRootless = TRUE; @@ -80,6 +76,12 @@ static KeyboardLayoutRef last_key_layout; extern int darwinFakeButtons; +/* Store the mouse location while in the background, and update X11's pointer + * location when we become the foreground application + */ +static NSPoint bgMouseLocation; +static BOOL bgMouseLocationUpdated = FALSE; + X11Application *X11App; CFStringRef app_prefs_domain_cfstr = NULL; @@ -188,6 +190,10 @@ static void message_kit_thread (SEL selector, NSObject *arg) { size_t i; DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active) if (state) { + if(bgMouseLocationUpdated) { + DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, bgMouseLocation.x, bgMouseLocation.y, 0.0, 0.0, 0.0); + bgMouseLocationUpdated = FALSE; + } DarwinSendDDXEvent(kXquartzActivate, 0); if (!_x_active) { @@ -201,7 +207,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) { } } else { - if(darwin_modifier_flags) + if(darwin_all_modifier_flags) DarwinUpdateModKeys(0); for(i=0; i < NUM_KEYCODES; i++) { if(keyState[i] == NSKeyDown) { @@ -359,7 +365,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) { if(!ok) switch_on_activate = YES; - if ([e data2] & 0x10 && switch_on_activate) + if ([e data2] & 0x10 && switch_on_activate) // 0x10 is set when we use cmd-tab or the dock icon DarwinSendDDXEvent(kXquartzBringAllToFront, 0); } break; @@ -578,6 +584,23 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { return ret != NULL ? ret : def; } +- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def { + CFPropertyListRef value; + NSURL *ret = NULL; + + value = [self prefs_get:key]; + + if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) { + NSString *s = (NSString *) value; + + ret = [NSURL URLWithString:s]; + } + + if (value != NULL) CFRelease (value); + + return ret != NULL ? ret : def; +} + - (float) prefs_get_float:(NSString *)key default:(float)def { CFPropertyListRef value; float ret = def; @@ -739,6 +762,14 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { noTestExtensions = ![self prefs_get_boolean:@PREFS_TEST_EXTENSIONS default:FALSE]; + +#if XQUARTZ_SPARKLE + NSURL *url = [self prefs_copy_url:@PREFS_UPDATE_FEED default:nil]; + if(url) { + [[SUUpdater sharedUpdater] setFeedURL:url]; + CFRelease(url); + } +#endif } /* This will end up at the end of the responder chain. */ @@ -747,6 +778,10 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { AppleWMCopyToPasteboard); } +- (X11Controller *) controller { + return _controller; +} + - (OSX_BOOL) x_active { return _x_active; } @@ -874,7 +909,6 @@ environment the next time you start X11?", @"Startup xinitrc dialog"); void X11ApplicationMain (int argc, char **argv, char **envp) { NSAutoreleasePool *pool; - int *p; #ifdef DEBUG while (access ("/tmp/x11-block", F_OK) == 0) sleep (1); @@ -919,10 +953,6 @@ void X11ApplicationMain (int argc, char **argv, char **envp) { fprintf(stderr, "X11ApplicationMain: Could not build a valid keymap.\n"); } - for(p=darwin_modifier_mask_list, modifierFlagsMask=0; *p; p++) { - modifierFlagsMask |= *p; - } - /* Tell the server thread that it can proceed */ QuartzInitServer(argc, argv, envp); @@ -933,7 +963,13 @@ void X11ApplicationMain (int argc, char **argv, char **envp) { if(!xpbproxy_init()) fprintf(stderr, "Error initializing xpbproxy\n"); - + +#if XQUARTZ_SPARKLE + [[X11App controller] setup_sparkle]; + [[SUUpdater sharedUpdater] resetUpdateCycle]; +// [[SUUpdater sharedUpdater] checkForUpdates:X11App]; +#endif + [NSApp run]; /* not reached */ } @@ -953,33 +989,49 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe #endif - (void) sendX11NSEvent:(NSEvent *)e { - NSRect screen; - NSPoint location; - NSWindow *window; + NSPoint location = NSZeroPoint, tilt = NSZeroPoint; int ev_button, ev_type; - float pointer_x, pointer_y, pressure, tilt_x, tilt_y; + float pressure = 0.0; DeviceIntPtr pDev; int modifierFlags; - - /* convert location to be relative to top-left of primary display */ - location = [e locationInWindow]; - window = [e window]; - screen = [[[NSScreen screens] objectAtIndex:0] frame]; - - if (window != nil) { - NSRect frame = [window frame]; - pointer_x = location.x + frame.origin.x; - pointer_y = (screen.origin.y + screen.size.height) - - (location.y + frame.origin.y); - } else { - pointer_x = location.x; - pointer_y = (screen.origin.y + screen.size.height) - location.y; + BOOL isMouseOrTabletEvent, isTabletEvent; + + isMouseOrTabletEvent = [e type] == NSLeftMouseDown || [e type] == NSOtherMouseDown || [e type] == NSRightMouseDown || + [e type] == NSLeftMouseUp || [e type] == NSOtherMouseUp || [e type] == NSRightMouseUp || + [e type] == NSLeftMouseDragged || [e type] == NSOtherMouseDragged || [e type] == NSRightMouseDragged || + [e type] == NSMouseMoved || [e type] == NSTabletPoint; + + isTabletEvent = ([e type] == NSTabletPoint) || + (isMouseOrTabletEvent && ([e subtype] == NSTabletPointEventSubtype || [e subtype] == NSTabletProximityEventSubtype)); + + if(isMouseOrTabletEvent) { + static NSPoint lastpt; + NSWindow *window = [e window]; + NSRect screen = [[[NSScreen screens] objectAtIndex:0] frame];; + + if (window != nil) { + NSRect frame = [window frame]; + location = [e locationInWindow]; + location.x += frame.origin.x; + location.y += frame.origin.y; + lastpt = location; + } else if(isTabletEvent) { + // NSEvents for tablets are not consistent wrt deltaXY between events, so we cannot rely on that + // Thus tablets will be subject to the warp-pointer bug worked around by the delta, but tablets + // are not normally used in cases where that bug would present itself, so this is a fair tradeoff + // deltaX and deltaY are incorrect for NSMouseMoved, NSTabletPointEventSubtype + // http://xquartz.macosforge.org/trac/ticket/288 + location = [e locationInWindow]; + lastpt = location; + } else { + location.x = lastpt.x + [e deltaX]; + location.y = lastpt.y - [e deltaY]; + lastpt = [e locationInWindow]; + } + + /* Convert coordinate system */ + location.y = (screen.origin.y + screen.size.height) - location.y; } - - /* Setup our valuators. These will range from 0 to 1 */ - pressure = 0; - tilt_x = 0; - tilt_y = 0; modifierFlags = [e modifierFlags]; @@ -993,14 +1045,14 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe modifierFlags = ensure_flag(modifierFlags, NX_ALTERNATEMASK, NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK, NX_DEVICELALTKEYMASK); #endif - modifierFlags &= modifierFlagsMask; + modifierFlags &= darwin_all_modifier_mask; /* We don't receive modifier key events while out of focus, and 3button * emulation mucks this up, so we need to check our modifier flag state * on every event... ugg */ - if(darwin_modifier_flags != modifierFlags) + if(darwin_all_modifier_flags != modifierFlags) DarwinUpdateModKeys(modifierFlags); switch ([e type]) { @@ -1042,46 +1094,54 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe * NSTabletProximityEventSubtype will come from NSTabletPoint * rather than NSMouseMoved. pressure = [e pressure]; - tilt_x = [e tilt].x; - tilt_y = [e tilt].y; + tilt = [e tilt]; pDev = darwinTabletCurrent; */ - DarwinSendProximityEvents([e isEnteringProximity]?ProximityIn:ProximityOut, - pointer_x, pointer_y); + DarwinSendProximityEvents([e isEnteringProximity] ? ProximityIn : ProximityOut, + location.x, location.y); } if ([e type] == NSTabletPoint || [e subtype] == NSTabletPointEventSubtype) { pressure = [e pressure]; - tilt_x = [e tilt].x; - tilt_y = [e tilt].y; + tilt = [e tilt]; pDev = darwinTabletCurrent; } + if(!quartzServerVisible && noTestExtensions) { +#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION > 0 /* Older libXplugin (Tiger/"Stock" Leopard) aren't thread safe, so we can't call xp_find_window from the Appkit thread */ -#ifdef XPLUGIN_VERSION -#if XPLUGIN_VERSION > 0 - if(!quartzServerVisible) { - xp_window_id wid; + xp_window_id wid = 0; + xp_error e; /* Sigh. Need to check that we're really over one of * our windows. (We need to receive pointer events while * not in the foreground, but we don't want to receive them * when another window is over us or we might show a tooltip) */ - - wid = 0; - - if (xp_find_window(pointer_x, pointer_y, 0, &wid) == XP_Success && - wid == 0) - return; - } -#endif + + e = xp_find_window(location.x, location.y, 0, &wid); + + if (e != XP_Success || (e == XP_Success && wid == 0)) #endif + { + bgMouseLocation = location; + bgMouseLocationUpdated = TRUE; + return; + } + } - DarwinSendPointerEvents(pDev, ev_type, ev_button, pointer_x, pointer_y, - pressure, tilt_x, tilt_y); + if(bgMouseLocationUpdated) { + if(!(ev_type == MotionNotify && ev_button == 0)) { + DarwinSendPointerEvents(pDev, MotionNotify, 0, location.x, + location.y, pressure, tilt.x, tilt.y); + } + bgMouseLocationUpdated = FALSE; + } + + DarwinSendPointerEvents(pDev, ev_type, ev_button, location.x, location.y, + pressure, tilt.x, tilt.y); break; @@ -1100,13 +1160,23 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe break; } - DarwinSendProximityEvents([e isEnteringProximity]?ProximityIn:ProximityOut, - pointer_x, pointer_y); + DarwinSendProximityEvents([e isEnteringProximity] ? ProximityIn : ProximityOut, + location.x, location.y); break; case NSScrollWheel: - DarwinSendScrollEvents([e deltaX], [e deltaY], pointer_x, pointer_y, - pressure, tilt_x, tilt_y); +#if !defined(XPLUGIN_VERSION) || XPLUGIN_VERSION == 0 + /* If we're in the background, we need to send a MotionNotify event + * first, since we aren't getting them on background mouse motion + */ + if(!quartzServerVisible && noTestExtensions) { + bgMouseLocationUpdated = FALSE; + DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, location.x, + location.y, pressure, tilt.x, tilt.y); + } +#endif + DarwinSendScrollEvents([e deltaX], [e deltaY], location.x, location.y, + pressure, tilt.x, tilt.y); break; case NSKeyDown: case NSKeyUp: diff --git a/xorg-server/hw/xquartz/X11Controller.h b/xorg-server/hw/xquartz/X11Controller.h index bb9adb1ce..a86b20f17 100644 --- a/xorg-server/hw/xquartz/X11Controller.h +++ b/xorg-server/hw/xquartz/X11Controller.h @@ -30,11 +30,31 @@ #ifndef X11CONTROLLER_H #define X11CONTROLLER_H 1 +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + #if __OBJC__ #include "sanitizedCocoa.h" #include "xpr/x-list.h" +#ifdef XQUARTZ_SPARKLE +#define BOOL OSX_BOOL +#include +#undef BOOL +#endif + +#ifndef NSINTEGER_DEFINED +#if __LP64__ || NS_BUILD_32_LIKE_64 +typedef long NSInteger; +typedef unsigned long NSUInteger; +#else +typedef int NSInteger; +typedef unsigned int NSUInteger; +#endif +#endif + @interface X11Controller : NSObject { IBOutlet NSPanel *prefs_panel; @@ -59,11 +79,19 @@ IBOutlet NSTextField *sync_text2; IBOutlet NSPopUpButton *depth; - IBOutlet NSMenuItem *x11_about_item; IBOutlet NSMenuItem *window_separator; + // window_separator is DEPRECATED due to this radar: + // NSApplication releases the separator in the Windows menu even though it's an IBOutlet + // It is kept around for localization compatability and is subject to removal "eventually" + // If it is !NULL (meaning it is in the nib), it is removed from the menu and released + + IBOutlet NSMenuItem *x11_about_item; IBOutlet NSMenuItem *dock_window_separator; IBOutlet NSMenuItem *apps_separator; IBOutlet NSMenuItem *toggle_fullscreen_item; +#ifdef XQUARTZ_SPARKLE + NSMenuItem *check_for_updates_item; // Programatically enabled +#endif IBOutlet NSMenuItem *copy_menu_item; IBOutlet NSMenu *dock_apps_menu; IBOutlet NSTableView *apps_table; @@ -72,6 +100,9 @@ NSMutableArray *table_apps; IBOutlet NSMenu *dock_menu; + + // This is where in the Windows menu we'll start (this will be the index of the separator) + NSInteger windows_menu_start; int checked_window_item; x_list *pending_apps; @@ -83,6 +114,10 @@ - (void) set_window_menu:(NSArray *)list; - (void) set_window_menu_check:(NSNumber *)n; - (void) set_apps_menu:(NSArray *)list; +#ifdef XQUARTZ_SPARKLE +- (void) setup_sparkle; +- (void) updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update; +#endif - (void) set_can_quit:(OSX_BOOL)state; - (void) server_ready; diff --git a/xorg-server/hw/xquartz/X11Controller.m b/xorg-server/hw/xquartz/X11Controller.m index adf861ca9..f58747e15 100644 --- a/xorg-server/hw/xquartz/X11Controller.m +++ b/xorg-server/hw/xquartz/X11Controller.m @@ -43,8 +43,7 @@ #include "darwin.h" #include "darwinEvents.h" #include "quartz.h" -#define _APPLEWM_SERVER_ -#include "X11/extensions/applewm.h" +#include #include "applewmExt.h" #include @@ -103,7 +102,14 @@ BOOL xquartz_resetenv_display = NO; selector: @selector(apps_table_done:) name: NSWindowWillCloseNotification object: [apps_table window]]; + + // Setup data about our Windows menu + if(window_separator) { + [[window_separator menu] removeItem:window_separator]; + window_separator = nil; + } + windows_menu_start = [[X11App windowsMenu] numberOfItems]; } - (void) item_selected:sender @@ -117,17 +123,15 @@ BOOL xquartz_resetenv_display = NO; - (void) remove_window_menu { NSMenu *menu; - int first, count, i; - + int count, i; + /* Work backwards so we don't mess up the indices */ - menu = [window_separator menu]; - first = [menu indexOfItem:window_separator] + 1; + menu = [X11App windowsMenu]; count = [menu numberOfItems]; - for (i = count - 1; i >= first; i--) + for (i = count - 1; i >= windows_menu_start; i--) [menu removeItemAtIndex:i]; - menu = [dock_window_separator menu]; - count = [menu indexOfItem:dock_window_separator]; + count = [dock_menu indexOfItem:dock_window_separator]; for (i = 0; i < count; i++) [dock_menu removeItemAtIndex:0]; } @@ -138,9 +142,15 @@ BOOL xquartz_resetenv_display = NO; NSMenuItem *item; int first, count, i; - menu = [window_separator menu]; - first = [menu indexOfItem:window_separator] + 1; + menu = [X11App windowsMenu]; + first = windows_menu_start + 1; count = [list count]; + + // Push a Separator + if(count) { + [menu addItem:[NSMenuItem separatorItem]]; + } + for (i = 0; i < count; i++) { NSString *name, *shortcut; @@ -153,11 +163,7 @@ BOOL xquartz_resetenv_display = NO; item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector (item_selected:) keyEquivalent:shortcut]; -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask]; -#else - [item setKeyEquivalentModifierMask:windowItemModMask]; -#endif [item setTarget:self]; [item setTag:i]; [item setEnabled:YES]; @@ -166,11 +172,7 @@ BOOL xquartz_resetenv_display = NO; action:@selector (item_selected:) keyEquivalent:shortcut atIndex:i]; -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask]; -#else - [item setKeyEquivalentModifierMask:windowItemModMask]; -#endif [item setTarget:self]; [item setTag:i]; [item setEnabled:YES]; @@ -285,8 +287,8 @@ BOOL xquartz_resetenv_display = NO; int first, count; int n = [nn intValue]; - menu = [window_separator menu]; - first = [menu indexOfItem:window_separator] + 1; + menu = [X11App windowsMenu]; + first = windows_menu_start + 1; count = [menu numberOfItems] - first; if (checked_window_item >= 0 && checked_window_item < count) @@ -312,6 +314,31 @@ BOOL xquartz_resetenv_display = NO; [self install_apps_menu:list]; } +#ifdef XQUARTZ_SPARKLE +- (void) setup_sparkle { + if(check_for_updates_item) + return; // already did it... + + NSMenu *menu = [x11_about_item menu]; + + check_for_updates_item = [menu insertItemWithTitle:NSLocalizedString(@"Check for X11 Updates...", @"Check for X11 Updates...") + action:@selector (checkForUpdates:) + keyEquivalent:@"" + atIndex:1]; + [check_for_updates_item setTarget:[SUUpdater sharedUpdater]]; + [check_for_updates_item setEnabled:YES]; + + // Set X11Controller as the delegate for the updater. + [[SUUpdater sharedUpdater] setDelegate:self]; +} + +// Sent immediately before installing the specified update. +- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update { + //[self set_can_quit:YES]; +} + +#endif + - (void) launch_client:(NSString *)filename { int child1, child2 = 0; @@ -704,9 +731,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row if (item == toggle_fullscreen_item) return !quartzEnableRootless; - else if (item == copy_menu_item) // For some reason, this isn't working... - return NO; - else if (menu == [window_separator menu] || menu == dock_menu + else if (menu == [X11App windowsMenu] || menu == dock_menu || (menu == [x11_about_item menu] && [item tag] == 42)) return (AppleWMSelectedEvents () & AppleWMControllerNotifyMask) != 0; else @@ -747,13 +772,16 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row - (void) applicationWillTerminate:(NSNotification *)aNotification { + unsigned remain; [X11App prefs_synchronize]; /* shutdown the X server, it will exit () for us. */ DarwinSendDDXEvent(kXquartzQuit, 0); /* In case it doesn't, exit anyway after a while. */ - while (sleep (10) != 0) ; + remain = 10000000; + while((remain = usleep(remain)) > 0); + exit (1); } diff --git a/xorg-server/hw/xquartz/applewm.c b/xorg-server/hw/xquartz/applewm.c index c72540ace..330bac4a4 100644 --- a/xorg-server/hw/xquartz/applewm.c +++ b/xorg-server/hw/xquartz/applewm.c @@ -33,8 +33,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "quartzCommon.h" -#define NEED_REPLIES -#define NEED_EVENTS #include "misc.h" #include "dixstruct.h" #include "globals.h" @@ -49,7 +47,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include "darwin.h" #define _APPLEWM_SERVER_ -#include "X11/extensions/applewmstr.h" +#include #include "applewmExt.h" #include "X11Application.h" @@ -139,7 +137,7 @@ AppleWMSetScreenOrigin( WindowPtr pWin ) { - long data[2]; + int32_t data[2]; data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX); @@ -494,6 +492,55 @@ ProcAppleWMSetWindowLevel(register ClientPtr client) return (client->noClientException); } +static int +ProcAppleWMSendPSN(register ClientPtr client) +{ + REQUEST(xAppleWMSendPSNReq); + int err; + + REQUEST_SIZE_MATCH(xAppleWMSendPSNReq); + + if(!appleWMProcs->SendPSN) + return BadRequest; + + err = appleWMProcs->SendPSN(stuff->psn_hi, stuff->psn_lo); + if (err != Success) { + return err; + } + + return (client->noClientException); +} + +static int +ProcAppleWMAttachTransient(register ClientPtr client) +{ + WindowPtr pWinChild, pWinParent; + REQUEST(xAppleWMAttachTransientReq); + int err; + + REQUEST_SIZE_MATCH(xAppleWMAttachTransientReq); + + if(!appleWMProcs->AttachTransient) + return BadRequest; + + if (Success != dixLookupWindow(&pWinChild, stuff->child, client, DixReadAccess)) + return BadValue; + + if(stuff->parent) { + if(Success != dixLookupWindow(&pWinParent, stuff->parent, client, DixReadAccess)) + return BadValue; + } else { + pWinParent = NULL; + } + + err = appleWMProcs->AttachTransient(pWinChild, pWinParent); + if (err != Success) { + return err; + } + + return (client->noClientException); +} + static int ProcAppleWMSetCanQuit( register ClientPtr client @@ -654,6 +701,10 @@ ProcAppleWMDispatch ( return ProcAppleWMFrameHitTest(client); case X_AppleWMFrameDraw: return ProcAppleWMFrameDraw(client); + case X_AppleWMSendPSN: + return ProcAppleWMSendPSN(client); + case X_AppleWMAttachTransient: + return ProcAppleWMAttachTransient(client); default: return BadRequest; } diff --git a/xorg-server/hw/xquartz/applewmExt.h b/xorg-server/hw/xquartz/applewmExt.h index 60d49ef59..5ef8b5496 100644 --- a/xorg-server/hw/xquartz/applewmExt.h +++ b/xorg-server/hw/xquartz/applewmExt.h @@ -45,6 +45,8 @@ typedef int (*FrameDrawProc)(WindowPtr pWin, int class, unsigned int attr, const BoxRec *outer, const BoxRec *inner, unsigned int title_len, const unsigned char *title_bytes); +typedef int (*SendPSNProc)(uint32_t hi, uint32_t lo); +typedef int (*AttachTransientProc)(WindowPtr pWinChild, WindowPtr pWinParent); /* * AppleWM implementation function list @@ -56,6 +58,8 @@ typedef struct _AppleWMProcs { FrameGetRectProc FrameGetRect; FrameHitTestProc FrameHitTest; FrameDrawProc FrameDraw; + SendPSNProc SendPSN; + AttachTransientProc AttachTransient; } AppleWMProcsRec, *AppleWMProcsPtr; void AppleWMExtensionInit( diff --git a/xorg-server/hw/xquartz/bundle/Info.plist.cpp b/xorg-server/hw/xquartz/bundle/Info.plist.cpp index 47018fdf3..6d951ada8 100644 --- a/xorg-server/hw/xquartz/bundle/Info.plist.cpp +++ b/xorg-server/hw/xquartz/bundle/Info.plist.cpp @@ -19,17 +19,25 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.3.2 + 2.4.0 CFBundleVersion - 2.3.2 + 2.4.0 CFBundleSignature x11a CSResourcesFileMapped +#ifdef XQUARTZ_SPARKLE + SUEnableAutomaticChecks + + SUPublicDSAKeyFile + sparkle.pem + SUFeedURL + http://xquartz.macosforge.org/downloads/sparkle/release.xml +#endif NSHumanReadableCopyright - Copyright © 2003-2009, Apple Inc. -Copyright © 2003, XFree86 Project, Inc. -Copyright © 2003-2009, X.org Foundation, Inc. + © 2003-2009 Apple Inc. +© 2003 XFree86 Project, Inc. +© 2003-2009 X.org Foundation, Inc. NSMainNibFile main diff --git a/xorg-server/hw/xquartz/bundle/Makefile.am b/xorg-server/hw/xquartz/bundle/Makefile.am index 963327bb9..ea02cd620 100644 --- a/xorg-server/hw/xquartz/bundle/Makefile.am +++ b/xorg-server/hw/xquartz/bundle/Makefile.am @@ -4,6 +4,10 @@ CPP_FILES_FLAGS = \ -DAPPLE_APPLICATION_ID="$(APPLE_APPLICATION_ID)" \ -DAPPLE_APPLICATION_NAME="$(APPLE_APPLICATION_NAME)" +if XQUARTZ_SPARKLE +CPP_FILES_FLAGS += -DXQUARTZ_SPARKLE +endif + install-data-hook: $(srcdir)/mk_bundke.sh $(srcdir) $(builddir) $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app install diff --git a/xorg-server/hw/xquartz/bundle/Makefile.in b/xorg-server/hw/xquartz/bundle/Makefile.in index ca5d994f9..b6b69c6bd 100644 --- a/xorg-server/hw/xquartz/bundle/Makefile.in +++ b/xorg-server/hw/xquartz/bundle/Makefile.in @@ -43,10 +43,14 @@ build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/cpprules.in +@XQUARTZ_SPARKLE_TRUE@am__append_1 = -DXQUARTZ_SPARKLE subdir = hw/xquartz/bundle ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -56,7 +60,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -90,6 +95,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -110,9 +116,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -141,7 +150,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -150,9 +161,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -191,12 +206,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -216,7 +232,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -226,6 +241,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -239,11 +255,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -279,6 +294,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -303,7 +319,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -326,6 +341,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -357,7 +373,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -387,10 +405,9 @@ MANDEFS = \ -DSHELL_CMD=$(SHELL_CMD) $(ARCHMANDEFS) SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp -CPP_FILES_FLAGS = \ - -DAPPLE_APPLICATION_ID="$(APPLE_APPLICATION_ID)" \ - -DAPPLE_APPLICATION_NAME="$(APPLE_APPLICATION_NAME)" - +CPP_FILES_FLAGS = -DAPPLE_APPLICATION_ID="$(APPLE_APPLICATION_ID)" \ + -DAPPLE_APPLICATION_NAME="$(APPLE_APPLICATION_NAME)" \ + $(am__append_1) noinst_PRE = Info.plist.cpp noinst_DATA = $(noinst_PRE:plist.cpp=plist) CLEANFILES = $(noinst_DATA) diff --git a/xorg-server/hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings index 1ff39fe67..40a843ee7 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib index 95c26d7b3..9209e81fa 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/English.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/English.lproj/Localizable.strings index 001227afe..03415026e 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/English.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/English.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib index d27162539..94d01047c 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib +++ b/xorg-server/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib @@ -2,9 +2,9 @@ 1050 - 9G55 + 9L29 677 - 949.43 + 949.54 353.00 YES @@ -341,17 +341,6 @@ - - - YES - YES - - - 1048576 - 2147483647 - - - _NSWindowsMenu @@ -857,7 +846,7 @@ Lg 67239424 0 - Update CLIPBOARD when Pasteboard changes. + Update CLIPBOARD when Pasteboard changes 1211912703 @@ -878,7 +867,7 @@ Lg 67239424 0 - Update PRIMARY (middle-click) when Pasteboard changes. + Update PRIMARY (middle-click) when Pasteboard changes 1211912703 @@ -899,7 +888,7 @@ Lg 67239424 0 - Update Pasteboard immediately when new text is selected. + Update Pasteboard immediately when new text is selected 1211912703 @@ -920,7 +909,7 @@ Lg 67239424 0 - Update Pasteboard when CLIPBOARD changes. + Update Pasteboard when CLIPBOARD changes 1211912703 @@ -1953,14 +1942,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 549 - - - window_separator - - - - 300331 - menu @@ -2209,7 +2190,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - @@ -3013,11 +2993,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - - 300330 - - - 300337 @@ -3401,8 +3376,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 298.ImportedFromIB2 300295.IBPluginDependency 300295.IBShouldRemoveOnLegacySave - 300330.IBPluginDependency - 300330.ImportedFromIB2 300337.IBPluginDependency 300337.ImportedFromIB2 300338.IBPluginDependency @@ -3638,7 +3611,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 com.apple.InterfaceBuilder.CocoaPlugin - {{349, 858}, {315, 153}} + {{349, 868}, {315, 143}} com.apple.InterfaceBuilder.CocoaPlugin {{271, 666}, {301, 153}} @@ -3699,8 +3672,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin diff --git a/xorg-server/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib index ee6cdf25e..fee8f1ce9 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/French.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/French.lproj/Localizable.strings index 2770dfb8c..1dd2e0601 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/French.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/French.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib index 9f9a7da67..9c65224a7 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/German.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/German.lproj/Localizable.strings index a5489ab5c..48c4e29c4 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/German.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/German.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib index 19532a9c2..1cc64172e 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings index d05d73d44..560a1fe40 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib index b6e2e1bb1..3c95f407b 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings index 99821ea1f..23c1879a7 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib index 523fd0856..7c96bfaec 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings index 652f432a5..156f61841 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib index 029349dd0..7e584058b 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/Localizable.strings index 9608a2e6b..dfe842313 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib index 4a2bd4bde..df8c01bf4 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings index e8420fbaa..7135063cc 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib index b5039fd44..e444ebf40 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings index 56a335859..33e0da528 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib index 925945c4d..f8d3ac4b0 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/no.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/no.lproj/Localizable.strings index 5157a67de..68d86fd78 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/no.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/no.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib index ca25327f5..562302f71 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings index 4ae12d77f..9a709d306 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib index e9ca5404b..d9aedb230 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings index 23ea96847..8cd9fecef 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib index e88cccdba..3dbd44f7a 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings index 71c33ad14..72d22b5d6 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib index a61933475..e48620b80 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings index 3b3811234..f172a8f72 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib index 9354e0264..5e11dcc78 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings index 655d5ff63..1522655dd 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings and b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings index 796f06c21..ccd68d059 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib index bd01c2dac..897aefa80 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings index f88a6da4b..8be59dade 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib index e36c15fb6..663ae241e 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings b/xorg-server/hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings index f009302c2..ba09668c0 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings and b/xorg-server/hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib index 36602c53e..12c5a14e8 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/darwin.c b/xorg-server/hw/xquartz/darwin.c index f01668201..7129ac61f 100644 --- a/xorg-server/hw/xquartz/darwin.c +++ b/xorg-server/hw/xquartz/darwin.c @@ -51,6 +51,8 @@ #include "exevents.h" #include "extinit.h" +#include "xserver-properties.h" + #include #include #include @@ -73,10 +75,6 @@ #include "darwinEvents.h" #include "quartzKeyboard.h" #include "quartz.h" -//#include "darwinClut8.h" - -#include "GL/visualConfigs.h" - #ifdef ENABLE_DEBUG_LOG FILE *debug_log_fp = NULL; @@ -155,10 +153,6 @@ const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]); #define XORG_RELEASE "?" #endif -void DDXRingBell(int volume, int pitch, int duration) { - // FIXME -- make some noise, yo -} - void DarwinPrintBanner(void) { @@ -183,18 +177,23 @@ static Bool DarwinSaveScreen(ScreenPtr pScreen, int on) } /* - * DarwinAddScreen + * DarwinScreenInit * This is a callback from dix during AddScreen() from InitOutput(). * Initialize the screen and communicate information about it back to dix. */ -static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv) { +static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) { int dpi; static int foundIndex = 0; Bool ret; DarwinFramebufferPtr dfb; // reset index of found screens for each server generation - if (index == 0) foundIndex = 0; + if (index == 0) { + foundIndex = 0; + + // reset the visual list + miClearVisualTypes(); + } // allocate space for private per screen storage dfb = xalloc(sizeof(DarwinFramebufferRec)); @@ -208,9 +207,6 @@ static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv) if (! ret) return FALSE; - // reset the visual list - miClearVisualTypes(); - // setup a single visual appropriate for our pixel type if(!miSetVisualTypesAndMasks(dfb->depth, dfb->visuals, dfb->bitsPerRGB, dfb->preferredCVC, dfb->redMask, @@ -221,17 +217,10 @@ static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv) // TODO: Make PseudoColor visuals not suck in TrueColor mode // if(dfb->depth > 8) // miSetVisualTypesAndMasks(8, PseudoColorMask, 8, PseudoColor, 0, 0, 0); - -#if 0 - /* - * These aren't used anymore. xpr/xprScreen.c initializes the dfb struct - * above based on the display properties. - */ if(dfb->depth > 15) - miSetVisualTypesAndMasks(15, LARGE_VISUALS, 5, TrueColor, 0x7c00, 0x03e0, 0x001f); + miSetVisualTypesAndMasks(15, TrueColorMask, 5, TrueColor, RM_ARGB(0,5,5,5), GM_ARGB(0,5,5,5), BM_ARGB(0,5,5,5)); if(dfb->depth > 24) - miSetVisualTypesAndMasks(24, LARGE_VISUALS, 8, TrueColor, 0x00ff0000, 0x0000ff00, 0x000000ff); -#endif + miSetVisualTypesAndMasks(24, TrueColorMask, 8, TrueColor, RM_ARGB(0,8,8,8), GM_ARGB(0,8,8,8), BM_ARGB(0,8,8,8)); miSetPixmapDepths(); @@ -253,29 +242,6 @@ static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv) return FALSE; } -// ErrorF("Screen type: %d, %d=%d, %d=%d, %d=%d, %x=%x=%x, %x=%x=%x, %x=%x=%x\n", pScreen->visuals->class, -// pScreen->visuals->offsetRed, dfb->bitsPerRGB * 2, -// pScreen->visuals->offsetGreen, dfb->bitsPerRGB, -// pScreen->visuals->offsetBlue, 0, -// pScreen->visuals->redMask, dfb->redMask, ((1<bitsPerRGB)-1) << pScreen->visuals->offsetRed, -// pScreen->visuals->greenMask, dfb->greenMask, ((1<bitsPerRGB)-1) << pScreen->visuals->offsetGreen, -// pScreen->visuals->blueMask, dfb->blueMask, ((1<bitsPerRGB)-1) << pScreen->visuals->offsetBlue); - - // set the RGB order correctly for TrueColor -// if (dfb->bitsPerPixel > 8) { -// for (i = 0, visual = pScreen->visuals; // someday we may have more than 1 -// i < pScreen->numVisuals; i++, visual++) { -// if (visual->class == TrueColor) { -// visual->offsetRed = bitsPerRGB * 2; -// visual->offsetGreen = bitsPerRGB; -// visual->offsetBlue = 0; -// visual->redMask = ((1<offsetRed; -// visual->greenMask = ((1<offsetGreen; -// visual->blueMask = ((1<offsetBlue; -// } -// } -// } - #ifdef RENDER if (! fbPictureInit(pScreen, 0, 0)) { return FALSE; @@ -300,21 +266,6 @@ static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv) return FALSE; } - /* Set the colormap to the statically defined one if we're in 8 bit - * mode and we're using a fixed color map. Essentially this translates - * to Darwin/x86 in 8-bit mode. - */ -// if(dfb->depth == 8) { -// ColormapPtr map = RootlessGetColormap (pScreen); -// for( i = 0; i < map->pVisual->ColormapEntries; i++ ) { -// Entry *ent = map->red + i; -// ErrorF("Setting lo %d -> r: %04x g: %04x b: %04x\n", i, darwinClut8[i].red, darwinClut8[i].green, darwinClut8[i].blue); -// ent->co.local.red = darwinClut8[i].red; -// ent->co.local.green = darwinClut8[i].green; -// ent->co.local.blue = darwinClut8[i].blue; -// } -// } - dixScreenOrigins[index].x = dfb->x; dixScreenOrigins[index].y = dfb->y; @@ -336,17 +287,35 @@ static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv) * DarwinMouseProc: Handle the initialization, etc. of a mouse */ static int DarwinMouseProc(DeviceIntPtr pPointer, int what) { +#define NBUTTONS 7 +#define NAXES 2 // 7 buttons: left, right, middle, then four scroll wheel "buttons" - CARD8 map[8] = {0, 1, 2, 3, 4, 5, 6, 7}; - + CARD8 map[NBUTTONS + 1] = {0, 1, 2, 3, 4, 5, 6, 7}; + Atom btn_labels[NAXES] = {0}; + Atom axes_labels[NBUTTONS] = {0}; + switch (what) { case DEVICE_INIT: pPointer->public.on = FALSE; - + + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); + btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); + btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); + btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + + // Set button map. - InitPointerDeviceStruct((DevicePtr)pPointer, map, 7, + InitPointerDeviceStruct((DevicePtr)pPointer, map, NBUTTONS, + btn_labels, (PtrCtrlProcPtr)NoopDDA, - GetMotionHistorySize(), 2); + GetMotionHistorySize(), NAXES, + axes_labels); pPointer->valuator->mode = Absolute; // Relative InitAbsoluteClassDeviceStruct(pPointer); // InitValuatorAxisStruct(pPointer, 0, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); @@ -364,28 +333,43 @@ static int DarwinMouseProc(DeviceIntPtr pPointer, int what) { } return Success; +#undef NBUTTONS +#undef NAXES } static int DarwinTabletProc(DeviceIntPtr pPointer, int what) { - CARD8 map[4] = {0, 1, 2, 3}; - +#define NBUTTONS 3 +#define NAXES 5 + CARD8 map[NBUTTONS + 1] = {0, 1, 2, 3}; + Atom axes_labels[NAXES] = {0}; + Atom btn_labels[NBUTTONS] = {0}; + switch (what) { case DEVICE_INIT: pPointer->public.on = FALSE; - + + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y); + // Set button map. - InitPointerDeviceStruct((DevicePtr)pPointer, map, 3, + InitPointerDeviceStruct((DevicePtr)pPointer, map, NBUTTONS, + btn_labels, (PtrCtrlProcPtr)NoopDDA, - GetMotionHistorySize(), 5); + GetMotionHistorySize(), NAXES, + axes_labels); pPointer->valuator->mode = Absolute; // Relative InitProximityClassDeviceStruct(pPointer); InitAbsoluteClassDeviceStruct(pPointer); - InitValuatorAxisStruct(pPointer, 0, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); - InitValuatorAxisStruct(pPointer, 1, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); - InitValuatorAxisStruct(pPointer, 2, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); - InitValuatorAxisStruct(pPointer, 3, -XQUARTZ_VALUATOR_LIMIT, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); - InitValuatorAxisStruct(pPointer, 4, -XQUARTZ_VALUATOR_LIMIT, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); + InitValuatorAxisStruct(pPointer, 0, axes_labels[0], 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); + InitValuatorAxisStruct(pPointer, 1, axes_labels[1], 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); + InitValuatorAxisStruct(pPointer, 2, axes_labels[2], 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); + InitValuatorAxisStruct(pPointer, 3, axes_labels[3], -XQUARTZ_VALUATOR_LIMIT, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); + InitValuatorAxisStruct(pPointer, 4, axes_labels[4], -XQUARTZ_VALUATOR_LIMIT, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1); // pPointer->use = IsXExtensionDevice; break; case DEVICE_ON: @@ -399,6 +383,8 @@ static int DarwinTabletProc(DeviceIntPtr pPointer, int what) { return Success; } return Success; +#undef NBUTTONS +#undef NAXES } /* @@ -577,7 +563,7 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo) * The display mode dependent code gets called three times. The mode * specific InitOutput routines are expected to discover the number * of potentially useful screens and cache routes to them internally. - * Inside DarwinAddScreen are two other mode specific calls. + * Inside DarwinScreenInit are two other mode specific calls. * A mode specific AddScreen routine is called for each screen to * actually initialize the screen with the ScreenPtr structure. * After other screen setup has been done, a mode specific @@ -597,16 +583,12 @@ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv ) for (i = 0; i < NUMFORMATS; i++) pScreenInfo->formats[i] = formats[i]; -#ifdef GLXEXT - setVisualConfigs(); -#endif - // Discover screens and do mode specific initialization QuartzInitOutput(argc, argv); // Add screens for (i = 0; i < darwinScreensFound; i++) { - AddScreen( DarwinAddScreen, argc, argv ); + AddScreen(DarwinScreenInit, argc, argv); } DarwinAdjustScreenOrigins(pScreenInfo); diff --git a/xorg-server/hw/xquartz/darwin.h b/xorg-server/hw/xquartz/darwin.h index 7fb9396e5..586044fba 100644 --- a/xorg-server/hw/xquartz/darwin.h +++ b/xorg-server/hw/xquartz/darwin.h @@ -36,22 +36,7 @@ #include "threadSafety.h" -typedef struct { - void *framebuffer; - int x; - int y; - int width; - int height; - int pitch; - int depth; - int visuals; - int bitsPerRGB; - int bitsPerPixel; - int preferredCVC; - Pixel redMask; - Pixel greenMask; - Pixel blueMask; -} DarwinFramebufferRec, *DarwinFramebufferPtr; +#include "darwinfb.h" // From darwin.c void DarwinPrintBanner(void); diff --git a/xorg-server/hw/xquartz/darwinEvents.c b/xorg-server/hw/xquartz/darwinEvents.c index 374c4e07e..4822af479 100644 --- a/xorg-server/hw/xquartz/darwinEvents.c +++ b/xorg-server/hw/xquartz/darwinEvents.c @@ -36,7 +36,6 @@ in this Software without prior written authorization from The Open Group. #include #endif -#define NEED_EVENTS #include #include #include @@ -68,14 +67,15 @@ in this Software without prior written authorization from The Open Group. #define SCROLLWHEELLEFTFAKE 6 #define SCROLLWHEELRIGHTFAKE 7 -#define _APPLEWM_SERVER_ +#include #include "applewmExt.h" -#include /* FIXME: Abstract this better */ void QuartzModeEQInit(void); -int darwin_modifier_flags = 0; // last known modifier state +int darwin_all_modifier_flags = 0; // last known modifier state +int darwin_all_modifier_mask = 0; +int darwin_x11_modifier_mask = 0; #define FD_ADD_MAX 128 static int fd_add[FD_ADD_MAX]; @@ -146,7 +146,7 @@ static void DarwinPressModifierKey(int pressed, int key) { * Send events to update the modifier state. */ -int darwin_modifier_mask_list[] = { +static int darwin_x11_modifier_mask_list[] = { #ifdef NX_DEVICELCMDKEYMASK NX_DEVICELCTLKEYMASK, NX_DEVICERCTLKEYMASK, NX_DEVICELSHIFTKEYMASK, NX_DEVICERSHIFTKEYMASK, @@ -159,6 +159,8 @@ int darwin_modifier_mask_list[] = { 0 }; +static int darwin_all_modifier_mask_additions[] = { NX_SECONDARYFNMASK, }; + static void DarwinUpdateModifiers( int pressed, // KeyPress or KeyRelease int flags ) // modifier flags that have changed @@ -174,7 +176,7 @@ static void DarwinUpdateModifiers( DarwinPressModifierKey(KeyRelease, NX_MODIFIERKEY_ALPHALOCK); } - for(f=darwin_modifier_mask_list; *f; f++) + for(f=darwin_x11_modifier_mask_list; *f; f++) if(*f & flags && *f != NX_ALPHASHIFTMASK) { key = DarwinModifierNXMaskToNXKey(*f); if(key == -1) @@ -307,6 +309,16 @@ static void kXquartzListenOnOpenFDHandler(int screenNum, xEventPtr xe, DeviceInt } Bool DarwinEQInit(void) { + int *p; + + for(p=darwin_x11_modifier_mask_list, darwin_all_modifier_mask=0; *p; p++) { + darwin_x11_modifier_mask |= *p; + } + + for(p=darwin_all_modifier_mask_additions, darwin_all_modifier_mask= darwin_x11_modifier_mask; *p; p++) { + darwin_all_modifier_mask |= *p; + } + mieqInit(); mieqSetHandler(kXquartzReloadKeymap, DarwinKeyboardReloadHandler); mieqSetHandler(kXquartzActivate, DarwinEventHandler); @@ -435,14 +447,14 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa DarwinSendPointerEvents(pDev, ButtonRelease, darwinFakeMouseButtonDown, pointer_x, pointer_y, pressure, tilt_x, tilt_y); darwinFakeMouseButtonDown=0; } - if (darwin_modifier_flags & darwinFakeMouse2Mask) { + if (darwin_all_modifier_flags & darwinFakeMouse2Mask) { ev_button = 2; darwinFakeMouseButtonDown = 2; - DarwinUpdateModKeys(darwin_modifier_flags & ~darwinFakeMouse2Mask); - } else if (darwin_modifier_flags & darwinFakeMouse3Mask) { + DarwinUpdateModKeys(darwin_all_modifier_flags & ~darwinFakeMouse2Mask); + } else if (darwin_all_modifier_flags & darwinFakeMouse3Mask) { ev_button = 3; darwinFakeMouseButtonDown = 3; - DarwinUpdateModKeys(darwin_modifier_flags & ~darwinFakeMouse3Mask); + DarwinUpdateModKeys(darwin_all_modifier_flags & ~darwinFakeMouse3Mask); } } @@ -452,9 +464,9 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa } if(darwinFakeMouseButtonDown == 2) { - DarwinUpdateModKeys(darwin_modifier_flags & ~darwinFakeMouse2Mask); + DarwinUpdateModKeys(darwin_all_modifier_flags & ~darwinFakeMouse2Mask); } else if(darwinFakeMouseButtonDown == 3) { - DarwinUpdateModKeys(darwin_modifier_flags & ~darwinFakeMouse3Mask); + DarwinUpdateModKeys(darwin_all_modifier_flags & ~darwinFakeMouse3Mask); } darwinFakeMouseButtonDown = 0; @@ -465,7 +477,7 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa num_events = GetPointerEvents(darwinEvents, pDev, ev_type, ev_button, POINTER_ABSOLUTE, 0, pDev==darwinTabletCurrent?5:2, valuators); for(i=0; i 0) DarwinPokeEQ(); } darwinEvents_unlock(); } @@ -480,7 +492,7 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) { darwinEvents_lock(); { num_events = GetKeyboardEvents(darwinEvents, darwinKeyboard, ev_type, keycode + MIN_KEYCODE); for(i=0; i 0) DarwinPokeEQ(); } darwinEvents_unlock(); } @@ -508,7 +520,7 @@ void DarwinSendProximityEvents(int ev_type, float pointer_x, float pointer_y) { num_events = GetProximityEvents(darwinEvents, pDev, ev_type, 0, 5, valuators); for(i=0; i 0) DarwinPokeEQ(); } darwinEvents_unlock(); } @@ -544,9 +556,9 @@ void DarwinSendScrollEvents(float count_x, float count_y, /* Send the appropriate KeyPress/KeyRelease events to GetKeyboardEvents to reflect changing modifier flags (alt, control, meta, etc) */ void DarwinUpdateModKeys(int flags) { - DarwinUpdateModifiers(KeyRelease, darwin_modifier_flags & ~flags); - DarwinUpdateModifiers(KeyPress, ~darwin_modifier_flags & flags); - darwin_modifier_flags = flags; + DarwinUpdateModifiers(KeyRelease, darwin_all_modifier_flags & ~flags & darwin_x11_modifier_mask); + DarwinUpdateModifiers(KeyPress, ~darwin_all_modifier_flags & flags & darwin_x11_modifier_mask); + darwin_all_modifier_flags = flags; } /* @@ -574,7 +586,7 @@ void DarwinSendDDXEvent(int type, int argc, ...) { } darwinEvents_lock(); { - mieqEnqueue(darwinPointer, &xe); + mieqEnqueue(NULL, &xe); DarwinPokeEQ(); } darwinEvents_unlock(); } diff --git a/xorg-server/hw/xquartz/darwinEvents.h b/xorg-server/hw/xquartz/darwinEvents.h index 9ec3bda2f..126851422 100644 --- a/xorg-server/hw/xquartz/darwinEvents.h +++ b/xorg-server/hw/xquartz/darwinEvents.h @@ -78,7 +78,15 @@ enum { /* Send one of the above events to the server thread. */ void DarwinSendDDXEvent(int type, int argc, ...); -extern int darwin_modifier_mask_list[]; -extern int darwin_modifier_flags; +/* A mask of the modifiers that are in our X11 keyboard layout: + * (Fn for example is just useful for 3button mouse emulation) */ +extern int darwin_all_modifier_mask; + +/* A mask of the modifiers that are in our X11 keyboard layout: + * (Fn for example is just useful for 3button mouse emulation) */ +extern int darwin_x11_modifier_mask; + +/* The current state of the above listed modifiers */ +extern int darwin_all_modifier_flags; #endif /* _DARWIN_EVENTS_H */ diff --git a/xorg-server/hw/xquartz/darwinXinput.c b/xorg-server/hw/xquartz/darwinXinput.c index 59bae6fde..8af9fc740 100644 --- a/xorg-server/hw/xquartz/darwinXinput.c +++ b/xorg-server/hw/xquartz/darwinXinput.c @@ -51,7 +51,6 @@ SOFTWARE. ********************************************************/ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/xorg-server/hw/xquartz/darwinfb.h b/xorg-server/hw/xquartz/darwinfb.h new file mode 100644 index 000000000..dab6d4b86 --- /dev/null +++ b/xorg-server/hw/xquartz/darwinfb.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2009 Apple, Inc. + * Copyright (c) 2001-2004 Torrey T. Lyons. 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, 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifndef _DARWIN_FB_H +#define _DARWIN_DB_H + +#include "scrnintstr.h" + +typedef struct { + void *framebuffer; + int x; + int y; + int width; + int height; + int pitch; + int depth; + int visuals; + int bitsPerRGB; + int bitsPerPixel; + int preferredCVC; + Pixel redMask; + Pixel greenMask; + Pixel blueMask; +} DarwinFramebufferRec, *DarwinFramebufferPtr; + +#define MASK_LH(l,h) (((1 << (1 + (h) - (l))) - 1) << (l)) +#define BM_ARGB(a,r,g,b) MASK_LH(0, (b) - 1) +#define GM_ARGB(a,r,g,b) MASK_LH(b, (b) + (g) - 1) +#define RM_ARGB(a,r,g,b) MASK_LH((b) + (g), (b) + (g) + (r) - 1) +#define AM_ARGB(a,r,g,b) MASK_LH((b) + (g) + (r), (b) + (g) + (r) + (a) - 1) + +#endif /* _DARWIN_FB_H */ diff --git a/xorg-server/hw/xquartz/doc/Makefile.in b/xorg-server/hw/xquartz/doc/Makefile.in index 7f0cc8d07..a41fd9fc2 100644 --- a/xorg-server/hw/xquartz/doc/Makefile.in +++ b/xorg-server/hw/xquartz/doc/Makefile.in @@ -42,8 +42,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xquartz/doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -53,7 +56,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -87,6 +91,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -107,9 +112,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -138,7 +146,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -147,9 +157,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -188,12 +202,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -213,7 +228,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -223,6 +237,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -236,11 +251,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -276,6 +290,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -300,7 +315,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -323,6 +337,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -354,7 +369,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xquartz/mach-startup/Makefile.am b/xorg-server/hw/xquartz/mach-startup/Makefile.am index b0112949d..2901b6559 100644 --- a/xorg-server/hw/xquartz/mach-startup/Makefile.am +++ b/xorg-server/hw/xquartz/mach-startup/Makefile.am @@ -19,7 +19,7 @@ X11_bin_LDADD = \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \ - $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin + $(DARWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin X11_bin_LDFLAGS = \ -XCClinker -Objc \ @@ -39,6 +39,11 @@ X11_bin_LDFLAGS += \ -Wl,-framework,OpenGL endif +if XQUARTZ_SPARKLE +X11_bin_LDFLAGS += \ + -Wl,-framework,Sparkle +endif + if RECORD X11_bin_LDADD += \ $(top_builddir)/record/librecord.la diff --git a/xorg-server/hw/xquartz/mach-startup/Makefile.in b/xorg-server/hw/xquartz/mach-startup/Makefile.in index 20e1243a1..80720c35c 100644 --- a/xorg-server/hw/xquartz/mach-startup/Makefile.in +++ b/xorg-server/hw/xquartz/mach-startup/Makefile.in @@ -43,15 +43,21 @@ x11app_PROGRAMS = X11.bin$(EXEEXT) @GLX_TRUE@ -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \ @GLX_TRUE@ -Wl,-framework,OpenGL -@RECORD_TRUE@am__append_3 = \ +@XQUARTZ_SPARKLE_TRUE@am__append_3 = \ +@XQUARTZ_SPARKLE_TRUE@ -Wl,-framework,Sparkle + +@RECORD_TRUE@am__append_4 = \ @RECORD_TRUE@ $(top_builddir)/record/librecord.la bin_PROGRAMS = Xquartz$(EXEEXT) subdir = hw/xquartz/mach-startup DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -61,7 +67,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(x11appdir)" @@ -77,7 +84,8 @@ X11_bin_DEPENDENCIES = $(top_builddir)/hw/xquartz/libXquartz.la \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__append_1) $(am__append_3) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_1) \ + $(am__append_4) X11_bin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(X11_bin_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -109,6 +117,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -129,9 +138,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -160,7 +172,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -169,9 +183,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -210,12 +228,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -235,7 +254,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -245,6 +263,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -258,11 +277,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -298,6 +316,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -322,7 +341,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -345,6 +363,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -376,7 +395,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -400,11 +421,12 @@ X11_bin_LDADD = $(top_builddir)/hw/xquartz/libXquartz.la \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \ - $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin \ - $(am__append_1) $(am__append_3) + $(DARWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) \ + -lXplugin $(am__append_1) $(am__append_4) X11_bin_LDFLAGS = -XCClinker -Objc -Wl,-u,_miDCInitialize \ -Wl,-framework,Carbon -Wl,-framework,Cocoa \ - -Wl,-framework,CoreAudio -Wl,-framework,IOKit $(am__append_2) + -Wl,-framework,CoreAudio -Wl,-framework,IOKit $(am__append_2) \ + $(am__append_3) dist_Xquartz_SOURCES = \ stub.c \ launchd_fd.c diff --git a/xorg-server/hw/xquartz/mach-startup/bundle-main.c b/xorg-server/hw/xquartz/mach-startup/bundle-main.c index fd70f26ed..ef5d75700 100644 --- a/xorg-server/hw/xquartz/mach-startup/bundle-main.c +++ b/xorg-server/hw/xquartz/mach-startup/bundle-main.c @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -514,8 +515,43 @@ int main(int argc, char **argv, char **envp) { * thread handle it. */ if(!listenOnly) { - if(fork() == 0) { - return startup_trigger(argc, argv, envp); + pid_t child1, child2; + int status; + + /* Do the fork-twice trick to avoid having to reap zombies */ + child1 = fork(); + switch (child1) { + case -1: /* error */ + break; + + case 0: /* child1 */ + child2 = fork(); + + switch (child2) { + int max_files, i; + + case -1: /* error */ + break; + + case 0: /* child2 */ + /* close all open files except for standard streams */ + max_files = sysconf(_SC_OPEN_MAX); + for(i = 3; i < max_files; i++) + close(i); + + /* ensure stdin is on /dev/null */ + close(0); + open("/dev/null", O_RDONLY); + + return startup_trigger(argc, argv, envp); + + default: /* parent (child1) */ + _exit(0); + } + break; + + default: /* parent */ + waitpid(child1, &status, 0); } } diff --git a/xorg-server/hw/xquartz/mach-startup/stub.c b/xorg-server/hw/xquartz/mach-startup/stub.c index 893d19c8d..cee811695 100644 --- a/xorg-server/hw/xquartz/mach-startup/stub.c +++ b/xorg-server/hw/xquartz/mach-startup/stub.c @@ -101,7 +101,7 @@ static void set_x11_path() { } ver = CFBundleGetVersionNumber(bundle); - if(ver < 0x02308000) { + if( !(ver >= 0x02308000 || (ver >= 0x02168000 && ver < 0x02208000))) { CFStringRef versionStr = CFBundleGetValueForInfoDictionaryKey(bundle, kCFBundleVersionKey); const char * versionCStr = "Unknown"; @@ -110,7 +110,7 @@ static void set_x11_path() { fprintf(stderr, "Xquartz: Could not find a new enough X11.app LSFindApplicationForInfo() returned\n"); fprintf(stderr, " X11.app = %s\n", x11_path); - fprintf(stderr, " Version = %s (%x), Expected Version > 2.3.0\n", versionCStr, (unsigned)ver); + fprintf(stderr, " Version = %s (%x), Expected Version > 2.3.0 or 2.1.6\n", versionCStr, (unsigned)ver); exit(9); } @@ -222,7 +222,7 @@ int main(int argc, char **argv, char **envp) { sig_t handler; if(argc == 2 && !strcmp(argv[1], "-version")) { - fprintf(stderr, "X.org Release 7.3\n"); + fprintf(stderr, "X.org Release 7.4\n"); fprintf(stderr, "X.Org X Server %s\n", XSERVER_VERSION); fprintf(stderr, "Build Date: %s\n", BUILD_DATE); return EXIT_SUCCESS; diff --git a/xorg-server/hw/xquartz/pbproxy/Makefile.in b/xorg-server/hw/xquartz/pbproxy/Makefile.in index 12365fb16..4d029ac8a 100644 --- a/xorg-server/hw/xquartz/pbproxy/Makefile.in +++ b/xorg-server/hw/xquartz/pbproxy/Makefile.in @@ -39,8 +39,11 @@ host_triplet = @host@ subdir = hw/xquartz/pbproxy DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -93,6 +97,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -113,9 +118,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -144,7 +152,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -153,9 +163,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -194,12 +208,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -219,7 +234,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -229,6 +243,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -242,11 +257,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -282,6 +296,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -306,7 +321,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -329,6 +343,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -360,7 +375,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/hw/xquartz/pbproxy/app-main.m b/xorg-server/hw/xquartz/pbproxy/app-main.m index cb0fa5744..d4b43c6ae 100644 --- a/xorg-server/hw/xquartz/pbproxy/app-main.m +++ b/xorg-server/hw/xquartz/pbproxy/app-main.m @@ -50,6 +50,9 @@ static void signal_handler (int sig) { } int main (int argc, const char *argv[]) { + const char *s; + int i; + #ifdef DEBUG printf("pid: %u\n", getpid()); #endif diff --git a/xorg-server/hw/xquartz/pseudoramiX.c b/xorg-server/hw/xquartz/pseudoramiX.c index f4ceff32b..1de7af6dc 100644 --- a/xorg-server/hw/xquartz/pseudoramiX.c +++ b/xorg-server/hw/xquartz/pseudoramiX.c @@ -307,7 +307,7 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens; - rep.length = rep.number * sz_XineramaScreenInfo >> 2; + rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo); if (client->swapped) { register int n; swaps (&rep.sequenceNumber, n); diff --git a/xorg-server/hw/xquartz/quartz.c b/xorg-server/hw/xquartz/quartz.c index 1f0b0048b..ca8b24595 100644 --- a/xorg-server/hw/xquartz/quartz.c +++ b/xorg-server/hw/xquartz/quartz.c @@ -45,7 +45,7 @@ #include "X11Application.h" -#include +#include #include // X headers @@ -179,7 +179,7 @@ void QuartzInitInput( int argc, char **argv ) { - X11ApplicationSetCanQuit(1); + X11ApplicationSetCanQuit(0); X11ApplicationServerReady(); // Do final display mode specific initialization before handling events if (quartzProcs->InitInput) @@ -276,7 +276,9 @@ static void QuartzUpdateScreens(void) { pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL); //pScreen->PaintWindowBackground (pRoot, &pRoot->borderClip, PW_BACKGROUND); miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); - DefineInitialRootWindow(pRoot); + +// TODO: This is a noop in 1.6 and nuked in master... we may need to do something else now to handle it +// DefineInitialRootWindow(pRoot); DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y); @@ -350,13 +352,20 @@ void QuartzSetRootless(Bool state) { /* When in rootless, the menubar is not part of the screen, so we need to update our screens on toggle */ QuartzUpdateScreens(); - if (!quartzEnableRootless && !quartzHasRoot) { - RootlessHideAllWindows(); - } else if (quartzEnableRootless && !quartzHasRoot) { - RootlessShowAllWindows(); + if(!quartzHasRoot) { + if(!quartzEnableRootless) { + RootlessHideAllWindows(); + } else { + RootlessShowAllWindows(); + } } + X11ApplicationShowHideMenubar(!quartzHasRoot); + xp_reenable_update(); + + if (!quartzEnableRootless && quartzFullscreenDisableHotkeys) + xp_disable_hot_keys(quartzHasRoot); } /* diff --git a/xorg-server/hw/xquartz/quartzAudio.c b/xorg-server/hw/xquartz/quartzAudio.c index 21232665a..8cf241738 100644 --- a/xorg-server/hw/xquartz/quartzAudio.c +++ b/xorg-server/hw/xquartz/quartzAudio.c @@ -211,14 +211,20 @@ QuartzAudioIOProc( /* - * QuartzCoreAudioBell - * Play a tone using the CoreAudio API + * DDXRingBell + * Play a tone using the CoreAudio API */ -static void QuartzCoreAudioBell( +void DDXRingBell( int volume, // volume is % of max int pitch, // pitch is Hz int duration ) // duration is milliseconds { + if (quartzUseSysBeep) { + if (volume) + NSBeep(); + return; + } + if (quartzAudioDevice == kAudioDeviceUnknown) return; pthread_mutex_lock(&data.lock); @@ -239,7 +245,7 @@ static void QuartzCoreAudioBell( OSStatus status; status = AudioDeviceStart(quartzAudioDevice, QuartzAudioIOProc); if (status) { - ErrorF("QuartzAudioBell: AudioDeviceStart returned %ld\n", (long)status); + ErrorF("DDXRingBell: AudioDeviceStart returned %ld\n", (long)status); } else { data.playing = TRUE; } @@ -247,40 +253,6 @@ static void QuartzCoreAudioBell( pthread_mutex_unlock(&data.lock); } - -/* - * QuartzBell - * Ring the bell - */ -void QuartzBell( - int volume, // volume in percent of max - DeviceIntPtr pDevice, - pointer ctrl, - int class ) -{ - int pitch; // pitch in Hz - int duration; // duration in milliseconds - - if (class == BellFeedbackClass) { - pitch = ((BellCtrl*)ctrl)->pitch; - duration = ((BellCtrl*)ctrl)->duration; - } else if (class == KbdFeedbackClass) { - pitch = ((KeybdCtrl*)ctrl)->bell_pitch; - duration = ((KeybdCtrl*)ctrl)->bell_duration; - } else { - ErrorF("QuartzBell: bad bell class %d\n", class); - return; - } - - if (quartzUseSysBeep) { - if (volume) - NSBeep(); - } else { - QuartzCoreAudioBell(volume, pitch, duration); - } -} - - /* * QuartzAudioInit * Prepare to play the bell with the CoreAudio API diff --git a/xorg-server/hw/xquartz/quartzAudio.h b/xorg-server/hw/xquartz/quartzAudio.h index c406bbc2a..2a78b3957 100644 --- a/xorg-server/hw/xquartz/quartzAudio.h +++ b/xorg-server/hw/xquartz/quartzAudio.h @@ -32,9 +32,6 @@ #ifndef _QUARTZAUDIO_H #define _QUARTZAUDIO_H -#include "input.h" - void QuartzAudioInit(void); -void QuartzBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); #endif diff --git a/xorg-server/hw/xquartz/quartzKeyboard.c b/xorg-server/hw/xquartz/quartzKeyboard.c index 72f94b443..4abf4af7f 100644 --- a/xorg-server/hw/xquartz/quartzKeyboard.c +++ b/xorg-server/hw/xquartz/quartzKeyboard.c @@ -68,6 +68,9 @@ #include "X11/keysym.h" #include "keysym2ucs.h" +extern void +CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); + enum { MOD_COMMAND = 256, MOD_SHIFT = 512, @@ -148,6 +151,7 @@ const static struct { {XK_apostrophe, XK_dead_acute}, /* US:"=" on a Czech keyboard */ {XK_acute, XK_dead_acute}, {UKEYSYM (0x384), XK_dead_acute}, /* US:";" on a Greek keyboard */ +// {XK_Greek_accentdieresis, XK_dead_diaeresis}, /* US:"opt+;" on a Greek keyboard ... replace with dead_accentdieresis if there is one */ {XK_asciicircum, XK_dead_circumflex}, {UKEYSYM (0x2c6), XK_dead_circumflex}, /* MODIFIER LETTER CIRCUMFLEX ACCENT */ {XK_asciitilde, XK_dead_tilde}, @@ -276,43 +280,29 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) { * Load the keyboard map from a file or system and convert * it to an equivalent X keyboard map and modifier map. */ -static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) { - pthread_mutex_lock(&keyInfo_mutex); - +static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) { DarwinBuildModifierMaps(&keyInfo); keySyms->map = keyInfo.keyMap; keySyms->mapWidth = GLYPHS_PER_KEY; keySyms->minKeyCode = MIN_KEYCODE; keySyms->maxKeyCode = MAX_KEYCODE; - - pthread_mutex_unlock(&keyInfo_mutex); } /* * DarwinKeyboardSetDeviceKeyMap * Load a keymap into the keyboard device */ -static void DarwinKeyboardSetDeviceKeyMap(KeySymsRec *keySyms) { +static void DarwinKeyboardSetDeviceKeyMap(KeySymsRec *keySyms, CARD8 *modmap) { DeviceIntPtr pDev; - /* From ProcSetModifierMapping */ - SendMappingNotify(darwinKeyboard, MappingModifier, 0, 0, serverClient); - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) - if (pDev->key && pDev->coreEvents) - SendDeviceMappingNotify(serverClient, MappingModifier, 0, 0, pDev); - - /* From ProcChangeKeyboardMapping */ + pthread_mutex_lock(&keyInfo_mutex); for (pDev = inputInfo.devices; pDev; pDev = pDev->next) if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) - assert(SetKeySymsMap(&pDev->key->curKeySyms, keySyms)); - - SendMappingNotify(darwinKeyboard, MappingKeyboard, keySyms->minKeyCode, - keySyms->maxKeyCode - keySyms->minKeyCode + 1, serverClient); - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) - if (pDev->key && pDev->coreEvents) - SendDeviceMappingNotify(serverClient, MappingKeyboard, keySyms->minKeyCode, - keySyms->maxKeyCode - keySyms->minKeyCode + 1, pDev); + XkbApplyMappingChange(pDev, keySyms, keySyms->minKeyCode, + keySyms->maxKeyCode - keySyms->minKeyCode + 1, + modmap, serverClient); + pthread_mutex_unlock(&keyInfo_mutex); } /* @@ -332,16 +322,16 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) { // for a kIOHIDParamConnectType connection. assert(darwinParamConnect = NXOpenEventStatus()); - DarwinLoadKeyboardMapping(&keySyms); - bzero(&names, sizeof(names)); /* We need to really have rules... or something... */ //XkbSetRulesDflts("base", "pc105", "us", NULL, NULL); - - pthread_mutex_lock(&keyInfo_mutex); - assert(XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, keyInfo.modMap, - QuartzBell, DarwinChangeKeyboardControl)); + + InitKeyboardDeviceStruct(pDev, NULL, NULL, DarwinChangeKeyboardControl); + + pthread_mutex_lock(&keyInfo_mutex); + DarwinLoadKeyboardMapping(&keySyms); + DarwinKeyboardSetDeviceKeyMap(&keySyms, keyInfo.modMap); pthread_mutex_unlock(&keyInfo_mutex); /* Get our key repeat settings from GlobalPreferences */ @@ -363,16 +353,23 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) { XkbSetRepeatKeys(pDev, -1, AutoRepeatModeOn); } - DarwinKeyboardSetDeviceKeyMap(&keySyms); + CopyKeyClass(pDev, inputInfo.keyboard); } void DarwinKeyboardReloadHandler(int screenNum, xEventPtr xe, DeviceIntPtr pDev, int nevents) { KeySymsRec keySyms; DEBUG_LOG("DarwinKeyboardReloadHandler\n"); +// if (pDev->key) { +// if (pDev->key->curKeySyms.map) xfree(pDev->key->curKeySyms.map); +// xfree(pDev->key); +// } + + pthread_mutex_lock(&keyInfo_mutex); DarwinLoadKeyboardMapping(&keySyms); - DarwinKeyboardSetDeviceKeyMap(&keySyms); + DarwinKeyboardSetDeviceKeyMap(&keySyms, keyInfo.modMap); + pthread_mutex_unlock(&keyInfo_mutex); } //----------------------------------------------------------------------------- @@ -408,21 +405,22 @@ int DarwinModifierNXKeyToNXKeycode(int key, int side) { int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) { int key, side; - pthread_mutex_lock(&keyInfo_mutex); keycode += MIN_KEYCODE; + // search modifierKeycodes for this keycode+side + pthread_mutex_lock(&keyInfo_mutex); for (key = 0; key < NX_NUMMODIFIERS; key++) { for (side = 0; side <= 1; side++) { if (keyInfo.modifierKeycodes[key][side] == keycode) break; } } + pthread_mutex_unlock(&keyInfo_mutex); + if (key == NX_NUMMODIFIERS) { - pthread_mutex_unlock(&keyInfo_mutex); return -1; } if (outSide) *outSide = side; - pthread_mutex_unlock(&keyInfo_mutex); return key; } @@ -718,9 +716,8 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) { } #endif } - + if (k[3] == k[2]) k[3] = NoSymbol; - if (k[2] == k[1]) k[2] = NoSymbol; if (k[1] == k[0]) k[1] = NoSymbol; if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol; } diff --git a/xorg-server/hw/xquartz/xpr/Makefile.am b/xorg-server/hw/xquartz/xpr/Makefile.am index e74580f73..ba7b25890 100644 --- a/xorg-server/hw/xquartz/xpr/Makefile.am +++ b/xorg-server/hw/xquartz/xpr/Makefile.am @@ -9,6 +9,7 @@ AM_CPPFLAGS = \ libXquartzXpr_la_SOURCES = \ appledri.c \ dri.c \ + driWrap.c \ xprAppleWM.c \ xprCursor.c \ xprEvent.c \ @@ -20,6 +21,7 @@ libXquartzXpr_la_SOURCES = \ EXTRA_DIST = \ dri.h \ + driWrap.h \ dristruct.h \ appledri.h \ appledristr.h \ diff --git a/xorg-server/hw/xquartz/xpr/Makefile.in b/xorg-server/hw/xquartz/xpr/Makefile.in index 3eaafdd17..0137c8bed 100644 --- a/xorg-server/hw/xquartz/xpr/Makefile.in +++ b/xorg-server/hw/xquartz/xpr/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xquartz/xpr DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,14 +51,15 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libXquartzXpr_la_LIBADD = -am_libXquartzXpr_la_OBJECTS = appledri.lo dri.lo xprAppleWM.lo \ - xprCursor.lo xprEvent.lo xprFrame.lo xprScreen.lo x-hash.lo \ - x-hook.lo x-list.lo +am_libXquartzXpr_la_OBJECTS = appledri.lo dri.lo driWrap.lo \ + xprAppleWM.lo xprCursor.lo xprEvent.lo xprFrame.lo \ + xprScreen.lo x-hash.lo x-hook.lo x-list.lo libXquartzXpr_la_OBJECTS = $(am_libXquartzXpr_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -77,6 +81,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -97,9 +102,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -128,7 +136,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -137,9 +147,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -178,12 +192,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -203,7 +218,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -213,6 +227,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -226,11 +241,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -266,6 +280,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -290,7 +305,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -313,6 +327,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -344,7 +359,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -360,6 +377,7 @@ AM_CPPFLAGS = \ libXquartzXpr_la_SOURCES = \ appledri.c \ dri.c \ + driWrap.c \ xprAppleWM.c \ xprCursor.c \ xprEvent.c \ @@ -371,6 +389,7 @@ libXquartzXpr_la_SOURCES = \ EXTRA_DIST = \ dri.h \ + driWrap.h \ dristruct.h \ appledri.h \ appledristr.h \ @@ -434,6 +453,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appledri.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driWrap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hook.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-list.Plo@am__quote@ diff --git a/xorg-server/hw/xquartz/xpr/appledri.c b/xorg-server/hw/xquartz/xpr/appledri.c index 3667c0dea..4d1a82fcc 100644 --- a/xorg-server/hw/xquartz/xpr/appledri.c +++ b/xorg-server/hw/xquartz/xpr/appledri.c @@ -2,7 +2,7 @@ Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. +Copyright (c) 2002, 2009 Apple Computer, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a @@ -39,8 +39,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #endif -#define NEED_REPLIES -#define NEED_EVENTS #include #include #include "misc.h" @@ -64,6 +62,7 @@ static DISPATCH_PROC(ProcAppleDRIDispatch); static DISPATCH_PROC(SProcAppleDRIDispatch); static void AppleDRIResetProc(ExtensionEntry* extEntry); +static int ProcAppleDRICreatePixmap(ClientPtr client); static unsigned char DRIReqCode = 0; static int DRIEventBase = 0; @@ -274,6 +273,76 @@ ProcAppleDRIDestroySurface( return (client->noClientException); } +static int +ProcAppleDRICreatePixmap(ClientPtr client) +{ + REQUEST(xAppleDRICreatePixmapReq); + DrawablePtr pDrawable; + int rc; + char path[PATH_MAX]; + xAppleDRICreatePixmapReply rep; + int width, height, pitch, bpp; + void *ptr; + + REQUEST_SIZE_MATCH(xAppleDRICreatePixmapReq); + + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixReadAccess); + + if(rc != Success) + return rc; + + if(!DRICreatePixmap(screenInfo.screens[stuff->screen], + (Drawable)stuff->drawable, + pDrawable, + path, PATH_MAX)) { + return BadValue; + } + + if(!DRIGetPixmapData(pDrawable, &width, &height, + &pitch, &bpp, &ptr)) { + return BadValue; + } + + rep.stringLength = strlen(path) + 1; + + /* No need for swapping, because this only runs if LocalClient is true. */ + rep.type = X_Reply; + rep.length = sizeof(rep) + rep.stringLength; + rep.sequenceNumber = client->sequence; + rep.width = width; + rep.height = height; + rep.pitch = pitch; + rep.bpp = bpp; + rep.size = pitch * height; + + if(sizeof(rep) != sz_xAppleDRICreatePixmapReply) + ErrorF("error sizeof(rep) is %zu\n", sizeof(rep)); + + WriteReplyToClient(client, sizeof(rep), &rep); + (void)WriteToClient(client, rep.stringLength, path); + + return (client->noClientException); +} + +static int +ProcAppleDRIDestroyPixmap(ClientPtr client) +{ + DrawablePtr pDrawable; + int rc; + REQUEST(xAppleDRIDestroyPixmapReq); + REQUEST_SIZE_MATCH(xAppleDRIDestroyPixmapReq); + + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixReadAccess); + + if(rc != Success) + return rc; + + DRIDestroyPixmap(pDrawable); + + return (client->noClientException); +} /* dispatch */ @@ -303,6 +372,11 @@ ProcAppleDRIDispatch ( return ProcAppleDRICreateSurface(client); case X_AppleDRIDestroySurface: return ProcAppleDRIDestroySurface(client); + case X_AppleDRICreatePixmap: + return ProcAppleDRICreatePixmap(client); + case X_AppleDRIDestroyPixmap: + return ProcAppleDRIDestroyPixmap(client); + default: return BadRequest; } diff --git a/xorg-server/hw/xquartz/xpr/appledri.h b/xorg-server/hw/xquartz/xpr/appledri.h index c4e43be12..36964c6cd 100644 --- a/xorg-server/hw/xquartz/xpr/appledri.h +++ b/xorg-server/hw/xquartz/xpr/appledri.h @@ -1,8 +1,9 @@ +/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. +Copyright (c) 2002, 2008, 2009 Apple Computer, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a @@ -45,6 +46,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define X_AppleDRICreateSurface 2 #define X_AppleDRIDestroySurface 3 #define X_AppleDRIAuthConnection 4 +#define X_AppleDRICreateSharedBuffer 5 +#define X_AppleDRISwapBuffers 6 +#define X_AppleDRICreatePixmap 7 +#define X_AppleDRIDestroyPixmap 8 + /* Requests up to and including 18 were used in a previous version */ /* Events */ @@ -99,8 +105,19 @@ Bool XAppleDRIDestroySurface (Display *dpy, int screen, Drawable drawable); Bool XAppleDRISynchronizeSurfaces (Display *dpy); +Bool XAppleDRICreateSharedBuffer(Display *dpy, int screen, Drawable drawable, + Bool doubleSwap, char *path, size_t pathlen, + int *width, int *height); + +Bool XAppleDRISwapBuffers(Display *dpy, int screen, Drawable drawable); + +Bool XAppleDRICreatePixmap(Display *dpy, int screen, Drawable drawable, + int *width, int *height, int *pitch, int *bpp, + size_t *size, char *bufname, size_t bufnamesize); + +Bool XAppleDRIDestroyPixmap(Display *dpy, Pixmap pixmap); + _XFUNCPROTOEND #endif /* _APPLEDRI_SERVER_ */ #endif /* _APPLEDRI_H_ */ - diff --git a/xorg-server/hw/xquartz/xpr/appledristr.h b/xorg-server/hw/xquartz/xpr/appledristr.h index 8649fd329..c569719b7 100644 --- a/xorg-server/hw/xquartz/xpr/appledristr.h +++ b/xorg-server/hw/xquartz/xpr/appledristr.h @@ -2,7 +2,7 @@ Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. +Copyright (c) 2002, 2008, 2009 Apple Computer, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a @@ -153,12 +153,87 @@ typedef struct _AppleDRINotify { BYTE type; /* always eventBase + event type */ BYTE kind; CARD16 sequenceNumber B16; - Time time B32; /* time of change */ - CARD16 pad1 B16; + CARD32 time B32; /* time of change */ + CARD32 pad1 B32; CARD32 arg B32; CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; } xAppleDRINotifyEvent; -#define sz_xAppleDRINotifyEvent 20 +#define sz_xAppleDRINotifyEvent 32 + + +typedef struct { + CARD8 reqType; + CARD8 driReqType; + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; + BOOL doubleSwap; + CARD8 pad1, pad2, pad3; +} xAppleDRICreateSharedBufferReq; + +#define sz_xAppleDRICreateSharedBufferReq 16 + +typedef struct { + BYTE type; + BYTE data1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 stringLength B32; /* 0 on error */ + CARD32 width B32; + CARD32 height B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xAppleDRICreateSharedBufferReply; + +#define sz_xAppleDRICreateSharedBufferReply 32 + +typedef struct { + CARD8 reqType; + CARD8 driReqType; + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; +} xAppleDRISwapBuffersReq; + +#define sz_xAppleDRISwapBuffersReq 12 + +typedef struct { + CARD8 reqType; /*1*/ + CARD8 driReqType; /*2*/ + CARD16 length B16; /*4*/ + CARD32 screen B32; /*8*/ + CARD32 drawable B32; /*12*/ +} xAppleDRICreatePixmapReq; + +#define sz_xAppleDRICreatePixmapReq 12 + +typedef struct { + BYTE type; /*1*/ + BOOL pad1; /*2*/ + CARD16 sequenceNumber B16; /*4*/ + CARD32 length B32; /*8*/ + CARD32 width B32; /*12*/ + CARD32 height B32; /*16*/ + CARD32 pitch B32; /*20*/ + CARD32 bpp B32; /*24*/ + CARD32 size B32; /*28*/ + CARD32 stringLength B32; /*32*/ +} xAppleDRICreatePixmapReply; + +#define sz_xAppleDRICreatePixmapReply 32 + +typedef struct { + CARD8 reqType; /*1*/ + CARD8 driReqType; /*2*/ + CARD16 length B16; /*4*/ + CARD32 drawable B32; /*8*/ +} xAppleDRIDestroyPixmapReq; + +#define sz_xAppleDRIDestroyPixmapReq 8 #ifdef _APPLEDRI_SERVER_ diff --git a/xorg-server/hw/xquartz/xpr/dri.c b/xorg-server/hw/xquartz/xpr/dri.c index 50b478b9c..f570bee5d 100644 --- a/xorg-server/hw/xquartz/xpr/dri.c +++ b/xorg-server/hw/xquartz/xpr/dri.c @@ -2,7 +2,7 @@ Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. +Copyright (c) 2002, 2009 Apple Computer, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a @@ -46,10 +46,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #endif -#define NEED_REPLIES -#define NEED_EVENTS #include #include +#include +#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -68,6 +70,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "rootless.h" #include "x-hash.h" #include "x-hook.h" +#include "driWrap.h" #include @@ -77,11 +80,15 @@ static int DRIWindowPrivKeyIndex; static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKeyIndex; static int DRIPixmapPrivKeyIndex; static DevPrivateKey DRIPixmapPrivKey = &DRIPixmapPrivKeyIndex; +static int DRIPixmapBufferPrivKeyIndex; +static DevPrivateKey DRIPixmapBufferPrivKey = &DRIPixmapBufferPrivKeyIndex; static RESTYPE DRIDrawablePrivResType; static x_hash_table *surface_hash; /* maps surface ids -> drawablePrivs */ +static Bool DRIFreePixmapImp(DrawablePtr pDrawable); + /* FIXME: don't hardcode this? */ #define CG_INFO_FILE "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/Info-macos.plist" @@ -90,6 +97,18 @@ static x_hash_table *surface_hash; /* maps surface ids -> drawablePrivs */ #define CG_REQUIRED_MINOR 157 #define CG_REQUIRED_MICRO 11 +typedef struct { + DrawablePtr pDrawable; + int refCount; + int bytesPerPixel; + int width; + int height; + char shmPath[PATH_MAX]; + int fd; /* From shm_open (for now) */ + size_t length; /* length of buffer */ + void *buffer; +} DRIPixmapBuffer, *DRIPixmapBufferPtr; + /* Returns version as major.minor.micro in 10.10.10 fixed form */ static unsigned int get_cg_version (void) @@ -241,7 +260,7 @@ DRIFinishScreenInit(ScreenPtr pScreen) // ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum); - return TRUE; + return DRIWrapInit(pScreen); } void @@ -408,7 +427,7 @@ CreateSurfaceForWindow(ScreenPtr pScreen, WindowPtr pWin, xp_window_id *widPtr) return pDRIDrawablePriv; } -/* Return FALSE if an error occurs. */ +/* Return NULL if an error occurs. */ static DRIDrawablePrivPtr CreateSurfaceForPixmap(ScreenPtr pScreen, PixmapPtr pPix) { DRIDrawablePrivPtr pDRIDrawablePriv; @@ -417,7 +436,6 @@ CreateSurfaceForPixmap(ScreenPtr pScreen, PixmapPtr pPix) { if (pDRIDrawablePriv == NULL) { xp_error err; - xp_window_changes wc; /* allocate a DRI Window Private record */ if (!(pDRIDrawablePriv = xcalloc(1, sizeof(*pDRIDrawablePriv)))) { @@ -439,18 +457,10 @@ CreateSurfaceForPixmap(ScreenPtr pScreen, PixmapPtr pPix) { return NULL; } - wc.x = 0; - wc.y = 0; - wc.width = pPix->drawable.width; - wc.height = pPix->drawable.height; - - err = xp_configure_surface(pDRIDrawablePriv->sid, XP_BOUNDS, &wc); - - if(err != Success) { - xp_destroy_surface(pDRIDrawablePriv->sid); - xfree(pDRIDrawablePriv); - return NULL; - } + /* + * The DRIUpdateSurface will be called to resize the surface + * after this function, if the export is successful. + */ /* save private off of preallocated index */ dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey, @@ -491,21 +501,39 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id, /* NOT_DONE */ return FALSE; } - - + /* Finish initialization of new surfaces */ if (pDRIDrawablePriv->refCount == 0) { unsigned int key[2] = {0}; xp_error err; /* try to give the client access to the surface */ - if (client_id != 0 && wid != 0) { + if (client_id != 0) { + /* + * Xplugin accepts a 0 wid if the surface id is offscreen, such + * as for a pixmap. + */ err = xp_export_surface(wid, pDRIDrawablePriv->sid, client_id, key); if (err != Success) { xp_destroy_surface(pDRIDrawablePriv->sid); xfree(pDRIDrawablePriv); + + /* + * Now set the dix privates to NULL that were previously set. + * This prevents reusing an invalid pointer. + */ + if(pDrawable->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr)pDrawable; + + dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL); + } else if(pDrawable->type == DRAWABLE_PIXMAP) { + PixmapPtr pPix = (PixmapPtr)pDrawable; + + dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey, NULL); + } + return FALSE; } } @@ -591,8 +619,9 @@ DRIDrawablePrivDelete(pointer pResource, XID id) pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix); } - if (pDRIDrawablePriv == NULL) - return FALSE; + if (pDRIDrawablePriv == NULL) { + return DRIFreePixmapImp(pDrawable); + } if (pDRIDrawablePriv->drawableIndex != -1) { /* release drawable table entry */ @@ -785,3 +814,139 @@ DRISurfaceNotify(xp_surface_id id, int kind) DRIDrawablePrivResType, FALSE); } } + +Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id, + DrawablePtr pDrawable, char *path, + size_t pathmax) +{ + DRIPixmapBufferPtr shared; + PixmapPtr pPix; + + if(pDrawable->type != DRAWABLE_PIXMAP) + return FALSE; + + pPix = (PixmapPtr)pDrawable; + + shared = xalloc(sizeof(*shared)); + if(NULL == shared) { + FatalError("failed to allocate DRIPixmapBuffer in %s\n", __func__); + } + + shared->pDrawable = pDrawable; + shared->refCount = 1; + + if(pDrawable->bitsPerPixel >= 24) { + shared->bytesPerPixel = 4; + } else if(pDrawable->bitsPerPixel <= 16) { + shared->bytesPerPixel = 2; + } + + shared->width = pDrawable->width; + shared->height = pDrawable->height; + + if(-1 == snprintf(shared->shmPath, sizeof(shared->shmPath), + "%d_0x%lx", getpid(), + (unsigned long)id)) { + FatalError("buffer overflow in %s\n", __func__); + } + + shared->fd = shm_open(shared->shmPath, + O_RDWR | O_EXCL | O_CREAT, + S_IRUSR | S_IWUSR | S_IROTH | S_IWOTH); + + if(-1 == shared->fd) { + xfree(shared); + return FALSE; + } + + shared->length = shared->width * shared->height * shared->bytesPerPixel; + + if(-1 == ftruncate(shared->fd, shared->length)) { + ErrorF("failed to ftruncate (extend) file."); + shm_unlink(shared->shmPath); + close(shared->fd); + xfree(shared); + return FALSE; + } + + shared->buffer = mmap(NULL, shared->length, + PROT_READ | PROT_WRITE, + MAP_FILE | MAP_SHARED, shared->fd, 0); + + if(MAP_FAILED == shared->buffer) { + ErrorF("failed to mmap shared memory."); + shm_unlink(shared->shmPath); + close(shared->fd); + xfree(shared); + return FALSE; + } + + strncpy(path, shared->shmPath, pathmax); + path[pathmax - 1] = '\0'; + + dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, shared); + + AddResource(id, DRIDrawablePrivResType, (pointer)pDrawable); + + return TRUE; +} + + +Bool DRIGetPixmapData(DrawablePtr pDrawable, int *width, int *height, + int *pitch, int *bpp, void **ptr) { + PixmapPtr pPix; + DRIPixmapBufferPtr shared; + + if(pDrawable->type != DRAWABLE_PIXMAP) + return FALSE; + + pPix = (PixmapPtr)pDrawable; + + shared = dixLookupPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey); + + if(NULL == shared) + return FALSE; + + assert(pDrawable->width == shared->width); + assert(pDrawable->height == shared->height); + + *width = shared->width; + *height = shared->height; + *bpp = shared->bytesPerPixel; + *pitch = shared->width * shared->bytesPerPixel; + *ptr = shared->buffer; + + return TRUE; +} + +static Bool +DRIFreePixmapImp(DrawablePtr pDrawable) { + DRIPixmapBufferPtr shared; + PixmapPtr pPix; + + if(pDrawable->type != DRAWABLE_PIXMAP) + return FALSE; + + pPix = (PixmapPtr)pDrawable; + + shared = dixLookupPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey); + + if(NULL == shared) + return FALSE; + + close(shared->fd); + munmap(shared->buffer, shared->length); + shm_unlink(shared->shmPath); + xfree(shared); + + dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, (pointer)NULL); + + return TRUE; +} + +void +DRIDestroyPixmap(DrawablePtr pDrawable) { + if(DRIFreePixmapImp(pDrawable)) + FreeResourceByType(pDrawable->id, DRIDrawablePrivResType, FALSE); + +} diff --git a/xorg-server/hw/xquartz/xpr/dri.h b/xorg-server/hw/xquartz/xpr/dri.h index 8bb2e9e80..48fea3668 100644 --- a/xorg-server/hw/xquartz/xpr/dri.h +++ b/xorg-server/hw/xquartz/xpr/dri.h @@ -1,7 +1,7 @@ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright (c) 2002 Apple Computer, Inc. +Copyright (c) 2002, 2009 Apple Computer, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a @@ -125,4 +125,14 @@ extern void DRIQueryVersion(int *majorVersion, int *minorVersion, int *patchVersion); +extern Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id, + DrawablePtr pDrawable, char *path, + size_t pathmax); + +extern Bool DRIGetPixmapData(DrawablePtr pDrawable, int *width, int *height, + int *pitch, int *bpp, void **ptr); + + +extern void DRIDestroyPixmap(DrawablePtr pDrawable); + #endif diff --git a/xorg-server/hw/xquartz/xpr/driWrap.c b/xorg-server/hw/xquartz/xpr/driWrap.c new file mode 100644 index 000000000..8c57fd4bd --- /dev/null +++ b/xorg-server/hw/xquartz/xpr/driWrap.c @@ -0,0 +1,547 @@ +/* +Copyright (c) 2009 Apple Computer, 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, sub license, 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 NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. +*/ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "dixfontstr.h" +#include "mivalidate.h" +#include "driWrap.h" +#include "dri.h" + +#include + +typedef struct { + GCOps *originalOps; + GCOps *driOps; +} DRIGCRec; + +typedef struct { + GCOps *originalOps; + CreateGCProcPtr CreateGC; +} DRIWrapScreenRec; + +typedef struct { + Bool didSave; + int devKind; + DevUnion devPrivate; +} DRISavedDrawableState; + +static int driGCKeyIndex; +static DevPrivateKey driGCKey = &driGCKeyIndex; + +static int driWrapScreenKeyIndex; +static DevPrivateKey driWrapScreenKey = &driWrapScreenKeyIndex; + +static GCOps driGCOps; + +#define wrap(priv, real, member, func) { \ + priv->member = real->member; \ + real->member = func; \ + } + +#define unwrap(priv, real, member) { \ + real->member = priv->member; \ + } + +static DRIGCRec * +DRIGetGCPriv(GCPtr pGC) { + return dixLookupPrivate(&pGC->devPrivates, driGCKey); +} + +static void +DRIUnwrapGC(GCPtr pGC) { + DRIGCRec *pGCPriv = DRIGetGCPriv(pGC); + + pGC->ops = pGCPriv->originalOps; +} + +static void +DRIWrapGC(GCPtr pGC) { + DRIGCRec *pGCPriv = DRIGetGCPriv(pGC); + + pGC->ops = pGCPriv->driOps; +} + +static void +DRISurfaceSetDrawable(DrawablePtr pDraw, + DRISavedDrawableState *saved) { + saved->didSave = FALSE; + + if(pDraw->type == DRAWABLE_PIXMAP) { + int pitch, width, height, bpp; + void *buffer; + + if(DRIGetPixmapData(pDraw, &width, &height, &pitch, &bpp, &buffer)) { + PixmapPtr pPix = (PixmapPtr)pDraw; + + saved->devKind = pPix->devKind; + saved->devPrivate.ptr = pPix->devPrivate.ptr; + saved->didSave = TRUE; + + pPix->devKind = pitch; + pPix->devPrivate.ptr = buffer; + } + } +} + +static void +DRISurfaceRestoreDrawable(DrawablePtr pDraw, + DRISavedDrawableState *saved) { + PixmapPtr pPix = (PixmapPtr)pDraw; + + if(!saved->didSave) + return; + + pPix->devKind = saved->devKind; + pPix->devPrivate.ptr = saved->devPrivate.ptr; +} + +static void +DRIFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, + DDXPointPtr pptInit, int *pwidthInit, + int sorted) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRISetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, + DDXPointPtr pptInit, int *pwidthInit, + int nspans, int sorted) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, nspans, sorted); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIPutImage(DrawablePtr dst, GCPtr pGC, + int depth, int x, int y, int w, int h, + int leftPad, int format, char *pBits) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->PutImage(dst, pGC, depth, x, y, w, h, leftPad, format, pBits); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static RegionPtr +DRICopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, + int srcx, int srcy, int w, int h, + int dstx, int dsty) { + RegionPtr pReg; + DRISavedDrawableState pSrcSaved, dstSaved; + + DRISurfaceSetDrawable(pSrc, &pSrcSaved); + DRISurfaceSetDrawable(dst, &dstSaved); + + DRIUnwrapGC(pGC); + + pReg = pGC->ops->CopyArea(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(pSrc, &pSrcSaved); + DRISurfaceRestoreDrawable(dst, &dstSaved); + + return pReg; +} + +static RegionPtr +DRICopyPlane(DrawablePtr pSrc, DrawablePtr dst, + GCPtr pGC, int srcx, int srcy, + int w, int h, int dstx, int dsty, + unsigned long plane) { + RegionPtr pReg; + DRISavedDrawableState pSrcSaved, dstSaved; + + DRISurfaceSetDrawable(pSrc, &pSrcSaved); + DRISurfaceSetDrawable(dst, &dstSaved); + + + DRIUnwrapGC(pGC); + + pReg = pGC->ops->CopyPlane(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty, + plane); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(pSrc, &pSrcSaved); + DRISurfaceRestoreDrawable(dst, &dstSaved); + + return pReg; +} + +static void +DRIPolyPoint(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->PolyPoint(dst, pGC, mode, npt, pptInit); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIPolylines(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->Polylines(dst, pGC, mode, npt, pptInit); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIPolySegment(DrawablePtr dst, GCPtr pGC, + int nseg, xSegment *pSeg) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->PolySegment(dst, pGC, nseg, pSeg); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIPolyRectangle(DrawablePtr dst, GCPtr pGC, + int nRects, xRectangle *pRects) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->PolyRectangle(dst, pGC, nRects, pRects); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} +static void +DRIPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->PolyArc(dst, pGC, narcs, parcs); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIFillPolygon(DrawablePtr dst, GCPtr pGC, + int shape, int mode, int count, + DDXPointPtr pptInit) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIPolyFillRect(DrawablePtr dst, GCPtr pGC, + int nRectsInit, xRectangle *pRectsInit) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIPolyFillArc(DrawablePtr dst, GCPtr pGC, + int narcsInit, xArc *parcsInit) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->PolyFillArc(dst, pGC, narcsInit, parcsInit); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static int +DRIPolyText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) { + int ret; + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + ret = pGC->ops->PolyText8(dst, pGC, x, y, count, chars); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); + + return ret; +} + +static int +DRIPolyText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) { + int ret; + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + ret = pGC->ops->PolyText16(dst, pGC, x, y, count, chars); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); + + return ret; +} + +static void +DRIImageText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->ImageText8(dst, pGC, x, y, count, chars); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIImageText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->ImageText16(dst, pGC, x, y, count, chars); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIImageGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyphInit, + CharInfoPtr *ppciInit, pointer unused) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->ImageGlyphBlt(dst, pGC, x, y, nglyphInit, ppciInit, unused); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void DRIPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase) { + DRISavedDrawableState saved; + + DRISurfaceSetDrawable(dst, &saved); + + DRIUnwrapGC(pGC); + + pGC->ops->PolyGlyphBlt(dst, pGC, x, y, nglyph, ppci, pglyphBase); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(dst, &saved); +} + +static void +DRIPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, + int dx, int dy, int xOrg, int yOrg) { + DRISavedDrawableState bitMapSaved, dstSaved; + + DRISurfaceSetDrawable(&pBitMap->drawable, &bitMapSaved); + DRISurfaceSetDrawable(dst, &dstSaved); + + DRIUnwrapGC(pGC); + + pGC->ops->PushPixels(pGC, pBitMap, dst, dx, dy, xOrg, yOrg); + + DRIWrapGC(pGC); + + DRISurfaceRestoreDrawable(&pBitMap->drawable, &bitMapSaved); + DRISurfaceRestoreDrawable(dst, &dstSaved); +} + + +static GCOps driGCOps = { + DRIFillSpans, + DRISetSpans, + DRIPutImage, + DRICopyArea, + DRICopyPlane, + DRIPolyPoint, + DRIPolylines, + DRIPolySegment, + DRIPolyRectangle, + DRIPolyArc, + DRIFillPolygon, + DRIPolyFillRect, + DRIPolyFillArc, + DRIPolyText8, + DRIPolyText16, + DRIImageText8, + DRIImageText16, + DRIImageGlyphBlt, + DRIPolyGlyphBlt, + DRIPushPixels +}; + + +static Bool +DRICreateGC(GCPtr pGC) { + ScreenPtr pScreen = pGC->pScreen; + DRIWrapScreenRec *pScreenPriv; + DRIGCRec *pGCPriv; + Bool ret; + + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, driWrapScreenKey); + + pGCPriv = DRIGetGCPriv(pGC); + + unwrap(pScreenPriv, pScreen, CreateGC); + ret = pScreen->CreateGC(pGC); + + if(ret) { + pGCPriv->originalOps = pGC->ops; + pGC->ops = &driGCOps; + pGCPriv->driOps = &driGCOps; + } + + wrap(pScreenPriv, pScreen, CreateGC, DRICreateGC); + + return ret; +} + + +/* Return false if an error occurred. */ +Bool +DRIWrapInit(ScreenPtr pScreen) { + DRIWrapScreenRec *pScreenPriv; + + if(!dixRequestPrivate(driGCKey, sizeof(DRIGCRec))) + return FALSE; + + if(!dixRequestPrivate(driWrapScreenKey, sizeof(DRIWrapScreenRec))) + return FALSE; + + pScreenPriv = xalloc(sizeof(*pScreenPriv)); + + if(NULL == pScreenPriv) + return FALSE; + + pScreenPriv->CreateGC = pScreen->CreateGC; + pScreen->CreateGC = DRICreateGC; + + dixSetPrivate(&pScreen->devPrivates, driWrapScreenKey, pScreenPriv); + + return TRUE; +} diff --git a/xorg-server/hw/xquartz/xpr/driWrap.h b/xorg-server/hw/xquartz/xpr/driWrap.h new file mode 100644 index 000000000..d31d5ddaf --- /dev/null +++ b/xorg-server/hw/xquartz/xpr/driWrap.h @@ -0,0 +1,31 @@ +/* +Copyright (c) 2009 Apple Computer, 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, sub license, 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 NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. +*/ + +#ifndef DRIWRAP_H +#include "scrnintstr.h" + +Bool DRIWrapInit(ScreenPtr pScreen); + +#endif /*DRIWRAP_H*/ diff --git a/xorg-server/hw/xquartz/xpr/xpr.h b/xorg-server/hw/xquartz/xpr/xpr.h index ab79a42cd..c657e1586 100644 --- a/xorg-server/hw/xquartz/xpr/xpr.h +++ b/xorg-server/hw/xquartz/xpr/xpr.h @@ -47,4 +47,18 @@ Bool QuartzInitCursor(ScreenPtr pScreen); void QuartzSuspendXCursor(ScreenPtr pScreen); void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y); +/* If we are rooted, we need the root window and desktop levels to be below + * the menubar (24) but above native windows. Normal window level is 0. + * Floating window level is 3. The rest are filled in as appropriate. + * See CGWindowLevel.h + */ + +#include +static const int normal_window_levels[AppleWMNumWindowLevels+1] = { +0, 3, 4, 5, INT_MIN + 30, INT_MIN + 29, +}; +static const int rooted_window_levels[AppleWMNumWindowLevels+1] = { +20, 21, 22, 23, 19, 18, +}; + #endif /* XPR_H */ diff --git a/xorg-server/hw/xquartz/xpr/xprAppleWM.c b/xorg-server/hw/xquartz/xpr/xprAppleWM.c index fae9a0422..4b31e3a11 100644 --- a/xorg-server/hw/xquartz/xpr/xprAppleWM.c +++ b/xorg-server/hw/xquartz/xpr/xprAppleWM.c @@ -33,41 +33,41 @@ #include "xpr.h" -#define _APPLEWM_SERVER_ -#include +#include #include "applewmExt.h" #include "rootless.h" +#include "rootlessCommon.h" #include #include #include "quartz.h" #include "x-hash.h" -/* This lookup table came straight from the Tiger X11 source. I tried to figure - * it out based on CGWindowLevel.h, but I dunno... -JH - */ -static const int normal_window_levels[AppleWMNumWindowLevels+1] = { -0, 3, 4, 5, INT_MIN + 30, INT_MIN + 29, -}; -static const int rooted_window_levels[AppleWMNumWindowLevels+1] = { -202, 203, 204, 205, 201, 200 -}; - static int xprSetWindowLevel( WindowPtr pWin, int level) { xp_window_id wid; xp_window_changes wc; + RootlessWindowRec *winRec; + // AppleWMNumWindowLevels is allowed, but is only set by the server + // for the root window. + if (level < 0 || level >= AppleWMNumWindowLevels) { + return BadValue; + } + wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, TRUE)); if (wid == 0) return BadWindow; RootlessStopDrawing (pWin, FALSE); - - //if (WINREC(WindowTable[pWin->drawable.pScreen->myNum]) == NULL) - if (quartzHasRoot) + winRec = WINREC(pWin); + + if(!winRec) + return BadWindow; + + if(quartzEnableRootless) wc.window_level = normal_window_levels[level]; else wc.window_level = rooted_window_levels[level]; @@ -76,9 +76,39 @@ static int xprSetWindowLevel( return BadValue; } + winRec->level = level; + return Success; } +#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3 +static int xprAttachTransient(WindowPtr pWinChild, WindowPtr pWinParent) { + xp_window_id child_wid, parent_wid; + xp_window_changes wc; + + child_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinChild, TRUE)); + if (child_wid == 0) + return BadWindow; + + if(pWinParent) { + parent_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinParent, TRUE)); + if (parent_wid == 0) + return BadWindow; + } else { + parent_wid = 0; + } + + wc.transient_for = parent_wid; + + RootlessStopDrawing (pWinChild, FALSE); + + if (xp_configure_window(child_wid, XP_ATTACH_TRANSIENT, &wc) != Success) { + return BadValue; + } + + return Success; +} +#endif static int xprFrameDraw( WindowPtr pWin, @@ -104,14 +134,23 @@ static int xprFrameDraw( return Success; } - static AppleWMProcsRec xprAppleWMProcs = { xp_disable_update, xp_reenable_update, xprSetWindowLevel, xp_frame_get_rect, xp_frame_hit_test, - xprFrameDraw + xprFrameDraw, +#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3 + xp_set_dock_proxy, + xprAttachTransient +#elif defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 2 + xp_set_dock_proxy, + NULL +#else + NULL, + NULL +#endif }; diff --git a/xorg-server/hw/xquartz/xpr/xprCursor.c b/xorg-server/hw/xquartz/xpr/xprCursor.c index 4345beea4..8c47b671c 100644 --- a/xorg-server/hw/xquartz/xpr/xprCursor.c +++ b/xorg-server/hw/xquartz/xpr/xprCursor.c @@ -128,7 +128,7 @@ load_cursor(CursorPtr src, int screen) while (ycount-- > 0) { - xcount = (src->bits->width + 7) / 8; + xcount = bits_to_bytes(src->bits->width); sptr = srow; mptr = mrow; dptr = drow; diff --git a/xorg-server/hw/xquartz/xpr/xprEvent.c b/xorg-server/hw/xquartz/xpr/xprEvent.c index 08581c0e3..f8e985aba 100644 --- a/xorg-server/hw/xquartz/xpr/xprEvent.c +++ b/xorg-server/hw/xquartz/xpr/xprEvent.c @@ -32,7 +32,6 @@ #include "xpr.h" -#define NEED_EVENTS #include #include #include diff --git a/xorg-server/hw/xquartz/xpr/xprFrame.c b/xorg-server/hw/xquartz/xpr/xprFrame.c index 9a143ade0..6635f08d8 100644 --- a/xorg-server/hw/xquartz/xpr/xprFrame.c +++ b/xorg-server/hw/xquartz/xpr/xprFrame.c @@ -42,6 +42,7 @@ #include "dix.h" #include #include "windowstr.h" +#include "quartz.h" #include "threadSafety.h" @@ -120,7 +121,7 @@ xprSetNativeProperty(RootlessWindowPtr pFrame) /* * Create and display a new frame. */ -Bool +static Bool xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, int newX, int newY, RegionPtr pShape) { @@ -161,6 +162,14 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, mask |= XP_SHAPE; } + pFrame->level = !IsRoot (pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels; + + if(quartzEnableRootless) + wc.window_level = normal_window_levels[pFrame->level]; + else + wc.window_level = rooted_window_levels[pFrame->level]; + mask |= XP_WINDOW_LEVEL; + err = xp_create_window(mask, &wc, (xp_window_id *) &pFrame->wid); if (err != Success) @@ -187,7 +196,7 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, /* * Destroy a frame. */ -void +static void xprDestroyFrame(RootlessFrameID wid) { TA_SERVER(); @@ -203,7 +212,7 @@ xprDestroyFrame(RootlessFrameID wid) /* * Move a frame on screen. */ -void +static void xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY) { TA_SERVER(); @@ -220,7 +229,7 @@ xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY) /* * Resize and move a frame. */ -void +static void xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY, unsigned int newW, unsigned int newH, unsigned int gravity) @@ -245,35 +254,43 @@ xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen, /* * Change frame stacking. */ -void -xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) -{ +static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) { xp_window_changes wc; + unsigned int mask = XP_STACKING; TA_SERVER(); - /* Stack frame below nextWid it if it exists, or raise + /* Stack frame below nextWid it if it exists, or raise frame above everything otherwise. */ - if (nextWid == NULL) - { + if(nextWid == NULL) { wc.stack_mode = XP_MAPPED_ABOVE; wc.sibling = 0; - } - else - { + } else { wc.stack_mode = XP_MAPPED_BELOW; wc.sibling = x_cvt_vptr_to_uint(nextWid); } - xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_STACKING, &wc); + if(window_hash) { + RootlessWindowRec *winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr((xp_window_id)wid), NULL); + + if(winRec) { + if(quartzEnableRootless) + wc.window_level = normal_window_levels[winRec->level]; + else + wc.window_level = rooted_window_levels[winRec->level]; + mask |= XP_WINDOW_LEVEL; + } + } + + xprConfigureWindow(x_cvt_vptr_to_uint(wid), mask, &wc); } /* * Change the frame's shape. */ -void +static void xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape) { xp_window_changes wc; @@ -300,7 +317,7 @@ xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape) /* * Unmap a frame. */ -void +static void xprUnmapFrame(RootlessFrameID wid) { xp_window_changes wc; @@ -318,7 +335,7 @@ xprUnmapFrame(RootlessFrameID wid) * Start drawing to a frame. * Prepare for direct access to its backing buffer. */ -void +static void xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) { void *data[2]; @@ -339,7 +356,7 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) /* * Stop drawing to a frame. */ -void +static void xprStopDrawing(RootlessFrameID wid, Bool flush) { TA_SERVER(); @@ -351,7 +368,7 @@ xprStopDrawing(RootlessFrameID wid, Bool flush) /* * Flush drawing updates to the screen. */ -void +static void xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage) { TA_SERVER(); @@ -363,7 +380,7 @@ xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage) /* * Mark damaged rectangles as requiring redisplay to screen. */ -void +static void xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects, int shift_x, int shift_y) { @@ -377,7 +394,7 @@ xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects, * Called after the window associated with a frame has been switched * to a new top-level parent. */ -void +static void xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin) { DeleteProperty(serverClient, oldWin, xa_native_window_id()); @@ -391,7 +408,7 @@ xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin) /* * Called to check if the frame should be reordered when it is restacked. */ -Bool xprDoReorderWindow(RootlessWindowPtr pFrame) +static Bool xprDoReorderWindow(RootlessWindowPtr pFrame) { WindowPtr pWin = pFrame->win; @@ -405,7 +422,7 @@ Bool xprDoReorderWindow(RootlessWindowPtr pFrame) * Copy area in frame to another part of frame. * Used to accelerate scrolling. */ -void +static void xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects, int dx, int dy) { @@ -473,6 +490,7 @@ xprGetXWindow(xp_window_id wid) return winRec != NULL ? winRec->win : NULL; } +#ifdef UNUSED_CODE /* * Given the id of a physical window, try to find the top-level (or root) * X window that it represents. @@ -503,7 +521,7 @@ xprGetXWindowFromAppKit(int windowNumber) return winRec != NULL ? winRec->win : NULL; } - +#endif /* * The windowNumber is an AppKit window number. Returns TRUE if xpr is diff --git a/xorg-server/hw/xquartz/xpr/xprScreen.c b/xorg-server/hw/xquartz/xpr/xprScreen.c index da262f654..3387ecf0a 100644 --- a/xorg-server/hw/xquartz/xpr/xprScreen.c +++ b/xorg-server/hw/xquartz/xpr/xprScreen.c @@ -48,6 +48,8 @@ #include "applewmExt.h" #include "micmap.h" +#include "rootlessCommon.h" + #ifdef DAMAGE # include "damage.h" #endif @@ -256,6 +258,9 @@ xprDisplayInit(void) AppleDRIExtensionInit(); xprAppleWMInit(); + + if (!quartzEnableRootless) + RootlessHideAllWindows(); } /* @@ -272,22 +277,9 @@ xprAddScreen(int index, ScreenPtr pScreen) if(depth == -1) { depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay); - //dfb->depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay); - //dfb->bitsPerRGB = CGDisplayBitsPerSample(kCGDirectMainDisplay); - //dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); } switch(depth) { -// case -8: // broken -// dfb->visuals = (1 << StaticGray) | (1 << GrayScale); -// dfb->preferredCVC = GrayScale; -// dfb->depth = 8; -// dfb->bitsPerRGB = 8; -// dfb->bitsPerPixel = 8; -// dfb->redMask = 0; -// dfb->greenMask = 0; -// dfb->blueMask = 0; -// break; case 8: // pseudo-working dfb->visuals = PseudoColorMask; dfb->preferredCVC = PseudoColor; @@ -299,27 +291,27 @@ xprAddScreen(int index, ScreenPtr pScreen) dfb->blueMask = 0; break; case 15: - dfb->visuals = LARGE_VISUALS; + dfb->visuals = TrueColorMask; //LARGE_VISUALS; dfb->preferredCVC = TrueColor; dfb->depth = 15; dfb->bitsPerRGB = 5; dfb->bitsPerPixel = 16; - dfb->redMask = 0x7c00; - dfb->greenMask = 0x03e0; - dfb->blueMask = 0x001f; + dfb->redMask = RM_ARGB(0,5,5,5); + dfb->greenMask = GM_ARGB(0,5,5,5); + dfb->blueMask = BM_ARGB(0,5,5,5); break; // case 24: default: if(depth != 24) ErrorF("Unsupported color depth requested. Defaulting to 24bit. (depth=%d darwinDesiredDepth=%d CGDisplaySamplesPerPixel=%d CGDisplayBitsPerSample=%d)\n", darwinDesiredDepth, depth, (int)CGDisplaySamplesPerPixel(kCGDirectMainDisplay), (int)CGDisplayBitsPerSample(kCGDirectMainDisplay)); - dfb->visuals = LARGE_VISUALS; + dfb->visuals = TrueColorMask; //LARGE_VISUALS; dfb->preferredCVC = TrueColor; dfb->depth = 24; dfb->bitsPerRGB = 8; dfb->bitsPerPixel = 32; - dfb->redMask = 0x00ff0000; - dfb->greenMask = 0x0000ff00; - dfb->blueMask = 0x000000ff; + dfb->redMask = RM_ARGB(0,8,8,8); + dfb->greenMask = GM_ARGB(0,8,8,8); + dfb->blueMask = BM_ARGB(0,8,8,8); break; } diff --git a/xorg-server/hw/xwin/InitInput.c b/xorg-server/hw/xwin/InitInput.c index 550c5a04e..1e9bcad7a 100644 --- a/xorg-server/hw/xwin/InitInput.c +++ b/xorg-server/hw/xwin/InitInput.c @@ -31,6 +31,7 @@ #endif #include "win.h" #include "dixstruct.h" +#include "inputstr.h" /* @@ -48,7 +49,8 @@ DISPATCH_PROC(winProcSetSelectionOwner); * Local global declarations */ -CARD32 g_c32LastInputEventTime = 0; +DeviceIntPtr g_pwinPointer; +DeviceIntPtr g_pwinKeyboard; /* @@ -94,7 +96,6 @@ ProcessInputEvents (void) #endif mieqProcessInputEvents (); - miPointerUpdate (); #if 0 ErrorF ("ProcessInputEvents - returning\n"); @@ -102,12 +103,10 @@ ProcessInputEvents (void) } -int -TimeSinceLastInputEvent () +void DDXRingBell(int volume, int pitch, int duration) { - if (g_c32LastInputEventTime == 0) - g_c32LastInputEventTime = GetTickCount (); - return GetTickCount () - g_c32LastInputEventTime; + /* winKeybdBell is used instead */ + return; } @@ -115,8 +114,6 @@ TimeSinceLastInputEvent () void InitInput (int argc, char *argv[]) { - DeviceIntPtr pMouse, pKeyboard; - #if CYGDEBUG winDebug ("InitInput\n"); #endif @@ -138,14 +135,16 @@ InitInput (int argc, char *argv[]) } #endif - pMouse = AddInputDevice (winMouseProc, TRUE); - pKeyboard = AddInputDevice (winKeybdProc, TRUE); + g_pwinPointer = AddInputDevice (serverClient, winMouseProc, TRUE); + g_pwinKeyboard = AddInputDevice (serverClient, winKeybdProc, TRUE); - RegisterPointerDevice (pMouse); - RegisterKeyboardDevice (pKeyboard); + RegisterPointerDevice (g_pwinPointer); + RegisterKeyboardDevice (g_pwinKeyboard); + + g_pwinPointer->name = strdup("Windows mouse"); + g_pwinKeyboard->name = strdup("Windows keyboard"); - miRegisterPointerDevice (screenInfo.screens[0], pMouse); - mieqInit ((DevicePtr)pKeyboard, (DevicePtr)pMouse); + mieqInit (); /* Initialize the mode key states */ winInitializeModeKeyStates (); diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c index abc35b943..2f4b0d222 100644 --- a/xorg-server/hw/xwin/InitOutput.c +++ b/xorg-server/hw/xwin/InitOutput.c @@ -42,8 +42,8 @@ from The Open Group. #ifdef __CYGWIN__ #include #endif -#if defined(XKB) && defined(WIN32) -#include +#if defined(WIN32) +#include "xkbsrv.h" #endif #ifdef RELOCATE_PROJECTROOT #include @@ -667,7 +667,6 @@ winFixupPaths (void) winMsg (X_DEFAULT, "Logfile set to \"%s\"\n", g_pszLogFile); } } -#ifdef XKB { static char xkbbasedir[MAX_PATH]; @@ -677,7 +676,6 @@ winFixupPaths (void) XkbBaseDirectory = xkbbasedir; XkbBinDirectory = basedir; } -#endif /* XKB */ #endif /* RELOCATE_PROJECTROOT */ } @@ -857,7 +855,6 @@ winUseMsg (void) "\tSpecify a keyboard device from the configuration file.\n"); #endif -#ifdef XKB ErrorF ("-xkbrules XKBRules\n" "\tEquivalent to XKBRules in XF86Config files.\n"); @@ -874,7 +871,6 @@ winUseMsg (void) ErrorF ("-xkboptions XKBOptions\n" "\tEquivalent to XKBOptions in XF86Config files.\n"); -#endif ErrorF ("-logfile filename\n" "\tWrite logmessages to instead of /tmp/Xwin.log.\n"); @@ -960,7 +956,7 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[]) if (!winReadConfigfile ()) winErrorFVerb (1, "InitOutput - Error reading config file\n"); #else - winMsg(X_INFO, "XF86Config is not supported\n"); + winMsg(X_INFO, "xorg.conf is not supported\n"); winMsg(X_INFO, "See http://x.cygwin.com/docs/faq/cygwin-x-faq.html " "for more information\n"); winConfigFiles (); @@ -1056,7 +1052,7 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[]) */ static Bool -winCheckDisplayNumber () +winCheckDisplayNumber (void) { int nDisp; HANDLE mutex; @@ -1120,20 +1116,3 @@ winCheckDisplayNumber () return TRUE; } - -#ifdef DPMSExtension -Bool DPMSSupported(void) -{ - return FALSE; -} - -void DPMSSet(int level) -{ - return; -} - -int DPMSGet(int *plevel) -{ - return 0; -} -#endif diff --git a/xorg-server/hw/xwin/Makefile.am b/xorg-server/hw/xwin/Makefile.am index 00d425544..2c7972a7f 100644 --- a/xorg-server/hw/xwin/Makefile.am +++ b/xorg-server/hw/xwin/Makefile.am @@ -34,6 +34,7 @@ SRCS_MULTIWINDOWEXTWM = \ winwin32rootlesswndproc.c \ winwindowswm.c DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM +MULTIWINDOWEXTWM_LIBS = $(top_builddir)/miext/rootless/librootless.la endif if XWIN_NATIVEGDI @@ -119,8 +120,11 @@ SRCS = InitInput.c \ winpriv.h \ winresource.h \ winwindow.h \ + XWin.rc \ + $(top_srcdir)/Xext/dpmsstubs.c \ + $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c \ - $(top_srcdir)/fb/fbcmap.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ $(SRCS_CLIPBOARD) \ $(SRCS_GLX_WINDOWS) \ $(SRCS_MULTIWINDOW) \ @@ -141,15 +145,13 @@ SRCS = InitInput.c \ XWin_SOURCES = $(SRCS) -INCLUDES = -I$(top_srcdir)/miext/rootless \ - -I$(top_srcdir)/miext/rootless/safeAlpha - -XWIN_LIBS = \ - $(top_builddir)/fb/libfb.la \ - $(XSERVER_LIBS) +INCLUDES = -I$(top_srcdir)/miext/rootless XWin_DEPENDENCIES = $(XWIN_LIBS) -XWin_LDADD = $(XWIN_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) +XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) + +.rc.o: + $(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -DPROJECT_NAME=\"$(VENDOR_NAME_SHORT)\" XWin_LDFLAGS = -mwindows -static @@ -157,23 +159,42 @@ winprefsyacc.h: winprefsyacc.c winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h BUILT_SOURCES = winprefsyacc.h winprefsyacc.c winprefslex.c -CLEANFILES = $(BUILT_SOURCES) +CLEANFILES = $(BUILT_SOURCES) $(appman_DATA) $(fileman_DATA) XWin.man XWinrc.man AM_YFLAGS = -d AM_LFLAGS = -i AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ - $(XWINMODULES_CFLAGS) - -dist_man1_MANS = XWin.man XWinrc.man + $(XWINMODULES_CFLAGS) \ + -DXFree86Server GLX_EXTRAS = \ - glx/ChangeLog \ glx/glwindows.h \ glx/glwrap.c \ glx/indirect.c +MAN_SRCS = XWin.man.pre XWinrc.man.pre + +appmandir = $(APP_MAN_DIR) +appman_DATA = XWin.$(APP_MAN_SUFFIX) + +filemandir = $(FILE_MAN_DIR) +fileman_DATA = XWinrc.$(FILE_MAN_SUFFIX) + +XWin.$(APP_MAN_SUFFIX): XWin.man + -rm -f XWin.$(APP_MAN_SUFFIX) + $(LN_S) XWin.man XWin.$(APP_MAN_SUFFIX) + +XWinrc.$(FILE_MAN_SUFFIX): XWinrc.man + -rm -f XWinrc.$(FILE_MAN_SUFFIX) + $(LN_S) XWinrc.man XWinrc.$(FILE_MAN_SUFFIX) + +EXTRAMANDEFS = -D__logdir__=$(logdir) -D__sysconfdir__=$(sysconfdir) -D__datadir__=$(datadir) + +include $(top_srcdir)/cpprules.in + EXTRA_DIST = \ $(GLX_EXTRAS) \ + $(MAN_SRCS) \ _usr_X11R6_lib_X11_system.XWinrc \ X-boxed.ico \ X.ico \ @@ -200,4 +221,4 @@ EXTRA_DIST = \ xlaunch/window/wizard.h relink: - rm -f XWin && $(MAKE) XWin + rm -f XWin$(EXEEXT) && $(MAKE) XWin$(EXEEXT) diff --git a/xorg-server/hw/xwin/Makefile.in b/xorg-server/hw/xwin/Makefile.in index 8b92bbdc6..24ec9f509 100644 --- a/xorg-server/hw/xwin/Makefile.in +++ b/xorg-server/hw/xwin/Makefile.in @@ -15,6 +15,11 @@ @SET_MAKE@ +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -35,13 +40,16 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = XWin$(EXEEXT) -subdir = hw/xwin -DIST_COMMON = README $(dist_man1_MANS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in ChangeLog winprefslex.c winprefsyacc.c \ +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in winprefslex.c winprefsyacc.c \ winprefsyacc.h +subdir = hw/xwin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -51,10 +59,12 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \ + "$(DESTDIR)$(filemandir)" PROGRAMS = $(bin_PROGRAMS) am__XWin_SOURCES_DIST = InitInput.c InitOutput.c winallpriv.c \ winauth.c winblock.c wincmap.c winconfig.c wincreatewnd.c \ @@ -67,8 +77,9 @@ am__XWin_SOURCES_DIST = InitInput.c InitOutput.c winallpriv.c \ winwndproc.c ddraw.h winclipboard.h winconfig.h win.h \ winkeybd.h winkeymap.h winkeynames.h winlayouts.h \ winmessages.h winmsg.h winms.h winmultiwindowclass.h \ - winprefs.h winpriv.h winresource.h winwindow.h \ - $(top_srcdir)/mi/miinitext.c $(top_srcdir)/fb/fbcmap.c \ + winprefs.h winpriv.h winresource.h winwindow.h XWin.rc \ + $(top_srcdir)/Xext/dpmsstubs.c $(top_srcdir)/Xi/stubs.c \ + $(top_srcdir)/mi/miinitext.c $(top_srcdir)/fb/fbcmap_mi.c \ winclipboardinit.c winclipboardtextconv.c winclipboardthread.c \ winclipboardunicode.c winclipboardwndproc.c \ winclipboardwrappers.c winclipboardxevents.c winpriv.c \ @@ -117,14 +128,14 @@ am__objects_9 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \ winscrinit.$(OBJEXT) winshaddd.$(OBJEXT) winshadddnl.$(OBJEXT) \ winshadgdi.$(OBJEXT) wintrayicon.$(OBJEXT) \ winvalargs.$(OBJEXT) winwakeup.$(OBJEXT) winwindow.$(OBJEXT) \ - winwndproc.$(OBJEXT) miinitext.$(OBJEXT) fbcmap.$(OBJEXT) \ + winwndproc.$(OBJEXT) XWin.$(OBJEXT) dpmsstubs.$(OBJEXT) \ + stubs.$(OBJEXT) miinitext.$(OBJEXT) fbcmap_mi.$(OBJEXT) \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) $(am__objects_6) \ $(am__objects_7) $(am__objects_8) am_XWin_OBJECTS = $(am__objects_9) XWin_OBJECTS = $(am_XWin_OBJECTS) am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/fb/libfb.la $(am__DEPENDENCIES_1) XWin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(XWin_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -170,9 +181,7 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(dist_man1_MANS) +DATA = $(appman_DATA) $(fileman_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -181,6 +190,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -201,9 +211,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -240,7 +253,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -249,9 +264,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -290,12 +309,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -315,7 +335,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -325,10 +344,11 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = @SED@ +SED = sed SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -338,11 +358,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -378,6 +397,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -394,10 +414,7 @@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = \ - $(top_builddir)/fb/libfb.la \ - $(XSERVER_LIBS) - +XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ @@ -405,7 +422,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -428,6 +444,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -459,7 +476,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -493,6 +512,7 @@ top_srcdir = @top_srcdir@ @XWIN_MULTIWINDOWEXTWM_TRUE@ winwindowswm.c @XWIN_MULTIWINDOWEXTWM_TRUE@DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM +@XWIN_MULTIWINDOWEXTWM_TRUE@MULTIWINDOWEXTWM_LIBS = $(top_builddir)/miext/rootless/librootless.la @XWIN_NATIVEGDI_TRUE@SRCS_NATIVEGDI = \ @XWIN_NATIVEGDI_TRUE@ winclip.c \ @XWIN_NATIVEGDI_TRUE@ winfillsp.c \ @@ -568,8 +588,11 @@ SRCS = InitInput.c \ winpriv.h \ winresource.h \ winwindow.h \ + XWin.rc \ + $(top_srcdir)/Xext/dpmsstubs.c \ + $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c \ - $(top_srcdir)/fb/fbcmap.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ $(SRCS_CLIPBOARD) \ $(SRCS_GLX_WINDOWS) \ $(SRCS_MULTIWINDOW) \ @@ -580,28 +603,66 @@ SRCS = InitInput.c \ $(SRCS_XV) XWin_SOURCES = $(SRCS) -INCLUDES = -I$(top_srcdir)/miext/rootless \ - -I$(top_srcdir)/miext/rootless/safeAlpha - +INCLUDES = -I$(top_srcdir)/miext/rootless XWin_DEPENDENCIES = $(XWIN_LIBS) -XWin_LDADD = $(XWIN_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) +XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) XWin_LDFLAGS = -mwindows -static BUILT_SOURCES = winprefsyacc.h winprefsyacc.c winprefslex.c -CLEANFILES = $(BUILT_SOURCES) +CLEANFILES = $(BUILT_SOURCES) $(appman_DATA) $(fileman_DATA) XWin.man XWinrc.man AM_YFLAGS = -d AM_LFLAGS = -i AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ - $(XWINMODULES_CFLAGS) + $(XWINMODULES_CFLAGS) \ + -DXFree86Server -dist_man1_MANS = XWin.man XWinrc.man GLX_EXTRAS = \ - glx/ChangeLog \ glx/glwindows.h \ glx/glwrap.c \ glx/indirect.c +MAN_SRCS = XWin.man.pre XWinrc.man.pre +appmandir = $(APP_MAN_DIR) +appman_DATA = XWin.$(APP_MAN_SUFFIX) +filemandir = $(FILE_MAN_DIR) +fileman_DATA = XWinrc.$(FILE_MAN_SUFFIX) +EXTRAMANDEFS = -D__logdir__=$(logdir) -D__sysconfdir__=$(sysconfdir) -D__datadir__=$(datadir) +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + EXTRA_DIST = \ $(GLX_EXTRAS) \ + $(MAN_SRCS) \ _usr_X11R6_lib_X11_system.XWinrc \ X-boxed.ico \ X.ico \ @@ -631,8 +692,8 @@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .c .l .lo .o .obj .y -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +.SUFFIXES: .pre .man .man.pre .c .l .lo .o .obj .rc .y +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -717,8 +778,10 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitInput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitOutput.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpmsstubs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap_mi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winallpriv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winauth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winblock.Po@am__quote@ @@ -802,6 +865,34 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +dpmsstubs.o: $(top_srcdir)/Xext/dpmsstubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dpmsstubs.o -MD -MP -MF $(DEPDIR)/dpmsstubs.Tpo -c -o dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dpmsstubs.Tpo $(DEPDIR)/dpmsstubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xext/dpmsstubs.c' object='dpmsstubs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c + +dpmsstubs.obj: $(top_srcdir)/Xext/dpmsstubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dpmsstubs.obj -MD -MP -MF $(DEPDIR)/dpmsstubs.Tpo -c -o dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dpmsstubs.Tpo $(DEPDIR)/dpmsstubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xext/dpmsstubs.c' object='dpmsstubs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` + +stubs.o: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.o -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xi/stubs.c' object='stubs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c + +stubs.obj: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.obj -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xi/stubs.c' object='stubs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` + miinitext.o: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.o -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po @@ -816,19 +907,19 @@ miinitext.obj: $(top_srcdir)/mi/miinitext.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` -fbcmap.o: $(top_srcdir)/fb/fbcmap.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap.o -MD -MP -MF $(DEPDIR)/fbcmap.Tpo -c -o fbcmap.o `test -f '$(top_srcdir)/fb/fbcmap.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fbcmap.Tpo $(DEPDIR)/fbcmap.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap.c' object='fbcmap.o' libtool=no @AMDEPBACKSLASH@ +fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.o -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap.o `test -f '$(top_srcdir)/fb/fbcmap.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c -fbcmap.obj: $(top_srcdir)/fb/fbcmap.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap.obj -MD -MP -MF $(DEPDIR)/fbcmap.Tpo -c -o fbcmap.obj `if test -f '$(top_srcdir)/fb/fbcmap.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fbcmap.Tpo $(DEPDIR)/fbcmap.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap.c' object='fbcmap.obj' libtool=no @AMDEPBACKSLASH@ +fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap.obj `if test -f '$(top_srcdir)/fb/fbcmap.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` .l.c: $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) @@ -841,40 +932,46 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-man1: $(dist_man1_MANS) +install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)" + @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ + done -uninstall-man1: +uninstall-appmanDATA: @$(NORMAL_UNINSTALL) - @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(appmandir)" && rm -f $$files +install-filemanDATA: $(fileman_DATA) + @$(NORMAL_INSTALL) + test -z "$(filemandir)" || $(MKDIR_P) "$(DESTDIR)$(filemandir)" + @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ + done + +uninstall-filemanDATA: + @$(NORMAL_UNINSTALL) + @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(filemandir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(filemandir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -929,19 +1026,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -974,9 +1058,9 @@ distdir: $(DISTFILES) check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) $(MANS) +all-am: Makefile $(PROGRAMS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -1032,7 +1116,7 @@ info: info-am info-am: -install-data-am: install-man +install-data-am: install-appmanDATA install-filemanDATA install-dvi: install-dvi-am @@ -1048,7 +1132,7 @@ install-info: install-info-am install-info-am: -install-man: install-man1 +install-man: install-pdf: install-pdf-am @@ -1078,9 +1162,8 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-man - -uninstall-man: uninstall-man1 +uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \ + uninstall-filemanDATA .MAKE: all check install install-am install-strip @@ -1088,23 +1171,41 @@ uninstall-man: uninstall-man1 clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ + install-appmanDATA install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-filemanDATA install-html \ install-html-am install-info install-info-am install-man \ - install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-man \ - uninstall-man1 + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-appmanDATA uninstall-binPROGRAMS \ + uninstall-filemanDATA +.rc.o: + $(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -DPROJECT_NAME=\"$(VENDOR_NAME_SHORT)\" + winprefsyacc.h: winprefsyacc.c winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h +XWin.$(APP_MAN_SUFFIX): XWin.man + -rm -f XWin.$(APP_MAN_SUFFIX) + $(LN_S) XWin.man XWin.$(APP_MAN_SUFFIX) + +XWinrc.$(FILE_MAN_SUFFIX): XWinrc.man + -rm -f XWinrc.$(FILE_MAN_SUFFIX) + $(LN_S) XWinrc.man XWinrc.$(FILE_MAN_SUFFIX) + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + relink: - rm -f XWin && $(MAKE) XWin + rm -f XWin$(EXEEXT) && $(MAKE) XWin$(EXEEXT) # 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. diff --git a/xorg-server/hw/xwin/X.ico b/xorg-server/hw/xwin/X.ico index d47168fca..5d69818b5 100644 Binary files a/xorg-server/hw/xwin/X.ico and b/xorg-server/hw/xwin/X.ico differ diff --git a/xorg-server/hw/xwin/XWin.man.pre b/xorg-server/hw/xwin/XWin.man.pre new file mode 100644 index 000000000..9649e2e60 --- /dev/null +++ b/xorg-server/hw/xwin/XWin.man.pre @@ -0,0 +1,288 @@ +.TH XWIN 1 __vendorversion__ +.SH NAME +XWin \- X Server for the Cygwin environment on Microsoft Windows + + +.SH SYNOPSIS +.B XWin +[ options ] ... + + +.SH DESCRIPTION +.I XWin is an X Server for the X Window System on the Cygwin environment +running on Microsoft Windows. + + +.SH MODES +\fIXWin\fP can operate in five different and incompatible modes: +.br +* \fISingle Window\fP: This is the default option. The X server +appears as a single Windows window and all X windows are contained +within this window. This mode requires an external window manager. +.br +* \fINo Decoration\fP: This mode is like single window mode except +that the X server window does not have a title bar or border, thus +maximizing the amount of space available for X windows within the X +server window. This mode requires an external window manager. +.br +* \fIFull Screen\fP: This mode is like single window mode except that +the X server window takes the full screen, covering completely the +Windows desktop. This mode requires an external window manager. +.br +* \fIRootless\fP: The X server works on a window covering the whole +screen but the root window (traditionally covered with an X hatch +pattern) is hidden from view. This mode requires an external window +manager. +.br +* \fIMulti-Window\fP: In this mode \fIXWin\fP uses its own integrated +window manager in order to handle the top-level X windows, in such a +way that they appear as normal Windows windows. +.PP +NOTE: \fIMulti-Window\fP mode will crash if an external window manager +such as \fItwm\fP or \fIfvwm\fP is launched since \fIMulti-Window\fP +uses its own internal window manager; all other modes require an +external window manager in order to move, resize, and perform other +operations on the individual X windows. + + +.SH LOG +As it runs \fIXWin\fP writes messages indicating the most relevant events +to the console +from which it was called and to a log file that by default is located at \fI +__logdir__/XWin.0.log\fP. This file is mainly for debugging purposes. + + +.SH PREFERENCES FILE +On startup \fIXWin\fP looks for the file \fI$HOME/.XWinrc\fP or, if +the previous file does not exist, \fI +__sysconfdir__/X11/system.XWinrc\fP. \fI.XWinrc\fP allows setting +preferences for the following: +.br +1- To include items into the menu associated with the \fIXWin\fP icon +which is in the \fIWindows\fP system tray. This functions in all +modes that have a tray icon. +.br +2- To include items in the menu which is associated with the Windows +window that \fIXWin -multiwindow\fP produces for each top-level X +window. That can be done both for the generic case and for particular +programs. +.br +3- To change the icon that is associated to the Windows window that +\fIXWin -multiwindow\fP produces for each top-level X-window. Again, +that can be done both for the generic case and for particular +programs. +.PP +The format of the \fI.XWinrc\fP file is given in the man page XWinrc(5). + + +.SH OPTIONS +In addition to the normal server options described in the \fIXserver(1)\fP +manual page, \fIXWin\fP accepts the following command line switches, +\fIall\fP of which are optional: +.TP 8 +.B \-clipboard +Enables the integration +between the Cygwin/X clipboard and Windows clipboard. Do not use in +conjunction with the \fIxwinclip\fP program. +.TP 8 +.B "\-clipupdates \fInum_boxes\fP" +Specify an optional threshold, above which the boxes in a shadow +update operation will be collected into a GDI clipping region. The +clipping region is then used to do a single bit block transfer that is +constrained to the updated area by the clipping region. There is some +overhead involved in creating, installing, destroying, and removing +the clipping region, thus there may not be much benefit for a small +number of boxes (less than 10). It is even possible that this +functionality does not provide a benefit at any number of boxes; we +can only determine the usefulness of this feature through testing. +This parameter works in conjunction with engines 1, 2, and 4 (Shadow +GDI, Shadow DirectDraw, and Shadow DirectDraw Non-Locking, +respectively). +.TP 8 +.B "\-emulate3buttons \fItimeout\fP" +Emulate a three button mouse; pressing both buttons within +.I timeout +milliseconds causes an emulated middle button press. The default +.I timeout +is 50 milliseconds. Note that most mice with scroll wheel have middle +button functionality, usually you will need this option only if you have +a two button mouse without scroll wheel. +.TP 8 +.B \-emulatepseudo +Create a depth 8 PseudoColor visual when running in depths 15, 16, 24, +or 32, collectively known as TrueColor depths. + At this date (April 2004) this option is not still operative. +.TP 8 +.B "\-engine \fIengine_type_id\fP" +This option, which is intended for Cygwin/X developers, +overrides the server's automatically supported engine type. This +parameter will be ignored if the specified engine type is not +supported on the current system. The supported engine type ids are 1 +- Shadow GDI, 2 - Shadow DirectDraw, and 4 - Shadow DirectDraw4. +Additionally, there is a barely functional experimental engine type id +16 - Native GDI. +.TP 8 +.B "\-fullscreen [-depth \fIdepth\fP] [-refresh \fIrate_in_Hz\fP]" +Run the server in fullscreen mode, as opposed to the default windowed +mode. +.TP 8 +.B "\-depth \fIdepth\fP" +Specify the color depth, in bits per pixel, to use when running in +fullscreen with a DirectDraw engine. This parameter is ignored if +\fB\-fullscreen\fP is not specified. +.TP 8 +.B "\-refresh \fIrate_in_Hz\fP" +Specify an optional refresh rate to use when running in +fullscreen with a DirectDraw engine. This parameter is ignored if +\fB\-fullscreen\fP is not specified. +.TP 8 +.B \-help +Write a help text to the console and to the log file. +.TP 8 +.B \-ignoreinput +Ignore keyboard and mouse input. This is usually only used for testing +and debugging purposes. +.TP 8 +.B \-[no]keyhook +Enable [disable] a low-level keyboard hook for catching +special key combinations like Alt+Tab and passing them to the X +Server instead of letting \fIWindows\fP handle them. +.TP 8 +.B \-lesspointer +Hide the Windows mouse cursor when the mouse is over any Cygwin/X +window (regardless of whether that window is active or inactive). This +prevents the Windows mouse cursor from being placed overtop of the X +cursor. +.TP 8 +.B "\-logfile \fIFile_Name\fP" +Change the log file from the default located at \fI +__logdir__/XWin.0.log\fP to the one indicated by \fIFile_Name\fP. +.TP 8 +.B "\-logverbose \fIlevel\fP" +Control the degree of verbosity of the log messages with the integer +parameter \fIlevel\fP. For \fIlevel\fP=0 only fatal errors are +reported, for \fIlevel\fP=1 (default) simple information about +configuration is also given, for \fIlevel\fP=2 a detailed log +information (including trace and debug output) is produced. Bigger +values will yield a still more detailed debug output. At this date +(April 2004) the option is still not fully operative; the default +value is 2 and the output is insensitive to the level value. +.TP 8 +.B \-multimonitors +Create a root window that covers all monitors on a system with +multiple monitors. +.TP 8 +.B \-multiwindow +Start the integrated \fIWindowsi\fP-based window manager, which launches each +top-level X window in its own \fIWindows\fP window. Not to be used together +with \fB\-rootless\fP nor \fB\-fullscreen\fP. +.TP 8 +.B \-nodecoration +Do not give the Cygwin/X window a Windows window border, title bar, +etc. This parameter only applies to windowed mode screens, i.e., this +parameter is ignored when the \fB\-fullscreen\fP parameter is specified. +.TP 8 +.B \-nounicodeclipboard +Do not use Unicode clipboard even if NT-based platform. +.TP 8 +.B \-rootless +Run the server in rootless mode. Not to be used with \fB\-multiwindow\fP +nor with \fB\-fullscreen\fP. +.TP 8 +.B "\-screen \fIscreen_number\fP \fIwidth\fP \fIheight\fP" +This parameter may be used to specify the +.I screen_number, +.I height, +and +.I width +of one or several Cygwin/X screens; each Cygwin/X screen will be +opened in its own window. When using multiple screens, be sure not to +duplicate any screen numbers. +.I XWin +default behavior is to create a single screen that is roughly +the size of the current Windows display area. +Screen specific parameters, such as \fB\-fullscreen\fP, can be applied as a +default to all screens by placing those screen specific parameters +before any \fB\-screen\fP parameter. Screen specific parameters placed after +the first \fB\-screen\fP parameter will apply only to the immediately +preceeding \fB\-screen\fP parameter. +.TP 8 +.B \-scrollbars +In windowed mode, allow screens bigger than the Windows desktop. +Moreover, if the window has decorations, one can now resize it. +.TP 8 +.B \-[no]trayicon +Do not create a tray icon. Default is to create one +icon per screen. You can globally disable tray icons with +\fB\-notrayicon\fP, then enable it for specific screens with +\fB\-trayicon\fP for those screens. +.TP 8 +.B \-[no]unixkill +Enable or disable the \fICtrl-Alt-Backspace\fP key combination as a +signal to exit the X Server. The \fICtrl-Alt-Backspace\fP key combination +is disabled by default. +.TP 8 +.B \-[no]winkill +Enable or disable the \fIAlt-F4\fP key combination as a signal to exit the +X Server. +The \fIAlt-F4\fP key combination is enabled by default. +.TP 8 +.B \-swcursor +Disable the usage of the windows cursor and use the X11 software cursor instead. +.TP 8 +.B \-silent-dup-error +If another instance of XWin is found running, exit silently and don't display +the error message. +.TP 8 +.B "\-xkblayout \fIlayout\fP" +.TP 8 +.B "\-xkbmodel \fImodel\fP" +.TP 8 +.B "\-xkboptions \fIoption\fP" +.TP 8 +.B "\-xkbrules \fIrule\fP" +.TP 8 +.B "\-xkbvariant \fIvariant\fp" +These options implement the xkeyboard extension for loading +a particular keyboard map as the X server starts. The behavior is similar +to the \fIsetxkbmap\fP program. The layout data is located at \fI +__datadir__/X11/xkb/\fP. Additional information is found in the +README files therein and in the man page of \fIsetxkbmap\fP. For example +in order to load a German layout for a pc105 keyboard one uses +the options: +.br +.I " \-xkblayout de \-xkbmodel pc105" +.PP +Alternatively one may use the \fIsetxkbmap\fP program after XWin is +running or even the \fIxmodmap\fP program for loading the old-style +keyboard maps. + + +.SH "SEE ALSO" +X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1), XWinrc(__filemansuffix__), setxkbmap(1) + + +.SH BUGS +.I XWin +and this man page still have many limitations. Some of the more obvious +ones are: +.br +- The display mode can not be changed once the X server has started. +.br +- The XWin software is developing rapidly; it is therefore likely that +this man page is not up to date. It is always prudent to +look also at the output of \fIXWin -help\fP and to the Cygwin/X User Guide +at /usr/share/doc/cygwin-x-doc-x.x.x/ug/cygwin-x-ug.xxx in order to +check the options that are operative. + + +.SH AUTHORS +This list is by no means complete, but direct contributors to the +Cygwin/X project include (in alphabetical order by last name): Stuart +Adamson, Michael Bax, Jehan Bing, Lev Bishop, Dr. Peter Busch, Biju G +C, Robert Collins, Nick Crabtree, Early Ehlinger, Christopher Faylor, +John Fortin, Brian Genisio, Fabrizio Gennari, Alexander Gottwald, Ralf +Habacker, Colin Harrison, Matthieu Herrb, Alan Hourihane, Pierre A +Humblet, Harold L Hunt II, Dakshinamurthy Karra, Kensuke Matsuzaki, +Takuma Murakami, Earle F. Philhower III, Benjamin Riefenstahl, Suhaib +Siddiqi, Jack Tanner, and Nicholas Wourms. diff --git a/xorg-server/hw/xwin/XWin.rc b/xorg-server/hw/xwin/XWin.rc index 749c0f5f5..5a254e1ab 100644 --- a/xorg-server/hw/xwin/XWin.rc +++ b/xorg-server/hw/xwin/XWin.rc @@ -50,9 +50,9 @@ BEGIN CONTROL "FAQ", ID_ABOUT_FAQ, "Button", BS_OWNERDRAW | WS_TABSTOP, 135, 65, 75, 15 - DEFPUSHBUTTON "Dismiss", IDOK, 95, 85, 50, 15 + DEFPUSHBUTTON "&OK", IDOK, 95, 85, 50, 15 - CTEXT "Welcome to the preliminary About box for the " PROJECT_NAME " X Server. This dialog was created on 2004/03/25 and will eventually be filled with more useful information. For now, use the links below to learn more about the " PROJECT_NAME " project.", IDC_STATIC, 5, 5, 230, 35 + CTEXT PROJECT_NAME " X Server. Use the links below to learn more about the " PROJECT_NAME " project.", IDC_STATIC, 5, 5, 230, 35 END @@ -75,11 +75,11 @@ END EXIT_DIALOG DIALOG DISCARDABLE 32, 32, 180, 78 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE FONT 8, "MS Sans Serif" -CAPTION PROJECT_NAME " - Exit?" +CAPTION "Exit " PROJECT_NAME "?" BEGIN PUSHBUTTON "E&xit", IDOK, 55, 56, 30, 14 DEFPUSHBUTTON "&Cancel", IDCANCEL, 95, 56, 30, 14 - CTEXT "Exiting will close all screens running on this display.", IDC_STATIC, 7, 12, 166, 8 + CTEXT "E&xiting will close all screens running on this display.", IDC_STATIC, 7, 12, 166, 8 CTEXT "No information about connected clients available.", IDC_CLIENTS_CONNECTED, 7, 24, 166, 8 CTEXT "Proceed with shutdown of this display/server?", IDC_STATIC, 7, 36, 166, 8 END diff --git a/xorg-server/hw/xwin/XWinrc.man.pre b/xorg-server/hw/xwin/XWinrc.man.pre new file mode 100644 index 000000000..4fb436ddd --- /dev/null +++ b/xorg-server/hw/xwin/XWinrc.man.pre @@ -0,0 +1,248 @@ +.TH XWIN 5 __vendorversion__ + + +.SH NAME +XWinrc\- XWin Server Resource Configuration File. + + +.SH DESCRIPTION +The X Server for the X Window System on the Cygwin/X environment +running on Microsoft Windows, \fIXWin\fP can be optionally configured +with the \fIXWinrc\fP file. A system-wide configuration file should +be placed in \fI +__sysconfdir__/X11/system.XWinrc\fP, a per-user file +should be put at \fI$HOME/.XWinrc\fP. The \fIsystem.XWinrc\fP file is +read only if no \fI$HOME/.XWinrc\fP exist. +.PP +With the \fI.XWinrc\fP configuration file it is possible to do the +following: +.PP +1- To include items into the menu associated with the \fIXWin\fP icon +which is in the \fIWindows\fP system tray. This feature functions in +all XWin modes that have such tray icon. +.PP +2- To include items into the menu which is associated with the +\fIWindows\fP window that \fIXWin -multiwindow\fP produces for each +top-level X-window. That can be done both for the generic case and +for particular programs. +.PP +3- To change the icon that is associated to the \fIWindows\fP window +that \fIXWin -multiwindow\fP produces for each top-level X-window. +Again, that can be done both for the generic case and for particular +programs. The new icons associated should be \fIWindows\fP format +icons \fI.ico\fP. +.PP +4- To change the style that is associated to the \fIWindows\fP window +that \fI-multiwindow\fP produces for each top-level X window. Again, +that can be done both for the generic case and for particular programs. + + +.SH FILE FORMAT +.B Keywords +are case insensitive, but in this document they will be written +completely capitalized. +.PP +.B Comments +are legal pretty much anywhere you can have an end-of-line; they +begin with "#" or "//" and go to the end-of-line. +.PP +Quote marks in strings are optional unless the string has included spaces, +or could be parsed, ambiguously, as a misplaced keyword. +.PP +There are four kinds of instructions: miscellaneous, menu, icon and style. + + +.SH Miscellaneous instruction +.TP 8 +.B DEBUG \fIString\fP +The \fIString\fP is printed to the XWin log file. + +.TP 8 +.B TRAYICON \fIicon-specifier\fB +The \fBTRAYICON\fP keyword changes the icon \fIXWin\fP displays in the +system tray area. + +.TP 8 +.B SILENTEXIT +The \fBSILENTEXIT\fP keyword, which takes no parameters, disables the +exit confirmation dialog. + + +.SH Menu instructions +.TP 8 +.B MENU \fIMenu_Name\fP { +.br +.B \fIMenu_Item_Line\fP +.br +.B \fIMenu_Item_Line\fP +.br +.B \fI...\fP +.br +.B } +.br +This instruction defines a menu and asigns a \fIMenu_Name\fP to it. +\fIMenu_Item_Line\fP are lines of any of the following types: +.TP 8 +.B \t SEPARATOR +.TP 8 +.B \t \fIItem_Label\fP EXEC \fICommand\fP +.TP 8 +.B \t \fIItem_Label\fP MENU \fIpreviously-defined-menu-name\fP +.TP 8 +.B \t \fIItem_Label\fP ALWAYSONTOP +.TP 8 +.B \t \fIItem_Label\fP RELOAD +.br +The \fIItem_Label\fP is the string that is written in the menu item. +.br +\fICommand\fP is a string with the command that will be executed by /bin/sh. +Here paths should be \fICYGWIN\fP style (e.g. /usr/local/bin/myprogram). +A string "%display%" appearing in the \fICommand\fP will be replaced +with the proper display variable (i.e. 127.0.0.1:.0). +.br +\fBALWAYSONTOP\fP sets the window to which the menu is associated to +display above all others. +.br +\fBRELOAD\fP causes the XWinrc file to be reloaded and icons and menus +regenerated. +.TP 8 +.B ROOTMENU \fIpreviously-defined-menu-name\fP +Includes the items in the indicated menu into the menu associated with +\fIXWin\fP that appears in the system tray. +.TP 8 +.B DEFAULTSYSMENU \fIpreviously-defined-menu-name\fP ATSTART|ATEND +Includes the items in the indicated menu into the menu associated with +generic top-level X-Windows in the \fIXWin\fP \fImultiwindow\fP mode. The +keywords \fBATSTART\fP and \fBATEND\fP indicate if such items should be +included at the start or at the end of the menu. +.TP 8 +.B SYSMENU { + \fIclass-or-name-of-window\fP \fIdefined-menu-name\fP \fBATSTART|ATEND\fP +.br + \fI...\fP +.br + \fB}\fP +.br +Associates a specific menu to a specified window class or name +in \fI-multiwindow\fP mode. The keywords ATSTART or ATEND indicate if +such items should be included at the start or at the end of the menu. + + +.SH Icon Instructions +When specifying an \fIicon-file\fP in the following commands several different formats are allowed: +.br +\fB"NAME.ICO"\fP\fI of an .ico format file\fP +.br +\t \t ("cygwin.ico", "apple.ico") +.br +\fB"NAME.DLL,nn"\fP\fI of a .DLL and icon index\fP +.br +\t \t ("c:\\windows\\system32\\shell32.dll,4" is the default folder icon) +.br +\fB",nnn"\fP\fI index into XWin.EXE internal ICON resources\fP +.br +\t \t (",101" is the 1st icon inside \fIXWin.EXE\fP) +.TP 8 +.B ICONDIRECTORY \fIWindows-path-to-icon-directory\fP +Defines the default directory to search for \ficon-file\fP files. +It should be a \fIWindows\fP style path (e.g. C:\\cygwin\\usr\\local\\icons). +.TP 8 +.B DEFAULTICON \fIicon-file\fP +Defines a replacement for the standard X icon for applications without +specified icons. +.TP 8 +.B ICONS { +.br + \fIclass-or-name-of-window\fP \fIicon-file\fP +.br + \fI...\fP +.br + \fB}\fP +.br +Defines icon replacements windows matching the specified window class or names. +If multiple name or class matches occur for a window, only the first one +will be used. + +.SH Style Instructions +.TP 8 +.B STYLES { +\fIclass-or-name-of-window\fP \fIstyle-keyword-1\fP \fIstyle-keyword-2\fP +.br + \fI...\fP +.br +\fB}\fP + +Associates specific styles to a specified window class or name +in \fI-multiwindow\fP mode. If multiple class or name matches occur, +for a window, only the first one will be used. + +The style keywords indicate the following: + +\fIstyle-keyword-1\fP + +\fBTOPMOST\fP +.br +Open the class or name above all NOTOPMOST Microsoft Windows +.br +\fBMAXIMIZE\fP +.br +Start the class or name fullscreen. +.br +\fBMINIMIZE\fP +.br +Start the class or name iconic. +.br +\fBBOTTOM\fP +.br +Open the class or name below all Windows windows. +.br + +\fIstyle-keyword-2\fP + +\fBNOTITLE\fP +.br +No Windows title bar, for the class or name. +.br +\fBOUTLINE\fP +.br +No Windows title bar and just a thin-line border, for the class or name. +.br +\fBNOFRAME\fP +.br +No Windows title bar or border, for the class or name. + +One keyword in \fIstyle-keyword-1\fP can be used with one keyword in \fIstyle-keyword-2\fP, +or any keyword can be used singly. + + +.SH EXAMPLE +.TP 8 +This example adds an Xterm menu item to the system tray icon +\fBMENU systray { +.br +\t xterm EXEC "xterm -display %display% -sb -sl 999" +.br +\t SEPARATOR +.br +} +.br +ROOTMENU systray +\fP + +.TP 8 +This example makes an oclock window frameless in \fI-multiwindow\fP mode +\fBSTYLES { +.br +\t oclock NOFRAME +.br +} + + + +.SH "SEE ALSO" + XWin(1) + + +.SH AUTHOR +The XWinrc feature of XWin was written primarily by Earle F. Philhower +III. Extended for style configuration by Colin Harrison. diff --git a/xorg-server/hw/xwin/win.h b/xorg-server/hw/xwin/win.h index ea54b997c..9009df29b 100644 --- a/xorg-server/hw/xwin/win.h +++ b/xorg-server/hw/xwin/win.h @@ -58,7 +58,6 @@ # define WM_XBUTTONDBLCLK 525 #endif -#define NEED_EVENTS #define WIN_DEFAULT_BPP 0 #define WIN_DEFAULT_WHITEPIXEL 255 @@ -103,6 +102,7 @@ #define WIN_E3B_TIMER_ID 1 #define WIN_POLLING_MOUSE_TIMER_ID 2 +#define MOUSE_POLLING_INTERVAL 50 #define WIN_E3B_OFF -1 #define WIN_FD_INVALID -1 @@ -314,6 +314,7 @@ typedef Bool (*winReleasePrimarySurfaceProcPtr)(ScreenPtr); typedef Bool (*winFinishCreateWindowsWindowProcPtr)(WindowPtr pWin); +typedef Bool (*winCreateScreenResourcesProc)(ScreenPtr); /* Typedef for DIX wrapper functions */ typedef int (*winDispatchProcPtr) (ClientPtr); @@ -564,6 +565,8 @@ typedef struct _winPrivScreenRec winCreatePrimarySurfaceProcPtr pwinCreatePrimarySurface; winReleasePrimarySurfaceProcPtr pwinReleasePrimarySurface; + winCreateScreenResourcesProc pwinCreateScreenResources; + #ifdef XWIN_MULTIWINDOW /* Window Procedures for MultiWindow mode */ winFinishCreateWindowsWindowProcPtr pwinFinishCreateWindowsWindow; @@ -633,12 +636,13 @@ extern DevPrivateKey g_iGCPrivateKey; extern DevPrivateKey g_iPixmapPrivateKey; extern DevPrivateKey g_iWindowPrivateKey; extern unsigned long g_ulServerGeneration; -extern CARD32 g_c32LastInputEventTime; extern DWORD g_dwEnginesSupported; extern HINSTANCE g_hInstance; extern int g_copyROP[]; extern int g_patternROP[]; extern const char * g_pszQueryHost; +extern DeviceIntPtr g_pwinPointer; +extern DeviceIntPtr g_pwinKeyboard; /* @@ -952,6 +956,11 @@ winKeybdReleaseKeys (void); void winSendKeyEvent (DWORD dwKey, Bool fDown); +BOOL +winCheckKeyPressed(WPARAM wParam, LPARAM lParam); + +void +winFixShiftKeys (int iScanCode); /* * winkeyhook.c @@ -1004,6 +1013,9 @@ winMouseButtonsHandle (ScreenPtr pScreen, int iEventType, int iButton, WPARAM wParam); +void +winEnqueueMotion(int x, int y); + #ifdef XWIN_NATIVEGDI /* * winnativegdi.c @@ -1205,6 +1217,8 @@ winSetShapeRootless (WindowPtr pWindow); HICON winXIconToHICON (WindowPtr pWin, int iconSize); +void +winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon); #ifdef XWIN_MULTIWINDOW /* diff --git a/xorg-server/hw/xwin/winclipboard.h b/xorg-server/hw/xwin/winclipboard.h index 445c01b27..089c2913b 100644 --- a/xorg-server/hw/xwin/winclipboard.h +++ b/xorg-server/hw/xwin/winclipboard.h @@ -38,7 +38,7 @@ #ifdef __CYGWIN__ #include #else -#include "Xwinsock.h" +#include #define HAS_WINSOCK #endif #include @@ -48,27 +48,12 @@ /* X headers */ #include #include -/* NOTE: For some unknown reason, including Xproto.h solves - * tons of problems with including windows.h. Unknowns reasons - * are usually bad, so someone should investigate this. - */ #include -#include "X11/Xutil.h" -#include "X11/Xlocale.h" - -/* Fixups to prevent collisions between Windows and X headers */ -#define ATOM DWORD - -#ifndef __CYGWIN__ -#define sleep(x) Sleep (1000 * (x)) -#endif +#include +#include /* Windows headers */ -#ifndef XFree86Server -#define XFree86Server -#endif -#include -#undef XFree86Server +#include /* Clipboard module constants */ diff --git a/xorg-server/hw/xwin/winclipboardinit.c b/xorg-server/hw/xwin/winclipboardinit.c index 6a0cbaf2c..bec63ac8e 100644 --- a/xorg-server/hw/xwin/winclipboardinit.c +++ b/xorg-server/hw/xwin/winclipboardinit.c @@ -59,7 +59,7 @@ extern HWND g_hwndClipboard; */ Bool -winInitClipboard () +winInitClipboard (void) { ErrorF ("winInitClipboard ()\n"); @@ -90,12 +90,13 @@ winInitClipboard () */ HWND -winClipboardCreateMessagingWindow () +winClipboardCreateMessagingWindow (void) { - WNDCLASS wc; + WNDCLASSEX wc; HWND hwnd; /* Setup our window class */ + wc.cbSize=sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = winClipboardWindowProc; wc.cbClsExtra = 0; @@ -106,7 +107,8 @@ winClipboardCreateMessagingWindow () wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = WIN_CLIPBOARD_WINDOW_CLASS; - RegisterClass (&wc); + wc.hIconSm = 0; + RegisterClassEx (&wc); /* Create the window */ hwnd = CreateWindowExA (0, /* Extended styles */ diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c index 081abd5e7..8eb825fa8 100644 --- a/xorg-server/hw/xwin/winclipboardthread.c +++ b/xorg-server/hw/xwin/winclipboardthread.c @@ -1,5 +1,6 @@ /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. + *Copyright (C) Colin Harrison 2005-2008 * *Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -20,12 +21,13 @@ *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 Harold L Hunt II - *shall not be used in advertising or otherwise to promote the sale, use - *or other dealings in this Software without prior written authorization - *from Harold L Hunt II. + *Except as contained in this notice, the name of the copyright holder(s) + *and author(s) 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 holder(s) and author(s). * * Authors: Harold L Hunt II + * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H @@ -37,6 +39,7 @@ #include #endif #include "X11/Xauth.h" +#include "misc.h" /* @@ -231,15 +234,6 @@ winClipboardProc (void *pvNotUsed) iMaxDescriptor = iConnectionNumber + 1; #endif - /* Select event types to watch */ - if (XSelectInput (pDisplay, - DefaultRootWindow (pDisplay), - SubstructureNotifyMask | - StructureNotifyMask | - PropertyChangeMask) == BadWindow) - ErrorF ("winClipboardProc - XSelectInput generated BadWindow " - "on RootWindow\n\n"); - /* Create atoms */ atomClipboard = XInternAtom (pDisplay, "CLIPBOARD", False); atomClipboardManager = XInternAtom (pDisplay, "CLIPBOARD_MANAGER", False); @@ -258,6 +252,13 @@ winClipboardProc (void *pvNotUsed) pthread_exit (NULL); } + /* Select event types to watch */ + if (XSelectInput (pDisplay, + iWindow, + PropertyChangeMask) == BadWindow) + ErrorF ("winClipboardProc - XSelectInput generated BadWindow " + "on messaging window\n"); + /* Save the window in the screen privates */ g_iClipboardWindow = iWindow; @@ -273,7 +274,8 @@ winClipboardProc (void *pvNotUsed) /* PRIMARY */ iReturn = XSetSelectionOwner (pDisplay, XA_PRIMARY, iWindow, CurrentTime); - if (iReturn == BadAtom || iReturn == BadWindow) + if (iReturn == BadAtom || iReturn == BadWindow || + XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow) { ErrorF ("winClipboardProc - Could not set PRIMARY owner\n"); pthread_exit (NULL); @@ -282,7 +284,8 @@ winClipboardProc (void *pvNotUsed) /* CLIPBOARD */ iReturn = XSetSelectionOwner (pDisplay, atomClipboard, iWindow, CurrentTime); - if (iReturn == BadAtom || iReturn == BadWindow) + if (iReturn == BadAtom || iReturn == BadWindow || + XGetSelectionOwner (pDisplay, atomClipboard) != iWindow) { ErrorF ("winClipboardProc - Could not set CLIPBOARD owner\n"); pthread_exit (NULL); diff --git a/xorg-server/hw/xwin/winclipboardwndproc.c b/xorg-server/hw/xwin/winclipboardwndproc.c index 802a74035..292ca872b 100644 --- a/xorg-server/hw/xwin/winclipboardwndproc.c +++ b/xorg-server/hw/xwin/winclipboardwndproc.c @@ -1,5 +1,6 @@ /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. + *Copyright (C) Colin Harrison 2005-2008 * *Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -20,12 +21,13 @@ *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 Harold L Hunt II - *shall not be used in advertising or otherwise to promote the sale, use - *or other dealings in this Software without prior written authorization - *from Harold L Hunt II. + *Except as contained in this notice, the name of the copyright holder(s) + *and author(s) 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 holder(s) and author(s). * * Authors: Harold L Hunt II + * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H @@ -34,9 +36,7 @@ #include #include #include "winclipboard.h" - -extern void winFixClipboardChain(); - +#include "misc.h" /* * Constants @@ -63,7 +63,7 @@ extern HWND g_hwndClipboard; * Local function prototypes */ -static Bool +static int winProcessXEventsTimeout (HWND hwnd, int iWindow, Display *pDisplay, Bool fUseUnicode, int iTimeoutSec); @@ -259,6 +259,8 @@ winClipboardWindowProc (HWND hwnd, UINT message, case WM_DRAWCLIPBOARD: { + static Atom atomClipboard; + static int generation; static Bool s_fProcessingDrawClipboard = FALSE; Display *pDisplay = g_pClipboardDisplay; Window iWindow = g_iClipboardWindow; @@ -266,6 +268,12 @@ winClipboardWindowProc (HWND hwnd, UINT message, winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Enter\n"); + if (generation != serverGeneration) + { + generation = serverGeneration; + atomClipboard = XInternAtom (pDisplay, "CLIPBOARD", False); + } + /* * We've occasionally seen a loop in the clipboard chain. * Try and fix it on the first hint of recursion. @@ -353,17 +361,13 @@ winClipboardWindowProc (HWND hwnd, UINT message, /* Release CLIPBOARD selection if owned */ iReturn = XGetSelectionOwner (pDisplay, - XInternAtom (pDisplay, - "CLIPBOARD", - False)); + atomClipboard); if (iReturn == g_iClipboardWindow) { winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - " "CLIPBOARD selection is owned by us.\n"); XSetSelectionOwner (pDisplay, - XInternAtom (pDisplay, - "CLIPBOARD", - False), + atomClipboard, None, CurrentTime); } @@ -383,7 +387,8 @@ winClipboardWindowProc (HWND hwnd, UINT message, XA_PRIMARY, iWindow, CurrentTime); - if (iReturn == BadAtom || iReturn == BadWindow) + if (iReturn == BadAtom || iReturn == BadWindow || + XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow) { winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - " "Could not reassert ownership of PRIMARY\n"); @@ -396,12 +401,12 @@ winClipboardWindowProc (HWND hwnd, UINT message, /* Reassert ownership of the CLIPBOARD */ iReturn = XSetSelectionOwner (pDisplay, - XInternAtom (pDisplay, - "CLIPBOARD", - False), + atomClipboard, iWindow, CurrentTime); - if (iReturn == BadAtom || iReturn == BadWindow) + + if (iReturn == BadAtom || iReturn == BadWindow || + XGetSelectionOwner (pDisplay, atomClipboard) != iWindow) { winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - " "Could not reassert ownership of CLIPBOARD\n"); diff --git a/xorg-server/hw/xwin/winclipboardwrappers.c b/xorg-server/hw/xwin/winclipboardwrappers.c index 2cfe0ffce..c68d78aa3 100644 --- a/xorg-server/hw/xwin/winclipboardwrappers.c +++ b/xorg-server/hw/xwin/winclipboardwrappers.c @@ -1,5 +1,6 @@ /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. + *Copyright (C) Colin Harrison 2005-2008 * *Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -20,12 +21,13 @@ *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 Harold L Hunt II - *shall not be used in advertising or otherwise to promote the sale, use - *or other dealings in this Software without prior written authorization - *from Harold L Hunt II. + *Except as contained in this notice, the name of the copyright holder(s) + *and author(s) 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 holder(s) and author(s). * * Authors: Harold L Hunt II + * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H @@ -40,6 +42,7 @@ * Constants */ +#define CLIP_NUM_CALLS 4 #define CLIP_NUM_SELECTIONS 2 #define CLIP_OWN_PRIMARY 0 #define CLIP_OWN_CLIPBOARD 1 @@ -85,6 +88,8 @@ winProcQueryTree (ClientPtr client) { int iReturn; + ErrorF ("winProcQueryTree - Hello\n"); + /* * This procedure is only used for initialization. * We can unwrap the original procedure at this point @@ -184,7 +189,7 @@ winProcEstablishConnection (ClientPtr client) static int s_iCallCount = 0; static unsigned long s_ulServerGeneration = 0; - ErrorF ("winProcEstablishConnection - Hello\n"); + if (s_iCallCount == 0 || s_iCallCount == CLIP_NUM_CALLS) ErrorF ("winProcEstablishConnection - Hello\n"); /* Do nothing if clipboard is not enabled */ if (!g_fClipboard) @@ -212,13 +217,15 @@ winProcEstablishConnection (ClientPtr client) /* Increment call count */ ++s_iCallCount; - /* Wait for second call when Xdmcp is enabled */ + /* Wait for CLIP_NUM_CALLS when Xdmcp is enabled */ if (g_fXdmcpEnabled && !g_fClipboardLaunched - && s_iCallCount < 4) + && s_iCallCount < CLIP_NUM_CALLS) { - ErrorF ("winProcEstablishConnection - Xdmcp enabled, waiting to " - "start clipboard client until fourth call.\n"); + if (s_iCallCount == 1) ErrorF ("winProcEstablishConnection - Xdmcp, waiting to " + "start clipboard client until %dth call", CLIP_NUM_CALLS); + if (s_iCallCount == CLIP_NUM_CALLS - 1) ErrorF (".\n"); + else ErrorF ("."); return (*winProcEstablishConnectionOrig) (client); } @@ -275,7 +282,7 @@ winProcEstablishConnection (ClientPtr client) * 8) Unfortunately, there is another problem. * 9) XDM walks the list of windows with XQueryTree, * killing any client it finds with a window. - * 10)Thus, when using XDMCP we wait until the second call + * 10)Thus, when using XDMCP we wait until CLIP_NUM_CALLS * to ProcEstablishCeonnection before we startup the clipboard * client. This should prevent XDM from finding the clipboard * client, since it has not yet created a window. @@ -335,8 +342,8 @@ winProcSetSelectionOwner (ClientPtr client) /* Abort if clipboard not completely initialized yet */ if (!g_fClipboardStarted) { - ErrorF ("winProcSetSelectionOwner - Clipboard not yet started, " - "aborting.\n"); + /* ErrorF ("winProcSetSelectionOwner - Clipboard not yet started, " + "aborting.\n"); */ goto winProcSetSelectionOwner_Done; } @@ -430,11 +437,9 @@ winProcSetSelectionOwner (ClientPtr client) * an owned to not owned transition was detected, * and we currently own the Win32 clipboard. */ - if (None == stuff->window - && (None == s_iOwners[CLIP_OWN_PRIMARY] - || g_iClipboardWindow == s_iOwners[CLIP_OWN_PRIMARY]) - && (None == s_iOwners[CLIP_OWN_CLIPBOARD] - || g_iClipboardWindow == s_iOwners[CLIP_OWN_CLIPBOARD]) + if (stuff->window == None + && s_iOwners[CLIP_OWN_PRIMARY] == None + && s_iOwners[CLIP_OWN_CLIPBOARD] == None && fOwnedToNotOwned && g_hwndClipboard != NULL && g_hwndClipboard == GetClipboardOwner ()) @@ -451,10 +456,6 @@ winProcSetSelectionOwner (ClientPtr client) EmptyClipboard (); CloseClipboard (); - /* Clear X selection ownership (might still be marked as us owning) */ - s_iOwners[CLIP_OWN_PRIMARY] = None; - s_iOwners[CLIP_OWN_CLIPBOARD] = None; - goto winProcSetSelectionOwner_Done; } diff --git a/xorg-server/hw/xwin/winclipboardxevents.c b/xorg-server/hw/xwin/winclipboardxevents.c index d4c617bec..ec40814db 100644 --- a/xorg-server/hw/xwin/winclipboardxevents.c +++ b/xorg-server/hw/xwin/winclipboardxevents.c @@ -1,5 +1,6 @@ /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. + *Copyright (C) Colin Harrison 2005-2008 * *Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -20,18 +21,20 @@ *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 Harold L Hunt II - *shall not be used in advertising or otherwise to promote the sale, use - *or other dealings in this Software without prior written authorization - *from Harold L Hunt II. + *Except as contained in this notice, the name of the copyright holder(s) + *and author(s) 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 holder(s) and author(s). * * Authors: Harold L Hunt II + * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "winclipboard.h" +#include "misc.h" /* @@ -51,18 +54,20 @@ winClipboardFlushXEvents (HWND hwnd, Display *pDisplay, Bool fUseUnicode) { - Atom atomLocalProperty = XInternAtom (pDisplay, - WIN_LOCAL_PROPERTY, - False); - Atom atomUTF8String = XInternAtom (pDisplay, - "UTF8_STRING", - False); - Atom atomCompoundText = XInternAtom (pDisplay, - "COMPOUND_TEXT", - False); - Atom atomTargets = XInternAtom (pDisplay, - "TARGETS", - False); + static Atom atomLocalProperty; + static Atom atomCompoundText; + static Atom atomUTF8String; + static Atom atomTargets; + static int generation; + + if (generation != serverGeneration) + { + generation = serverGeneration; + atomLocalProperty = XInternAtom (pDisplay, WIN_LOCAL_PROPERTY, False); + atomUTF8String = XInternAtom (pDisplay, "UTF8_STRING", False); + atomCompoundText = XInternAtom (pDisplay, "COMPOUND_TEXT", False); + atomTargets = XInternAtom (pDisplay, "TARGETS", False); + } /* Process all pending events */ while (XPending (pDisplay)) @@ -186,8 +191,13 @@ winClipboardFlushXEvents (HWND hwnd, if (fUseUnicode && !IsClipboardFormatAvailable (CF_UNICODETEXT)) { - ErrorF ("winClipboardFlushXEvents - CF_UNICODETEXT is not " - "available from Win32 clipboard. Aborting.\n"); + static int count; /* Hack to stop acroread spamming the log */ + static HWND lasthwnd; /* I've not seen any other client get here repeatedly? */ + if (hwnd != lasthwnd) count = 0; + count++; + if (count < 6) ErrorF ("winClipboardFlushXEvents - CF_UNICODETEXT is not " + "available from Win32 clipboard. Aborting %d.\n", count); + lasthwnd = hwnd; /* Abort */ fAbort = TRUE; @@ -301,6 +311,7 @@ winClipboardFlushXEvents (HWND hwnd, /* Initialize the text property */ xtpText.value = NULL; + xtpText.nitems = 0; /* Create the text property from the text list */ if (fUseUnicode) @@ -361,10 +372,13 @@ winClipboardFlushXEvents (HWND hwnd, /* Release the clipboard data */ GlobalUnlock (hGlobal); pszGlobalData = NULL; + fCloseClipboard = FALSE; + CloseClipboard (); /* Clean up */ XFree (xtpText.value); xtpText.value = NULL; + xtpText.nitems = 0; /* Setup selection notify event */ eventSelection.type = SelectionNotify; @@ -395,7 +409,11 @@ winClipboardFlushXEvents (HWND hwnd, winClipboardFlushXEvents_SelectionRequest_Done: /* Free allocated resources */ if (xtpText.value) + { XFree (xtpText.value); + xtpText.value = NULL; + xtpText.nitems = 0; + } if (pszConvertData) free (pszConvertData); if (hGlobal && pszGlobalData) @@ -436,7 +454,10 @@ winClipboardFlushXEvents (HWND hwnd, /* Close clipboard if it was opened */ if (fCloseClipboard) + { + fCloseClipboard = FALSE; CloseClipboard (); + } break; @@ -618,6 +639,7 @@ winClipboardFlushXEvents (HWND hwnd, /* Conversion succeeded or some unconvertible characters */ if (ppszTextList != NULL) { + iReturnDataLen = 0; for (i = 0; i < iCount; i++) { iReturnDataLen += strlen(ppszTextList[i]); @@ -663,6 +685,7 @@ winClipboardFlushXEvents (HWND hwnd, ppszTextList = NULL; XFree (xtpText.value); xtpText.value = NULL; + xtpText.nitems = 0; /* Convert the X clipboard string to DOS format */ winClipboardUNIXtoDOS (&pszReturnData, strlen (pszReturnData)); @@ -711,6 +734,8 @@ winClipboardFlushXEvents (HWND hwnd, hGlobal = GlobalAlloc (GMEM_MOVEABLE, iConvertDataLen); } + free (pszReturnData); + /* Check that global memory was allocated */ if (!hGlobal) { @@ -774,7 +799,11 @@ winClipboardFlushXEvents (HWND hwnd, if (ppszTextList) XFreeStringList (ppszTextList); if (xtpText.value) + { XFree (xtpText.value); + xtpText.value = NULL; + xtpText.nitems = 0; + } if (pszConvertData) free (pszConvertData); if (pwszUnicodeStr) diff --git a/xorg-server/hw/xwin/winconfig.c b/xorg-server/hw/xwin/winconfig.c index 38966bf96..3e1908c90 100644 --- a/xorg-server/hw/xwin/winconfig.c +++ b/xorg-server/hw/xwin/winconfig.c @@ -36,12 +36,7 @@ #include "winmsg.h" #include "globals.h" -#ifdef XKB -#ifndef XKB_IN_SERVER -#define XKB_IN_SERVER -#endif -#include -#endif +#include "xkbsrv.h" #ifdef XWIN_XF86CONFIG #ifndef CONFIGPATH @@ -67,15 +62,11 @@ WinCmdlineRec g_cmdline = { #ifdef XWIN_XF86CONFIG NULL, /* keyboard */ #endif -#ifdef XKB - FALSE, /* noXkbExtension */ - NULL, /* xkbMap */ NULL, /* xkbRules */ NULL, /* xkbModel */ NULL, /* xkbLayout */ NULL, /* xkbVariant */ NULL, /* xkbOptions */ -#endif NULL, /* screenname */ NULL, /* mousename */ FALSE, /* emulate3Buttons */ @@ -87,24 +78,14 @@ winInfoRec g_winInfo = { 0, /* leds */ 500, /* delay */ 30 /* rate */ -#ifdef XKB } , { /* xkb */ - FALSE, /* disable */ NULL, /* rules */ NULL, /* model */ NULL, /* layout */ NULL, /* variant */ NULL, /* options */ - NULL, /* initialMap */ - NULL, /* keymap */ - NULL, /* types */ - NULL, /* compat */ - NULL, /* keycodes */ - NULL, /* symbols */ - NULL /* geometry */ -#endif } , { @@ -228,11 +209,9 @@ winReadConfigfile () Bool winConfigKeyboard (DeviceIntPtr pDevice) { -#ifdef XKB char layoutName[KL_NAMELENGTH]; static unsigned int layoutNum = 0; int keyboardType; -#endif #ifdef XWIN_XF86CONFIG XF86ConfInputPtr kbd = NULL; XF86ConfInputPtr input_list = NULL; @@ -242,26 +221,10 @@ winConfigKeyboard (DeviceIntPtr pDevice) char *s = NULL; /* Setup defaults */ -#ifdef XKB - g_winInfo.xkb.disable = FALSE; -# ifdef PC98 /* japanese */ /* not implemented */ - g_winInfo.xkb.rules = "xfree98"; - g_winInfo.xkb.model = "pc98"; - g_winInfo.xkb.layout = "nex/jp"; - g_winInfo.xkb.variant = NULL; - g_winInfo.xkb.options = NULL; -# else - g_winInfo.xkb.rules = "xorg"; - g_winInfo.xkb.model = "pc101"; - g_winInfo.xkb.layout = "us"; - g_winInfo.xkb.variant = NULL; - g_winInfo.xkb.options = NULL; -# endif /* PC98 */ + XkbGetRulesDflts(&g_winInfo.xkb); /* * Query the windows autorepeat settings and change the xserver defaults. - * If XKB is disabled then windows handles the autorepeat and the special - * treatment is not needed */ { int kbd_delay; @@ -358,15 +321,6 @@ winConfigKeyboard (DeviceIntPtr pDevice) } } - g_winInfo.xkb.initialMap = NULL; - g_winInfo.xkb.keymap = NULL; - g_winInfo.xkb.types = NULL; - g_winInfo.xkb.compat = NULL; - g_winInfo.xkb.keycodes = NULL; - g_winInfo.xkb.symbols = NULL; - g_winInfo.xkb.geometry = NULL; -#endif /* XKB */ - /* parse the configuration */ #ifdef XWIN_XF86CONFIG if (g_cmdline.keyboard) @@ -418,169 +372,101 @@ winConfigKeyboard (DeviceIntPtr pDevice) } #endif -#ifdef XKB - from = X_DEFAULT; - if (g_cmdline.noXkbExtension) - { - from = X_CMDLINE; - g_winInfo.xkb.disable = TRUE; - } -#ifdef XWIN_XF86CONFIG - else if (kbd->inp_option_lst) - { - int b = winSetBoolOption (kbd->inp_option_lst, "XkbDisable", FALSE); - if (b) - { - from = X_CONFIG; - g_winInfo.xkb.disable = TRUE; - } - } -#endif - if (g_winInfo.xkb.disable) - { - winMsg (from, "XkbExtension disabled\n"); - } - else - { - s = NULL; - if (g_cmdline.xkbRules) - { - s = g_cmdline.xkbRules; - from = X_CMDLINE; - } + s = NULL; + if (g_cmdline.xkbRules) + { + s = g_cmdline.xkbRules; + from = X_CMDLINE; + } #ifdef XWIN_XF86CONFIG - else - { - s = winSetStrOption (kbd->inp_option_lst, "XkbRules", NULL); - from = X_CONFIG; - } + else + { + s = winSetStrOption (kbd->inp_option_lst, "XkbRules", NULL); + from = X_CONFIG; + } #endif - if (s) - { - g_winInfo.xkb.rules = NULL_IF_EMPTY (s); - winMsg (from, "XKB: rules: \"%s\"\n", s); - } + if (s) + { + g_winInfo.xkb.rules = NULL_IF_EMPTY (s); + winMsg (from, "XKB: rules: \"%s\"\n", s); + } - s = NULL; - if (g_cmdline.xkbModel) - { - s = g_cmdline.xkbModel; - from = X_CMDLINE; - } + s = NULL; + if (g_cmdline.xkbModel) + { + s = g_cmdline.xkbModel; + from = X_CMDLINE; + } #ifdef XWIN_XF86CONFIG - else - { - s = winSetStrOption (kbd->inp_option_lst, "XkbModel", NULL); - from = X_CONFIG; - } + else + { + s = winSetStrOption (kbd->inp_option_lst, "XkbModel", NULL); + from = X_CONFIG; + } #endif - if (s) - { - g_winInfo.xkb.model = NULL_IF_EMPTY (s); - winMsg (from, "XKB: model: \"%s\"\n", s); - } + if (s) + { + g_winInfo.xkb.model = NULL_IF_EMPTY (s); + winMsg (from, "XKB: model: \"%s\"\n", s); + } - s = NULL; - if (g_cmdline.xkbLayout) - { - s = g_cmdline.xkbLayout; - from = X_CMDLINE; - } + s = NULL; + if (g_cmdline.xkbLayout) + { + s = g_cmdline.xkbLayout; + from = X_CMDLINE; + } #ifdef XWIN_XF86CONFIG - else - { - s = winSetStrOption (kbd->inp_option_lst, "XkbLayout", NULL); - from = X_CONFIG; - } + else + { + s = winSetStrOption (kbd->inp_option_lst, "XkbLayout", NULL); + from = X_CONFIG; + } #endif - if (s) - { - g_winInfo.xkb.layout = NULL_IF_EMPTY (s); - winMsg (from, "XKB: layout: \"%s\"\n", s); - } + if (s) + { + g_winInfo.xkb.layout = NULL_IF_EMPTY (s); + winMsg (from, "XKB: layout: \"%s\"\n", s); + } - s = NULL; - if (g_cmdline.xkbVariant) - { - s = g_cmdline.xkbVariant; - from = X_CMDLINE; - } + s = NULL; + if (g_cmdline.xkbVariant) + { + s = g_cmdline.xkbVariant; + from = X_CMDLINE; + } #ifdef XWIN_XF86CONFIG - else - { - s = winSetStrOption (kbd->inp_option_lst, "XkbVariant", NULL); - from = X_CONFIG; - } + else + { + s = winSetStrOption (kbd->inp_option_lst, "XkbVariant", NULL); + from = X_CONFIG; + } #endif - if (s) - { - g_winInfo.xkb.variant = NULL_IF_EMPTY (s); - winMsg (from, "XKB: variant: \"%s\"\n", s); - } + if (s) + { + g_winInfo.xkb.variant = NULL_IF_EMPTY (s); + winMsg (from, "XKB: variant: \"%s\"\n", s); + } - s = NULL; - if (g_cmdline.xkbOptions) - { - s = g_cmdline.xkbOptions; - from = X_CMDLINE; - } + s = NULL; + if (g_cmdline.xkbOptions) + { + s = g_cmdline.xkbOptions; + from = X_CMDLINE; + } #ifdef XWIN_XF86CONFIG - else - { - s = winSetStrOption (kbd->inp_option_lst, "XkbOptions", NULL); - from = X_CONFIG; - } + else + { + s = winSetStrOption (kbd->inp_option_lst, "XkbOptions", NULL); + from = X_CONFIG; + } #endif - if (s) - { - g_winInfo.xkb.options = NULL_IF_EMPTY (s); - winMsg (from, "XKB: options: \"%s\"\n", s); - } - -#ifdef XWIN_XF86CONFIG - from = X_CMDLINE; - - if ((s = winSetStrOption (kbd->inp_option_lst, "XkbKeymap", NULL))) - { - g_winInfo.xkb.keymap = NULL_IF_EMPTY (s); - winMsg (X_CONFIG, "XKB: keymap: \"%s\" " - " (overrides other XKB settings)\n", s); - } - - if ((s = winSetStrOption (kbd->inp_option_lst, "XkbCompat", NULL))) - { - g_winInfo.xkb.compat = NULL_IF_EMPTY (s); - winMsg (X_CONFIG, "XKB: compat: \"%s\"\n", s); - } - - if ((s = winSetStrOption (kbd->inp_option_lst, "XkbTypes", NULL))) - { - g_winInfo.xkb.types = NULL_IF_EMPTY (s); - winMsg (X_CONFIG, "XKB: types: \"%s\"\n", s); - } - - if ((s = - winSetStrOption (kbd->inp_option_lst, "XkbKeycodes", NULL))) - { - g_winInfo.xkb.keycodes = NULL_IF_EMPTY (s); - winMsg (X_CONFIG, "XKB: keycodes: \"%s\"\n", s); - } - - if ((s = - winSetStrOption (kbd->inp_option_lst, "XkbGeometry", NULL))) - { - g_winInfo.xkb.geometry = NULL_IF_EMPTY (s); - winMsg (X_CONFIG, "XKB: geometry: \"%s\"\n", s); - } + if (s) + { + g_winInfo.xkb.options = NULL_IF_EMPTY (s); + winMsg (from, "XKB: options: \"%s\"\n", s); + } - if ((s = winSetStrOption (kbd->inp_option_lst, "XkbSymbols", NULL))) - { - g_winInfo.xkb.symbols = NULL_IF_EMPTY (s); - winMsg (X_CONFIG, "XKB: symbols: \"%s\"\n", s); - } -#endif -#endif - } #ifdef XWIN_XF86CONFIG } #endif @@ -675,10 +561,8 @@ winConfigFiles () } #else Bool -winConfigFiles () +winConfigFiles (void) { - MessageType from; - /* Fontpath */ if (g_cmdline.fontPath) { @@ -692,14 +576,14 @@ winConfigFiles () Bool -winConfigOptions () +winConfigOptions (void) { return TRUE; } Bool -winConfigScreens () +winConfigScreens (void) { return TRUE; } diff --git a/xorg-server/hw/xwin/winconfig.h b/xorg-server/hw/xwin/winconfig.h index 4b56d639c..63d621112 100644 --- a/xorg-server/hw/xwin/winconfig.h +++ b/xorg-server/hw/xwin/winconfig.h @@ -194,15 +194,11 @@ typedef struct #ifdef XWIN_XF86CONFIG char *keyboard; #endif -#ifdef XKB - Bool noXkbExtension; - char *xkbMap; char *xkbRules; char *xkbModel; char *xkbLayout; char *xkbVariant; char *xkbOptions; -#endif /* layout */ char *screenname; /* mouse settings */ @@ -309,25 +305,7 @@ typedef struct long rate; } keyboard; -#ifdef XKB - struct - { - Bool disable; - char *rules; - char *model; - char *layout; - char *variant; - char *options; - char *initialMap; - char *keymap; - char *types; - char *compat; - char *keycodes; - char *symbols; - char *geometry; - } - xkb; -#endif + XkbRMLVOSet xkb; struct { Bool emulate3Buttons; diff --git a/xorg-server/hw/xwin/wincreatewnd.c b/xorg-server/hw/xwin/wincreatewnd.c index 796a08593..0c342e1ae 100644 --- a/xorg-server/hw/xwin/wincreatewnd.c +++ b/xorg-server/hw/xwin/wincreatewnd.c @@ -63,7 +63,7 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen) int iWidth = pScreenInfo->dwWidth; int iHeight = pScreenInfo->dwHeight; HWND *phwnd = &pScreenPriv->hwndScreen; - WNDCLASS wc; + WNDCLASSEX wc; char szTitle[256]; #if CYGDEBUG @@ -71,24 +71,30 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen) #endif /* Setup our window class */ + wc.cbSize=sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = winWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = g_hInstance; - wc.hIcon = LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN)); + wc.hIcon = (HICON)LoadImage (g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, + GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0); wc.hCursor = 0; wc.hbrBackground = 0; wc.lpszMenuName = NULL; wc.lpszClassName = WINDOW_CLASS; - RegisterClass (&wc); + wc.hIconSm = (HICON)LoadImage (g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, + GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTSIZE); + RegisterClassEx (&wc); /* Set display and screen-specific tooltip text */ if (g_pszQueryHost != NULL) snprintf (szTitle, sizeof (szTitle), WINDOW_TITLE_XDMCP, - g_pszQueryHost); + g_pszQueryHost, + display, + (int) pScreenInfo->dwScreen); else snprintf (szTitle, sizeof (szTitle), @@ -150,7 +156,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen) int iPosX; int iPosY; HWND *phwnd = &pScreenPriv->hwndScreen; - WNDCLASS wc; + WNDCLASSEX wc; RECT rcClient, rcWorkArea; DWORD dwWindowStyle; BOOL fForceShowWindow = FALSE; @@ -193,17 +199,21 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen) dwWindowStyle |= WS_POPUP; /* Setup our window class */ + wc.cbSize=sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = winWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = g_hInstance; - wc.hIcon = LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN)); + wc.hIcon = (HICON)LoadImage (g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, + GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0); wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = WINDOW_CLASS; - RegisterClass (&wc); + wc.hIconSm = (HICON)LoadImage (g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, + GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTSIZE); + RegisterClassEx (&wc); /* Get size of work area */ winGetWorkArea (&rcWorkArea, pScreenInfo); @@ -331,7 +341,9 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen) snprintf (szTitle, sizeof (szTitle), WINDOW_TITLE_XDMCP, - g_pszQueryHost); + g_pszQueryHost, + display, + (int) pScreenInfo->dwScreen); else snprintf (szTitle, sizeof (szTitle), diff --git a/xorg-server/hw/xwin/wincursor.c b/xorg-server/hw/xwin/wincursor.c index 92775e404..ce98162ef 100644 --- a/xorg-server/hw/xwin/wincursor.c +++ b/xorg-server/hw/xwin/wincursor.c @@ -39,16 +39,10 @@ #include #include #include +#include "misc.h" extern Bool g_fSoftwareCursor; - -#ifndef MIN -#define MIN(x,y) ((x)<(y)?(x):(y)) -#endif - -#define BYTE_COUNT(x) (((x) + 7) / 8) - #define BRIGHTNESS(x) (x##Red * 0.299 + x##Green * 0.587 + x##Blue * 0.114) #if 0 @@ -62,7 +56,7 @@ extern Bool g_fSoftwareCursor; */ static void -winPointerWarpCursor (ScreenPtr pScreen, int x, int y); +winPointerWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); static Bool winCursorOffScreen (ScreenPtr *ppScreen, int *x, int *y); @@ -79,7 +73,7 @@ miPointerScreenFuncRec g_winPointerCursorFuncs = static void -winPointerWarpCursor (ScreenPtr pScreen, int x, int y) +winPointerWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { winScreenPriv(pScreen); RECT rcClient; @@ -99,8 +93,16 @@ winPointerWarpCursor (ScreenPtr pScreen, int x, int y) return; } - /* Only update the Windows cursor position if we are active */ - if (pScreenPriv->hwndScreen == GetForegroundWindow ()) + /* + Only update the Windows cursor position if root window is active, + or we are in a rootless mode + */ + if ((pScreenPriv->hwndScreen == GetForegroundWindow ()) + || pScreenPriv->pScreenInfo->fRootless +#ifdef XWIN_MULTIWINDOW + || pScreenPriv->pScreenInfo->fMultiWindow +#endif + ) { /* Get the client area coordinates */ GetClientRect (pScreenPriv->hwndScreen, &rcClient); @@ -119,7 +121,7 @@ winPointerWarpCursor (ScreenPtr pScreen, int x, int y) } /* Call the mi warp procedure to do the actual warping in X. */ - miPointerWarpCursor (pScreen, x, y); + miPointerWarpCursor (pDev, pScreen, x, y); } static Bool @@ -195,11 +197,11 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen) /* Get the number of bytes required to store the whole cursor image * This is roughly (sm_cx * sm_cy) / 8 * round up to 8 pixel boundary so we can convert whole bytes */ - nBytes = BYTE_COUNT(pScreenPriv->cursor.sm_cx) * pScreenPriv->cursor.sm_cy; + nBytes = bits_to_bytes(pScreenPriv->cursor.sm_cx) * pScreenPriv->cursor.sm_cy; /* Get the effective width and height */ - nCX = MIN(pScreenPriv->cursor.sm_cx, pCursor->bits->width); - nCY = MIN(pScreenPriv->cursor.sm_cy, pCursor->bits->height); + nCX = min(pScreenPriv->cursor.sm_cx, pCursor->bits->width); + nCY = min(pScreenPriv->cursor.sm_cy, pCursor->bits->height); /* Allocate memory for the bitmaps */ pAnd = malloc (nBytes); @@ -210,11 +212,11 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen) * The first is for an empty mask */ if (pCursor->bits->emptyMask) { - int x, y, xmax = BYTE_COUNT(nCX); + int x, y, xmax = bits_to_bytes(nCX); for (y = 0; y < nCY; ++y) for (x = 0; x < xmax; ++x) { - int nWinPix = BYTE_COUNT(pScreenPriv->cursor.sm_cx) * y + x; + int nWinPix = bits_to_bytes(pScreenPriv->cursor.sm_cx) * y + x; int nXPix = BitmapBytePad(pCursor->bits->width) * y + x; pAnd[nWinPix] = 0; @@ -226,11 +228,11 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen) } else { - int x, y, xmax = BYTE_COUNT(nCX); + int x, y, xmax = bits_to_bytes(nCX); for (y = 0; y < nCY; ++y) for (x = 0; x < xmax; ++x) { - int nWinPix = BYTE_COUNT(pScreenPriv->cursor.sm_cx) * y + x; + int nWinPix = bits_to_bytes(pScreenPriv->cursor.sm_cx) * y + x; int nXPix = BitmapBytePad(pCursor->bits->width) * y + x; unsigned char mask = pCursor->bits->mask[nXPix]; @@ -319,7 +321,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen) (*pCur++) = 0; else /* Within X11 icon bounds */ { - int nWinPix = BYTE_COUNT(pScreenPriv->cursor.sm_cx) * y + (x/8); + int nWinPix = bits_to_bytes(pScreenPriv->cursor.sm_cx) * y + (x/8); bit = pAnd[nWinPix]; bit = bit & (1<<(7-(x&7))); @@ -436,7 +438,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen) * Convert the X cursor representation to native format if possible. */ static Bool -winRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) +winRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { if(pCursor == NULL || pCursor->bits == NULL) return FALSE; @@ -452,7 +454,7 @@ winRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) * Free the storage space associated with a realized cursor. */ static Bool -winUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +winUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { return TRUE; } @@ -463,7 +465,7 @@ winUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) * Set the cursor sprite and position. */ static void -winSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +winSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { POINT ptCurPos, ptTemp; HWND hwnd; @@ -537,20 +539,35 @@ winSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) /* - * QuartzMoveCursor + * winMoveCursor * Move the cursor. This is a noop for us. */ static void -winMoveCursor (ScreenPtr pScreen, int x, int y) +winMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) +{ +} + +static Bool +winDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScr) { + winScreenPriv(pScr); + return pScreenPriv->cursor.spriteFuncs->DeviceCursorInitialize(pDev, pScr); } +static void +winDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr) +{ + winScreenPriv(pScr); + return pScreenPriv->cursor.spriteFuncs->DeviceCursorCleanup(pDev, pScr); +} static miPointerSpriteFuncRec winSpriteFuncsRec = { winRealizeCursor, winUnrealizeCursor, winSetCursor, - winMoveCursor + winMoveCursor, + winDeviceCursorInitialize, + winDeviceCursorCleanup }; diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c index ab06b0d00..31a3766a6 100644 --- a/xorg-server/hw/xwin/windialogs.c +++ b/xorg-server/hw/xwin/windialogs.c @@ -54,6 +54,10 @@ extern Bool g_fClipboardStarted; #endif extern Bool g_fSoftwareCursor; +#if defined(XWIN_MULTIWINDOW) +extern HICON g_hIconX; +extern HICON g_hSmallIconX; +#endif /* * Local function prototypes @@ -146,7 +150,7 @@ winURLWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SetCursor (cursor); return TRUE; } - origCB = (WNDPROC)GetWindowLong (hwnd, GWL_USERDATA); + origCB = (WNDPROC)GetWindowLongPtr(hwnd, GWLP_USERDATA); /* Otherwise fall through to original WndProc */ if (origCB) return CallWindowProc (origCB, hwnd, msg, wParam, lParam); @@ -163,50 +167,90 @@ static void winOverrideURLButton (HWND hwnd, int id) { WNDPROC origCB; - origCB = (WNDPROC)SetWindowLong (GetDlgItem (hwnd, id), - GWL_WNDPROC, (LONG)winURLWndProc); - SetWindowLong (GetDlgItem (hwnd, id), GWL_USERDATA, (LONG)origCB); + origCB = (WNDPROC)SetWindowLongPtr(GetDlgItem (hwnd, id), + GWLP_WNDPROC, (LONG_PTR)winURLWndProc); + SetWindowLongPtr(GetDlgItem (hwnd, id), GWLP_USERDATA, (LONG_PTR)origCB); } static void winUnoverrideURLButton (HWND hwnd, int id) { WNDPROC origCB; - origCB = (WNDPROC)SetWindowLong (GetDlgItem (hwnd, id), - GWL_USERDATA, 0); + origCB = (WNDPROC)SetWindowLongPtr(GetDlgItem (hwnd, id), + GWLP_USERDATA, 0); if (origCB) - SetWindowLong (GetDlgItem (hwnd, id), GWL_WNDPROC, (LONG)origCB); + SetWindowLongPtr(GetDlgItem (hwnd, id), GWLP_WNDPROC, (LONG_PTR)origCB); } /* * Center a dialog window in the desktop window + * and set small and large icons to X icons. */ static void -winCenterDialog (HWND hwndDlg) +winInitDialog (HWND hwndDlg) { HWND hwndDesk; - RECT rc, rcDlg, rcDesk; + RECT rc, rcDlg, rcDesk; + HICON hIcon, hIconSmall; hwndDesk = GetParent (hwndDlg); if (!hwndDesk || IsIconic (hwndDesk)) hwndDesk = GetDesktopWindow (); - GetWindowRect (hwndDesk, &rcDesk); - GetWindowRect (hwndDlg, &rcDlg); - CopyRect (&rc, &rcDesk); - - OffsetRect (&rcDlg, -rcDlg.left, -rcDlg.top); - OffsetRect (&rc, -rc.left, -rc.top); - OffsetRect (&rc, -rcDlg.right, -rcDlg.bottom); - - SetWindowPos (hwndDlg, - HWND_TOP, - rcDesk.left + (rc.right / 2), - rcDesk.top + (rc.bottom / 2), + /* Remove minimize and maximize buttons */ + SetWindowLongPtr(hwndDlg, GWL_STYLE, + GetWindowLongPtr(hwndDlg, GWL_STYLE) + & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX)); + + /* Set Window not to show in the task bar */ + SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, + GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_APPWINDOW ); + + /* Center dialog window in the screen. Not done for multi-monitor systems, where + * it is likely to end up split across the screens. In that case, it appears + * near the Tray icon. + */ + if (GetSystemMetrics(SM_CMONITORS)>1) { + /* Still need to refresh the frame change. */ + SetWindowPos (hwndDlg, HWND_TOPMOST, 0,0,0,0, + SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); + } else { + GetWindowRect (hwndDesk, &rcDesk); + GetWindowRect (hwndDlg, &rcDlg); + CopyRect (&rc, &rcDesk); + + OffsetRect (&rcDlg, -rcDlg.left, -rcDlg.top); + OffsetRect (&rc, -rc.left, -rc.top); + OffsetRect (&rc, -rcDlg.right, -rcDlg.bottom); + + SetWindowPos (hwndDlg, + HWND_TOPMOST, + rcDesk.left + (rc.right / 2), + rcDesk.top + (rc.bottom / 2), 0, 0, - SWP_NOSIZE | SWP_NOZORDER); + SWP_NOSIZE | SWP_FRAMECHANGED); + } + +#ifdef XWIN_MULTIWINDOW + if (g_hIconX) hIcon=g_hIconX; + else +#endif + hIcon = LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN)); + +#ifdef XWIN_MULTIWINDOW + if (g_hSmallIconX) hIconSmall=g_hSmallIconX; + else +#endif + hIconSmall = LoadImage (g_hInstance, + MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, + GetSystemMetrics(SM_CXSMICON), + GetSystemMetrics(SM_CYSMICON), + LR_SHARED); + + PostMessage (hwndDlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon); + PostMessage (hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall); } @@ -220,7 +264,7 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv) int i; int liveClients = 0; - /* Count up running clinets (clients[0] is serverClient) */ + /* Count up running clients (clients[0] is serverClient) */ for (i = 1; i < currentMaxClients; i++) if (clients[i] != NullClient) liveClients++; @@ -271,15 +315,6 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv) winExitDlgProc, (int) pScreenPriv); - /* Drop minimize and maximize buttons */ - SetWindowLong (g_hDlgExit, GWL_STYLE, - GetWindowLong (g_hDlgExit, GWL_STYLE) - & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX)); - SetWindowLong (g_hDlgExit, GWL_EXSTYLE, - GetWindowLong (g_hDlgExit, GWL_EXSTYLE) & ~WS_EX_APPWINDOW ); - SetWindowPos (g_hDlgExit, HWND_TOPMOST, 0, 0, 0, 0, - SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE); - /* Show the dialog box */ ShowWindow (g_hDlgExit, SW_SHOW); @@ -288,7 +323,7 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv) /* Set focus to the Cancel button */ PostMessage (g_hDlgExit, WM_NEXTDLGCTL, - (int) GetDlgItem (g_hDlgExit, IDCANCEL), TRUE); + GetDlgItem (g_hDlgExit, IDCANCEL), TRUE); } #define CONNECTED_CLIENTS_FORMAT "There are currently %d clients connected." @@ -314,14 +349,7 @@ winExitDlgProc (HWND hDialog, UINT message, /* Store pointers to private structures for future use */ s_pScreenPriv = (winPrivScreenPtr) lParam; - winCenterDialog (hDialog); - - /* Set icon to standard app icon */ - PostMessage (hDialog, - WM_SETICON, - ICON_SMALL, - (LPARAM) LoadIcon (g_hInstance, - MAKEINTRESOURCE(IDI_XWIN))); + winInitDialog (hDialog); /* Format the connected clients string */ pszConnectedClients = Xprintf (CONNECTED_CLIENTS_FORMAT, @@ -413,17 +441,6 @@ winDisplayDepthChangeDialog (winPrivScreenPtr pScreenPriv) pScreenPriv->hwndScreen, winChangeDepthDlgProc, (int) pScreenPriv); - - /* Drop minimize and maximize buttons */ - SetWindowLong (g_hDlgDepthChange, GWL_STYLE, - GetWindowLong (g_hDlgDepthChange, GWL_STYLE) - & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX)); - SetWindowLong (g_hDlgDepthChange, GWL_EXSTYLE, - GetWindowLong (g_hDlgDepthChange, GWL_EXSTYLE) - & ~WS_EX_APPWINDOW ); - SetWindowPos (g_hDlgDepthChange, 0, 0, 0, 0, 0, - SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOSIZE); - /* Show the dialog box */ ShowWindow (g_hDlgDepthChange, SW_SHOW); @@ -480,13 +497,7 @@ winChangeDepthDlgProc (HWND hwndDialog, UINT message, s_pScreenPriv->dwLastWindowsBitsPixel); #endif - winCenterDialog( hwndDialog ); - - /* Set icon to standard app icon */ - PostMessage (hwndDialog, - WM_SETICON, - ICON_SMALL, - (LPARAM) LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN))); + winInitDialog( hwndDialog ); return TRUE; @@ -572,15 +583,6 @@ winDisplayAboutDialog (winPrivScreenPtr pScreenPriv) winAboutDlgProc, (int) pScreenPriv); - /* Drop minimize and maximize buttons */ - SetWindowLong (g_hDlgAbout, GWL_STYLE, - GetWindowLong (g_hDlgAbout, GWL_STYLE) - & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX)); - SetWindowLong (g_hDlgAbout, GWL_EXSTYLE, - GetWindowLong (g_hDlgAbout, GWL_EXSTYLE) & ~WS_EX_APPWINDOW); - SetWindowPos (g_hDlgAbout, 0, 0, 0, 0, 0, - SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE); - /* Show the dialog box */ ShowWindow (g_hDlgAbout, SW_SHOW); @@ -589,7 +591,7 @@ winDisplayAboutDialog (winPrivScreenPtr pScreenPriv) /* Set focus to the OK button */ PostMessage (g_hDlgAbout, WM_NEXTDLGCTL, - (int) GetDlgItem (g_hDlgAbout, IDOK), TRUE); + GetDlgItem (g_hDlgAbout, IDOK), TRUE); } @@ -622,13 +624,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message, s_pScreenInfo = s_pScreenPriv->pScreenInfo; s_pScreen = s_pScreenInfo->pScreen; - winCenterDialog (hwndDialog); - - /* Set icon to standard app icon */ - PostMessage (hwndDialog, - WM_SETICON, - ICON_SMALL, - (LPARAM) LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN))); + winInitDialog (hwndDialog); /* Override the URL buttons */ winOverrideURLButton (hwndDialog, ID_ABOUT_CHANGELOG); @@ -676,7 +672,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message, case ID_ABOUT_CHANGELOG: { - int iReturn; + HINSTANCE iReturn; #ifdef __CYGWIN__ const char * pszCygPath = "/usr/X11R6/share/doc/" "xorg-x11-xwin/changelog.html"; @@ -689,12 +685,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message, "devel/server/changelog.html"; #endif - iReturn = (int) ShellExecute (NULL, - "open", - pszWinPath, - NULL, - NULL, - SW_MAXIMIZE); + iReturn = ShellExecute (NULL, + "open", + pszWinPath, + NULL, + NULL, + SW_MAXIMIZE); if (iReturn < 32) { ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_CHANGELOG - " @@ -709,12 +705,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message, const char * pszPath = "http://x.cygwin.com/"; int iReturn; - iReturn = (int) ShellExecute (NULL, - "open", - pszPath, - NULL, - NULL, - SW_MAXIMIZE); + iReturn = ShellExecute (NULL, + "open", + pszPath, + NULL, + NULL, + SW_MAXIMIZE); if (iReturn < 32) { ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_WEBSITE - " @@ -729,12 +725,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message, const char * pszPath = "http://x.cygwin.com/docs/ug/"; int iReturn; - iReturn = (int) ShellExecute (NULL, - "open", - pszPath, - NULL, - NULL, - SW_MAXIMIZE); + iReturn = ShellExecute (NULL, + "open", + pszPath, + NULL, + NULL, + SW_MAXIMIZE); if (iReturn < 32) { ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_UG - " @@ -749,12 +745,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message, const char * pszPath = "http://x.cygwin.com/docs/faq/"; int iReturn; - iReturn = (int) ShellExecute (NULL, - "open", - pszPath, - NULL, - NULL, - SW_MAXIMIZE); + iReturn = ShellExecute (NULL, + "open", + pszPath, + NULL, + NULL, + SW_MAXIMIZE); if (iReturn < 32) { ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_FAQ - " diff --git a/xorg-server/hw/xwin/winengine.c b/xorg-server/hw/xwin/winengine.c index f0bc671e2..fb9aed8a0 100644 --- a/xorg-server/hw/xwin/winengine.c +++ b/xorg-server/hw/xwin/winengine.c @@ -48,7 +48,7 @@ extern const GUID _IID_IDirectDraw4; */ void -winDetectSupportedEngines () +winDetectSupportedEngines (void) { OSVERSIONINFO osvi; @@ -285,7 +285,7 @@ winSetEngine (ScreenPtr pScreen) */ Bool -winGetDDProcAddresses () +winGetDDProcAddresses (void) { Bool fReturn = TRUE; diff --git a/xorg-server/hw/xwin/winerror.c b/xorg-server/hw/xwin/winerror.c index 7d292134f..72ee2cfb7 100644 --- a/xorg-server/hw/xwin/winerror.c +++ b/xorg-server/hw/xwin/winerror.c @@ -33,10 +33,10 @@ #endif #ifdef XVENDORNAME #define VENDOR_STRING XVENDORNAME -#define VERSION_STRING XORG_RELEASE #define VENDOR_CONTACT BUILDERADDR #endif +#include <../xfree86/common/xorgVersion.h> #include "win.h" /* References to external symbols */ @@ -80,7 +80,6 @@ OsVendorVErrorF (const char *pszFormat, va_list va_args) * * Attempt to do last-ditch, safe, important cleanup here. */ -#ifdef DDXOSFATALERROR void OsVendorFatalError (void) { @@ -93,7 +92,6 @@ OsVendorFatalError (void) "Please open %s for more information.\n", MB_ICONERROR, (g_pszLogFile?g_pszLogFile:"the logfile")); } -#endif /* @@ -117,13 +115,15 @@ winMessageBoxF (const char *pszError, UINT uType, ...) #define MESSAGEBOXF \ "%s\n" \ "Vendor: %s\n" \ - "Release: %s\n" \ + "Release: %d.%d.%d.%d (%d)\n" \ "Contact: %s\n" \ "XWin was started with the following command-line:\n\n" \ "%s\n" pszMsgBox = Xprintf (MESSAGEBOXF, - pszErrorF, VENDOR_STRING, VERSION_STRING, VENDOR_CONTACT, + pszErrorF, VENDOR_STRING, + XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT, + VENDOR_CONTACT, g_pszCommandLine); if (!pszMsgBox) goto winMessageBoxF_Cleanup; diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c index d574f2053..611ea5d55 100644 --- a/xorg-server/hw/xwin/winkeybd.c +++ b/xorg-server/hw/xwin/winkeybd.c @@ -40,19 +40,10 @@ #include "winconfig.h" #include "winmsg.h" -#ifdef XKB -#ifndef XKB_IN_SERVER -#define XKB_IN_SERVER -#endif -#include -#endif +#include "xkbsrv.h" static Bool g_winKeyState[NUM_KEYCODES]; -/* Stored to get internal mode key states. Must be read-only. */ -static unsigned short const *g_winInternalModeKeyStatesPtr = NULL; - - /* * Local prototypes */ @@ -209,7 +200,6 @@ winKeybdBell (int iPercent, DeviceIntPtr pDeviceInt, static void winKeybdCtrl (DeviceIntPtr pDevice, KeybdCtrl *pCtrl) { - g_winInternalModeKeyStatesPtr = &(pDevice->key->state); } @@ -221,93 +211,52 @@ winKeybdCtrl (DeviceIntPtr pDevice, KeybdCtrl *pCtrl) int winKeybdProc (DeviceIntPtr pDeviceInt, int iState) { - KeySymsRec keySyms; - CARD8 modMap[MAP_LENGTH]; DevicePtr pDevice = (DevicePtr) pDeviceInt; -#ifdef XKB - XkbComponentNamesRec names; XkbSrvInfoPtr xkbi; XkbControlsPtr ctrl; -#endif switch (iState) { case DEVICE_INIT: winConfigKeyboard (pDeviceInt); - winGetKeyMappings (&keySyms, modMap); - -#ifdef XKB /* FIXME: Maybe we should use winGetKbdLeds () here? */ defaultKeyboardControl.leds = g_winInfo.keyboard.leds; -#else - defaultKeyboardControl.leds = g_winInfo.keyboard.leds; -#endif - -#ifdef XKB - if (g_winInfo.xkb.disable) - { -#endif - InitKeyboardDeviceStruct (pDevice, - &keySyms, - modMap, - winKeybdBell, - winKeybdCtrl); -#ifdef XKB - } - else - { - - names.keymap = g_winInfo.xkb.keymap; - names.keycodes = g_winInfo.xkb.keycodes; - names.types = g_winInfo.xkb.types; - names.compat = g_winInfo.xkb.compat; - names.symbols = g_winInfo.xkb.symbols; - names.geometry = g_winInfo.xkb.geometry; - - winErrorFVerb(2, "Rules = \"%s\" Model = \"%s\" Layout = \"%s\"" - " Variant = \"%s\" Options = \"%s\"\n", - g_winInfo.xkb.rules, g_winInfo.xkb.model, - g_winInfo.xkb.layout, g_winInfo.xkb.variant, - g_winInfo.xkb.options); - - XkbSetRulesDflts (g_winInfo.xkb.rules, g_winInfo.xkb.model, - g_winInfo.xkb.layout, g_winInfo.xkb.variant, - g_winInfo.xkb.options); - XkbInitKeyboardDeviceStruct (pDeviceInt, &names, &keySyms, - modMap, winKeybdBell, winKeybdCtrl); - } -#endif -#ifdef XKB - if (!g_winInfo.xkb.disable) - { - xkbi = pDeviceInt->key->xkbInfo; - if (xkbi != NULL) - { - ctrl = xkbi->desc->ctrls; - ctrl->repeat_delay = g_winInfo.keyboard.delay; - ctrl->repeat_interval = 1000/g_winInfo.keyboard.rate; - } - else - { - winErrorFVerb (1, "winKeybdProc - Error initializing keyboard AutoRepeat (No XKB)\n"); - } + winErrorFVerb(2, "Rules = \"%s\" Model = \"%s\" Layout = \"%s\"" + " Variant = \"%s\" Options = \"%s\"\n", + g_winInfo.xkb.rules ? g_winInfo.xkb.rules : "none", + g_winInfo.xkb.model ? g_winInfo.xkb.model : "none", + g_winInfo.xkb.layout ? g_winInfo.xkb.layout : "none", + g_winInfo.xkb.variant ? g_winInfo.xkb.variant : "none", + g_winInfo.xkb.options ? g_winInfo.xkb.options : "none"); + + InitKeyboardDeviceStruct (pDeviceInt, + &g_winInfo.xkb, + winKeybdBell, + winKeybdCtrl); + + xkbi = pDeviceInt->key->xkbInfo; + if ((xkbi != NULL) && (xkbi->desc != NULL)) + { + ctrl = xkbi->desc->ctrls; + ctrl->repeat_delay = g_winInfo.keyboard.delay; + ctrl->repeat_interval = 1000/g_winInfo.keyboard.rate; + } + else + { + winErrorFVerb (1, "winKeybdProc - Error initializing keyboard AutoRepeat\n"); } -#endif - g_winInternalModeKeyStatesPtr = &(pDeviceInt->key->state); break; case DEVICE_ON: pDevice->on = TRUE; - g_winInternalModeKeyStatesPtr = &(pDeviceInt->key->state); break; case DEVICE_CLOSE: case DEVICE_OFF: pDevice->on = FALSE; - g_winInternalModeKeyStatesPtr = NULL; break; } @@ -362,14 +311,14 @@ winInitializeModeKeyStates (void) */ void -winRestoreModeKeyStates () +winRestoreModeKeyStates (void) { DWORD dwKeyState; BOOL processEvents = TRUE; unsigned short internalKeyStates; /* X server is being initialized */ - if (!g_winInternalModeKeyStatesPtr) + if (!inputInfo.keyboard) return; /* Only process events if the rootwindow is mapped. The keyboard events @@ -382,7 +331,9 @@ winRestoreModeKeyStates () mieqProcessInputEvents (); /* Read the mode key states of our X server */ - internalKeyStates = *g_winInternalModeKeyStatesPtr; + /* (stored in the virtual core keyboard) */ + internalKeyStates = XkbStateFieldFromRec(&inputInfo.keyboard->key->xkbInfo->state); + winDebug("winRestoreModeKeyStates: state %d\n", internalKeyStates); /* * NOTE: The C XOR operator, ^, will not work here because it is @@ -548,7 +499,7 @@ winIsFakeCtrl_L (UINT message, WPARAM wParam, LPARAM lParam) */ void -winKeybdReleaseKeys () +winKeybdReleaseKeys (void) { int i; @@ -580,7 +531,8 @@ winKeybdReleaseKeys () void winSendKeyEvent (DWORD dwKey, Bool fDown) { - xEvent xCurrentEvent; + EventListPtr events; + int i, nevents; /* * When alt-tabing between screens we can get phantom key up messages @@ -590,14 +542,17 @@ winSendKeyEvent (DWORD dwKey, Bool fDown) /* Update the keyState map */ g_winKeyState[dwKey] = fDown; - - ZeroMemory (&xCurrentEvent, sizeof (xCurrentEvent)); - xCurrentEvent.u.u.type = fDown ? KeyPress : KeyRelease; - xCurrentEvent.u.keyButtonPointer.time = - g_c32LastInputEventTime = GetTickCount (); - xCurrentEvent.u.u.detail = dwKey + MIN_KEYCODE; - mieqEnqueue (&xCurrentEvent); + GetEventList(&events); + nevents = GetKeyboardEvents(events, g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE); + + for (i = 0; i < nevents; i++) + mieqEnqueue(g_pwinKeyboard, events[i].event); + +#if CYGDEBUG + ErrorF("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n", + dwKey, fDown, nevents); +#endif } BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam) diff --git a/xorg-server/hw/xwin/winkeyhook.c b/xorg-server/hw/xwin/winkeyhook.c index 53d91e6ee..2d6ed18b7 100644 --- a/xorg-server/hw/xwin/winkeyhook.c +++ b/xorg-server/hw/xwin/winkeyhook.c @@ -149,7 +149,7 @@ winKeyboardMessageHookLL (int iCode, WPARAM wParam, LPARAM lParam) */ Bool -winInstallKeyboardHookLL () +winInstallKeyboardHookLL (void) { OSVERSIONINFO osvi = {0}; @@ -186,7 +186,7 @@ winInstallKeyboardHookLL () */ void -winRemoveKeyboardHookLL () +winRemoveKeyboardHookLL (void) { if (g_hhookKeyboardLL) UnhookWindowsHookEx (g_hhookKeyboardLL); diff --git a/xorg-server/hw/xwin/winlayouts.h b/xorg-server/hw/xwin/winlayouts.h index cc0752430..d1d21a12d 100644 --- a/xorg-server/hw/xwin/winlayouts.h +++ b/xorg-server/hw/xwin/winlayouts.h @@ -38,34 +38,50 @@ typedef struct char *layoutname; } WinKBLayoutRec, *WinKBLayoutPtr; +/* + This table is sorted by low byte of winlayout, then by next byte, etc. +*/ + WinKBLayoutRec winKBLayouts[] = { + { 0x404, -1, "pc105", "zh_TW", NULL, NULL, "Chinese (Taiwan)"}, { 0x405, -1, "pc105", "cz", NULL, NULL, "Czech"}, {0x10405, -1, "pc105", "cz_qwerty", NULL, NULL, "Czech (QWERTY)"}, { 0x406, -1, "pc105", "dk", NULL, NULL, "Danish"}, { 0x407, -1, "pc105", "de", NULL, NULL, "German (Germany)"}, {0x10407, -1, "pc105", "de", NULL, NULL, "German (Germany, IBM)"}, - { 0x807, -1, "pc105", "de_CH", NULL, NULL, "German (Switzerland)"}, + { 0x807, -1, "pc105", "ch", "de", NULL, "German (Switzerland)"}, { 0x409, -1, "pc105", "us", NULL, NULL, "English (USA)"}, {0x10409, -1, "pc105", "dvorak", NULL, NULL, "English (USA, Dvorak)"}, {0x20409, -1, "pc105", "us_intl", NULL, NULL, "English (USA, International)"}, { 0x809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"}, { 0x1809, -1, "pc105", "ie", NULL, NULL, "Irish"}, { 0x40a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain, Traditional Sort)"}, + { 0x80a, -1, "pc105", "latam", NULL, NULL, "Latin American"}, { 0x40b, -1, "pc105", "fi", NULL, NULL, "Finnish"}, { 0x40c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"}, { 0x80c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"}, - { 0xc0c, -1, "pc105", "ca_enhanced", NULL, NULL, "French (Canada)"}, - { 0x100c, -1, "pc105", "fr_CH", NULL, NULL, "French (Switzerland)"}, + { 0xc0c, -1, "pc105", "ca", "fr", NULL, "French (Canada)"}, + { 0x100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"}, + { 0x40d, -1, "pc105", "il", NULL, NULL, "Hebrew"}, { 0x40e, -1, "pc105", "hu", NULL, NULL, "Hungarian"}, + { 0x40f, -1, "pc105", "is", NULL, NULL, "Icelandic"}, { 0x410, -1, "pc105", "it", NULL, NULL, "Italian"}, + {0x10410, -1, "pc105", "it", NULL, NULL, "Italian (142)"}, + {0xa0000410,-1, "macbook79","it", "mac",NULL, "Italiano (Apple)"}, { 0x411, 7, "jp106", "jp", NULL, NULL, "Japanese"}, + { 0x413, -1, "pc105", "nl", NULL, NULL, "Dutch"}, { 0x813, -1, "pc105", "be", NULL, NULL, "Dutch (Belgian)"}, { 0x414, -1, "pc105", "no", NULL, NULL, "Norwegian"}, + { 0x415, -1, "pc105", "pl", NULL, NULL, "Polish (Programmers)"}, { 0x416, -1, "pc105", "br", NULL, NULL, "Portuguese (Brazil, ABNT)"}, {0x10416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil, ABNT2)"}, { 0x816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"}, + { 0x41a, -1, "pc105", "hr", NULL, NULL, "Croatian"}, { 0x41d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"}, + { 0x424, -1, "pc105", "si", NULL, NULL, "Slovenian"}, + { 0x425, -1, "pc105", "ee", NULL, NULL, "Estonian"}, + { 0x452, -1, "pc105", "gb", "intl", NULL, "United Kingdom (Extended)"}, { -1, -1, NULL, NULL, NULL, NULL, NULL} }; diff --git a/xorg-server/hw/xwin/winmouse.c b/xorg-server/hw/xwin/winmouse.c index be2b66a08..b537d3213 100644 --- a/xorg-server/hw/xwin/winmouse.c +++ b/xorg-server/hw/xwin/winmouse.c @@ -38,6 +38,8 @@ #if defined(XFree86Server) #include "inputstr.h" +#include "exevents.h" /* for button/axes labels */ +#include "xserver-properties.h" /* Peek the internal button mapping */ static CARD8 const *g_winMouseButtonMap = NULL; @@ -70,6 +72,8 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState) int lngWheelEvents = 2; CARD8 *map; DevicePtr pDevice = (DevicePtr) pDeviceInt; + Atom *btn_labels; + Atom axes_labels[2]; switch (iState) { @@ -97,14 +101,27 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState) map[0] = 0; for (i=1; i <= lngMouseButtons + lngWheelEvents; i++) map[i] = i; + + btn_labels = calloc((lngMouseButtons + lngWheelEvents), sizeof(Atom)); + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); + btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + InitPointerDeviceStruct (pDevice, map, lngMouseButtons + lngWheelEvents, - GetMotionHistory, + btn_labels, winMouseCtrl, GetMotionHistorySize(), - 2); + 2, + axes_labels); free(map); + free(btn_labels); #if defined(XFree86Server) g_winMouseButtonMap = pDeviceInt->button->map; @@ -221,19 +238,25 @@ winMouseWheel (ScreenPtr pScreen, int iDeltaZ) void winMouseButtonsSendEvent (int iEventType, int iButton) { - xEvent xCurrentEvent; + EventListPtr events; + int i, nevents; - /* Load an xEvent and enqueue the event */ - xCurrentEvent.u.u.type = iEventType; #if defined(XFree86Server) if (g_winMouseButtonMap) - xCurrentEvent.u.u.detail = g_winMouseButtonMap[iButton]; - else + iButton = g_winMouseButtonMap[iButton]; +#endif + + GetEventList(&events); + nevents = GetPointerEvents(events, g_pwinPointer, iEventType, iButton, + POINTER_RELATIVE, 0, 0, NULL); + + for (i = 0; i < nevents; i++) + mieqEnqueue(g_pwinPointer, events[i].event); + +#if CYGDEBUG + ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n", + iEventType, iButton, nevents); #endif - xCurrentEvent.u.u.detail = iButton; - xCurrentEvent.u.keyButtonPointer.time - = g_c32LastInputEventTime = GetTickCount (); - mieqEnqueue (&xCurrentEvent); } @@ -339,3 +362,28 @@ winMouseButtonsHandle (ScreenPtr pScreen, return 0; } + +/** + * Enqueue a motion event. + * + * XXX: miPointerMove does exactly this, but is static :-( (and uses a static buffer) + * + */ +void winEnqueueMotion(int x, int y) +{ + miPointerSetPosition(g_pwinPointer, &x, &y); + + int i, nevents; + int valuators[2]; + + EventListPtr events; + GetEventList(&events); + + valuators[0] = x; + valuators[1] = y; + nevents = GetPointerEvents(events, g_pwinPointer, MotionNotify, 0, + POINTER_ABSOLUTE, 0, 2, valuators); + + for (i = 0; i < nevents; i++) + mieqEnqueue(g_pwinPointer, events[i].event); +} diff --git a/xorg-server/hw/xwin/winms.h b/xorg-server/hw/xwin/winms.h index 1ad30dc0b..60f7eb906 100644 --- a/xorg-server/hw/xwin/winms.h +++ b/xorg-server/hw/xwin/winms.h @@ -35,6 +35,9 @@ #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif +#ifndef WINVER +#define WINVER 0x0500 +#endif #include #include diff --git a/xorg-server/hw/xwin/winmultiwindowclass.c b/xorg-server/hw/xwin/winmultiwindowclass.c index 5b47c3976..a5cf2120a 100644 --- a/xorg-server/hw/xwin/winmultiwindowclass.c +++ b/xorg-server/hw/xwin/winmultiwindowclass.c @@ -263,7 +263,7 @@ winMultiWindowGetTransientFor (WindowPtr pWin, WindowPtr *ppDaddy) if (prop->propertyName == XA_WM_TRANSIENT_FOR) { if (ppDaddy) - memcpy (*ppDaddy, prop->data, sizeof (WindowPtr)); + memcpy (ppDaddy, prop->data, sizeof (WindowPtr)); return 1; } else diff --git a/xorg-server/hw/xwin/winmultiwindowicons.c b/xorg-server/hw/xwin/winmultiwindowicons.c index fbc516cde..e16b2a3c8 100644 --- a/xorg-server/hw/xwin/winmultiwindowicons.c +++ b/xorg-server/hw/xwin/winmultiwindowicons.c @@ -36,6 +36,10 @@ #include "winmultiwindowclass.h" #include "winprefs.h" +#include "propertyst.h" + +#include "propertyst.h" +#include "windowstr.h" /* * External global variables @@ -66,7 +70,7 @@ winScaleXBitmapToWindows (int iconSize, { int row, column, effXBPP, effXDepth; unsigned char *outPtr; - unsigned char *iconData = 0; + char *iconData = 0; int stride, xStride; float factX, factY; int posX, posY; @@ -83,8 +87,8 @@ winScaleXBitmapToWindows (int iconSize, if (pixmap->drawable.depth == 15) effXDepth = 16; - /* Need 32-bit aligned rows */ - stride = ((iconSize * effBPP + 31) & (~31)) / 8; + /* Need 16-bit aligned rows for DDBitmaps */ + stride = ((iconSize * effBPP + 15) & (~15)) / 8; xStride = PixmapBytePad (pixmap->drawable.width, pixmap->drawable.depth); if (stride == 0 || xStride == 0) { @@ -126,7 +130,7 @@ winScaleXBitmapToWindows (int iconSize, posX = factX * column; posY = factY * row; - ptr = iconData + posY*xStride; + ptr = (unsigned char*) iconData + posY*xStride; if (effXBPP == 1) { ptr += posX / 8; @@ -187,10 +191,10 @@ winScaleXBitmapToWindows (int iconSize, switch (effBPP) { case 32: - *(outPtr++) = *(ptr++); // b - *(outPtr++) = *(ptr++); // g - *(outPtr++) = *(ptr++); // r - *(outPtr++) = 0; // resvd + *(outPtr++) = *(ptr++); /* b */ + *(outPtr++) = *(ptr++); /* g */ + *(outPtr++) = *(ptr++); /* r */ + *(outPtr++) = (effXDepth == 32) ? *(ptr++) : 0x0; /* alpha */ break; case 24: *(outPtr++) = *(ptr++); @@ -231,7 +235,7 @@ winScaleXBitmapToWindows (int iconSize, *(outPtr++) = (color & 31) << 2; *(outPtr++) = ((color >> 5) & 31) << 2; *(outPtr++) = ((color >> 10) & 31) << 2; - *(outPtr++) = 0; // resvd + *(outPtr++) = 0; /* resvd */ break; case 24: *(outPtr++) = (color & 31) << 2; @@ -260,6 +264,144 @@ winScaleXBitmapToWindows (int iconSize, free (iconData); } +static HICON +NetWMToWinIconAlpha(uint32_t *icon) +{ + int width = icon[0]; + int height = icon[1]; + uint32_t *pixels = &icon[2]; + HICON result; + HDC hdc = GetDC(NULL); + uint32_t *DIB_pixels; + ICONINFO ii = {TRUE}; + BITMAPV4HEADER bmh = {sizeof(bmh)}; + + /* Define an ARGB pixel format used for Color+Alpha icons */ + bmh.bV4Width = width; + bmh.bV4Height = -height; /* Invert the image */ + bmh.bV4Planes = 1; + bmh.bV4BitCount = 32; + bmh.bV4V4Compression = BI_BITFIELDS; + bmh.bV4AlphaMask = 0xFF000000; + bmh.bV4RedMask = 0x00FF0000; + bmh.bV4GreenMask = 0x0000FF00; + bmh.bV4BlueMask = 0x000000FF; + + ii.hbmColor = CreateDIBSection(hdc, (BITMAPINFO*)&bmh, + DIB_RGB_COLORS, (void**)&DIB_pixels, NULL, 0); + ReleaseDC(NULL, hdc); + ii.hbmMask = CreateBitmap(width, height, 1, 1, NULL); + memcpy(DIB_pixels, pixels, height*width*4); + + /* CreateIconIndirect() traditionally required DDBitmaps */ + /* Systems from WinXP accept 32-bit ARGB DIBitmaps with full 8-bit alpha support */ + /* The icon is created with a DIB + empty DDB mask (an MS example does the same) */ + result = CreateIconIndirect(&ii); + + DeleteObject(ii.hbmColor); + DeleteObject(ii.hbmMask); + + winDebug("NetWMToWinIconAlpha - %d x %d = %p\n", icon[0], icon[1], result); + return result; +} + +static HICON +NetWMToWinIconThreshold(uint32_t *icon) +{ + int width = icon[0]; + int height = icon[1]; + uint32_t *pixels = &icon[2]; + int row, col; + HICON result; + ICONINFO ii = {TRUE}; + + HDC hdc = GetDC(NULL); + HDC xorDC = CreateCompatibleDC(hdc); + HDC andDC = CreateCompatibleDC(hdc); + ii.hbmColor = CreateCompatibleBitmap(hdc, width, height); + ii.hbmMask = CreateCompatibleBitmap(hdc, width, height); + ReleaseDC(NULL, hdc); + SelectObject(xorDC, ii.hbmColor); + SelectObject(andDC, ii.hbmMask); + + for (row = 0; row < height; row++) { + for (col = 0; col < width; col++) { + if ((*pixels & 0xFF000000) > 31<<24) { /* 31 alpha threshold, i.e. opaque above, transparent below */ + SetPixelV(xorDC, col, row, RGB(((char*)pixels)[2], ((char*)pixels)[1], + ((char*)pixels)[0])); + SetPixelV(andDC, col, row, RGB(0, 0, 0)); /* black mask */ + } + else { + SetPixelV(xorDC, col, row, RGB(0, 0, 0)); + SetPixelV(andDC, col, row, RGB(255, 255, 255)); /* white mask */ + } + pixels++; + } + } + DeleteDC(xorDC); + DeleteDC(andDC); + + result = CreateIconIndirect(&ii); + + DeleteObject(ii.hbmColor); + DeleteObject(ii.hbmMask ); + + winDebug("NetWMToWinIconThreshold - %d x %d = %p\n", icon[0], icon[1], result); + return result; +} + +static HICON +NetWMToWinIcon(int bpp, uint32_t *icon) +{ + static Bool hasIconAlphaChannel = FALSE; + static BOOL versionChecked = FALSE; + + if (!versionChecked) + { + OSVERSIONINFOEX osvi = {0}; + ULONGLONG dwlConditionMask = 0; + + osvi.dwOSVersionInfoSize = sizeof (osvi); + osvi.dwMajorVersion = 5; + osvi.dwMinorVersion = 1; + + /* Windows versions later than XP have icon alpha channel suport, 2000 does not */ + VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL); + VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, VER_GREATER_EQUAL); + hasIconAlphaChannel = VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION, dwlConditionMask); + versionChecked = TRUE; + + ErrorF("OS has icon alpha channel support: %s\n", hasIconAlphaChannel ? "yes" : "no"); + } + + if (hasIconAlphaChannel && (bpp==32)) + return NetWMToWinIconAlpha(icon); + else + return NetWMToWinIconThreshold(icon); +} + +static pointer +GetWindowProp(WindowPtr pWin, Atom name, long int *size_return) +{ + struct _Window *pwin; + struct _Property *prop; + + if (!pWin || !name) { + ErrorF ("GetWindowProp - pWin or name was NULL\n"); + return 0; + } + pwin = (struct _Window*) pWin; + if (!pwin->optional) return NULL; + for (prop = (struct _Property *) pwin->optional->userProps; + prop; + prop=prop->next){ + if (prop->propertyName == name) { + *size_return=prop->size; + return prop->data; + } + } + return NULL; +} /* * Attempt to create a custom icon from the WM_HINTS bitmaps @@ -273,34 +415,68 @@ winXIconToHICON (WindowPtr pWin, int iconSize) PixmapPtr iconPtr; PixmapPtr maskPtr; int planes, bpp, effBPP, stride, maskStride, i; + int biggest_size = 0; HDC hDC; ICONINFO ii; WinXWMHints hints; - HICON hIcon; + HICON hIcon = NULL; + uint32_t *biggest_icon = NULL; - winMultiWindowGetWMHints (pWin, &hints); - if (!hints.icon_pixmap) return NULL; + /* Try to get _NET_WM_ICON icons first */ + static Atom _XA_NET_WM_ICON; + static int generation; + uint32_t *icon, *icon_data = NULL; + long int size=0; - iconPtr = (PixmapPtr) LookupIDByType (hints.icon_pixmap, RT_PIXMAP); - - if (!iconPtr) return NULL; - hDC = GetDC (GetDesktopWindow ()); planes = GetDeviceCaps (hDC, PLANES); bpp = GetDeviceCaps (hDC, BITSPIXEL); ReleaseDC (GetDesktopWindow (), hDC); + + if (generation != serverGeneration) { + generation = serverGeneration; + _XA_NET_WM_ICON = MakeAtom("_NET_WM_ICON", 12, TRUE); + } + + if (_XA_NET_WM_ICON) icon_data = GetWindowProp(pWin, _XA_NET_WM_ICON, &size); + if (icon_data) + { + for(icon = icon_data; + icon < &icon_data[size] && *icon; + icon = &icon[icon[0]*icon[1]+2]) + { + if (icon[0]==iconSize && icon[1]==iconSize) + return NetWMToWinIcon(bpp, icon); + /* Find the biggest icon and let Windows scale the size */ + else if (biggest_size < icon[0]) + { + biggest_icon = icon; + biggest_size = icon[0]; + } + } + if (biggest_icon) + return NetWMToWinIcon(bpp, biggest_icon); + } + winDebug("winXIconToHICON - pWin %x: no suitable NetIcon\n",(int)pWin, iconSize); + + winMultiWindowGetWMHints (pWin, &hints); + if (!hints.icon_pixmap) return NULL; + + iconPtr = (PixmapPtr) LookupIDByType (hints.icon_pixmap, RT_PIXMAP); + if (!iconPtr) return NULL; + /* 15 BPP is really 16BPP as far as we care */ if (bpp == 15) effBPP = 16; else effBPP = bpp; - /* Need 32-bit aligned rows */ - stride = ((iconSize * effBPP + 31) & (~31)) / 8; + /* Need 16-bit aligned rows for DDBitmaps */ + stride = ((iconSize * effBPP + 15) & (~15)) / 8; /* Mask is 1-bit deep */ - maskStride = ((iconSize * 1 + 31) & (~31)) / 8; + maskStride = ((iconSize * 1 + 15) & (~15)) / 8; image = malloc (stride * iconSize); imageMask = malloc (stride * iconSize); @@ -364,43 +540,37 @@ void winUpdateIcon (Window id) { WindowPtr pWin; - HICON hIcon, hiconOld; + HICON hIcon, hIconSmall=NULL, hIconOld; pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW); if (!pWin) return; - hIcon = (HICON)winOverrideIcon ((unsigned long)pWin); + winWindowPriv(pWin); + if (pWinPriv->hWnd) { + hIcon = winOverrideIcon ((unsigned long)pWin); + if (!hIcon) { + hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXICON)); + if (!hIcon) { + hIcon = g_hIconX; + hIconSmall = g_hSmallIconX; + } else { + /* Leave undefined if not found */ + hIconSmall = winXIconToHICON (pWin, GetSystemMetrics(SM_CXSMICON)); + } + } - if (!hIcon) - hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXICON)); + /* Set the large icon */ + hIconOld = (HICON) SendMessage (pWinPriv->hWnd, + WM_SETICON, ICON_BIG, (LPARAM) hIcon); - if (hIcon) - { - winWindowPriv(pWin); + /* Delete the icon if its not the default */ + winDestroyIcon(hIconOld); - if (pWinPriv->hWnd) - { - hiconOld = (HICON) SetClassLong (pWinPriv->hWnd, - GCL_HICON, - (int) hIcon); - - /* Delete the icon if its not the default */ - winDestroyIcon(hiconOld); - } - } - - hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXSMICON)); - if (hIcon) - { - winWindowPriv(pWin); + /* Same for the small icon */ + hIconOld = (HICON) SendMessage (pWinPriv->hWnd, + WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall); + winDestroyIcon(hIconOld); - if (pWinPriv->hWnd) - { - hiconOld = (HICON) SetClassLong (pWinPriv->hWnd, - GCL_HICONSM, - (int) hIcon); - winDestroyIcon (hiconOld); - } - } + } } void winInitGlobalIcons (void) @@ -410,8 +580,8 @@ void winInitGlobalIcons (void) /* Load default X icon in case it's not ready yet */ if (!g_hIconX) { - g_hIconX = (HICON)winOverrideDefaultIcon(sm_cx); - g_hSmallIconX = (HICON)winOverrideDefaultIcon(sm_cxsm); + g_hIconX = winOverrideDefaultIcon(sm_cx); + g_hSmallIconX = winOverrideDefaultIcon(sm_cxsm); } if (!g_hIconX) diff --git a/xorg-server/hw/xwin/winmultiwindowshape.c b/xorg-server/hw/xwin/winmultiwindowshape.c index 62cddd0a1..44007027a 100644 --- a/xorg-server/hw/xwin/winmultiwindowshape.c +++ b/xorg-server/hw/xwin/winmultiwindowshape.c @@ -44,7 +44,6 @@ void winSetShapeMultiWindow (WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c index 75bef9786..e2b5ed291 100644 --- a/xorg-server/hw/xwin/winmultiwindowwindow.c +++ b/xorg-server/hw/xwin/winmultiwindowwindow.c @@ -1,5 +1,6 @@ /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + *Copyright (C) Colin Harrison 2005-2008 * *Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -28,6 +29,7 @@ * Authors: Kensuke Matsuzaki * Earle F. Philhower, III * Harold L Hunt II + * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H @@ -42,9 +44,9 @@ * External global variables */ -extern HWND g_hDlgDepthChange; - -extern void winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon); +extern HICON g_hIconX; +extern HICON g_hSmallIconX; +extern HWND g_hDlgDepthChange; /* * Prototypes for local functions @@ -62,13 +64,6 @@ winUpdateWindowsWindow (WindowPtr pWin); static void winFindWindow (pointer value, XID id, pointer cdata); -/* - * Constant defines - */ - -#define MOUSE_POLLING_INTERVAL 500 - - /* * Macros */ @@ -81,6 +76,35 @@ winFindWindow (pointer value, XID id, pointer cdata); #define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent)) +static +void winInitMultiWindowClass(void) +{ + static wATOM atomXWinClass=0; + WNDCLASSEX wcx; + + if (atomXWinClass==0) + { + /* Setup our window class */ + wcx.cbSize=sizeof(WNDCLASSEX); + wcx.style = CS_HREDRAW | CS_VREDRAW; + wcx.lpfnWndProc = winTopLevelWindowProc; + wcx.cbClsExtra = 0; + wcx.cbWndExtra = 0; + wcx.hInstance = g_hInstance; + wcx.hIcon = g_hIconX; + wcx.hCursor = 0; + wcx.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); + wcx.lpszMenuName = NULL; + wcx.lpszClassName = WINDOW_CLASS_X; + wcx.hIconSm = g_hSmallIconX; + +#if CYGMULTIWINDOW_DEBUG + ErrorF ("winCreateWindowsWindow - Creating class: %s\n", WINDOW_CLASS_X); +#endif + + atomXWinClass = RegisterClassEx (&wcx); + } +} /* * CreateWindow - See Porting Layer Definition - p. 37 @@ -275,7 +299,6 @@ winChangeWindowAttributesMultiWindow (WindowPtr pWin, unsigned long mask) { Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG @@ -368,7 +391,6 @@ void winReparentWindowMultiWindow (WindowPtr pWin, WindowPtr pPriorParent) { ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG @@ -392,12 +414,13 @@ winReparentWindowMultiWindow (WindowPtr pWin, WindowPtr pPriorParent) void winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib) { +#if 0 WindowPtr pPrevWin; UINT uFlags; HWND hInsertAfter; HWND hWnd = NULL; +#endif ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG || CYGWINDOWING_DEBUG @@ -484,16 +507,15 @@ winCreateWindowsWindow (WindowPtr pWin) int iWidth; int iHeight; HWND hWnd; - WNDCLASSEX wc; + HWND hFore = NULL; winWindowPriv(pWin); HICON hIcon; HICON hIconSmall; -#define CLASS_NAME_LENGTH 512 - char pszClass[CLASS_NAME_LENGTH], pszWindowID[12]; - char *res_name, *res_class, *res_role; - static int s_iWindowID = 0; winPrivScreenPtr pScreenPriv = pWinPriv->pScreenPriv; WinXSizeHints hints; + WindowPtr pDaddy; + + winInitMultiWindowClass(); #if CYGMULTIWINDOW_DEBUG ErrorF ("winCreateWindowsWindow - pWin: %08x\n", pWin); @@ -516,70 +538,27 @@ winCreateWindowsWindow (WindowPtr pWin) iWidth = pWin->drawable.width; iHeight = pWin->drawable.height; - winSelectIcons(pWin, &hIcon, &hIconSmall); - - /* Set standard class name prefix so we can identify window easily */ - strncpy (pszClass, WINDOW_CLASS_X, sizeof(pszClass)); - - if (winMultiWindowGetClassHint (pWin, &res_name, &res_class)) + if (winMultiWindowGetTransientFor (pWin, &pDaddy)) { - strncat (pszClass, "-", 1); - strncat (pszClass, res_name, CLASS_NAME_LENGTH - strlen (pszClass)); - strncat (pszClass, "-", 1); - strncat (pszClass, res_class, CLASS_NAME_LENGTH - strlen (pszClass)); - - /* Check if a window class is provided by the WM_WINDOW_ROLE property, - * if not use the WM_CLASS information. - * For further information see: - * http://tronche.com/gui/x/icccm/sec-5.html - */ - if (winMultiWindowGetWindowRole (pWin, &res_role) ) - { - strcat (pszClass, "-"); - strcat (pszClass, res_role); - free (res_role); - } - - free (res_name); - free (res_class); + if (pDaddy) + { + hFore = GetForegroundWindow(); + if (hFore && (pDaddy != (WindowPtr)GetProp(hFore, WIN_WID_PROP))) hFore = NULL; + } } - /* Add incrementing window ID to make unique class name */ - snprintf (pszWindowID, sizeof(pszWindowID), "-%x", s_iWindowID++); - pszWindowID[sizeof(pszWindowID)-1] = 0; - strcat (pszClass, pszWindowID); - -#if CYGMULTIWINDOW_DEBUG - ErrorF ("winCreateWindowsWindow - Creating class: %s\n", pszClass); -#endif - - /* Setup our window class */ - wc.cbSize = sizeof(wc); - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = winTopLevelWindowProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = g_hInstance; - wc.hIcon = hIcon; - wc.hIconSm = hIconSmall; - wc.hCursor = 0; - wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); - wc.lpszMenuName = NULL; - wc.lpszClassName = pszClass; - RegisterClassEx (&wc); - /* Create the window */ /* Make it OVERLAPPED in create call since WS_POPUP doesn't support */ /* CW_USEDEFAULT, change back to popup after creation */ hWnd = CreateWindowExA (WS_EX_TOOLWINDOW, /* Extended styles */ - pszClass, /* Class name */ + WINDOW_CLASS_X, /* Class name */ WINDOW_TITLE_X, /* Window name */ WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, iX, /* Horizontal position */ iY, /* Vertical position */ iWidth, /* Right edge */ iHeight, /* Bottom edge */ - (HWND) NULL, /* No parent or owner window */ + hFore, /* Null or Parent window if transient*/ (HMENU) NULL, /* No menu */ GetModuleHandle (NULL), /* Instance handle */ pWin); /* ScreenPrivates */ @@ -588,23 +567,27 @@ winCreateWindowsWindow (WindowPtr pWin) ErrorF ("winCreateWindowsWindow - CreateWindowExA () failed: %d\n", (int) GetLastError ()); } + pWinPriv->hWnd = hWnd; + + /* Set application or .XWinrc defined Icons */ + winSelectIcons(pWin, &hIcon, &hIconSmall); + if (hIcon) SendMessage (hWnd, WM_SETICON, ICON_BIG, (LPARAM) hIcon); + if (hIconSmall) SendMessage (hWnd, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall); /* Change style back to popup, already placed... */ - SetWindowLong (hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); + SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); SetWindowPos (hWnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); /* Make sure it gets the proper system menu for a WS_POPUP, too */ GetSystemMenu (hWnd, TRUE); - pWinPriv->hWnd = hWnd; - /* Cause any .XWinrc menus to be added in main WNDPROC */ PostMessage (hWnd, WM_INIT_SYS_MENU, 0, 0); - SetProp (pWinPriv->hWnd, WIN_WID_PROP, (HANDLE) winGetWindowID(pWin)); + SetProp (hWnd, WIN_WID_PROP, (HANDLE) winGetWindowID(pWin)); /* Flag that this Windows window handles its own activation */ - SetProp (pWinPriv->hWnd, WIN_NEEDMANAGE_PROP, (HANDLE) 0); + SetProp (hWnd, WIN_NEEDMANAGE_PROP, (HANDLE) 0); /* Call engine-specific create window procedure */ (*pScreenPriv->pwinFinishCreateWindowsWindow) (pWin); @@ -621,11 +604,6 @@ winDestroyWindowsWindow (WindowPtr pWin) { MSG msg; winWindowPriv(pWin); - HICON hiconClass; - HICON hiconSmClass; - HMODULE hInstance; - int iReturn; - char pszClass[512]; BOOL oldstate = winInDestroyWindowsWindow; #if CYGMULTIWINDOW_DEBUG @@ -638,12 +616,6 @@ winDestroyWindowsWindow (WindowPtr pWin) winInDestroyWindowsWindow = TRUE; - /* Store the info we need to destroy after this window is gone */ - hInstance = (HINSTANCE) GetClassLong (pWinPriv->hWnd, GCL_HMODULE); - hiconClass = (HICON) GetClassLong (pWinPriv->hWnd, GCL_HICON); - hiconSmClass = (HICON) GetClassLong (pWinPriv->hWnd, GCL_HICONSM); - iReturn = GetClassName (pWinPriv->hWnd, pszClass, 512); - SetProp (pWinPriv->hWnd, WIN_WINDOW_PROP, NULL); /* Destroy the Windows window */ DestroyWindow (pWinPriv->hWnd); @@ -660,22 +632,6 @@ winDestroyWindowsWindow (WindowPtr pWin) } } - /* Only if we were able to get the name */ - if (iReturn) - { -#if CYGMULTIWINDOW_DEBUG - ErrorF ("winDestroyWindowsWindow - Unregistering %s: ", pszClass); -#endif - iReturn = UnregisterClass (pszClass, hInstance); - -#if CYGMULTIWINDOW_DEBUG - ErrorF ("winDestroyWindowsWindow - %d Deleting Icon: ", iReturn); -#endif - - winDestroyIcon(hiconClass); - winDestroyIcon(hiconSmClass); - } - winInDestroyWindowsWindow = oldstate; #if CYGMULTIWINDOW_DEBUG @@ -854,7 +810,7 @@ winMinimizeWindow (Window id) ErrorF ("winMinimizeWindow\n"); #endif - pWin = LookupIDByType (id, RT_WINDOW); + pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW); if (!pWin) { ErrorF("%s: NULL pWin. Leaving\n", __FUNCTION__); @@ -892,7 +848,6 @@ winCopyWindowMultiWindow (WindowPtr pWin, DDXPointRec oldpt, RegionPtr oldRegion) { ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGWINDOWING_DEBUG @@ -912,7 +867,6 @@ winMoveWindowMultiWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) { ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGWINDOWING_DEBUG @@ -933,7 +887,6 @@ winResizeWindowMultiWindow (WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib) { ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGWINDOWING_DEBUG diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c index 5401ecdee..18d9aedc2 100644 --- a/xorg-server/hw/xwin/winmultiwindowwm.c +++ b/xorg-server/hw/xwin/winmultiwindowwm.c @@ -1,5 +1,6 @@ /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + *Copyright (C) Colin Harrison 2005-2009 * *Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -26,6 +27,7 @@ *from the XFree86 Project. * * Authors: Kensuke Matsuzaki + * Colin Harrison */ /* X headers */ @@ -50,26 +52,28 @@ #include #include #include - -/* Windows headers */ -#ifdef __CYGWIN__ -/* Fixups to prevent collisions between Windows and X headers */ -#define ATOM DWORD - -#include -#else -#include -#endif +#include /* Local headers */ #include "objbase.h" #include "ddraw.h" #include "winwindow.h" +#include "winprefs.h" +#include "window.h" +#include "pixmapstr.h" +#include "windowstr.h" + #ifdef XWIN_MULTIWINDOWEXTWM -#include "windowswmstr.h" +#include +#else +/* We need the native HWND atom for intWM, so for consistency use the + same name as extWM would if we were building with enabled... */ +#define WINDOWSWM_NATIVE_HWND "_WINDOWSWM_NATIVE_HWND" #endif extern void winDebug(const char *format, ...); +extern void winReshapeMultiWindow(WindowPtr pWin); +extern void winUpdateRgnMultiWindow(WindowPtr pWin); #ifndef CYGDEBUG #define CYGDEBUG NO @@ -191,6 +195,11 @@ PreserveWin32Stack(WMInfoPtr pWMInfo, Window iWindow, UINT direction); static Bool CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen); +static void +winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle); + +void +winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle); /* * Local globals @@ -245,6 +254,12 @@ PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode) case WM_WM_MAP: ErrorF ("\tWM_WM_MAP\n"); break; + case WM_WM_MAP2: + ErrorF ("\tWM_WM_MAP2\n"); + break; + case WM_WM_MAP3: + ErrorF ("\tWM_WM_MAP3\n"); + break; case WM_WM_UNMAP: ErrorF ("\tWM_WM_UNMAP\n"); break; @@ -705,10 +720,42 @@ winMultiWindowWMProc (void *pArg) 1); UpdateName (pWMInfo, pNode->msg.iWindow); winUpdateIcon (pNode->msg.iWindow); -#if 0 - /* Handles the case where there are AOT windows above it in W32 */ - PreserveWin32Stack (pWMInfo, pNode->msg.iWindow, GW_HWNDPREV); + break; + + case WM_WM_MAP2: +#if CYGMULTIWINDOW_DEBUG + ErrorF ("\tWM_WM_MAP2\n"); #endif + XChangeProperty (pWMInfo->pDisplay, + pNode->msg.iWindow, + pWMInfo->atmPrivMap, + XA_INTEGER,//pWMInfo->atmPrivMap, + 32, + PropModeReplace, + (unsigned char *) &(pNode->msg.hwndWindow), + 1); + break; + + case WM_WM_MAP3: +#if CYGMULTIWINDOW_DEBUG + ErrorF ("\tWM_WM_MAP3\n"); +#endif + /* Put a note as to the HWND associated with this Window */ + XChangeProperty (pWMInfo->pDisplay, + pNode->msg.iWindow, + pWMInfo->atmPrivMap, + XA_INTEGER,//pWMInfo->atmPrivMap, + 32, + PropModeReplace, + (unsigned char *) &(pNode->msg.hwndWindow), + 1); + UpdateName (pWMInfo, pNode->msg.iWindow); + winUpdateIcon (pNode->msg.iWindow); + { + HWND zstyle = HWND_NOTOPMOST; + winApplyHints (pWMInfo->pDisplay, pNode->msg.iWindow, pNode->msg.hwndWindow, &zstyle); + winUpdateWindowPosition (pNode->msg.hwndWindow, TRUE, &zstyle); + } break; case WM_WM_UNMAP: @@ -803,6 +850,7 @@ winMultiWindowWMProc (void *pArg) #if CYGMULTIWINDOW_DEBUG ErrorF("-winMultiWindowWMProc ()\n"); #endif + return NULL; } @@ -1063,7 +1111,7 @@ winMultiWindowXMsgProc (void *pArg) XCloseDisplay (pProcArg->pDisplay); pthread_exit (NULL); - + return NULL; } @@ -1265,11 +1313,10 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg) pWMInfo->atmWmDelete = XInternAtom (pWMInfo->pDisplay, "WM_DELETE_WINDOW", False); -#ifdef XWIN_MULTIWINDOWEXTWM + pWMInfo->atmPrivMap = XInternAtom (pWMInfo->pDisplay, WINDOWSWM_NATIVE_HWND, False); -#endif if (1) { @@ -1364,7 +1411,9 @@ winMultiWindowXMsgProcErrorHandler (Display *pDisplay, XErrorEvent *pErr) pErr->error_code, pszErrorMsg, sizeof (pszErrorMsg)); +#if CYGMULTIWINDOW_DEBUG ErrorF ("winMultiWindowXMsgProcErrorHandler - ERROR: %s\n", pszErrorMsg); +#endif return 0; } @@ -1433,8 +1482,187 @@ CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen) */ void -winDeinitMultiWindowWM () +winDeinitMultiWindowWM (void) { ErrorF ("winDeinitMultiWindowWM - Noting shutdown in progress\n"); g_shutdown = TRUE; } + +/* Windows window styles */ +#define HINT_NOFRAME (1l<<0) +#define HINT_BORDER (1L<<1) +#define HINT_SIZEBOX (1l<<2) +#define HINT_CAPTION (1l<<3) +/* These two are used on their own */ +#define HINT_MAX (1L<<0) +#define HINT_MIN (1L<<1) + +static void +winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle) +{ + static Atom windowState, motif_wm_hints, windowType; + static Atom hiddenState, fullscreenState, belowState, aboveState; + static Atom dockWindow; + static int generation; + Atom type, *pAtom = NULL; + int format; + unsigned long hint = 0, maxmin = 0, style, nitems = 0 , left = 0; + WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP); + + if (!hWnd) return; + if (!IsWindow (hWnd)) return; + + if (generation != serverGeneration) { + generation = serverGeneration; + windowState = XInternAtom(pDisplay, "_NET_WM_STATE", False); + motif_wm_hints = XInternAtom(pDisplay, "_MOTIF_WM_HINTS", False); + windowType = XInternAtom(pDisplay, "_NET_WM_WINDOW_TYPE", False); + hiddenState = XInternAtom(pDisplay, "_NET_WM_STATE_HIDDEN", False); + fullscreenState = XInternAtom(pDisplay, "_NET_WM_STATE_FULLSCREEN", False); + belowState = XInternAtom(pDisplay, "_NET_WM_STATE_BELOW", False); + aboveState = XInternAtom(pDisplay, "_NET_WM_STATE_ABOVE", False); + dockWindow = XInternAtom(pDisplay, "_NET_WM_WINDOW_TYPE_DOCK", False); + } + + if (XGetWindowProperty(pDisplay, iWindow, windowState, 0L, + 1L, False, XA_ATOM, &type, &format, + &nitems, &left, (unsigned char **)&pAtom) == Success) + { + if (pAtom && nitems == 1) + { + if (*pAtom == hiddenState) maxmin |= HINT_MIN; + else if (*pAtom == fullscreenState) maxmin |= HINT_MAX; + if (*pAtom == belowState) *zstyle = HWND_BOTTOM; + else if (*pAtom == aboveState) *zstyle = HWND_TOPMOST; + } + if (pAtom) XFree(pAtom); + } + + nitems = left = 0; + MwmHints *mwm_hint = NULL; + if (XGetWindowProperty(pDisplay, iWindow, motif_wm_hints, 0L, + PropMwmHintsElements, False, motif_wm_hints, &type, &format, + &nitems, &left, (unsigned char **)&mwm_hint) == Success) + { + if (mwm_hint && nitems == PropMwmHintsElements && (mwm_hint->flags & MwmHintsDecorations)) + { + if (!mwm_hint->decorations) hint |= HINT_NOFRAME; + else if (!(mwm_hint->decorations & MwmDecorAll)) + { + if (mwm_hint->decorations & MwmDecorBorder) hint |= HINT_BORDER; + if (mwm_hint->decorations & MwmDecorHandle) hint |= HINT_SIZEBOX; + if (mwm_hint->decorations & MwmDecorTitle) hint |= HINT_CAPTION; + } + } + if (mwm_hint) XFree(mwm_hint); + } + + nitems = left = 0; + pAtom = NULL; + if (XGetWindowProperty(pDisplay, iWindow, windowType, 0L, + 1L, False, XA_ATOM, &type, &format, + &nitems, &left, (unsigned char **)&pAtom) == Success) + { + if (pAtom && nitems == 1) + { + if (*pAtom == dockWindow) + { + hint = (hint & ~HINT_NOFRAME) | HINT_SIZEBOX; /* Xming puts a sizebox on dock windows */ + *zstyle = HWND_TOPMOST; + } + } + if (pAtom) XFree(pAtom); + } + + /* Apply Styles, overriding hint settings from above */ + style = winOverrideStyle((unsigned long)pWin); + if (style & STYLE_TOPMOST) *zstyle = HWND_TOPMOST; + else if (style & STYLE_MAXIMIZE) maxmin = (hint & ~HINT_MIN) | HINT_MAX; + else if (style & STYLE_MINIMIZE) maxmin = (hint & ~HINT_MAX) | HINT_MIN; + else if (style & STYLE_BOTTOM) *zstyle = HWND_BOTTOM; + + if (maxmin & HINT_MAX) SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0); + else if (maxmin & HINT_MIN) SendMessage(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); + + if (style & STYLE_NOTITLE) + hint = (hint & ~HINT_NOFRAME & ~HINT_BORDER & ~HINT_CAPTION) | HINT_SIZEBOX; + else if (style & STYLE_OUTLINE) + hint = (hint & ~HINT_NOFRAME & ~HINT_SIZEBOX & ~HINT_CAPTION) | HINT_BORDER; + else if (style & STYLE_NOFRAME) + hint = (hint & ~HINT_BORDER & ~HINT_CAPTION & ~HINT_SIZEBOX) | HINT_NOFRAME; + + style = GetWindowLongPtr(hWnd, GWL_STYLE) & ~WS_CAPTION & ~WS_SIZEBOX; /* Just in case */ + if (!style) return; + if (!hint) /* All on, but no resize of children is allowed */ + style = style | WS_CAPTION | (GetParent(hWnd) ? 0 : WS_SIZEBOX); + else if (hint & HINT_NOFRAME); /* All off, so do nothing */ + else style = style | ((hint & HINT_BORDER) ? WS_BORDER : 0) | + ((hint & HINT_SIZEBOX) ? (GetParent(hWnd) ? 0 : WS_SIZEBOX) : 0) | + ((hint & HINT_CAPTION) ? WS_CAPTION : 0); + SetWindowLongPtr (hWnd, GWL_STYLE, style); +} + +void +winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle) +{ + int iX, iY, iWidth, iHeight; + int iDx, iDy; + RECT rcNew; + WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP); + DrawablePtr pDraw = NULL; + + if (!pWin) return; + pDraw = &pWin->drawable; + if (!pDraw) return; + + /* Get the X and Y location of the X window */ + iX = pWin->drawable.x + GetSystemMetrics (SM_XVIRTUALSCREEN); + iY = pWin->drawable.y + GetSystemMetrics (SM_YVIRTUALSCREEN); + + /* Get the height and width of the X window */ + iWidth = pWin->drawable.width; + iHeight = pWin->drawable.height; + + /* Setup a rectangle with the X window position and size */ + SetRect (&rcNew, iX, iY, iX + iWidth, iY + iHeight); + +#if 0 + ErrorF ("winUpdateWindowPosition - (%d, %d)-(%d, %d)\n", + rcNew.left, rcNew.top, + rcNew.right, rcNew.bottom); +#endif + + AdjustWindowRectEx (&rcNew, GetWindowLongPtr (hWnd, GWL_STYLE), FALSE, WS_EX_APPWINDOW); + + /* Don't allow window decoration to disappear off to top-left as a result of this adjustment */ + if (rcNew.left < GetSystemMetrics(SM_XVIRTUALSCREEN)) + { + iDx = GetSystemMetrics(SM_XVIRTUALSCREEN) - rcNew.left; + rcNew.left += iDx; + rcNew.right += iDx; + } + + if (rcNew.top < GetSystemMetrics(SM_YVIRTUALSCREEN)) + { + iDy = GetSystemMetrics(SM_YVIRTUALSCREEN) - rcNew.top; + rcNew.top += iDy; + rcNew.bottom += iDy; + } + +#if 0 + ErrorF ("winUpdateWindowPosition - (%d, %d)-(%d, %d)\n", + rcNew.left, rcNew.top, + rcNew.right, rcNew.bottom); +#endif + + /* Position the Windows window */ + SetWindowPos (hWnd, *zstyle, rcNew.left, rcNew.top, + rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, + 0); + + if (reshape) + { + winReshapeMultiWindow(pWin); + winUpdateRgnMultiWindow(pWin); + } +} diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c index 20ff9f7db..543a1652f 100644 --- a/xorg-server/hw/xwin/winmultiwindowwndproc.c +++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c @@ -1,5 +1,6 @@ /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + *Copyright (C) Colin Harrison 2005-2008 * *Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -28,6 +29,7 @@ * Authors: Kensuke Matsuzaki * Earle F. Philhower, III * Harold L Hunt II + * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H @@ -49,6 +51,8 @@ extern Bool g_fKeyboardHookLL; extern Bool g_fSoftwareCursor; extern Bool g_fButton[3]; +extern void winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle); + /* * Local globals @@ -61,7 +65,6 @@ static UINT_PTR g_uipMousePollingTimerID = 0; * Constant defines */ -#define MOUSE_POLLING_INTERVAL 500 #define WIN_MULTIWINDOW_SHAPE YES @@ -206,6 +209,8 @@ ValidateSizing (HWND hwnd, WindowPtr pWin, WinXSizeHints sizeHints; RECT *rect; int iWidth, iHeight; + RECT rcClient, rcWindow; + int iBorderWidthX, iBorderWidthY; /* Invalid input checking */ if (pWin==NULL || lParam==0) @@ -227,19 +232,20 @@ ValidateSizing (HWND hwnd, WindowPtr pWin, iWidth = rect->right - rect->left; iHeight = rect->bottom - rect->top; - /* Now remove size of any borders */ - iWidth -= 2 * GetSystemMetrics(SM_CXSIZEFRAME); - iHeight -= (GetSystemMetrics(SM_CYCAPTION) - + 2 * GetSystemMetrics(SM_CYSIZEFRAME)); - + /* Now remove size of any borders and title bar */ + GetClientRect(hwnd, &rcClient); + GetWindowRect(hwnd, &rcWindow); + iBorderWidthX = (rcWindow.right - rcWindow.left) - (rcClient.right - rcClient.left); + iBorderWidthY = (rcWindow.bottom - rcWindow.top) - (rcClient.bottom - rcClient.top); + iWidth -= iBorderWidthX; + iHeight -= iBorderWidthY; /* Constrain the size to legal values */ ConstrainSize (sizeHints, &iWidth, &iHeight); - /* Add back the borders */ - iWidth += 2 * GetSystemMetrics(SM_CXSIZEFRAME); - iHeight += (GetSystemMetrics(SM_CYCAPTION) - + 2 * GetSystemMetrics(SM_CYSIZEFRAME)); + /* Add back the size of borders and title bar */ + iWidth += iBorderWidthX; + iHeight += iBorderWidthY; /* Adjust size according to where we're dragging from */ switch(wParam) { @@ -286,6 +292,20 @@ static void winRaiseWindow(WindowPtr pWin) } } +static +void winStartMousePolling(winPrivScreenPtr s_pScreenPriv) +{ + /* + * Timer to poll mouse position. This is needed to make + * programs like xeyes follow the mouse properly when the + * mouse pointer is outside of any X window. + */ + if (g_uipMousePollingTimerID == 0) + g_uipMousePollingTimerID = SetTimer (s_pScreenPriv->hwndScreen, + WIN_POLLING_MOUSE_TIMER_ID, + MOUSE_POLLING_INTERVAL, + NULL); +} /* * winTopLevelWindowProc - Window procedure for all top-level Windows windows. @@ -403,6 +423,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message, SetWindowRgn (hwnd, hRgnWindow, TRUE); DeleteObject(hRgnWindow); + SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)XMING_SIGNATURE); + return 0; case WM_INIT_SYS_MENU: @@ -435,6 +457,14 @@ winTopLevelWindowProc (HWND hwnd, UINT message, HandleCustomWM_INITMENU ((unsigned long)hwnd, wParam); break; + case WM_ERASEBKGND: + /* + * Pretend that we did erase the background but we don't care, + * since we repaint the entire region anyhow + * This avoids some flickering when resizing. + */ + return TRUE; + case WM_PAINT: /* Only paint if our window handle is valid */ if (hwndScreen == NULL) @@ -495,8 +525,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message, break; /* Has the mouse pointer crossed screens? */ - if (s_pScreen != miPointerGetScreen(inputInfo.pointer)) - miPointerSetScreen (inputInfo.pointer, s_pScreenInfo->dwScreen, + if (s_pScreen != miPointerGetScreen(g_pwinPointer)) + miPointerSetScreen (g_pwinPointer, s_pScreenInfo->dwScreen, ptMouse.x - s_pScreenInfo->dwXOffset, ptMouse.y - s_pScreenInfo->dwYOffset); @@ -535,9 +565,9 @@ winTopLevelWindowProc (HWND hwnd, UINT message, } /* Deliver absolute cursor position to X Server */ - miPointerAbsoluteCursor (ptMouse.x - s_pScreenInfo->dwXOffset, - ptMouse.y - s_pScreenInfo->dwYOffset, - g_c32LastInputEventTime = GetTickCount ()); + winEnqueueMotion(ptMouse.x - s_pScreenInfo->dwXOffset, + ptMouse.y - s_pScreenInfo->dwYOffset); + return 0; case WM_NCMOUSEMOVE: @@ -561,15 +591,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message, ShowCursor (TRUE); } - /* - * Timer to poll mouse events. This is needed to make - * programs like xeyes follow the mouse properly. - */ - if (g_uipMousePollingTimerID == 0) - g_uipMousePollingTimerID = SetTimer (s_pScreenPriv->hwndScreen, - WIN_POLLING_MOUSE_TIMER_ID, - MOUSE_POLLING_INTERVAL, - NULL); + winStartMousePolling(s_pScreenPriv); + break; case WM_MOUSELEAVE: @@ -585,15 +608,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message, ShowCursor (TRUE); } - /* - * Timer to poll mouse events. This is needed to make - * programs like xeyes follow the mouse properly. - */ - if (g_uipMousePollingTimerID == 0) - g_uipMousePollingTimerID = SetTimer (s_pScreenPriv->hwndScreen, - WIN_POLLING_MOUSE_TIMER_ID, - MOUSE_POLLING_INTERVAL, - NULL); + winStartMousePolling(s_pScreenPriv); + return 0; case WM_LBUTTONDBLCLK: @@ -601,12 +617,15 @@ winTopLevelWindowProc (HWND hwnd, UINT message, if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[0] = TRUE; + SetCapture(hwnd); return winMouseButtonsHandle (s_pScreen, ButtonPress, Button1, wParam); - + case WM_LBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[0] = FALSE; + ReleaseCapture(); + winStartMousePolling(s_pScreenPriv); return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button1, wParam); case WM_MBUTTONDBLCLK: @@ -614,47 +633,66 @@ winTopLevelWindowProc (HWND hwnd, UINT message, if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[1] = TRUE; + SetCapture(hwnd); return winMouseButtonsHandle (s_pScreen, ButtonPress, Button2, wParam); - + case WM_MBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[1] = FALSE; + ReleaseCapture(); + winStartMousePolling(s_pScreenPriv); return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button2, wParam); - + case WM_RBUTTONDBLCLK: case WM_RBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[2] = TRUE; + SetCapture(hwnd); return winMouseButtonsHandle (s_pScreen, ButtonPress, Button3, wParam); - + case WM_RBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[2] = FALSE; + ReleaseCapture(); + winStartMousePolling(s_pScreenPriv); return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button3, wParam); case WM_XBUTTONDBLCLK: case WM_XBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; + SetCapture(hwnd); return winMouseButtonsHandle (s_pScreen, ButtonPress, HIWORD(wParam) + 5, wParam); + case WM_XBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; + ReleaseCapture(); + winStartMousePolling(s_pScreenPriv); return winMouseButtonsHandle (s_pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam); case WM_MOUSEWHEEL: - - /* Pass the message to the root window */ - SendMessage (hwndScreen, message, wParam, lParam); - return 0; + if (SendMessage(hwnd, WM_NCHITTEST, 0, MAKELONG(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))) == HTCLIENT) + { + /* Pass the message to the root window */ + SendMessage (hwndScreen, message, wParam, lParam); + return 0; + } + else break; case WM_SETFOCUS: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; + { + /* Get the parent window for transient handling */ + HWND hParent = GetParent(hwnd); + if (hParent && IsIconic(hParent)) ShowWindow (hParent, SW_RESTORE); + } + winRestoreModeKeyStates (); /* Add the keyboard hook if possible */ @@ -668,6 +706,9 @@ winTopLevelWindowProc (HWND hwnd, UINT message, /* Remove our keyboard hook if it is installed */ winRemoveKeyboardHookLL (); + if (!wParam) + /* Revert the X focus as well, but only if the Windows focus is going to another window */ + DeleteWindowFromAnyEvents(pWin, FALSE); return 0; case WM_SYSDEADCHAR: @@ -770,6 +811,10 @@ winTopLevelWindowProc (HWND hwnd, UINT message, if (!pWin || !pWin->overrideRedirect) /* for OOo menus */ winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg); } + /* Prevent the mouse wheel from stalling when another window is minimized */ + if (HIWORD(wParam) == 0 && LOWORD(wParam) == WA_ACTIVE && + (HWND)lParam != NULL && (HWND)lParam != (HWND)GetParent(hwnd)) + SetFocus(hwnd); return 0; case WM_ACTIVATEAPP: @@ -824,98 +869,57 @@ winTopLevelWindowProc (HWND hwnd, UINT message, if (!wParam) return 0; - /* Tell X to map the window */ - MapWindow (pWin, wClient(pWin)); - /* */ if (!pWin->overrideRedirect) { - DWORD dwExStyle; - DWORD dwStyle; - RECT rcNew; - int iDx, iDy; - /* Flag that this window needs to be made active when clicked */ SetProp (hwnd, WIN_NEEDMANAGE_PROP, (HANDLE) 1); - /* Get the standard and extended window style information */ - dwExStyle = GetWindowLongPtr (hwnd, GWL_EXSTYLE); - dwStyle = GetWindowLongPtr (hwnd, GWL_STYLE); - - /* */ - if (dwExStyle != WS_EX_APPWINDOW) + if (!(GetWindowLongPtr (hwnd, GWL_EXSTYLE) & WS_EX_APPWINDOW)) { - /* Setup a rectangle with the X window position and size */ - SetRect (&rcNew, - pDraw->x, - pDraw->y, - pDraw->x + pDraw->width, - pDraw->y + pDraw->height); - -#if 0 - ErrorF ("winTopLevelWindowProc - (%d, %d)-(%d, %d)\n", - rcNew.left, rcNew.top, - rcNew.right, rcNew.bottom); -#endif - - /* */ - AdjustWindowRectEx (&rcNew, - WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW, - FALSE, - WS_EX_APPWINDOW); - - /* Calculate position deltas */ - iDx = pDraw->x - rcNew.left; - iDy = pDraw->y - rcNew.top; - - /* Calculate new rectangle */ - rcNew.left += iDx; - rcNew.right += iDx; - rcNew.top += iDy; - rcNew.bottom += iDy; - -#if 0 - ErrorF ("winTopLevelWindowProc - (%d, %d)-(%d, %d)\n", - rcNew.left, rcNew.top, - rcNew.right, rcNew.bottom); -#endif + HWND zstyle = HWND_NOTOPMOST; /* Set the window extended style flags */ SetWindowLongPtr (hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW); + /* Set the transient style flags */ + if (GetParent(hwnd)) SetWindowLongPtr (hwnd, GWL_STYLE, + WS_POPUP | WS_OVERLAPPED | WS_SYSMENU | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); /* Set the window standard style flags */ - SetWindowLongPtr (hwnd, GWL_STYLE, - WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW); - - /* Position the Windows window */ - SetWindowPos (hwnd, HWND_TOP, - rcNew.left, rcNew.top, - rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, - SWP_NOMOVE | SWP_FRAMECHANGED - | SWP_SHOWWINDOW | SWP_NOACTIVATE); + else SetWindowLongPtr (hwnd, GWL_STYLE, + (WS_POPUP | WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS) + & ~WS_CAPTION & ~WS_SIZEBOX); - /* Bring the Windows window to the foreground */ + winUpdateWindowPosition (hwnd, FALSE, &zstyle); SetForegroundWindow (hwnd); } + wmMsg.msg = WM_WM_MAP3; } else /* It is an overridden window so make it top of Z stack */ { #if CYGWINDOWING_DEBUG ErrorF ("overridden window is shown\n"); #endif - SetWindowPos (hwnd, HWND_TOPMOST, 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + HWND forHwnd = GetForegroundWindow(); + if (forHwnd != NULL) + { + if (GetWindowLongPtr(forHwnd, GWLP_USERDATA) & (LONG_PTR)XMING_SIGNATURE) + { + if (GetWindowLongPtr(forHwnd, GWL_EXSTYLE) & WS_EX_TOPMOST) + SetWindowPos (hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + else + SetWindowPos (hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + } + } + wmMsg.msg = WM_WM_MAP2; } - /* Setup the Window Manager message */ - wmMsg.msg = WM_WM_MAP; - wmMsg.iWidth = pDraw->width; - wmMsg.iHeight = pDraw->height; - /* Tell our Window Manager thread to map the window */ if (fWMMsgInitialized) winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg); + winStartMousePolling(s_pScreenPriv); + return 0; case WM_SIZING: diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c index 30e587d4a..d5bceb928 100644 --- a/xorg-server/hw/xwin/winprefs.c +++ b/xorg-server/hw/xwin/winprefs.c @@ -1,5 +1,6 @@ /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + * Copyright (C) Colin Harrison 2005-2008 * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -26,6 +27,7 @@ * from the XFree86 Project. * * Authors: Earle F. Philhower, III + * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H @@ -187,35 +189,28 @@ ReloadEnumWindowsProc (HWND hwnd, LPARAM lParam) /* It's our baby, either clean or dirty it */ if (lParam==FALSE) { - hicon = (HICON)GetClassLong(hwnd, GCL_HICON); + /* Reset the window's icon to undefined. */ + hicon = (HICON)SendMessage(hwnd, WM_SETICON, ICON_BIG, 0); - /* Unselect any icon in the class structure */ - SetClassLong (hwnd, GCL_HICON, (LONG)LoadIcon (NULL, IDI_APPLICATION)); - - /* If it's generated on-the-fly, get rid of it, will regen */ + /* If the old icon is generated on-the-fly, get rid of it, will regen */ winDestroyIcon (hicon); - - hicon = (HICON)GetClassLong(hwnd, GCL_HICONSM); - - /* Unselect any icon in the class structure */ - SetClassLong (hwnd, GCL_HICONSM, 0); - /* If it's generated on-the-fly, get rid of it, will regen */ + /* Same for the small icon */ + hicon = (HICON)SendMessage(hwnd, WM_SETICON, ICON_SMALL, 0); winDestroyIcon (hicon); - - /* Remove any menu additions, use bRevert flag */ + + /* Remove any menu additions; bRevert=TRUE destroys any modified menus */ GetSystemMenu (hwnd, TRUE); - /* This window is now clean of our taint */ + /* This window is now clean of our taint (but with undefined icons) */ } else { - /* Make the icon default, dynamic, or from xwinrc */ - SetClassLong (hwnd, GCL_HICON, (LONG)g_hIconX); - SetClassLong (hwnd, GCL_HICONSM, (LONG)g_hSmallIconX); + /* winUpdateIcon() will set the icon default, dynamic, or from xwinrc */ wid = (Window)GetProp (hwnd, WIN_WID_PROP); if (wid) winUpdateIcon (wid); + /* Update the system menu for this window */ SetupSysMenu ((unsigned long)hwnd); @@ -239,8 +234,12 @@ ReloadPrefs (void) int i; #ifdef XWIN_MULTIWINDOW - /* First, iterate over all windows replacing their icon with system */ - /* default one and deleting any custom system menus */ + /* First, iterate over all windows, deleting their icons and custom menus. + * This is really only needed because winDestroyIcon() will try to + * destroy the old global icons, which will have changed. + * It is probably better to set a windows USER_DATA to flag locally defined + * icons, and use that to accurately know when to destroy old icons. + */ EnumThreadWindows (g_dwCurrentThreadID, ReloadEnumWindowsProc, FALSE); #endif @@ -314,7 +313,7 @@ HandleCustomWM_INITMENU(unsigned long hwndIn, if (!hwnd || !hmenu) return; - if (GetWindowLong (hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST) + if (GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST) dwExStyle = MF_BYCOMMAND | MF_CHECKED; else dwExStyle = MF_BYCOMMAND | MF_UNCHECKED; @@ -409,7 +408,7 @@ HandleCustomWM_COMMAND (unsigned long hwndIn, return FALSE; /* Get extended window style */ - dwExStyle = GetWindowLong (hwnd, GWL_EXSTYLE); + dwExStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE); /* Handle topmost windows */ if (dwExStyle & WS_EX_TOPMOST) @@ -527,7 +526,7 @@ SetupRootMenu (unsigned long hmenuRoot) /* * Check for and return an overridden default ICON specified in the prefs */ -unsigned long +HICON winOverrideDefaultIcon(int size) { HICON hicon; @@ -539,7 +538,7 @@ winOverrideDefaultIcon(int size) ErrorF ("winOverrideDefaultIcon: LoadImageComma(%s) failed\n", pref.defaultIconName); - return (unsigned long)hicon; + return hicon; } return 0; @@ -549,7 +548,7 @@ winOverrideDefaultIcon(int size) /* * Return the HICON to use in the taskbar notification area */ -unsigned long +HICON winTaskbarIcon(void) { HICON hicon; @@ -573,7 +572,7 @@ winTaskbarIcon(void) GetSystemMetrics (SM_CYSMICON), 0); - return (unsigned long)hicon; + return hicon; } @@ -648,7 +647,7 @@ LoadImageComma (char *fname, int sx, int sy, int flags) * Check for a match of the window class to one specified in the * ICONS{} section in the prefs file, and load the icon from a file */ -unsigned long +HICON winOverrideIcon (unsigned long longWin) { WindowPtr pWin = (WindowPtr) longWin; @@ -684,8 +683,8 @@ winOverrideIcon (unsigned long longWin) ErrorF ("winOverrideIcon: LoadImageComma(%s) failed\n", pref.icon[i].iconFile); - pref.icon[i].hicon = (unsigned long)hicon; - return (unsigned long)hicon; + pref.icon[i].hicon = hicon; + return hicon; } } @@ -728,7 +727,7 @@ winIconIsOverride(unsigned hiconIn) * Load it into prefs structure for use by other functions */ void -LoadPreferences () +LoadPreferences (void) { char *home; char fname[PATH_MAX+NAME_MAX+2]; @@ -820,3 +819,49 @@ LoadPreferences () } /* for all menus */ } + + +/* + * Check for a match of the window class to one specified in the + * STYLES{} section in the prefs file, and return the style type + */ +unsigned long +winOverrideStyle (unsigned long longpWin) +{ + WindowPtr pWin = (WindowPtr) longpWin; + char *res_name, *res_class; + int i; + char *wmName; + + if (pWin==NULL) + return STYLE_NONE; + + /* If we can't find the class, we can't override from default! */ + if (!winMultiWindowGetClassHint (pWin, &res_name, &res_class)) + return STYLE_NONE; + + winMultiWindowGetWMName (pWin, &wmName); + + for (i=0; iyy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -841,9 +871,9 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 64 "winprefslex.l" +#line 66 "winprefslex.l" -#line 847 "winprefslex.c" +#line 877 "winprefslex.c" if ( !(yy_init) ) { @@ -896,13 +926,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 136 ) + if ( yy_current_state >= 186 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 301 ); + while ( yy_base[yy_current_state] != 403 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -939,135 +969,175 @@ do_action: /* This label is used only to access EOF actions. */ case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 65 "winprefslex.l" +#line 67 "winprefslex.l" { /* comment */ return NEWLINE; } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 66 "winprefslex.l" +#line 68 "winprefslex.l" { /* comment */ return NEWLINE; } YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 67 "winprefslex.l" +#line 69 "winprefslex.l" { return NEWLINE; } YY_BREAK case 4: YY_RULE_SETUP -#line 68 "winprefslex.l" +#line 70 "winprefslex.l" { /* ignore whitespace */ } YY_BREAK case 5: YY_RULE_SETUP -#line 69 "winprefslex.l" +#line 71 "winprefslex.l" { return MENU; } YY_BREAK case 6: YY_RULE_SETUP -#line 70 "winprefslex.l" +#line 72 "winprefslex.l" { return ICONDIRECTORY; } YY_BREAK case 7: YY_RULE_SETUP -#line 71 "winprefslex.l" +#line 73 "winprefslex.l" { return DEFAULTICON; } YY_BREAK case 8: YY_RULE_SETUP -#line 72 "winprefslex.l" +#line 74 "winprefslex.l" { return ICONS; } YY_BREAK case 9: YY_RULE_SETUP -#line 73 "winprefslex.l" -{ return ROOTMENU; } +#line 75 "winprefslex.l" +{ return STYLES; } YY_BREAK case 10: YY_RULE_SETUP -#line 74 "winprefslex.l" -{ return DEFAULTSYSMENU; } +#line 76 "winprefslex.l" +{ return TOPMOST; } YY_BREAK case 11: YY_RULE_SETUP -#line 75 "winprefslex.l" -{ return SYSMENU; } +#line 77 "winprefslex.l" +{ return MAXIMIZE; } YY_BREAK case 12: YY_RULE_SETUP -#line 76 "winprefslex.l" -{ return SEPARATOR; } +#line 78 "winprefslex.l" +{ return MINIMIZE; } YY_BREAK case 13: YY_RULE_SETUP -#line 77 "winprefslex.l" -{ return ATSTART; } +#line 79 "winprefslex.l" +{ return BOTTOM; } YY_BREAK case 14: YY_RULE_SETUP -#line 78 "winprefslex.l" -{ return ATEND; } +#line 80 "winprefslex.l" +{ return NOTITLE; } YY_BREAK case 15: YY_RULE_SETUP -#line 79 "winprefslex.l" -{ return EXEC; } +#line 81 "winprefslex.l" +{ return OUTLINE; } YY_BREAK case 16: YY_RULE_SETUP -#line 80 "winprefslex.l" -{ return ALWAYSONTOP; } +#line 82 "winprefslex.l" +{ return NOFRAME; } YY_BREAK case 17: YY_RULE_SETUP -#line 81 "winprefslex.l" -{ return DEBUG; } +#line 83 "winprefslex.l" +{ return ROOTMENU; } YY_BREAK case 18: YY_RULE_SETUP -#line 82 "winprefslex.l" -{ return RELOAD; } +#line 84 "winprefslex.l" +{ return DEFAULTSYSMENU; } YY_BREAK case 19: YY_RULE_SETUP -#line 83 "winprefslex.l" -{ return TRAYICON; } +#line 85 "winprefslex.l" +{ return SYSMENU; } YY_BREAK case 20: YY_RULE_SETUP -#line 84 "winprefslex.l" -{ return SILENTEXIT; } +#line 86 "winprefslex.l" +{ return SEPARATOR; } YY_BREAK case 21: YY_RULE_SETUP -#line 85 "winprefslex.l" -{ return LB; } +#line 87 "winprefslex.l" +{ return ATSTART; } YY_BREAK case 22: YY_RULE_SETUP -#line 86 "winprefslex.l" -{ return RB; } +#line 88 "winprefslex.l" +{ return ATEND; } YY_BREAK case 23: YY_RULE_SETUP -#line 87 "winprefslex.l" +#line 89 "winprefslex.l" +{ return EXEC; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 90 "winprefslex.l" +{ return ALWAYSONTOP; } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 91 "winprefslex.l" +{ return DEBUG; } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 92 "winprefslex.l" +{ return RELOAD; } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 93 "winprefslex.l" +{ return TRAYICON; } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 94 "winprefslex.l" +{ return SILENTEXIT; } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 95 "winprefslex.l" +{ return LB; } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 96 "winprefslex.l" +{ return RB; } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 97 "winprefslex.l" { yylval.sVal = makestr(yytext+1); \ yylval.sVal[strlen(yylval.sVal)-1] = 0; \ return STRING; } YY_BREAK -case 24: +case 32: YY_RULE_SETUP -#line 90 "winprefslex.l" +#line 100 "winprefslex.l" { yylval.sVal = makestr(yytext); \ return STRING; } YY_BREAK -case 25: +case 33: YY_RULE_SETUP -#line 92 "winprefslex.l" +#line 102 "winprefslex.l" ECHO; YY_BREAK -#line 1071 "winprefslex.c" +#line 1141 "winprefslex.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1359,7 +1429,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 136 ) + if ( yy_current_state >= 186 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1387,11 +1457,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 136 ) + if ( yy_current_state >= 186 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 135); + yy_is_jam = (yy_current_state == 185); return yy_is_jam ? 0 : yy_current_state; } @@ -1834,8 +1904,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ @@ -2077,7 +2147,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 92 "winprefslex.l" +#line 102 "winprefslex.l" @@ -2085,7 +2155,7 @@ void yyfree (void * ptr ) * Run-of-the mill requirement for yacc */ int -yywrap () +yywrap (void) { return 1; } diff --git a/xorg-server/hw/xwin/winprefslex.l b/xorg-server/hw/xwin/winprefslex.l index a4c1abc3d..9a384a2cd 100644 --- a/xorg-server/hw/xwin/winprefslex.l +++ b/xorg-server/hw/xwin/winprefslex.l @@ -1,6 +1,7 @@ %{ # -*- C -*- /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + * Copyright (C) Colin Harrison 2005-2008 * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -27,6 +28,7 @@ * from the XFree86 Project. * * Authors: Earle F. Philhower, III + * Colin Harrison */ /* $XFree86: $ */ @@ -70,6 +72,14 @@ MENU { return MENU; } ICONDIRECTORY { return ICONDIRECTORY; } DEFAULTICON { return DEFAULTICON; } ICONS { return ICONS; } +STYLES { return STYLES; } +TOPMOST { return TOPMOST; } +MAXIMIZE { return MAXIMIZE; } +MINIMIZE { return MINIMIZE; } +BOTTOM { return BOTTOM; } +NOTITLE { return NOTITLE; } +OUTLINE { return OUTLINE; } +NOFRAME { return NOFRAME; } ROOTMENU { return ROOTMENU; } DEFAULTSYSMENU { return DEFAULTSYSMENU; } SYSMENU { return SYSMENU; } @@ -95,7 +105,7 @@ SILENTEXIT { return SILENTEXIT; } * Run-of-the mill requirement for yacc */ int -yywrap () +yywrap (void) { return 1; } diff --git a/xorg-server/hw/xwin/winprefsyacc.c b/xorg-server/hw/xwin/winprefsyacc.c index d92dfdd8b..1255887c3 100644 --- a/xorg-server/hw/xwin/winprefsyacc.c +++ b/xorg-server/hw/xwin/winprefsyacc.c @@ -72,6 +72,7 @@ /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + * Copyright (C) Colin Harrison 2005-2008 * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -98,6 +99,7 @@ * from the XFree86 Project. * * Authors: Earle F. Philhower, III + * Colin Harrison */ /* $XFree86: $ */ @@ -112,6 +114,10 @@ /* The following give better error messages in bison at the cost of a few KB */ #define YYERROR_VERBOSE 1 +/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */ +#define YYLTYPE_IS_TRIVIAL 1 +#define YYENABLE_NLS 0 + /* The global pref settings */ WINPREFS pref; @@ -135,6 +141,10 @@ static void OpenIcons(void); static void AddIconLine(char *matchstr, char *iconfile); static void CloseIcons(void); +static void OpenStyles(void); +static void AddStyleLine(char *matchstr, unsigned long style); +static void CloseStyles(void); + static void OpenSysMenu(void); static void AddSysMenuLine(char *matchstr, char *menuname, int pos); static void CloseSysMenu(void); @@ -148,7 +158,7 @@ extern int yylex(void); /* Line 189 of yacc.c */ -#line 152 "winprefsyacc.c" +#line 162 "winprefsyacc.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -182,19 +192,27 @@ extern int yylex(void); ICONDIRECTORY = 262, DEFAULTICON = 263, ICONS = 264, - DEFAULTSYSMENU = 265, - SYSMENU = 266, - ROOTMENU = 267, - SEPARATOR = 268, - ATSTART = 269, - ATEND = 270, - EXEC = 271, - ALWAYSONTOP = 272, - DEBUG = 273, - RELOAD = 274, - TRAYICON = 275, - SILENTEXIT = 276, - STRING = 277 + STYLES = 265, + TOPMOST = 266, + MAXIMIZE = 267, + MINIMIZE = 268, + BOTTOM = 269, + NOTITLE = 270, + OUTLINE = 271, + NOFRAME = 272, + DEFAULTSYSMENU = 273, + SYSMENU = 274, + ROOTMENU = 275, + SEPARATOR = 276, + ATSTART = 277, + ATEND = 278, + EXEC = 279, + ALWAYSONTOP = 280, + DEBUG = 281, + RELOAD = 282, + TRAYICON = 283, + SILENTEXIT = 284, + STRING = 285 }; #endif /* Tokens. */ @@ -205,19 +223,27 @@ extern int yylex(void); #define ICONDIRECTORY 262 #define DEFAULTICON 263 #define ICONS 264 -#define DEFAULTSYSMENU 265 -#define SYSMENU 266 -#define ROOTMENU 267 -#define SEPARATOR 268 -#define ATSTART 269 -#define ATEND 270 -#define EXEC 271 -#define ALWAYSONTOP 272 -#define DEBUG 273 -#define RELOAD 274 -#define TRAYICON 275 -#define SILENTEXIT 276 -#define STRING 277 +#define STYLES 265 +#define TOPMOST 266 +#define MAXIMIZE 267 +#define MINIMIZE 268 +#define BOTTOM 269 +#define NOTITLE 270 +#define OUTLINE 271 +#define NOFRAME 272 +#define DEFAULTSYSMENU 273 +#define SYSMENU 274 +#define ROOTMENU 275 +#define SEPARATOR 276 +#define ATSTART 277 +#define ATEND 278 +#define EXEC 279 +#define ALWAYSONTOP 280 +#define DEBUG 281 +#define RELOAD 282 +#define TRAYICON 283 +#define SILENTEXIT 284 +#define STRING 285 @@ -227,15 +253,16 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 79 "winprefsyacc.y" +#line 89 "winprefsyacc.y" char *sVal; + unsigned long uVal; int iVal; /* Line 214 of yacc.c */ -#line 239 "winprefsyacc.c" +#line 266 "winprefsyacc.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -247,7 +274,7 @@ typedef union YYSTYPE /* Line 264 of yacc.c */ -#line 251 "winprefsyacc.c" +#line 278 "winprefsyacc.c" #ifdef short # undef short @@ -462,20 +489,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 68 +#define YYLAST 92 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 23 +#define YYNTOKENS 31 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 25 +#define YYNNTS 32 /* YYNRULES -- Number of rules. */ -#define YYNRULES 46 +#define YYNRULES 63 /* YYNRULES -- Number of states. */ -#define YYNSTATES 94 +#define YYNSTATES 118 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 277 +#define YYMAXUTOK 285 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -510,7 +537,8 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22 + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30 }; #if YYDEBUG @@ -519,40 +547,48 @@ static const yytype_uint8 yytranslate[] = static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 7, 9, 11, 12, 15, 17, - 19, 21, 23, 25, 27, 29, 31, 33, 35, 39, - 43, 48, 52, 56, 60, 65, 71, 77, 82, 84, - 87, 88, 96, 101, 103, 106, 107, 114, 115, 117, - 119, 125, 127, 130, 131, 139, 142 + 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, + 41, 45, 50, 54, 58, 62, 67, 73, 79, 84, + 86, 89, 90, 98, 103, 105, 108, 109, 116, 118, + 120, 122, 124, 126, 128, 130, 132, 134, 137, 140, + 145, 147, 150, 151, 158, 159, 161, 163, 169, 171, + 174, 175, 183, 186 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 24, 0, -1, -1, 24, 25, -1, 3, -1, 27, - -1, -1, 3, 26, -1, 31, -1, 32, -1, 35, - -1, 39, -1, 44, -1, 29, -1, 30, -1, 47, - -1, 28, -1, 46, -1, 20, 22, 3, -1, 12, - 22, 3, -1, 10, 22, 41, 3, -1, 8, 22, - 3, -1, 7, 22, 3, -1, 13, 3, 26, -1, - 22, 17, 3, 26, -1, 22, 16, 22, 3, 26, - -1, 22, 4, 22, 3, 26, -1, 22, 19, 3, - 26, -1, 33, -1, 33, 34, -1, -1, 4, 22, - 5, 36, 26, 34, 6, -1, 22, 22, 3, 26, - -1, 37, -1, 37, 38, -1, -1, 9, 5, 40, - 26, 38, 6, -1, -1, 14, -1, 15, -1, 22, - 22, 41, 3, 26, -1, 42, -1, 42, 43, -1, - -1, 11, 5, 3, 45, 26, 43, 6, -1, 21, - 3, -1, 18, 22, 3, -1 + 32, 0, -1, -1, 32, 33, -1, 3, -1, 35, + -1, -1, 3, 34, -1, 39, -1, 40, -1, 43, + -1, 47, -1, 54, -1, 59, -1, 37, -1, 38, + -1, 62, -1, 36, -1, 61, -1, 28, 30, 3, + -1, 20, 30, 3, -1, 18, 30, 56, 3, -1, + 8, 30, 3, -1, 7, 30, 3, -1, 21, 3, + 34, -1, 30, 25, 3, 34, -1, 30, 24, 30, + 3, 34, -1, 30, 4, 30, 3, 34, -1, 30, + 27, 3, 34, -1, 41, -1, 41, 42, -1, -1, + 4, 30, 5, 44, 34, 42, 6, -1, 30, 30, + 3, 34, -1, 45, -1, 45, 46, -1, -1, 9, + 5, 48, 34, 46, 6, -1, 11, -1, 12, -1, + 13, -1, 14, -1, 15, -1, 16, -1, 17, -1, + 49, -1, 50, -1, 49, 50, -1, 50, 49, -1, + 30, 51, 3, 34, -1, 52, -1, 52, 53, -1, + -1, 10, 5, 55, 34, 53, 6, -1, -1, 22, + -1, 23, -1, 30, 30, 56, 3, 34, -1, 57, + -1, 57, 58, -1, -1, 19, 5, 3, 60, 34, + 58, 6, -1, 29, 3, -1, 26, 30, 3, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 93, 93, 94, 97, 98, 102, 103, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 118, 121, - 124, 127, 130, 133, 134, 135, 136, 137, 140, 141, - 144, 144, 147, 150, 151, 154, 154, 157, 158, 159, - 162, 165, 166, 169, 169, 172, 175 + 0, 108, 108, 109, 112, 113, 117, 118, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 134, + 137, 140, 143, 146, 149, 150, 151, 152, 153, 156, + 157, 160, 160, 163, 166, 167, 170, 170, 173, 174, + 175, 176, 179, 180, 181, 184, 185, 186, 187, 190, + 193, 194, 197, 197, 200, 201, 202, 205, 208, 209, + 212, 212, 215, 218 }; #endif @@ -562,13 +598,16 @@ static const yytype_uint8 yyrline[] = static const char *const yytname[] = { "$end", "error", "$undefined", "NEWLINE", "MENU", "LB", "RB", - "ICONDIRECTORY", "DEFAULTICON", "ICONS", "DEFAULTSYSMENU", "SYSMENU", - "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", "EXEC", "ALWAYSONTOP", - "DEBUG", "RELOAD", "TRAYICON", "SILENTEXIT", "STRING", "$accept", - "input", "line", "newline_or_nada", "command", "trayicon", "rootmenu", - "defaultsysmenu", "defaulticon", "icondirectory", "menuline", "menulist", - "menu", "$@1", "iconline", "iconlist", "icons", "$@2", "atspot", - "sysmenuline", "sysmenulist", "sysmenu", "$@3", "silentexit", "debug", 0 + "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST", "MAXIMIZE", + "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME", "DEFAULTSYSMENU", + "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", "EXEC", + "ALWAYSONTOP", "DEBUG", "RELOAD", "TRAYICON", "SILENTEXIT", "STRING", + "$accept", "input", "line", "newline_or_nada", "command", "trayicon", + "rootmenu", "defaultsysmenu", "defaulticon", "icondirectory", "menuline", + "menulist", "menu", "$@1", "iconline", "iconlist", "icons", "$@2", + "group1", "group2", "stylecombo", "styleline", "stylelist", "styles", + "$@3", "atspot", "sysmenuline", "sysmenulist", "sysmenu", "$@4", + "silentexit", "debug", 0 }; #endif @@ -579,28 +618,33 @@ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277 + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 28, 29, - 30, 31, 32, 33, 33, 33, 33, 33, 34, 34, - 36, 35, 37, 38, 38, 40, 39, 41, 41, 41, - 42, 43, 43, 45, 44, 46, 47 + 0, 31, 32, 32, 33, 33, 34, 34, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, + 37, 38, 39, 40, 41, 41, 41, 41, 41, 42, + 42, 44, 43, 45, 46, 46, 48, 47, 49, 49, + 49, 49, 50, 50, 50, 51, 51, 51, 51, 52, + 53, 53, 55, 54, 56, 56, 56, 57, 58, 58, + 60, 59, 61, 62 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 1, 1, 0, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, - 4, 3, 3, 3, 4, 5, 5, 4, 1, 2, - 0, 7, 4, 1, 2, 0, 6, 0, 1, 1, - 5, 1, 2, 0, 7, 2, 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 4, 3, 3, 3, 4, 5, 5, 4, 1, + 2, 0, 7, 4, 1, 2, 0, 6, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 4, + 1, 2, 0, 6, 0, 1, 1, 5, 1, 2, + 0, 7, 2, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -609,48 +653,54 @@ static const yytype_uint8 yyr2[] = static const yytype_uint8 yydefact[] = { 2, 0, 1, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 5, 16, 13, 14, 8, - 9, 10, 11, 12, 17, 15, 0, 0, 0, 35, - 37, 0, 0, 0, 0, 45, 30, 22, 21, 6, - 38, 39, 0, 43, 19, 46, 18, 6, 6, 0, - 20, 6, 0, 7, 0, 33, 0, 0, 0, 0, - 28, 0, 0, 34, 36, 0, 41, 0, 6, 0, - 0, 0, 0, 29, 31, 6, 37, 42, 44, 23, - 0, 0, 6, 6, 32, 0, 6, 6, 24, 27, - 6, 26, 25, 40 + 0, 0, 0, 0, 0, 3, 5, 17, 14, 15, + 8, 9, 10, 11, 12, 13, 18, 16, 0, 0, + 0, 36, 52, 54, 0, 0, 0, 0, 62, 31, + 23, 22, 6, 6, 55, 56, 0, 60, 20, 63, + 19, 6, 6, 0, 0, 21, 6, 0, 7, 0, + 34, 0, 0, 50, 0, 0, 0, 0, 29, 0, + 0, 35, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 0, 51, 53, 0, 58, 0, 6, 0, + 0, 0, 0, 30, 32, 6, 47, 48, 6, 54, + 59, 61, 24, 0, 0, 6, 6, 33, 49, 0, + 6, 6, 25, 28, 6, 27, 26, 57 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 1, 14, 49, 15, 16, 17, 18, 19, 20, - 60, 61, 21, 47, 55, 56, 22, 39, 42, 66, - 67, 23, 51, 24, 25 + -1, 1, 15, 53, 16, 17, 18, 19, 20, 21, + 68, 69, 22, 51, 60, 61, 23, 42, 80, 81, + 82, 63, 64, 24, 43, 46, 86, 87, 25, 56, + 26, 27 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -48 +#define YYPACT_NINF -44 static const yytype_int8 yypact[] = { - -48, 2, -48, -48, -15, -3, 4, 22, 7, 25, - 9, 11, 12, 29, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, 32, 35, 38, -48, - 10, 39, 41, 42, 43, -48, -48, -48, -48, 44, - -48, -48, 45, -48, -48, -48, -48, 44, 44, 27, - -48, 44, -5, -48, 28, 27, 46, 31, 48, -1, - -5, 49, 51, -48, -48, 34, 31, 52, 44, 37, - 40, 54, 57, -48, -48, 44, 10, -48, -48, -48, - 58, 60, 44, 44, -48, 61, 44, 44, -48, -48, - 44, -48, -48, -48 + -44, 7, -44, -44, -28, -10, -7, 27, 29, 14, + 41, 18, 19, 20, 44, -44, -44, -44, -44, -44, + -44, -44, -44, -44, -44, -44, -44, -44, 46, 50, + 51, -44, -44, -4, 53, 54, 55, 56, -44, -44, + -44, -44, 57, 57, -44, -44, 58, -44, -44, -44, + -44, 57, 57, 34, 35, -44, 57, -18, -44, 36, + 34, 63, 26, 35, 64, 42, 70, -3, -18, 68, + 72, -44, -44, -44, -44, -44, -44, -44, -44, -44, + -11, 17, 73, -44, -44, 47, 42, 74, 57, 48, + 49, 78, 79, -44, -44, 57, -44, -44, 57, -4, + -44, -44, -44, 80, 81, 57, 57, -44, -44, 82, + 57, 57, -44, -44, 57, -44, -44, -44 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -48, -48, -48, -47, -48, -48, -48, -48, -48, -48, - -48, 5, -48, -48, -48, 13, -48, -48, -10, -48, - 1, -48, -48, -48, -48 + -44, -44, -44, -43, -44, -44, -44, -44, -44, -44, + -44, 21, -44, -44, -44, 28, -44, -44, 5, 10, + -44, -44, 24, -44, -44, -8, -44, 6, -44, -44, + -44, -44 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -660,40 +710,48 @@ static const yytype_int8 yypgoto[] = #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { - 52, 53, 2, 69, 57, 3, 4, 26, 58, 5, - 6, 7, 8, 9, 10, 70, 71, 59, 72, 27, - 11, 79, 12, 13, 40, 41, 28, 29, 84, 30, - 31, 32, 35, 33, 34, 88, 89, 36, 37, 91, - 92, 38, 43, 93, 44, 45, 46, 48, 50, 54, - 62, 68, 64, 65, 75, 74, 76, 82, 78, 80, - 83, 86, 81, 87, 90, 73, 85, 77, 63 + 54, 89, 28, 66, 77, 78, 79, 2, 57, 58, + 3, 4, 67, 65, 5, 6, 7, 8, 44, 45, + 29, 90, 91, 30, 92, 9, 10, 11, 73, 74, + 75, 76, 31, 12, 32, 13, 14, 73, 74, 75, + 76, 77, 78, 79, 33, 102, 34, 38, 35, 36, + 37, 39, 107, 40, 41, 108, 47, 48, 49, 50, + 52, 55, 112, 113, 59, 62, 70, 115, 116, 72, + 84, 117, 85, 88, 94, 95, 98, 99, 103, 104, + 101, 105, 106, 110, 111, 114, 97, 83, 71, 93, + 96, 109, 100 }; static const yytype_uint8 yycheck[] = { - 47, 48, 0, 4, 51, 3, 4, 22, 13, 7, - 8, 9, 10, 11, 12, 16, 17, 22, 19, 22, - 18, 68, 20, 21, 14, 15, 22, 5, 75, 22, - 5, 22, 3, 22, 22, 82, 83, 5, 3, 86, - 87, 3, 3, 90, 3, 3, 3, 3, 3, 22, - 22, 3, 6, 22, 3, 6, 22, 3, 6, 22, - 3, 3, 22, 3, 3, 60, 76, 66, 55 + 43, 4, 30, 21, 15, 16, 17, 0, 51, 52, + 3, 4, 30, 56, 7, 8, 9, 10, 22, 23, + 30, 24, 25, 30, 27, 18, 19, 20, 11, 12, + 13, 14, 5, 26, 5, 28, 29, 11, 12, 13, + 14, 15, 16, 17, 30, 88, 5, 3, 30, 30, + 30, 5, 95, 3, 3, 98, 3, 3, 3, 3, + 3, 3, 105, 106, 30, 30, 30, 110, 111, 6, + 6, 114, 30, 3, 6, 3, 3, 30, 30, 30, + 6, 3, 3, 3, 3, 3, 81, 63, 60, 68, + 80, 99, 86 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 24, 0, 3, 4, 7, 8, 9, 10, 11, - 12, 18, 20, 21, 25, 27, 28, 29, 30, 31, - 32, 35, 39, 44, 46, 47, 22, 22, 22, 5, - 22, 5, 22, 22, 22, 3, 5, 3, 3, 40, - 14, 15, 41, 3, 3, 3, 3, 36, 3, 26, - 3, 45, 26, 26, 22, 37, 38, 26, 13, 22, - 33, 34, 22, 38, 6, 22, 42, 43, 3, 4, - 16, 17, 19, 34, 6, 3, 22, 43, 6, 26, - 22, 22, 3, 3, 26, 41, 3, 3, 26, 26, - 3, 26, 26, 26 + 0, 32, 0, 3, 4, 7, 8, 9, 10, 18, + 19, 20, 26, 28, 29, 33, 35, 36, 37, 38, + 39, 40, 43, 47, 54, 59, 61, 62, 30, 30, + 30, 5, 5, 30, 5, 30, 30, 30, 3, 5, + 3, 3, 48, 55, 22, 23, 56, 3, 3, 3, + 3, 44, 3, 34, 34, 3, 60, 34, 34, 30, + 45, 46, 30, 52, 53, 34, 21, 30, 41, 42, + 30, 46, 6, 11, 12, 13, 14, 15, 16, 17, + 49, 50, 51, 53, 6, 30, 57, 58, 3, 4, + 24, 25, 27, 42, 6, 3, 50, 49, 3, 30, + 58, 6, 34, 30, 30, 3, 3, 34, 34, 56, + 3, 3, 34, 34, 3, 34, 34, 34 }; #define yyerrok (yyerrstatus = 0) @@ -1504,171 +1562,269 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 18: + case 19: /* Line 1455 of yacc.c */ -#line 118 "winprefsyacc.y" +#line 134 "winprefsyacc.y" { SetTrayIcon((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); } break; - case 19: + case 20: /* Line 1455 of yacc.c */ -#line 121 "winprefsyacc.y" +#line 137 "winprefsyacc.y" { SetRootMenu((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); } break; - case 20: + case 21: /* Line 1455 of yacc.c */ -#line 124 "winprefsyacc.y" +#line 140 "winprefsyacc.y" { SetDefaultSysMenu((yyvsp[(2) - (4)].sVal), (yyvsp[(3) - (4)].iVal)); free((yyvsp[(2) - (4)].sVal)); } break; - case 21: + case 22: /* Line 1455 of yacc.c */ -#line 127 "winprefsyacc.y" +#line 143 "winprefsyacc.y" { SetDefaultIcon((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); } break; - case 22: + case 23: /* Line 1455 of yacc.c */ -#line 130 "winprefsyacc.y" +#line 146 "winprefsyacc.y" { SetIconDirectory((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); } break; - case 23: + case 24: /* Line 1455 of yacc.c */ -#line 133 "winprefsyacc.y" +#line 149 "winprefsyacc.y" { AddMenuLine("-", CMD_SEPARATOR, ""); } break; - case 24: + case 25: /* Line 1455 of yacc.c */ -#line 134 "winprefsyacc.y" +#line 150 "winprefsyacc.y" { AddMenuLine((yyvsp[(1) - (4)].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[(1) - (4)].sVal)); } break; - case 25: + case 26: /* Line 1455 of yacc.c */ -#line 135 "winprefsyacc.y" +#line 151 "winprefsyacc.y" { AddMenuLine((yyvsp[(1) - (5)].sVal), CMD_EXEC, (yyvsp[(3) - (5)].sVal)); free((yyvsp[(1) - (5)].sVal)); free((yyvsp[(3) - (5)].sVal)); } break; - case 26: + case 27: /* Line 1455 of yacc.c */ -#line 136 "winprefsyacc.y" +#line 152 "winprefsyacc.y" { AddMenuLine((yyvsp[(1) - (5)].sVal), CMD_MENU, (yyvsp[(3) - (5)].sVal)); free((yyvsp[(1) - (5)].sVal)); free((yyvsp[(3) - (5)].sVal)); } break; - case 27: + case 28: /* Line 1455 of yacc.c */ -#line 137 "winprefsyacc.y" +#line 153 "winprefsyacc.y" { AddMenuLine((yyvsp[(1) - (4)].sVal), CMD_RELOAD, ""); free((yyvsp[(1) - (4)].sVal)); } break; - case 30: + case 31: /* Line 1455 of yacc.c */ -#line 144 "winprefsyacc.y" +#line 160 "winprefsyacc.y" { OpenMenu((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); } break; - case 31: + case 32: /* Line 1455 of yacc.c */ -#line 144 "winprefsyacc.y" +#line 160 "winprefsyacc.y" {CloseMenu();} break; - case 32: + case 33: /* Line 1455 of yacc.c */ -#line 147 "winprefsyacc.y" +#line 163 "winprefsyacc.y" { AddIconLine((yyvsp[(1) - (4)].sVal), (yyvsp[(2) - (4)].sVal)); free((yyvsp[(1) - (4)].sVal)); free((yyvsp[(2) - (4)].sVal)); } break; - case 35: + case 36: /* Line 1455 of yacc.c */ -#line 154 "winprefsyacc.y" +#line 170 "winprefsyacc.y" {OpenIcons();} break; - case 36: + case 37: /* Line 1455 of yacc.c */ -#line 154 "winprefsyacc.y" +#line 170 "winprefsyacc.y" {CloseIcons();} break; - case 37: + case 38: + +/* Line 1455 of yacc.c */ +#line 173 "winprefsyacc.y" + { (yyval.uVal)=STYLE_TOPMOST; } + break; + + case 39: + +/* Line 1455 of yacc.c */ +#line 174 "winprefsyacc.y" + { (yyval.uVal)=STYLE_MAXIMIZE; } + break; + + case 40: + +/* Line 1455 of yacc.c */ +#line 175 "winprefsyacc.y" + { (yyval.uVal)=STYLE_MINIMIZE; } + break; + + case 41: + +/* Line 1455 of yacc.c */ +#line 176 "winprefsyacc.y" + { (yyval.uVal)=STYLE_BOTTOM; } + break; + + case 42: + +/* Line 1455 of yacc.c */ +#line 179 "winprefsyacc.y" + { (yyval.uVal)=STYLE_NOTITLE; } + break; + + case 43: + +/* Line 1455 of yacc.c */ +#line 180 "winprefsyacc.y" + { (yyval.uVal)=STYLE_OUTLINE; } + break; + + case 44: /* Line 1455 of yacc.c */ -#line 157 "winprefsyacc.y" +#line 181 "winprefsyacc.y" + { (yyval.uVal)=STYLE_NOFRAME; } + break; + + case 45: + +/* Line 1455 of yacc.c */ +#line 184 "winprefsyacc.y" + { (yyval.uVal)=(yyvsp[(1) - (1)].uVal); } + break; + + case 46: + +/* Line 1455 of yacc.c */ +#line 185 "winprefsyacc.y" + { (yyval.uVal)=(yyvsp[(1) - (1)].uVal); } + break; + + case 47: + +/* Line 1455 of yacc.c */ +#line 186 "winprefsyacc.y" + { (yyval.uVal)=(yyvsp[(1) - (2)].uVal)|(yyvsp[(2) - (2)].uVal); } + break; + + case 48: + +/* Line 1455 of yacc.c */ +#line 187 "winprefsyacc.y" + { (yyval.uVal)=(yyvsp[(1) - (2)].uVal)|(yyvsp[(2) - (2)].uVal); } + break; + + case 49: + +/* Line 1455 of yacc.c */ +#line 190 "winprefsyacc.y" + { AddStyleLine((yyvsp[(1) - (4)].sVal), (yyvsp[(2) - (4)].uVal)); free((yyvsp[(1) - (4)].sVal)); } + break; + + case 52: + +/* Line 1455 of yacc.c */ +#line 197 "winprefsyacc.y" + {OpenStyles();} + break; + + case 53: + +/* Line 1455 of yacc.c */ +#line 197 "winprefsyacc.y" + {CloseStyles();} + break; + + case 54: + +/* Line 1455 of yacc.c */ +#line 200 "winprefsyacc.y" { (yyval.iVal)=AT_END; } break; - case 38: + case 55: /* Line 1455 of yacc.c */ -#line 158 "winprefsyacc.y" +#line 201 "winprefsyacc.y" { (yyval.iVal)=AT_START; } break; - case 39: + case 56: /* Line 1455 of yacc.c */ -#line 159 "winprefsyacc.y" +#line 202 "winprefsyacc.y" { (yyval.iVal)=AT_END; } break; - case 40: + case 57: /* Line 1455 of yacc.c */ -#line 162 "winprefsyacc.y" +#line 205 "winprefsyacc.y" { AddSysMenuLine((yyvsp[(1) - (5)].sVal), (yyvsp[(2) - (5)].sVal), (yyvsp[(3) - (5)].iVal)); free((yyvsp[(1) - (5)].sVal)); free((yyvsp[(2) - (5)].sVal)); } break; - case 43: + case 60: /* Line 1455 of yacc.c */ -#line 169 "winprefsyacc.y" +#line 212 "winprefsyacc.y" {OpenSysMenu();} break; - case 44: + case 61: /* Line 1455 of yacc.c */ -#line 169 "winprefsyacc.y" +#line 212 "winprefsyacc.y" {CloseSysMenu();} break; - case 45: + case 62: /* Line 1455 of yacc.c */ -#line 172 "winprefsyacc.y" +#line 215 "winprefsyacc.y" { pref.fSilentExit = TRUE; } break; - case 46: + case 63: /* Line 1455 of yacc.c */ -#line 175 "winprefsyacc.y" +#line 218 "winprefsyacc.y" { ErrorF("LoadPreferences: %s\n", (yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); } break; /* Line 1455 of yacc.c */ -#line 1672 "winprefsyacc.c" +#line 1828 "winprefsyacc.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1880,7 +2036,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 179 "winprefsyacc.y" +#line 222 "winprefsyacc.y" /* * Errors in parsing abort and print log messages @@ -2020,6 +2176,39 @@ CloseIcons (void) { } +static void +OpenStyles (void) +{ + if (pref.style != NULL) { + ErrorF("LoadPreferences: Redefining window style\n"); + free(pref.style); + pref.style = NULL; + } + pref.styleItems = 0; +} + +static void +AddStyleLine (char *matchstr, unsigned long style) +{ + if (pref.style==NULL) + pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM)); + else + pref.style = (STYLEITEM*) + realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1)); + + strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX); + pref.style[pref.styleItems].match[MENU_MAX] = 0; + + pref.style[pref.styleItems].type = style; + + pref.styleItems++; +} + +static void +CloseStyles (void) +{ +} + static void OpenSysMenu (void) { diff --git a/xorg-server/hw/xwin/winprefsyacc.h b/xorg-server/hw/xwin/winprefsyacc.h index 25f6e2ab5..a9e5d0c2b 100644 --- a/xorg-server/hw/xwin/winprefsyacc.h +++ b/xorg-server/hw/xwin/winprefsyacc.h @@ -46,19 +46,27 @@ ICONDIRECTORY = 262, DEFAULTICON = 263, ICONS = 264, - DEFAULTSYSMENU = 265, - SYSMENU = 266, - ROOTMENU = 267, - SEPARATOR = 268, - ATSTART = 269, - ATEND = 270, - EXEC = 271, - ALWAYSONTOP = 272, - DEBUG = 273, - RELOAD = 274, - TRAYICON = 275, - SILENTEXIT = 276, - STRING = 277 + STYLES = 265, + TOPMOST = 266, + MAXIMIZE = 267, + MINIMIZE = 268, + BOTTOM = 269, + NOTITLE = 270, + OUTLINE = 271, + NOFRAME = 272, + DEFAULTSYSMENU = 273, + SYSMENU = 274, + ROOTMENU = 275, + SEPARATOR = 276, + ATSTART = 277, + ATEND = 278, + EXEC = 279, + ALWAYSONTOP = 280, + DEBUG = 281, + RELOAD = 282, + TRAYICON = 283, + SILENTEXIT = 284, + STRING = 285 }; #endif /* Tokens. */ @@ -69,19 +77,27 @@ #define ICONDIRECTORY 262 #define DEFAULTICON 263 #define ICONS 264 -#define DEFAULTSYSMENU 265 -#define SYSMENU 266 -#define ROOTMENU 267 -#define SEPARATOR 268 -#define ATSTART 269 -#define ATEND 270 -#define EXEC 271 -#define ALWAYSONTOP 272 -#define DEBUG 273 -#define RELOAD 274 -#define TRAYICON 275 -#define SILENTEXIT 276 -#define STRING 277 +#define STYLES 265 +#define TOPMOST 266 +#define MAXIMIZE 267 +#define MINIMIZE 268 +#define BOTTOM 269 +#define NOTITLE 270 +#define OUTLINE 271 +#define NOFRAME 272 +#define DEFAULTSYSMENU 273 +#define SYSMENU 274 +#define ROOTMENU 275 +#define SEPARATOR 276 +#define ATSTART 277 +#define ATEND 278 +#define EXEC 279 +#define ALWAYSONTOP 280 +#define DEBUG 281 +#define RELOAD 282 +#define TRAYICON 283 +#define SILENTEXIT 284 +#define STRING 285 @@ -91,15 +107,16 @@ typedef union YYSTYPE { /* Line 1676 of yacc.c */ -#line 79 "winprefsyacc.y" +#line 89 "winprefsyacc.y" char *sVal; + unsigned long uVal; int iVal; /* Line 1676 of yacc.c */ -#line 103 "winprefsyacc.h" +#line 120 "winprefsyacc.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y index 2a54ff28f..0c2775192 100644 --- a/xorg-server/hw/xwin/winprefsyacc.y +++ b/xorg-server/hw/xwin/winprefsyacc.y @@ -1,6 +1,7 @@ %{ /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + * Copyright (C) Colin Harrison 2005-2008 * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -27,6 +28,7 @@ * from the XFree86 Project. * * Authors: Earle F. Philhower, III + * Colin Harrison */ /* $XFree86: $ */ @@ -41,6 +43,10 @@ /* The following give better error messages in bison at the cost of a few KB */ #define YYERROR_VERBOSE 1 +/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */ +#define YYLTYPE_IS_TRIVIAL 1 +#define YYENABLE_NLS 0 + /* The global pref settings */ WINPREFS pref; @@ -64,6 +70,10 @@ static void OpenIcons(void); static void AddIconLine(char *matchstr, char *iconfile); static void CloseIcons(void); +static void OpenStyles(void); +static void AddStyleLine(char *matchstr, unsigned long style); +static void CloseStyles(void); + static void OpenSysMenu(void); static void AddSysMenuLine(char *matchstr, char *menuname, int pos); static void CloseSysMenu(void); @@ -78,14 +88,19 @@ extern int yylex(void); %union { char *sVal; + unsigned long uVal; int iVal; } -%token NEWLINE MENU LB RB ICONDIRECTORY DEFAULTICON ICONS DEFAULTSYSMENU +%token NEWLINE MENU LB RB ICONDIRECTORY DEFAULTICON ICONS STYLES +%token TOPMOST MAXIMIZE MINIMIZE BOTTOM NOTITLE OUTLINE NOFRAME DEFAULTSYSMENU %token SYSMENU ROOTMENU SEPARATOR ATSTART ATEND EXEC ALWAYSONTOP DEBUG %token RELOAD TRAYICON SILENTEXIT %token STRING +%type group1 +%type group2 +%type stylecombo %type atspot %% @@ -107,6 +122,7 @@ command: defaulticon | icondirectory | menu | icons + | styles | sysmenu | rootmenu | defaultsysmenu @@ -154,6 +170,33 @@ iconlist: iconline icons: ICONS LB {OpenIcons();} newline_or_nada iconlist RB {CloseIcons();} ; +group1: TOPMOST { $$=STYLE_TOPMOST; } + | MAXIMIZE { $$=STYLE_MAXIMIZE; } + | MINIMIZE { $$=STYLE_MINIMIZE; } + | BOTTOM { $$=STYLE_BOTTOM; } + ; + +group2: NOTITLE { $$=STYLE_NOTITLE; } + | OUTLINE { $$=STYLE_OUTLINE; } + | NOFRAME { $$=STYLE_NOFRAME; } + ; + +stylecombo: group1 { $$=$1; } + | group2 { $$=$1; } + | group1 group2 { $$=$1|$2; } + | group2 group1 { $$=$1|$2; } + ; + +styleline: STRING stylecombo NEWLINE newline_or_nada { AddStyleLine($1, $2); free($1); } + ; + +stylelist: styleline + | styleline stylelist + ; + +styles: STYLES LB {OpenStyles();} newline_or_nada stylelist RB {CloseStyles();} + ; + atspot: { $$=AT_END; } | ATSTART { $$=AT_START; } | ATEND { $$=AT_END; } @@ -315,6 +358,39 @@ CloseIcons (void) { } +static void +OpenStyles (void) +{ + if (pref.style != NULL) { + ErrorF("LoadPreferences: Redefining window style\n"); + free(pref.style); + pref.style = NULL; + } + pref.styleItems = 0; +} + +static void +AddStyleLine (char *matchstr, unsigned long style) +{ + if (pref.style==NULL) + pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM)); + else + pref.style = (STYLEITEM*) + realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1)); + + strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX); + pref.style[pref.styleItems].match[MENU_MAX] = 0; + + pref.style[pref.styleItems].type = style; + + pref.styleItems++; +} + +static void +CloseStyles (void) +{ +} + static void OpenSysMenu (void) { diff --git a/xorg-server/hw/xwin/winprocarg.c b/xorg-server/hw/xwin/winprocarg.c index 7139cbaab..f20598db9 100644 --- a/xorg-server/hw/xwin/winprocarg.c +++ b/xorg-server/hw/xwin/winprocarg.c @@ -31,9 +31,9 @@ from The Open Group. #endif #ifdef XVENDORNAME #define VENDOR_STRING XVENDORNAME -#define VERSION_STRING XORG_RELEASE #define VENDOR_CONTACT BUILDERADDR #endif +#include <../xfree86/common/xorgVersion.h> #include "win.h" #include "winconfig.h" #include "winprefs.h" @@ -1369,16 +1369,6 @@ ddxProcessArgument (int argc, char *argv[], int i) } #endif -#ifdef XKB - /* - * Look for the '-kb' argument - */ - if (IS_OPTION ("-kb")) - { - g_cmdline.noXkbExtension = TRUE; - return 0; /* Let DIX parse this again */ - } - if (IS_OPTION ("-xkbrules")) { CHECK_ARGS (1); @@ -1409,7 +1399,6 @@ ddxProcessArgument (int argc, char *argv[], int i) g_cmdline.xkbOptions = argv[++i]; return 2; } -#endif if (IS_OPTION ("-keyhook")) { @@ -1459,13 +1448,13 @@ winLogCommandLine (int argc, char *argv[]) for (i = 0, iCurrLen = 0; i < argc; ++i) if (argv[i]) { - /* Add a character for lines that overflow */ + /* Adds two characters for lines that overflow */ if ((strlen (argv[i]) < CHARS_PER_LINE && iCurrLen + strlen (argv[i]) > CHARS_PER_LINE) || strlen (argv[i]) > CHARS_PER_LINE) { iCurrLen = 0; - ++iSize; + iSize += 2; } /* Add space for item and trailing space */ @@ -1495,7 +1484,7 @@ winLogCommandLine (int argc, char *argv[]) iCurrLen = 0; /* Add line break if it fits */ - strncat (g_pszCommandLine, "\n", iSize - strlen (g_pszCommandLine)); + strncat (g_pszCommandLine, "\n ", iSize - strlen (g_pszCommandLine)); } strncat (g_pszCommandLine, argv[i], iSize - strlen (g_pszCommandLine)); @@ -1525,7 +1514,7 @@ winLogVersionInfo (void) ErrorF ("Welcome to the XWin X Server\n"); ErrorF ("Vendor: %s\n", VENDOR_STRING); - ErrorF ("Release: %s\n\n", VERSION_STRING); + ErrorF ("Release: %d.%d.%d.%d (%d)\n\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT); ErrorF ("Contact: %s\n\n", VENDOR_CONTACT); } diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c index 512109500..eab0c6ccf 100644 --- a/xorg-server/hw/xwin/winscrinit.c +++ b/xorg-server/hw/xwin/winscrinit.c @@ -37,7 +37,6 @@ #endif #include "win.h" #include "winmsg.h" -#include "safeAlpha.h" #ifdef XWIN_MULTIWINDOWEXTWM @@ -245,6 +244,25 @@ winScreenInit (int index, return TRUE; } +static Bool +winCreateScreenResources(ScreenPtr pScreen) +{ + winScreenPriv(pScreen); + Bool result; + + result = pScreenPriv->pwinCreateScreenResources(pScreen); + + /* Now the screen bitmap has been wrapped in a pixmap, + add that to the Shadow framebuffer */ + if (!shadowAdd(pScreen, pScreen->devPrivate, + pScreenPriv->pwinShadowUpdate, NULL, 0, 0)) + { + ErrorF ("winCreateScreenResources - shadowAdd () failed\n"); + return FALSE; + } + + return result; +} /* See Porting Layer Definition - p. 20 */ Bool @@ -360,22 +378,6 @@ winFinishScreenInitFB (int index, pScreen->blockData = pScreen; pScreen->wakeupData = pScreen; -#ifdef XWIN_MULTIWINDOWEXTWM - /* - * Setup acceleration for multi-window external window manager mode. - * To be compatible with the Damage extension, this must be done - * before calling miDCInitialize, which calls DamageSetup. - */ - if (pScreenInfo->fMWExtWM) - { - if (!RootlessAccelInit (pScreen)) - { - ErrorF ("winFinishScreenInitFB - RootlessAccelInit () failed\n"); - return FALSE; - } - } -#endif - #ifdef RENDER /* Render extension initialization, calls miPictureInit */ if (!fbPictureInit (pScreen, NULL, 0)) @@ -428,15 +430,18 @@ winFinishScreenInitFB (int index, ) { #if CYGDEBUG - winDebug ("winFinishScreenInitFB - Calling shadowInit ()\n"); + winDebug ("winFinishScreenInitFB - Calling shadowSetup ()\n"); #endif - if (!shadowInit (pScreen, - pScreenPriv->pwinShadowUpdate, - NULL)) + if (!shadowSetup(pScreen)) { - ErrorF ("winFinishScreenInitFB - shadowInit () failed\n"); + ErrorF ("winFinishScreenInitFB - shadowSetup () failed\n"); return FALSE; } + + /* Wrap CreateScreenResources so we can add the screen pixmap + to the Shadow framebuffer after it's been created */ + pScreenPriv->pwinCreateScreenResources = pScreen->CreateScreenResources; + pScreen->CreateScreenResources = winCreateScreenResources; } #ifdef XWIN_MULTIWINDOWEXTWM diff --git a/xorg-server/hw/xwin/winshaddd.c b/xorg-server/hw/xwin/winshaddd.c index a2c1dc9b0..833444177 100644 --- a/xorg-server/hw/xwin/winshaddd.c +++ b/xorg-server/hw/xwin/winshaddd.c @@ -42,7 +42,7 @@ */ extern HWND g_hDlgExit; - +extern char *g_pszLogFile; /* * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly, @@ -361,7 +361,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) { ErrorF ("winAllocateFBShadowDD - Changing video mode\n"); - /* Change the video mode to the mode requested */ + /* Change the video mode to the mode requested, and use the driver default refresh rate on failure */ ddrval = IDirectDraw2_SetDisplayMode (pScreenPriv->pdd2, pScreenInfo->dwWidth, pScreenInfo->dwHeight, @@ -373,7 +373,20 @@ winAllocateFBShadowDD (ScreenPtr pScreen) ErrorF ("winAllocateFBShadowDD - Could not set "\ "full screen display mode: %08x\n", (unsigned int) ddrval); - return FALSE; + ErrorF ("winAllocateFBShadowDD - Using default driver refresh rate\n"); + ddrval = IDirectDraw2_SetDisplayMode (pScreenPriv->pdd2, + pScreenInfo->dwWidth, + pScreenInfo->dwHeight, + pScreenInfo->dwBPP, + 0, + 0); + if (FAILED(ddrval)) + { + ErrorF ("winAllocateFBShadowDD - Could not set default refresh rate " + "full screen display mode: %08x\n", + (unsigned int) ddrval); + return FALSE; + } } } else @@ -508,7 +521,7 @@ winShadowUpdateDD (ScreenPtr pScreen, { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; - RegionPtr damage = &pBuf->damage; + RegionPtr damage = shadowDamage(pBuf); HRESULT ddrval = DD_OK; RECT rcDest, rcSrc; POINT ptOrigin; @@ -534,7 +547,7 @@ winShadowUpdateDD (ScreenPtr pScreen, ddrval = IDirectDrawSurface2_Unlock (pScreenPriv->pddsShadow, NULL); if (FAILED (ddrval)) { - ErrorF ("winShadowUpdateProcDD - Unlock failed\n"); + ErrorF ("winShadowUpdateDD - Unlock failed\n"); return; } @@ -626,19 +639,19 @@ winShadowUpdateDD (ScreenPtr pScreen, NULL); if (FAILED (ddrval)) { - ErrorF ("winShadowUpdateProcDD - Lock failed\n"); + ErrorF ("winShadowUpdateDD - Lock failed\n"); return; } /* Has our memory pointer changed? */ if (pScreenInfo->pfb != pScreenPriv->pddsdShadow->lpSurface) { - ErrorF ("winShadowUpdateProcDD - Memory location of the shadow " + ErrorF ("winShadowUpdateDD - Memory location of the shadow " "surface has changed, trying to update the root window " "pixmap header to point to the new address. If you get " "this message and "PROJECT_NAME" freezes or crashes " "after this message then send a problem report and your " - "/tmp/XWin.log file to cygwin-xfree@cygwin.com\n"); + "%s file to " BUILDERADDR, g_pszLogFile); /* Location of shadow framebuffer has changed */ pScreenInfo->pfb = pScreenPriv->pddsdShadow->lpSurface; @@ -653,7 +666,7 @@ winShadowUpdateDD (ScreenPtr pScreen, pScreenInfo->dwBPP), pScreenInfo->pfb)) { - ErrorF ("winShadowUpdateProcDD - Bits changed, could not " + ErrorF ("winShadowUpdateDD - Bits changed, could not " "notify fb.\n"); return; } diff --git a/xorg-server/hw/xwin/winshadddnl.c b/xorg-server/hw/xwin/winshadddnl.c index 47cc382e9..ef5c21469 100644 --- a/xorg-server/hw/xwin/winshadddnl.c +++ b/xorg-server/hw/xwin/winshadddnl.c @@ -391,7 +391,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) { winDebug ("winAllocateFBShadowDDNL - Changing video mode\n"); - /* Change the video mode to the mode requested */ + /* Change the video mode to the mode requested, and use the driver default refresh rate on failure */ ddrval = IDirectDraw4_SetDisplayMode (pScreenPriv->pdd4, pScreenInfo->dwWidth, pScreenInfo->dwHeight, @@ -403,7 +403,20 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) ErrorF ("winAllocateFBShadowDDNL - Could not set " "full screen display mode: %08x\n", (unsigned int) ddrval); - return FALSE; + ErrorF ("winAllocateFBShadowDDNL - Using default driver refresh rate\n"); + ddrval = IDirectDraw4_SetDisplayMode (pScreenPriv->pdd4, + pScreenInfo->dwWidth, + pScreenInfo->dwHeight, + pScreenInfo->dwBPP, + 0, + 0); + if (FAILED(ddrval)) + { + ErrorF ("winAllocateFBShadowDDNL - Could not set default refresh rate " + "full screen display mode: %08x\n", + (unsigned int) ddrval); + return FALSE; + } } } else @@ -584,7 +597,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen, { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; - RegionPtr damage = &pBuf->damage; + RegionPtr damage = shadowDamage(pBuf); HRESULT ddrval = DD_OK; RECT rcDest, rcSrc; POINT ptOrigin; @@ -1310,7 +1323,7 @@ winStoreColorsShadowDDNL (ColormapPtr pColormap, + pdefs[0].pixel); if (FAILED (ddrval)) { - ErrorF ("winStoreColorsShadowDDNL - SetEntries () failed: %08x\n", ddrval); + ErrorF ("winStoreColorsShadowDDNL - SetEntries () failed: %08x\n", (unsigned int) ddrval); return FALSE; } diff --git a/xorg-server/hw/xwin/winshadgdi.c b/xorg-server/hw/xwin/winshadgdi.c index 04cc2f716..d38e4f76b 100644 --- a/xorg-server/hw/xwin/winshadgdi.c +++ b/xorg-server/hw/xwin/winshadgdi.c @@ -498,7 +498,7 @@ winShadowUpdateGDI (ScreenPtr pScreen, { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; - RegionPtr damage = &pBuf->damage; + RegionPtr damage = shadowDamage(pBuf); DWORD dwBox = REGION_NUM_RECTS (damage); BoxPtr pBox = REGION_RECTS (damage); int x, y, w, h; diff --git a/xorg-server/hw/xwin/wintrayicon.c b/xorg-server/hw/xwin/wintrayicon.c index 054a8e956..895b47caf 100644 --- a/xorg-server/hw/xwin/wintrayicon.c +++ b/xorg-server/hw/xwin/wintrayicon.c @@ -51,7 +51,7 @@ winInitNotifyIcon (winPrivScreenPtr pScreenPriv) nid.uID = pScreenInfo->dwScreen; nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; nid.uCallbackMessage = WM_TRAYICON; - nid.hIcon = (HICON)winTaskbarIcon (); + nid.hIcon = winTaskbarIcon (); /* Save handle to the icon so it can be freed later */ pScreenPriv->hiconNotifyIcon = nid.hIcon; @@ -59,7 +59,7 @@ winInitNotifyIcon (winPrivScreenPtr pScreenPriv) /* Set display and screen-specific tooltip text */ snprintf (nid.szTip, sizeof (nid.szTip), - PROJECT_NAME " Server - %s:%d", + PROJECT_NAME " Server:%s.%d", display, (int) pScreenInfo->dwScreen); diff --git a/xorg-server/hw/xwin/winwin32rootless.c b/xorg-server/hw/xwin/winwin32rootless.c index 6f4e2c97e..c225a4495 100644 --- a/xorg-server/hw/xwin/winwin32rootless.c +++ b/xorg-server/hw/xwin/winwin32rootless.c @@ -38,7 +38,7 @@ #include "win.h" #include #define _WINDOWSWM_SERVER_ -#include "windowswmstr.h" +#include #include "dixevents.h" #include "winmultiwindowclass.h" #include "winprefs.h" @@ -49,11 +49,15 @@ * Constant defines */ -#define MOUSE_POLLING_INTERVAL 500 - +#ifndef ULW_COLORKEY #define ULW_COLORKEY 0x00000001 +#endif +#ifndef ULW_ALPHA #define ULW_ALPHA 0x00000002 +#endif +#ifndef ULW_OPAQUE #define ULW_OPAQUE 0x00000004 +#endif #define AC_SRC_ALPHA 0x01 /* @@ -70,9 +74,6 @@ winMWExtWMSetNativeProperty (RootlessWindowPtr pFrame); Bool g_fNoConfigureWindow = FALSE; - -extern void winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon); - /* * Internal function to get the DIB format that is compatible with the screen * Fixme: Share code with winshadgdi.c @@ -397,9 +398,9 @@ winMWExtWMDestroyFrame (RootlessFrameID wid) #endif /* Store the info we need to destroy after this window is gone */ - hInstance = (HINSTANCE) GetClassLong (pRLWinPriv->hWnd, GCL_HMODULE); - hiconClass = (HICON) GetClassLong (pRLWinPriv->hWnd, GCL_HICON); - hiconSmClass = (HICON) GetClassLong (pRLWinPriv->hWnd, GCL_HICONSM); + hInstance = (HINSTANCE) GetClassLongPtr (pRLWinPriv->hWnd, GCLP_HMODULE); + hiconClass = (HICON) GetClassLongPtr (pRLWinPriv->hWnd, GCLP_HICON); + hiconSmClass = (HICON) GetClassLongPtr (pRLWinPriv->hWnd, GCLP_HICONSM); iReturn = GetClassName (pRLWinPriv->hWnd, pszClass, CLASS_NAME_LENGTH); pRLWinPriv->fClose = TRUE; diff --git a/xorg-server/hw/xwin/winwin32rootlesswindow.c b/xorg-server/hw/xwin/winwin32rootlesswindow.c index dedcd7a76..2b2f63010 100644 --- a/xorg-server/hw/xwin/winwin32rootlesswindow.c +++ b/xorg-server/hw/xwin/winwin32rootlesswindow.c @@ -165,7 +165,7 @@ winMWExtWMUpdateIcon (Window id) HICON hIcon, hiconOld; pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW); - hIcon = (HICON)winOverrideIcon ((unsigned long)pWin); + hIcon = winOverrideIcon ((unsigned long)pWin); if (!hIcon) hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXICON)); @@ -177,12 +177,12 @@ winMWExtWMUpdateIcon (Window id) if (pRLWinPriv->hWnd) { - hiconOld = (HICON) SetClassLong (pRLWinPriv->hWnd, - GCL_HICON, - (int) hIcon); - + + hiconOld = (HICON) SendMessage (pRLWinPriv->hWnd, + WM_SETICON, ICON_BIG, (LPARAM) hIcon); winDestroyIcon(hiconOld); } + hIcon=NULL; } } diff --git a/xorg-server/hw/xwin/winwin32rootlesswndproc.c b/xorg-server/hw/xwin/winwin32rootlesswndproc.c index 32db6621b..4d7afee42 100644 --- a/xorg-server/hw/xwin/winwin32rootlesswndproc.c +++ b/xorg-server/hw/xwin/winwin32rootlesswndproc.c @@ -35,7 +35,7 @@ #include "win.h" #include #define _WINDOWSWM_SERVER_ -#include "windowswmstr.h" +#include #include "dixevents.h" #include "propertyst.h" #include @@ -48,7 +48,6 @@ * Constant defines */ -#define MOUSE_POLLING_INTERVAL 500 #define MOUSE_ACTIVATE_DEFAULT TRUE #define RAISE_ON_CLICK_DEFAULT FALSE @@ -571,9 +570,9 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, } /* Deliver absolute cursor position to X Server */ - miPointerAbsoluteCursor (ptMouse.x - pScreenInfo->dwXOffset, - ptMouse.y - pScreenInfo->dwYOffset, - g_c32LastInputEventTime = GetTickCount ()); + winEnqueueMotion(ptMouse.x - pScreenInfo->dwXOffset, + ptMouse.y - pScreenInfo->dwYOffset); + return 0; case WM_NCMOUSEMOVE: @@ -784,6 +783,17 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, SendMessage (hwndScreen, message, wParam, lParam); return 0; + case WM_ERASEBKGND: +#if CYGDEBUG + winDebug ("winMWExtWMWindowProc - WM_ERASEBKGND\n"); +#endif + /* + * Pretend that we did erase the background but we don't care, + * since we repaint the entire region anyhow + * This avoids some flickering when resizing. + */ + return TRUE; + case WM_PAINT: /* BeginPaint gives us an hdc that clips to the invalidated region */ diff --git a/xorg-server/hw/xwin/winwindow.c b/xorg-server/hw/xwin/winwindow.c index 285a344f7..0e75a2c6a 100644 --- a/xorg-server/hw/xwin/winwindow.c +++ b/xorg-server/hw/xwin/winwindow.c @@ -350,7 +350,6 @@ winPositionWindowRootless (WindowPtr pWin, int x, int y) { Bool fResult = FALSE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); @@ -376,7 +375,6 @@ winChangeWindowAttributesRootless (WindowPtr pWin, unsigned long mask) { Bool fResult = FALSE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -434,7 +432,6 @@ winMapWindowRootless (WindowPtr pWin) { Bool fResult = FALSE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -457,7 +454,6 @@ void winSetShapeRootless (WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG diff --git a/xorg-server/hw/xwin/winwindow.h b/xorg-server/hw/xwin/winwindow.h index 9c49d6482..86c094334 100644 --- a/xorg-server/hw/xwin/winwindow.h +++ b/xorg-server/hw/xwin/winwindow.h @@ -2,6 +2,7 @@ #define _WINWINDOW_H_ /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + *Copyright (C) Colin Harrison 2005-2009 * *Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -28,6 +29,7 @@ *from the XFree86 Project. * * Authors: Kensuke Matsuzaki + * Colin Harrison */ #ifndef NO @@ -42,8 +44,8 @@ # define PROJECT_NAME "Cygwin/X" #endif #define WINDOW_CLASS "cygwin/x" -#define WINDOW_TITLE PROJECT_NAME " - %s:%d" -#define WINDOW_TITLE_XDMCP PROJECT_NAME " - %s" +#define WINDOW_TITLE PROJECT_NAME ":%s.%d" +#define WINDOW_TITLE_XDMCP "%s:%s.%d" #define WIN_SCR_PROP "cyg_screen_prop rl" #define WINDOW_CLASS_X "cygwin/x X rl" #define WINDOW_TITLE_X PROJECT_NAME " X" @@ -60,6 +62,8 @@ #define CYGWINDOWING_DEBUG NO #endif +#define XMING_SIGNATURE 0x12345678L + typedef struct _winPrivScreenRec *winPrivScreenPtr; @@ -111,9 +115,25 @@ typedef struct _winWMMessageRec{ #define WM_WM_NAME_EVENT (WM_USER + 9) #define WM_WM_HINTS_EVENT (WM_USER + 10) #define WM_WM_CHANGE_STATE (WM_USER + 11) +#define WM_WM_MAP2 (WM_USER + 12) +#define WM_WM_MAP3 (WM_USER + 13) #define WM_MANAGE (WM_USER + 100) #define WM_UNMANAGE (WM_USER + 102) +#define MwmHintsDecorations (1L << 1) + +#define MwmDecorAll (1l << 0) +#define MwmDecorBorder (1l << 1) +#define MwmDecorHandle (1l << 2) +#define MwmDecorTitle (1l << 3) + +/* This structure only contains 3 elements... the Motif 2.0 structure +contains 5... we only need the first 3... so that is all we will define */ +typedef struct MwmHints { + unsigned long flags, functions, decorations; +} MwmHints; +#define PropMwmHintsElements 3 + void winSendMessageToWM (void *pWMInfo, winWMMessagePtr msg); diff --git a/xorg-server/hw/xwin/winwindowswm.c b/xorg-server/hw/xwin/winwindowswm.c index 28bcb64c8..61972c932 100644 --- a/xorg-server/hw/xwin/winwindowswm.c +++ b/xorg-server/hw/xwin/winwindowswm.c @@ -31,8 +31,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include "win.h" -#define NEED_REPLIES -#define NEED_EVENTS #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -42,7 +40,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "servermd.h" #include "swaprep.h" #define _WINDOWSWM_SERVER_ -#include "windowswmstr.h" +#include static int WMErrorBase; @@ -52,7 +50,7 @@ static DISPATCH_PROC(SProcWindowsWMDispatch); static unsigned char WMReqCode = 0; static int WMEventBase = 0; -static RESTYPE ClientType, EventType; /* resource types for event masks */ +static RESTYPE ClientType, eventResourceType; /* resource types for event masks */ static XID eventResource; /* Currently selected events */ @@ -87,10 +85,10 @@ winWindowsWMExtensionInit () ExtensionEntry* extEntry; ClientType = CreateNewResourceType(WMFreeClient); - EventType = CreateNewResourceType(WMFreeEvents); + eventResourceType = CreateNewResourceType(WMFreeEvents); eventResource = FakeClientID(0); - if (ClientType && EventType && + if (ClientType && eventResourceType && (extEntry = AddExtension(WINDOWSWMNAME, WindowsWMNumberEvents, WindowsWMNumberErrors, @@ -149,7 +147,7 @@ WMFreeClient (pointer data, XID id) WMEventPtr *pHead, pCur, pPrev; pEvent = (WMEventPtr) data; - pHead = (WMEventPtr *) LookupIDByType(eventResource, EventType); + pHead = (WMEventPtr *) LookupIDByType(eventResource, eventResourceType); if (pHead) { pPrev = 0; @@ -195,7 +193,7 @@ ProcWindowsWMSelectInput (register ClientPtr client) REQUEST_SIZE_MATCH (xWindowsWMSelectInputReq); pHead = (WMEventPtr *)SecurityLookupIDByType(client, eventResource, - EventType, DixWriteAccess); + eventResourceType, DixWriteAccess); if (stuff->mask != 0) { if (pHead) @@ -237,7 +235,7 @@ ProcWindowsWMSelectInput (register ClientPtr client) { pHead = (WMEventPtr *) xalloc (sizeof (WMEventPtr)); if (!pHead || - !AddResource (eventResource, EventType, (pointer)pHead)) + !AddResource (eventResource, eventResourceType, (pointer)pHead)) { FreeResource (clientResource, RT_NONE); return BadAlloc; @@ -295,7 +293,7 @@ winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg, ErrorF ("winWindowsWMSendEvent %d %d %d %d, %d %d - %d %d\n", type, mask, which, arg, x, y, w, h); #endif - pHead = (WMEventPtr *) LookupIDByType(eventResource, EventType); + pHead = (WMEventPtr *) LookupIDByType(eventResource, eventResourceType); if (!pHead) return; for (pEvent = *pHead; pEvent; pEvent = pEvent->next) diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c index 29ea81fc1..d72a5f135 100644 --- a/xorg-server/hw/xwin/winwndproc.c +++ b/xorg-server/hw/xwin/winwndproc.c @@ -42,12 +42,6 @@ #include "winmsg.h" #include "inputstr.h" -#ifdef XKB -extern BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam); -#endif -extern void winFixShiftKeys (int iScanCode); - - /* * Global variables */ @@ -724,8 +718,8 @@ winWindowProc (HWND hwnd, UINT message, break; /* Has the mouse pointer crossed screens? */ - if (s_pScreen != miPointerGetScreen(inputInfo.pointer)) - miPointerSetScreen (inputInfo.pointer, s_pScreenInfo->dwScreen, + if (s_pScreen != miPointerGetScreen(g_pwinPointer)) + miPointerSetScreen (g_pwinPointer, s_pScreenInfo->dwScreen, GET_X_LPARAM(lParam)-s_pScreenInfo->dwXOffset, GET_Y_LPARAM(lParam)-s_pScreenInfo->dwYOffset); @@ -764,9 +758,8 @@ winWindowProc (HWND hwnd, UINT message, } /* Deliver absolute cursor position to X Server */ - miPointerAbsoluteCursor (GET_X_LPARAM(lParam)-s_pScreenInfo->dwXOffset, - GET_Y_LPARAM(lParam)-s_pScreenInfo->dwYOffset, - g_c32LastInputEventTime = GetTickCount ()); + winEnqueueMotion(GET_X_LPARAM(lParam)-s_pScreenInfo->dwXOffset, + GET_Y_LPARAM(lParam)-s_pScreenInfo->dwYOffset); return 0; case WM_NCMOUSEMOVE: @@ -929,8 +922,7 @@ winWindowProc (HWND hwnd, UINT message, point.y -= GetSystemMetrics (SM_YVIRTUALSCREEN); /* Deliver absolute cursor position to X Server */ - miPointerAbsoluteCursor (point.x, point.y, - g_c32LastInputEventTime = GetTickCount()); + winEnqueueMotion(point.x , point.y); /* Check if a button was released but we didn't see it */ GetCursorPos (&point); @@ -1033,12 +1025,10 @@ winWindowProc (HWND hwnd, UINT message, if ((wParam == VK_LWIN || wParam == VK_RWIN) && !g_fKeyboardHookLL) break; -#ifdef XKB /* * Discard presses generated from Windows auto-repeat - * ago: Only discard them if XKB is not disabled */ - if (!g_winInfo.xkb.disable && (lParam & (1<<30))) + if (lParam & (1<<30)) { switch (wParam) { @@ -1054,7 +1044,6 @@ winWindowProc (HWND hwnd, UINT message, return 0; } } -#endif /* Discard fake Ctrl_L presses that precede AltGR on non-US keyboards */ if (winIsFakeCtrl_L (message, wParam, lParam)) diff --git a/xorg-server/include/Makefile.am b/xorg-server/include/Makefile.am index cb0b2934c..f8eef53e1 100644 --- a/xorg-server/include/Makefile.am +++ b/xorg-server/include/Makefile.am @@ -17,6 +17,7 @@ sdk_HEADERS = \ dixfontstr.h \ dixgrabs.h \ dixstruct.h \ + events.h \ exevents.h \ extension.h \ extinit.h \ @@ -63,4 +64,5 @@ endif AM_CFLAGS = $(DIX_CFLAGS) EXTRA_DIST = \ - dix-config-apple-verbatim.h + dix-config-apple-verbatim.h \ + eventconvert.h eventstr.h diff --git a/xorg-server/include/Makefile.in b/xorg-server/include/Makefile.in index 6aff39ff4..76587e409 100644 --- a/xorg-server/include/Makefile.in +++ b/xorg-server/include/Makefile.in @@ -38,16 +38,21 @@ subdir = include DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/dix-config.h.in \ $(srcdir)/do-not-use-config.h.in $(srcdir)/kdrive-config.h.in \ - $(srcdir)/xkb-config.h.in $(srcdir)/xorg-config.h.in \ - $(srcdir)/xorg-server.h.in $(srcdir)/xwin-config.h.in + $(srcdir)/version-config.h.in $(srcdir)/xkb-config.h.in \ + $(srcdir)/xorg-config.h.in $(srcdir)/xorg-server.h.in \ + $(srcdir)/xwin-config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = do-not-use-config.h xorg-server.h dix-config.h \ - xorg-config.h xkb-config.h xwin-config.h kdrive-config.h + xorg-config.h xkb-config.h xwin-config.h kdrive-config.h \ + version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -77,9 +82,9 @@ am__installdirs = "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)" am__sdk_HEADERS_DIST = XIstubs.h bstore.h bstorestr.h closestr.h \ closure.h colormap.h colormapst.h hotplug.h cursor.h \ cursorstr.h dix.h dixaccess.h dixevents.h dixfont.h \ - dixfontstr.h dixgrabs.h dixstruct.h exevents.h extension.h \ - extinit.h extnsionst.h gc.h gcstruct.h globals.h input.h \ - inputstr.h misc.h miscstruct.h opaque.h os.h pixmap.h \ + dixfontstr.h dixgrabs.h dixstruct.h events.h exevents.h \ + extension.h extinit.h extnsionst.h gc.h gcstruct.h globals.h \ + input.h inputstr.h misc.h miscstruct.h opaque.h os.h pixmap.h \ pixmapstr.h privates.h property.h propertyst.h ptrveloc.h \ region.h regionstr.h registry.h resource.h rgb.h screenint.h \ scrnintstr.h selection.h servermd.h site.h swaprep.h swapreq.h \ @@ -94,6 +99,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -114,9 +120,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -145,7 +154,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -154,9 +165,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -195,12 +210,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -220,7 +236,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -230,6 +245,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -243,11 +259,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -283,6 +298,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -307,7 +323,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -330,6 +345,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -361,7 +377,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -385,6 +403,7 @@ top_srcdir = @top_srcdir@ @XORG_TRUE@ dixfontstr.h \ @XORG_TRUE@ dixgrabs.h \ @XORG_TRUE@ dixstruct.h \ +@XORG_TRUE@ events.h \ @XORG_TRUE@ exevents.h \ @XORG_TRUE@ extension.h \ @XORG_TRUE@ extinit.h \ @@ -428,9 +447,10 @@ top_srcdir = @top_srcdir@ @XORG_TRUE@nodist_sdk_HEADERS = xorg-server.h AM_CFLAGS = $(DIX_CFLAGS) EXTRA_DIST = \ - dix-config-apple-verbatim.h + dix-config-apple-verbatim.h \ + eventconvert.h eventstr.h -all: do-not-use-config.h xorg-server.h dix-config.h xorg-config.h xkb-config.h xwin-config.h kdrive-config.h +all: do-not-use-config.h xorg-server.h dix-config.h xorg-config.h xkb-config.h xwin-config.h kdrive-config.h version-config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: @@ -539,8 +559,18 @@ stamp-h7: $(srcdir)/kdrive-config.h.in $(top_builddir)/config.status @rm -f stamp-h7 cd $(top_builddir) && $(SHELL) ./config.status include/kdrive-config.h +version-config.h: stamp-h8 + @if test ! -f $@; then \ + rm -f stamp-h8; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h8; \ + else :; fi + +stamp-h8: $(srcdir)/version-config.h.in $(top_builddir)/config.status + @rm -f stamp-h8 + cd $(top_builddir) && $(SHELL) ./config.status include/version-config.h + distclean-hdr: - -rm -f do-not-use-config.h stamp-h1 xorg-server.h stamp-h2 dix-config.h stamp-h3 xorg-config.h stamp-h4 xkb-config.h stamp-h5 xwin-config.h stamp-h6 kdrive-config.h stamp-h7 + -rm -f do-not-use-config.h stamp-h1 xorg-server.h stamp-h2 dix-config.h stamp-h3 xorg-config.h stamp-h4 xkb-config.h stamp-h5 xwin-config.h stamp-h6 kdrive-config.h stamp-h7 version-config.h stamp-h8 mostlyclean-libtool: -rm -f *.lo @@ -598,11 +628,11 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in $(TAGS_DEPENDENCIES) \ +TAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in version-config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in $(LISP) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in version-config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ @@ -620,9 +650,9 @@ TAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config. fi; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in $(TAGS_DEPENDENCIES) \ +CTAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in version-config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in $(LISP) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in version-config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ @@ -674,7 +704,7 @@ check-am: all-am check: check-am all-am: Makefile $(HEADERS) do-not-use-config.h xorg-server.h \ dix-config.h xorg-config.h xkb-config.h xwin-config.h \ - kdrive-config.h + kdrive-config.h version-config.h installdirs: for dir in "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ diff --git a/xorg-server/include/XIstubs.h b/xorg-server/include/XIstubs.h index 6797e0732..ba2f861cd 100644 --- a/xorg-server/include/XIstubs.h +++ b/xorg-server/include/XIstubs.h @@ -26,27 +26,27 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef XI_STUBS_H #define XI_STUBS_H 1 -void +extern _X_EXPORT void CloseInputDevice ( DeviceIntPtr /* d */, ClientPtr /* client */); -void +extern _X_EXPORT void AddOtherInputDevices (void); -void +extern _X_EXPORT void OpenInputDevice ( DeviceIntPtr /* dev */, ClientPtr /* client */, int * /* status */); -int +extern _X_EXPORT int SetDeviceMode ( ClientPtr /* client */, DeviceIntPtr /* dev */, int /* mode */); -int +extern _X_EXPORT int SetDeviceValuators ( ClientPtr /* client */, DeviceIntPtr /* dev */, @@ -54,7 +54,7 @@ SetDeviceValuators ( int /* first_valuator */, int /* num_valuators */); -int +extern _X_EXPORT int ChangeDeviceControl ( ClientPtr /* client */, DeviceIntPtr /* dev */, diff --git a/xorg-server/include/closestr.h b/xorg-server/include/closestr.h index 8855a5f93..2cd67b1d3 100644 --- a/xorg-server/include/closestr.h +++ b/xorg-server/include/closestr.h @@ -30,7 +30,6 @@ from The Open Group. #ifndef CLOSESTR_H #define CLOSESTR_H -#define NEED_REPLIES #include #include "closure.h" #include "dix.h" diff --git a/xorg-server/include/colormap.h b/xorg-server/include/colormap.h index 8513c0a09..a3467c93f 100644 --- a/xorg-server/include/colormap.h +++ b/xorg-server/include/colormap.h @@ -76,7 +76,7 @@ typedef struct _CMEntry *EntryPtr; /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */ typedef struct _colorResource *colorResourcePtr; -extern int CreateColormap( +extern _X_EXPORT int CreateColormap( Colormap /*mid*/, ScreenPtr /*pScreen*/, VisualPtr /*pVisual*/, @@ -84,24 +84,24 @@ extern int CreateColormap( int /*alloc*/, int /*client*/); -extern int FreeColormap( +extern _X_EXPORT int FreeColormap( pointer /*pmap*/, XID /*mid*/); -extern int TellLostMap( +extern _X_EXPORT int TellLostMap( WindowPtr /*pwin*/, pointer /* Colormap *pmid */); -extern int TellGainedMap( +extern _X_EXPORT int TellGainedMap( WindowPtr /*pwin*/, pointer /* Colormap *pmid */); -extern int CopyColormapAndFree( +extern _X_EXPORT int CopyColormapAndFree( Colormap /*mid*/, ColormapPtr /*pSrc*/, int /*client*/); -extern int AllocColor( +extern _X_EXPORT int AllocColor( ColormapPtr /*pmap*/, unsigned short* /*pred*/, unsigned short* /*pgreen*/, @@ -109,11 +109,11 @@ extern int AllocColor( Pixel* /*pPix*/, int /*client*/); -extern void FakeAllocColor( +extern _X_EXPORT void FakeAllocColor( ColormapPtr /*pmap*/, xColorItem * /*item*/); -extern void FakeFreeColor( +extern _X_EXPORT void FakeFreeColor( ColormapPtr /*pmap*/, Pixel /*pixel*/); @@ -121,7 +121,7 @@ typedef int (*ColorCompareProcPtr)( EntryPtr /*pent*/, xrgb * /*prgb*/); -extern int FindColor( +extern _X_EXPORT int FindColor( ColormapPtr /*pmap*/, EntryPtr /*pentFirst*/, int /*size*/, @@ -131,17 +131,17 @@ extern int FindColor( int /*client*/, ColorCompareProcPtr /*comp*/); -extern int QueryColors( +extern _X_EXPORT int QueryColors( ColormapPtr /*pmap*/, int /*count*/, Pixel* /*ppixIn*/, xrgb* /*prgbList*/); -extern int FreeClientPixels( +extern _X_EXPORT int FreeClientPixels( pointer /*pcr*/, XID /*fakeid*/); -extern int AllocColorCells( +extern _X_EXPORT int AllocColorCells( int /*client*/, ColormapPtr /*pmap*/, int /*colors*/, @@ -150,7 +150,7 @@ extern int AllocColorCells( Pixel* /*ppix*/, Pixel* /*masks*/); -extern int AllocColorPlanes( +extern _X_EXPORT int AllocColorPlanes( int /*client*/, ColormapPtr /*pmap*/, int /*colors*/, @@ -163,19 +163,19 @@ extern int AllocColorPlanes( Pixel* /*pgmask*/, Pixel* /*pbmask*/); -extern int FreeColors( +extern _X_EXPORT int FreeColors( ColormapPtr /*pmap*/, int /*client*/, int /*count*/, Pixel* /*pixels*/, Pixel /*mask*/); -extern int StoreColors( +extern _X_EXPORT int StoreColors( ColormapPtr /*pmap*/, int /*count*/, xColorItem* /*defs*/); -extern int IsMapInstalled( +extern _X_EXPORT int IsMapInstalled( Colormap /*map*/, WindowPtr /*pWin*/); diff --git a/xorg-server/include/cursor.h b/xorg-server/include/cursor.h index f7c16e3f9..acc95c3b3 100644 --- a/xorg-server/include/cursor.h +++ b/xorg-server/include/cursor.h @@ -64,16 +64,16 @@ struct _DeviceIntRec; typedef struct _Cursor *CursorPtr; typedef struct _CursorMetric *CursorMetricPtr; -extern int cursorScreenDevPriv[MAXSCREENS]; +extern _X_EXPORT int cursorScreenDevPriv[MAXSCREENS]; #define CursorScreenKey(pScreen) (cursorScreenDevPriv + (pScreen)->myNum) -extern CursorPtr rootCursor; +extern _X_EXPORT CursorPtr rootCursor; -extern int FreeCursor( +extern _X_EXPORT int FreeCursor( pointer /*pCurs*/, XID /*cid*/); -extern int AllocARGBCursor( +extern _X_EXPORT int AllocARGBCursor( unsigned char* /*psrcbits*/, unsigned char* /*pmaskbits*/, CARD32* /*argb*/, @@ -88,7 +88,7 @@ extern int AllocARGBCursor( ClientPtr /*client*/, XID /*cid*/); -extern int AllocGlyphCursor( +extern _X_EXPORT int AllocGlyphCursor( Font /*source*/, unsigned int /*sourceChar*/, Font /*mask*/, @@ -103,39 +103,39 @@ extern int AllocGlyphCursor( ClientPtr /*client*/, XID /*cid*/); -extern CursorPtr CreateRootCursor( +extern _X_EXPORT CursorPtr CreateRootCursor( char* /*pfilename*/, unsigned int /*glyph*/); -extern int ServerBitsFromGlyph( +extern _X_EXPORT int ServerBitsFromGlyph( FontPtr /*pfont*/, unsigned int /*ch*/, CursorMetricPtr /*cm*/, unsigned char ** /*ppbits*/); -extern Bool CursorMetricsFromGlyph( +extern _X_EXPORT Bool CursorMetricsFromGlyph( FontPtr /*pfont*/, unsigned /*ch*/, CursorMetricPtr /*cm*/); -extern void CheckCursorConfinement( +extern _X_EXPORT void CheckCursorConfinement( WindowPtr /*pWin*/); -extern void NewCurrentScreen( +extern _X_EXPORT void NewCurrentScreen( struct _DeviceIntRec* /*pDev*/, ScreenPtr /*newScreen*/, int /*x*/, int /*y*/); -extern Bool PointerConfinedToScreen(struct _DeviceIntRec* /* pDev */); +extern _X_EXPORT Bool PointerConfinedToScreen(struct _DeviceIntRec* /* pDev */); -extern void GetSpritePosition( +extern _X_EXPORT void GetSpritePosition( struct _DeviceIntRec* /* pDev */, int * /*px*/, int * /*py*/); #ifdef PANORAMIX -extern int XineramaGetCursorScreen(struct _DeviceIntRec* pDev); +extern _X_EXPORT int XineramaGetCursorScreen(struct _DeviceIntRec* pDev); #endif /* PANORAMIX */ #endif /* CURSOR_H */ diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in index db491ed06..fcb582ff0 100644 --- a/xorg-server/include/dix-config.h.in +++ b/xorg-server/include/dix-config.h.in @@ -124,6 +124,9 @@ /* Have Quartz */ #undef XQUARTZ +/* Support application updating through sparkle. */ +#undef XQUARTZ_SPARKLE + /* Build a standalone xpbproxy */ #undef STANDALONE_XPBPROXY @@ -315,15 +318,6 @@ /* Support Xinerama extension */ #undef XINERAMA -/* Build XKB */ -#undef XKB - -/* Enable XKB per default */ -#undef XKB_DFLT_DISABLED - -/* Build XKB server */ -#undef XKB_IN_SERVER - /* Vendor release */ #undef XORG_RELEASE diff --git a/xorg-server/include/dix.h b/xorg-server/include/dix.h index 9c2c73fb7..49dfe3774 100644 --- a/xorg-server/include/dix.h +++ b/xorg-server/include/dix.h @@ -53,6 +53,7 @@ SOFTWARE. #include "input.h" #include "cursor.h" #include "geext.h" +#include "events.h" #include #define EARLIER -1 @@ -119,15 +120,15 @@ typedef struct _Client *ClientPtr; /* also in misc.h */ typedef struct _WorkQueue *WorkQueuePtr; -extern ClientPtr clients[MAXCLIENTS]; -extern ClientPtr serverClient; -extern int currentMaxClients; -extern char dispatchExceptionAtReset; +extern _X_EXPORT ClientPtr clients[MAXCLIENTS]; +extern _X_EXPORT ClientPtr serverClient; +extern _X_EXPORT int currentMaxClients; +extern _X_EXPORT char dispatchExceptionAtReset; typedef int HWEventQueueType; typedef HWEventQueueType* HWEventQueuePtr; -extern HWEventQueuePtr checkForInput[2]; +extern _X_EXPORT HWEventQueuePtr checkForInput[2]; typedef struct _TimeStamp { CARD32 months; /* really ~49.7 days */ @@ -136,96 +137,95 @@ typedef struct _TimeStamp { /* dispatch.c */ -extern void SetInputCheck( +extern _X_EXPORT void SetInputCheck( HWEventQueuePtr /*c0*/, HWEventQueuePtr /*c1*/); -extern void CloseDownClient( +extern _X_EXPORT void CloseDownClient( ClientPtr /*client*/); -extern void UpdateCurrentTime(void); +extern _X_EXPORT void UpdateCurrentTime(void); -extern void UpdateCurrentTimeIf(void); +extern _X_EXPORT void UpdateCurrentTimeIf(void); -extern int dixDestroyPixmap( +extern _X_EXPORT int dixDestroyPixmap( pointer /*value*/, XID /*pid*/); -extern void InitClient( +extern _X_EXPORT void InitClient( ClientPtr /*client*/, int /*i*/, pointer /*ospriv*/); -extern ClientPtr NextAvailableClient( +extern _X_EXPORT ClientPtr NextAvailableClient( pointer /*ospriv*/); -extern void SendErrorToClient( +extern _X_EXPORT void SendErrorToClient( ClientPtr /*client*/, unsigned int /*majorCode*/, unsigned int /*minorCode*/, XID /*resId*/, int /*errorCode*/); -extern void MarkClientException( +extern _X_EXPORT void MarkClientException( ClientPtr /*client*/); -extern void ddxBeforeReset (void); - +extern _X_HIDDEN Bool CreateConnectionBlock(void); /* dixutils.c */ -extern void CopyISOLatin1Lowered( +extern _X_EXPORT void CopyISOLatin1Lowered( unsigned char * /*dest*/, unsigned char * /*source*/, int /*length*/); -extern int CompareISOLatin1Lowered( +extern _X_EXPORT int CompareISOLatin1Lowered( unsigned char * /*a*/, int alen, unsigned char * /*b*/, int blen); -extern int dixLookupWindow( +extern _X_EXPORT int dixLookupWindow( WindowPtr *result, XID id, ClientPtr client, Mask access_mode); -extern int dixLookupDrawable( +extern _X_EXPORT int dixLookupDrawable( DrawablePtr *result, XID id, ClientPtr client, Mask type_mask, Mask access_mode); -extern int dixLookupGC( +extern _X_EXPORT int dixLookupGC( GCPtr *result, XID id, ClientPtr client, Mask access_mode); -extern int dixLookupClient( +extern _X_EXPORT int dixLookupClient( ClientPtr *result, XID id, ClientPtr client, Mask access_mode); -extern void NoopDDA(void); +extern _X_EXPORT void NoopDDA(void); -extern int AlterSaveSetForClient( +extern _X_EXPORT int AlterSaveSetForClient( ClientPtr /*client*/, WindowPtr /*pWin*/, unsigned /*mode*/, Bool /*toRoot*/, Bool /*map*/); -extern void DeleteWindowFromAnySaveSet( +extern _X_EXPORT void DeleteWindowFromAnySaveSet( WindowPtr /*pWin*/); -extern void BlockHandler( +extern _X_EXPORT void BlockHandler( pointer /*pTimeout*/, pointer /*pReadmask*/); -extern void WakeupHandler( +extern _X_EXPORT void WakeupHandler( int /*result*/, pointer /*pReadmask*/); @@ -240,23 +240,23 @@ typedef void (* WakeupHandlerProcPtr)( int /* result */, pointer /* pReadmask */); -extern Bool RegisterBlockAndWakeupHandlers( +extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers( BlockHandlerProcPtr /*blockHandler*/, WakeupHandlerProcPtr /*wakeupHandler*/, pointer /*blockData*/); -extern void RemoveBlockAndWakeupHandlers( +extern _X_EXPORT void RemoveBlockAndWakeupHandlers( BlockHandlerProcPtr /*blockHandler*/, WakeupHandlerProcPtr /*wakeupHandler*/, pointer /*blockData*/); -extern void InitBlockAndWakeupHandlers(void); +extern _X_EXPORT void InitBlockAndWakeupHandlers(void); -extern void ProcessWorkQueue(void); +extern _X_EXPORT void ProcessWorkQueue(void); -extern void ProcessWorkQueueZombies(void); +extern _X_EXPORT void ProcessWorkQueueZombies(void); -extern Bool QueueWorkProc( +extern _X_EXPORT Bool QueueWorkProc( Bool (* /*function*/)( ClientPtr /*clientUnused*/, pointer /*closure*/), @@ -268,47 +268,47 @@ typedef Bool (* ClientSleepProcPtr)( ClientPtr /*client*/, pointer /*closure*/); -extern Bool ClientSleep( +extern _X_EXPORT Bool ClientSleep( ClientPtr /*client*/, ClientSleepProcPtr /* function */, pointer /*closure*/); #ifndef ___CLIENTSIGNAL_DEFINED___ #define ___CLIENTSIGNAL_DEFINED___ -extern Bool ClientSignal( +extern _X_EXPORT Bool ClientSignal( ClientPtr /*client*/); #endif /* ___CLIENTSIGNAL_DEFINED___ */ -extern void ClientWakeup( +extern _X_EXPORT void ClientWakeup( ClientPtr /*client*/); -extern Bool ClientIsAsleep( +extern _X_EXPORT Bool ClientIsAsleep( ClientPtr /*client*/); /* atom.c */ -extern Atom MakeAtom( - char * /*string*/, +extern _X_EXPORT Atom MakeAtom( + const char * /*string*/, unsigned /*len*/, Bool /*makeit*/); -extern Bool ValidAtom( +extern _X_EXPORT Bool ValidAtom( Atom /*atom*/); -extern char *NameForAtom( +extern _X_EXPORT const char *NameForAtom( Atom /*atom*/); -extern void AtomError(void); +extern _X_EXPORT void AtomError(void); -extern void FreeAllAtoms(void); +extern _X_EXPORT void FreeAllAtoms(void); -extern void InitAtoms(void); +extern _X_EXPORT void InitAtoms(void); /* main.c */ -extern void SetVendorRelease(int release); +extern _X_EXPORT void SetVendorRelease(int release); -extern void SetVendorString(char *string); +extern _X_EXPORT void SetVendorString(char *string); /* events.c */ @@ -317,27 +317,26 @@ extern void SetMaskForEvent( Mask /* mask */, int /* event */); -extern void ConfineToShape( +extern _X_EXPORT void ConfineToShape( DeviceIntPtr /* pDev */, RegionPtr /* shape */, int* /* px */, int* /* py */); -extern Bool IsParent( +extern _X_EXPORT Bool IsParent( WindowPtr /* maybeparent */, WindowPtr /* child */); -extern WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev); +extern _X_EXPORT WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev); -extern WindowPtr GetSpriteWindow(DeviceIntPtr pDev); +extern _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev); -extern void NoticeEventTime(xEventPtr /* xE */); +extern _X_EXPORT void NoticeEventTime(InternalEvent *ev); extern void EnqueueEvent( - xEventPtr /* xE */, - DeviceIntPtr /* device */, - int /* count */); + InternalEvent * /* ev */, + DeviceIntPtr /* device */); extern void ActivatePointerGrab( DeviceIntPtr /* mouse */, @@ -357,39 +356,34 @@ extern void ActivateKeyboardGrab( extern void DeactivateKeyboardGrab( DeviceIntPtr /* keybd */); +extern BOOL ActivateFocusInGrab( + DeviceIntPtr /* dev */, + WindowPtr /* old */, + WindowPtr /* win */); + extern void AllowSome( ClientPtr /* client */, TimeStamp /* time */, DeviceIntPtr /* thisDev */, - int /* newState */, - Bool /* core */); + int /* newState */); extern void ReleaseActiveGrabs( ClientPtr client); -extern int DeliverEventsToWindow( +extern _X_EXPORT int DeliverEventsToWindow( DeviceIntPtr /* pWin */, WindowPtr /* pWin */, xEventPtr /* pEvents */, int /* count */, Mask /* filter */, - GrabPtr /* grab */, - int /* mskidx */); + GrabPtr /* grab */); extern int DeliverDeviceEvents( WindowPtr /* pWin */, - xEventPtr /* xE */, + InternalEvent* /* event */, GrabPtr /* grab */, WindowPtr /* stopAt */, - DeviceIntPtr /* dev */, - int /* count */); - -extern void DefineInitialRootWindow( - WindowPtr /* win */); - -extern void SetupSprite( - DeviceIntPtr /* pDev */, - ScreenPtr /* pScreen */); + DeviceIntPtr /* dev */); extern void InitializeSprite( DeviceIntPtr /* pDev */, @@ -399,37 +393,32 @@ extern void UpdateSpriteForScreen( DeviceIntPtr /* pDev */, ScreenPtr /* pScreen */); -extern void WindowHasNewCursor( +extern _X_EXPORT void WindowHasNewCursor( WindowPtr /* pWin */); extern Bool CheckDeviceGrabs( DeviceIntPtr /* device */, - xEventPtr /* xE */, - int /* checkFirst */, - int /* count */); + DeviceEvent* /* event */, + int /* checkFirst */); extern void DeliverFocusedEvent( DeviceIntPtr /* keybd */, - xEventPtr /* xE */, - WindowPtr /* window */, - int /* count */); + InternalEvent* /* event */, + WindowPtr /* window */); extern void DeliverGrabbedEvent( - xEventPtr /* xE */, + InternalEvent* /* event */, DeviceIntPtr /* thisDev */, - Bool /* deactivateGrab */, - int /* count */); + Bool /* deactivateGrab */); -#ifdef XKB extern void FixKeyState( - xEvent * /* xE */, + DeviceEvent* /* event */, DeviceIntPtr /* keybd */); -#endif /* XKB */ extern void RecalculateDeliverableEvents( WindowPtr /* pWin */); -extern int OtherClientGone( +extern _X_EXPORT int OtherClientGone( pointer /* value */, XID /* id */); @@ -455,15 +444,13 @@ extern int GrabDevice( Window /* grabWindow */, unsigned /* ownerEvents */, Time /* ctime */, - Mask /* mask */, - CARD8 * /* status */, - Bool /* coreGrab */); + GrabMask* /* mask */, + int /* grabtype */, + Cursor /* curs */, + Window /* confineToWin */, + CARD8 * /* status */); extern void InitEvents(void); -extern void InitSprite( - DeviceIntPtr /* pDev */, - Bool /* hasCursor */ - ); extern void CloseDownEvents(void); @@ -478,23 +465,22 @@ extern Mask EventMaskForClient( -extern int DeliverEvents( +extern _X_EXPORT int DeliverEvents( WindowPtr /*pWin*/, xEventPtr /*xE*/, int /*count*/, WindowPtr /*otherParent*/); -extern Bool -CheckMotion( - xEvent* /* xE */, +extern Bool CheckMotion( + DeviceEvent* /* ev */, DeviceIntPtr /* pDev */); -extern void WriteEventsToClient( +extern _X_EXPORT void WriteEventsToClient( ClientPtr /*pClient*/, int /*count*/, xEventPtr /*events*/); -extern int TryClientEvents( +extern _X_EXPORT int TryClientEvents( ClientPtr /*client*/, DeviceIntPtr /* device */, xEventPtr /*pEvents*/, @@ -503,17 +489,16 @@ extern int TryClientEvents( Mask /*filter*/, GrabPtr /*grab*/); -extern void WindowsRestructured(void); +extern _X_EXPORT void WindowsRestructured(void); -extern Bool SetClientPointer( - ClientPtr /* client */, - ClientPtr /* setter */, +extern int SetClientPointer( + ClientPtr /* client */, DeviceIntPtr /* device */); -extern DeviceIntPtr PickPointer( +extern _X_EXPORT DeviceIntPtr PickPointer( ClientPtr /* client */); -extern DeviceIntPtr PickKeyboard( +extern _X_EXPORT DeviceIntPtr PickKeyboard( ClientPtr /* client */); extern Bool IsInterferingGrab( @@ -522,15 +507,15 @@ extern Bool IsInterferingGrab( xEvent* /* events */); #ifdef PANORAMIX -extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff); +extern _X_EXPORT void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff); #endif #ifdef RANDR -void +extern _X_EXPORT void ScreenRestructured (ScreenPtr pScreen); #endif -extern int ffs(int i); +extern _X_EXPORT int ffs(int i); /* * callback manager stuff @@ -544,30 +529,30 @@ typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */ typedef void (*CallbackProcPtr) ( CallbackListPtr *, pointer, pointer); -extern Bool AddCallback( +extern _X_EXPORT Bool AddCallback( CallbackListPtr * /*pcbl*/, CallbackProcPtr /*callback*/, pointer /*data*/); -extern Bool DeleteCallback( +extern _X_EXPORT Bool DeleteCallback( CallbackListPtr * /*pcbl*/, CallbackProcPtr /*callback*/, pointer /*data*/); -extern void CallCallbacks( +extern _X_EXPORT void CallCallbacks( CallbackListPtr * /*pcbl*/, pointer /*call_data*/); -extern void DeleteCallbackList( +extern _X_EXPORT void DeleteCallbackList( CallbackListPtr * /*pcbl*/); -extern void InitCallbackManager(void); +extern _X_EXPORT void InitCallbackManager(void); /* * ServerGrabCallback stuff */ -extern CallbackListPtr ServerGrabCallback; +extern _X_EXPORT CallbackListPtr ServerGrabCallback; typedef enum {SERVER_GRABBED, SERVER_UNGRABBED, CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState; @@ -581,7 +566,7 @@ typedef struct { * EventCallback stuff */ -extern CallbackListPtr EventCallback; +extern _X_EXPORT CallbackListPtr EventCallback; typedef struct { ClientPtr client; @@ -593,7 +578,7 @@ typedef struct { * DeviceEventCallback stuff */ -extern CallbackListPtr DeviceEventCallback; +extern _X_EXPORT CallbackListPtr DeviceEventCallback; typedef struct { xEventPtr events; @@ -604,48 +589,41 @@ extern int XItoCoreType(int xi_type); extern Bool DevHasCursor(DeviceIntPtr pDev); extern Bool IsPointerDevice( DeviceIntPtr dev); extern Bool IsKeyboardDevice(DeviceIntPtr dev); -extern Bool IsPointerEvent(xEvent* xE); +extern Bool IsPointerEvent(InternalEvent *event); +extern Bool IsMaster(DeviceIntPtr dev); + +extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what); +extern _X_HIDDEN int CoreKeyboardProc(DeviceIntPtr dev, int what); + /* * These are deprecated compatibility functions and will be removed soon! * Please use the noted replacements instead. */ /* replaced by dixLookupWindow */ -extern WindowPtr SecurityLookupWindow( +extern _X_EXPORT WindowPtr SecurityLookupWindow( XID id, ClientPtr client, Mask access_mode); /* replaced by dixLookupWindow */ -extern WindowPtr LookupWindow( +extern _X_EXPORT WindowPtr LookupWindow( XID id, ClientPtr client); /* replaced by dixLookupDrawable */ -extern pointer SecurityLookupDrawable( +extern _X_EXPORT pointer SecurityLookupDrawable( XID id, ClientPtr client, Mask access_mode); /* replaced by dixLookupDrawable */ -extern pointer LookupDrawable( +extern _X_EXPORT pointer LookupDrawable( XID id, ClientPtr client); /* replaced by dixLookupClient */ -extern ClientPtr LookupClient( +extern _X_EXPORT ClientPtr LookupClient( XID id, ClientPtr client); -/* GE stuff */ -extern void SetGenericFilter(int extension, Mask* filters); -extern int ExtGrabDevice(ClientPtr client, - DeviceIntPtr dev, - int device_mode, - WindowPtr grabWindow, - WindowPtr confineTo, - TimeStamp ctime, - Bool ownerEvents, - CursorPtr cursor, - Mask xi_mask, - GenericMaskPtr ge_masks); #endif /* DIX_H */ diff --git a/xorg-server/include/dixaccess.h b/xorg-server/include/dixaccess.h index 3c62ee354..7180acd71 100644 --- a/xorg-server/include/dixaccess.h +++ b/xorg-server/include/dixaccess.h @@ -49,5 +49,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define DixManageAccess (1<<25) /* manage object */ #define DixDebugAccess (1<<26) /* debug object */ #define DixBellAccess (1<<27) /* audible sound */ +#define DixPostAccess (1<<28) /* post or follow-up call */ #endif /* DIX_ACCESS_H */ diff --git a/xorg-server/include/dixevents.h b/xorg-server/include/dixevents.h index 1ce2ad0c1..b9153456f 100644 --- a/xorg-server/include/dixevents.h +++ b/xorg-server/include/dixevents.h @@ -26,62 +26,62 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef DIXEVENTS_H #define DIXEVENTS_H -extern void SetCriticalEvent(int /* event */); +extern _X_EXPORT void SetCriticalEvent(int /* event */); -extern CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev*/); +extern _X_EXPORT CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev*/); -extern int ProcAllowEvents(ClientPtr /* client */); +extern _X_EXPORT int ProcAllowEvents(ClientPtr /* client */); -extern int MaybeDeliverEventsToClient( +extern _X_EXPORT int MaybeDeliverEventsToClient( WindowPtr /* pWin */, xEvent * /* pEvents */, int /* count */, Mask /* filter */, ClientPtr /* dontClient */); -extern int ProcWarpPointer(ClientPtr /* client */); +extern _X_EXPORT int ProcWarpPointer(ClientPtr /* client */); -extern int EventSelectForWindow( +extern _X_EXPORT int EventSelectForWindow( WindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */); -extern int EventSuppressForWindow( +extern _X_EXPORT int EventSuppressForWindow( WindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, Bool * /* checkOptional */); -extern int ProcSetInputFocus(ClientPtr /* client */); +extern _X_EXPORT int ProcSetInputFocus(ClientPtr /* client */); -extern int ProcGetInputFocus(ClientPtr /* client */); +extern _X_EXPORT int ProcGetInputFocus(ClientPtr /* client */); -extern int ProcGrabPointer(ClientPtr /* client */); +extern _X_EXPORT int ProcGrabPointer(ClientPtr /* client */); -extern int ProcChangeActivePointerGrab(ClientPtr /* client */); +extern _X_EXPORT int ProcChangeActivePointerGrab(ClientPtr /* client */); -extern int ProcUngrabPointer(ClientPtr /* client */); +extern _X_EXPORT int ProcUngrabPointer(ClientPtr /* client */); -extern int ProcGrabKeyboard(ClientPtr /* client */); +extern _X_EXPORT int ProcGrabKeyboard(ClientPtr /* client */); -extern int ProcUngrabKeyboard(ClientPtr /* client */); +extern _X_EXPORT int ProcUngrabKeyboard(ClientPtr /* client */); -extern int ProcQueryPointer(ClientPtr /* client */); +extern _X_EXPORT int ProcQueryPointer(ClientPtr /* client */); -extern int ProcSendEvent(ClientPtr /* client */); +extern _X_EXPORT int ProcSendEvent(ClientPtr /* client */); -extern int ProcUngrabKey(ClientPtr /* client */); +extern _X_EXPORT int ProcUngrabKey(ClientPtr /* client */); -extern int ProcGrabKey(ClientPtr /* client */); +extern _X_EXPORT int ProcGrabKey(ClientPtr /* client */); -extern int ProcGrabButton(ClientPtr /* client */); +extern _X_EXPORT int ProcGrabButton(ClientPtr /* client */); -extern int ProcUngrabButton(ClientPtr /* client */); +extern _X_EXPORT int ProcUngrabButton(ClientPtr /* client */); -extern int ProcRecolorCursor(ClientPtr /* client */); +extern _X_EXPORT int ProcRecolorCursor(ClientPtr /* client */); #ifdef PANORAMIX -extern void PostSyntheticMotion(DeviceIntPtr pDev, +extern _X_EXPORT void PostSyntheticMotion(DeviceIntPtr pDev, int x, int y, int screen, diff --git a/xorg-server/include/dixfont.h b/xorg-server/include/dixfont.h index 0f3df97cf..e444a2024 100644 --- a/xorg-server/include/dixfont.h +++ b/xorg-server/include/dixfont.h @@ -33,45 +33,45 @@ SOFTWARE. typedef struct _DIXFontProp *DIXFontPropPtr; -extern Bool SetDefaultFont(char * /*defaultfontname*/); +extern _X_EXPORT Bool SetDefaultFont(char * /*defaultfontname*/); -extern void QueueFontWakeup(FontPathElementPtr /*fpe*/); +extern _X_EXPORT void QueueFontWakeup(FontPathElementPtr /*fpe*/); -extern void RemoveFontWakeup(FontPathElementPtr /*fpe*/); +extern _X_EXPORT void RemoveFontWakeup(FontPathElementPtr /*fpe*/); -extern void FontWakeup(pointer /*data*/, +extern _X_EXPORT void FontWakeup(pointer /*data*/, int /*count*/, pointer /*LastSelectMask*/); -extern int OpenFont(ClientPtr /*client*/, +extern _X_EXPORT int OpenFont(ClientPtr /*client*/, XID /*fid*/, Mask /*flags*/, unsigned /*lenfname*/, char * /*pfontname*/); -extern int CloseFont(pointer /*pfont*/, +extern _X_EXPORT int CloseFont(pointer /*pfont*/, XID /*fid*/); typedef struct _xQueryFontReply *xQueryFontReplyPtr; -extern void QueryFont(FontPtr /*pFont*/, +extern _X_EXPORT void QueryFont(FontPtr /*pFont*/, xQueryFontReplyPtr /*pReply*/, int /*nProtoCCIStructs*/); -extern int ListFonts(ClientPtr /*client*/, +extern _X_EXPORT int ListFonts(ClientPtr /*client*/, unsigned char * /*pattern*/, unsigned int /*length*/, unsigned int /*max_names*/); -int +extern _X_EXPORT int doListFontsWithInfo(ClientPtr /*client*/, LFWIclosurePtr /*c*/); -extern int doPolyText(ClientPtr /*client*/, +extern _X_EXPORT int doPolyText(ClientPtr /*client*/, PTclosurePtr /*c*/ ); -extern int PolyText(ClientPtr /*client*/, +extern _X_EXPORT int PolyText(ClientPtr /*client*/, DrawablePtr /*pDraw*/, GCPtr /*pGC*/, unsigned char * /*pElt*/, @@ -81,10 +81,10 @@ extern int PolyText(ClientPtr /*client*/, int /*reqType*/, XID /*did*/); -extern int doImageText(ClientPtr /*client*/, +extern _X_EXPORT int doImageText(ClientPtr /*client*/, ITclosurePtr /*c*/); -extern int ImageText(ClientPtr /*client*/, +extern _X_EXPORT int ImageText(ClientPtr /*client*/, DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*nChars*/, @@ -94,76 +94,76 @@ extern int ImageText(ClientPtr /*client*/, int /*reqType*/, XID /*did*/); -extern int SetFontPath(ClientPtr /*client*/, +extern _X_EXPORT int SetFontPath(ClientPtr /*client*/, int /*npaths*/, unsigned char * /*paths*/, int * /*error*/); -extern int SetDefaultFontPath(char * /*path*/); +extern _X_EXPORT int SetDefaultFontPath(char * /*path*/); -extern int GetFontPath(ClientPtr client, +extern _X_EXPORT int GetFontPath(ClientPtr client, int *count, int *length, unsigned char **result); -extern void DeleteClientFontStuff(ClientPtr /*client*/); +extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client*/); /* Quartz support on Mac OS X pulls in the QuickDraw framework whose InitFonts function conflicts here. */ #ifdef __APPLE__ #define InitFonts Darwin_X_InitFonts #endif -extern void InitFonts(void); +extern _X_EXPORT void InitFonts(void); -extern void FreeFonts(void); +extern _X_EXPORT void FreeFonts(void); -extern FontPtr find_old_font(XID /*id*/); +extern _X_EXPORT FontPtr find_old_font(XID /*id*/); -extern void GetGlyphs(FontPtr /*font*/, +extern _X_EXPORT void GetGlyphs(FontPtr /*font*/, unsigned long /*count*/, unsigned char * /*chars*/, FontEncoding /*fontEncoding*/, unsigned long * /*glyphcount*/, CharInfoPtr * /*glyphs*/); -extern void QueryGlyphExtents(FontPtr /*pFont*/, +extern _X_EXPORT void QueryGlyphExtents(FontPtr /*pFont*/, CharInfoPtr * /*charinfo*/, unsigned long /*count*/, ExtentInfoPtr /*info*/); -extern Bool QueryTextExtents(FontPtr /*pFont*/, +extern _X_EXPORT Bool QueryTextExtents(FontPtr /*pFont*/, unsigned long /*count*/, unsigned char * /*chars*/, ExtentInfoPtr /*info*/); -extern Bool ParseGlyphCachingMode(char * /*str*/); +extern _X_EXPORT Bool ParseGlyphCachingMode(char * /*str*/); -extern void InitGlyphCaching(void); +extern _X_EXPORT void InitGlyphCaching(void); -extern void SetGlyphCachingMode(int /*newmode*/); +extern _X_EXPORT void SetGlyphCachingMode(int /*newmode*/); /* * libXfont/src/builtins/builtin.h */ -extern void BuiltinRegisterFpeFunctions(void); +extern _X_EXPORT void BuiltinRegisterFpeFunctions(void); /* * libXfont stubs. */ -extern int client_auth_generation(ClientPtr client); +extern _X_EXPORT int client_auth_generation(ClientPtr client); -extern void DeleteFontClientID(Font id); +extern _X_EXPORT void DeleteFontClientID(Font id); -extern FontResolutionPtr GetClientResolutions(int *num); +extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num); -extern int GetDefaultPointSize(void); +extern _X_EXPORT int GetDefaultPointSize(void); -extern Font GetNewFontClientID(void); +extern _X_EXPORT Font GetNewFontClientID(void); -extern int init_fs_handlers(FontPathElementPtr fpe, +extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler); -extern int RegisterFPEFunctions(NameCheckFunc name_func, +extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func, InitFpeFunc init_func, FreeFpeFunc free_func, ResetFpeFunc reset_func, @@ -179,10 +179,10 @@ extern int RegisterFPEFunctions(NameCheckFunc name_func, NextLaFunc next_list_alias_func, SetPathFunc set_path_func); -extern void remove_fs_handlers(FontPathElementPtr fpe, +extern _X_EXPORT void remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr blockHandler, Bool all); -extern int StoreFontClientFont(FontPtr pfont, Font id); +extern _X_EXPORT int StoreFontClientFont(FontPtr pfont, Font id); #endif /* DIXFONT_H */ diff --git a/xorg-server/include/dixfontstr.h b/xorg-server/include/dixfontstr.h index 463b2fdc5..c559e861e 100644 --- a/xorg-server/include/dixfontstr.h +++ b/xorg-server/include/dixfontstr.h @@ -28,7 +28,6 @@ SOFTWARE. #include "dixfont.h" #include #include "closure.h" -#define NEED_REPLIES #include /* for xQueryFontReply */ #define FONTCHARSET(font) (font) diff --git a/xorg-server/include/dixgrabs.h b/xorg-server/include/dixgrabs.h index 29aa82857..3b2a46d72 100644 --- a/xorg-server/include/dixgrabs.h +++ b/xorg-server/include/dixgrabs.h @@ -26,35 +26,35 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef DIXGRABS_H #define DIXGRABS_H 1 +struct _GrabParameters; + extern GrabPtr CreateGrab( int /* client */, DeviceIntPtr /* device */, - WindowPtr /* window */, - Mask /* eventMask */, - Bool /* ownerEvents */, - Bool /* keyboardMode */, - Bool /* pointerMode */, DeviceIntPtr /* modDevice */, - unsigned short /* modifiers */, + WindowPtr /* window */, + GrabType /* grabtype */, + GrabMask * /* mask */, + struct _GrabParameters * /* param */, int /* type */, KeyCode /* keybut */, - WindowPtr /* confineTo */, - CursorPtr /* cursor */); + WindowPtr /* confineTo */, + CursorPtr /* cursor */); -extern int DeletePassiveGrab( +extern _X_EXPORT int DeletePassiveGrab( pointer /* value */, XID /* id */); -extern Bool GrabMatchesSecond( +extern _X_EXPORT Bool GrabMatchesSecond( GrabPtr /* pFirstGrab */, GrabPtr /* pSecondGrab */, Bool /*ignoreDevice*/); -extern int AddPassiveGrabToList( +extern _X_EXPORT int AddPassiveGrabToList( ClientPtr /* client */, GrabPtr /* pGrab */); -extern Bool DeletePassiveGrabFromList( +extern _X_EXPORT Bool DeletePassiveGrabFromList( GrabPtr /* pMinuendGrab */); #endif /* DIXGRABS_H */ diff --git a/xorg-server/include/dixstruct.h b/xorg-server/include/dixstruct.h index 4bfe3713c..696b793ff 100644 --- a/xorg-server/include/dixstruct.h +++ b/xorg-server/include/dixstruct.h @@ -37,11 +37,7 @@ SOFTWARE. * translation from client ids to server addresses. */ -#ifdef DEBUG -#define MAX_REQUEST_LOG 100 -#endif - -extern CallbackListPtr ClientStateCallback; +extern _X_EXPORT CallbackListPtr ClientStateCallback; typedef struct { ClientPtr client; @@ -54,7 +50,7 @@ typedef void (*ReplySwapPtr) ( int /* size */, void * /* pbuf */); -extern void ReplyNotSwappd ( +extern _X_EXPORT void ReplyNotSwappd ( ClientPtr /* pClient */, int /* size */, void * /* pbuf */); @@ -89,6 +85,7 @@ typedef struct _Window *SaveSetElt; #define SaveSetAssignMap(ss,m) #endif +/* The unused_ members are ABI spacing. Please reuse them. */ typedef struct _Client { int index; Mask clientAsMask; @@ -104,7 +101,7 @@ typedef struct _Client { * killed */ SaveSetElt *saveSet; int numSaved; - pointer screenPrivate[MAXSCREENS]; + void *unused_screenPrivate[16]; int (**requestVector) ( ClientPtr /* pClient */); CARD32 req_len; /* length of current request */ @@ -112,23 +109,15 @@ typedef struct _Client { int priority; ClientState clientState; PrivateRec *devPrivates; -#ifdef XKB unsigned short xkbClientFlags; unsigned short mapNotifyMask; unsigned short newKeyboardNotifyMask; unsigned short vMajor,vMinor; KeyCode minKC,maxKC; -#endif -#ifdef DEBUG - unsigned char requestLog[MAX_REQUEST_LOG]; - int requestLogIndex; -#endif unsigned long replyBytesRemaining; - void *appgroup; /* Can't remove, ABI */ - struct _FontResolution * (*fontResFunc) ( /* no need for font.h */ - ClientPtr /* pClient */, - int * /* num */); + void *unused_appgroup; + void *unused_fontResFunc; int smart_priority; long smart_start_tick; long smart_stop_tick; @@ -140,17 +129,17 @@ typedef struct _Client { /* * Scheduling interface */ -extern long SmartScheduleTime; -extern long SmartScheduleInterval; -extern long SmartScheduleSlice; -extern long SmartScheduleMaxSlice; -extern Bool SmartScheduleDisable; -extern void SmartScheduleStartTimer(void); -extern void SmartScheduleStopTimer(void); +extern _X_EXPORT long SmartScheduleTime; +extern _X_EXPORT long SmartScheduleInterval; +extern _X_EXPORT long SmartScheduleSlice; +extern _X_EXPORT long SmartScheduleMaxSlice; +extern _X_EXPORT Bool SmartScheduleDisable; +extern _X_EXPORT void SmartScheduleStartTimer(void); +extern _X_EXPORT void SmartScheduleStopTimer(void); #define SMART_MAX_PRIORITY (20) #define SMART_MIN_PRIORITY (-20) -extern Bool SmartScheduleInit(void); +extern _X_EXPORT Bool SmartScheduleInit(void); /* This prototype is used pervasively in Xext, dix */ @@ -166,14 +155,14 @@ typedef struct _WorkQueue { pointer closure; } WorkQueueRec; -extern TimeStamp currentTime; -extern TimeStamp lastDeviceEventTime; +extern _X_EXPORT TimeStamp currentTime; +extern _X_EXPORT TimeStamp lastDeviceEventTime; -extern int CompareTimeStamps( +extern _X_EXPORT int CompareTimeStamps( TimeStamp /*a*/, TimeStamp /*b*/); -extern TimeStamp ClientTimeToServerTime(CARD32 /*c*/); +extern _X_EXPORT TimeStamp ClientTimeToServerTime(CARD32 /*c*/); typedef struct _CallbackRec { CallbackProcPtr proc; @@ -191,14 +180,14 @@ typedef struct _CallbackList { /* proc vectors */ -extern int (* InitialVector[3]) (ClientPtr /*client*/); +extern _X_EXPORT int (* InitialVector[3]) (ClientPtr /*client*/); -extern int (* ProcVector[256]) (ClientPtr /*client*/); +extern _X_EXPORT int (* ProcVector[256]) (ClientPtr /*client*/); -extern int (* SwappedProcVector[256]) (ClientPtr /*client*/); +extern _X_EXPORT int (* SwappedProcVector[256]) (ClientPtr /*client*/); -extern ReplySwapPtr ReplySwapVector[256]; +extern _X_EXPORT ReplySwapPtr ReplySwapVector[256]; -extern int ProcBadRequest(ClientPtr /*client*/); +extern _X_EXPORT int ProcBadRequest(ClientPtr /*client*/); #endif /* DIXSTRUCT_H */ diff --git a/xorg-server/include/do-not-use-config.h.in b/xorg-server/include/do-not-use-config.h.in index 26b50bcaf..b2f19ed6b 100644 --- a/xorg-server/include/do-not-use-config.h.in +++ b/xorg-server/include/do-not-use-config.h.in @@ -265,6 +265,12 @@ /* Define to 1 if you have the `pci_device_enable' function. */ #undef HAVE_PCI_DEVICE_ENABLE +/* Define to 1 if you have the `pci_device_is_boot_vga' function. */ +#undef HAVE_PCI_DEVICE_IS_BOOT_VGA + +/* Define to 1 if you have the `pci_device_vgaarb_init' function. */ +#undef HAVE_PCI_DEVICE_VGAARB_INIT + /* Define to 1 if you have the `pci_system_init_dev_mem' function. */ #undef HAVE_PCI_SYSTEM_INIT_DEV_MEM @@ -307,6 +313,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STROPTS_H + /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR @@ -316,6 +325,9 @@ /* Define to 1 if SYSV IPC is available */ #undef HAVE_SYSV_IPC +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_AGPGART_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_AGPIO_H @@ -348,6 +360,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_VM86_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VT_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -433,9 +448,6 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME -/* Define to the home page for this package. */ -#undef PACKAGE_URL - /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -522,6 +534,9 @@ /* Have tslib support */ #undef TSLIB +/* Enable unit tests */ +#undef UNITTESTS + /* Support UNIX socket connections */ #undef UNIXCONN @@ -540,6 +555,18 @@ /* Define to use byteswap macros from */ #undef USE_SYS_ENDIAN_H +/* Vendor man version */ +#undef VENDOR_MAN_VERSION + +/* Vendor name */ +#undef VENDOR_NAME + +/* Vendor name */ +#undef VENDOR_NAME_SHORT + +/* Vendor release */ +#undef VENDOR_RELEASE + /* Version number of package */ #undef VERSION @@ -603,20 +630,26 @@ /* Support Xinerama extension */ #undef XINERAMA -/* Build XKB */ -#undef XKB - /* Path to XKB data */ #undef XKB_BASE_DIRECTORY /* Path to XKB bin dir */ #undef XKB_BIN_DIRECTORY -/* Disable XKB per default */ -#undef XKB_DFLT_DISABLED +/* Default XKB layout */ +#undef XKB_DFLT_LAYOUT + +/* Default XKB model */ +#undef XKB_DFLT_MODEL -/* Build XKB server */ -#undef XKB_IN_SERVER +/* Default XKB options */ +#undef XKB_DFLT_OPTIONS + +/* Default XKB ruleset */ +#undef XKB_DFLT_RULES + +/* Default XKB variant */ +#undef XKB_DFLT_VARIANT /* Path to XKB output dir */ #undef XKM_OUTPUT_DIR @@ -639,6 +672,9 @@ /* Have Quartz */ #undef XQUARTZ +/* Support application updating through sparkle. */ +#undef XQUARTZ_SPARKLE + /* Support Record extension */ #undef XRECORD @@ -694,18 +730,12 @@ /* Define to 1 if unsigned long is 64 bits. */ #undef _XSERVER64 -/* Solaris 8 or later */ -#undef __SOL8__ - /* Vendor web address for support */ #undef __VENDORDWEBSUPPORT__ /* Name of configuration file */ #undef __XCONFIGFILE__ -/* Default XKB rules */ -#undef __XKBDEFRULES__ - /* Name of X server */ #undef __XSERVERNAME__ diff --git a/xorg-server/include/eventconvert.h b/xorg-server/include/eventconvert.h new file mode 100644 index 000000000..277a6c4b8 --- /dev/null +++ b/xorg-server/include/eventconvert.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + */ + +#ifndef _EVENTCONVERT_H_ +#include +#include +#include "input.h" +#include "events.h" + +#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16)) + +_X_INTERNAL int EventToCore(InternalEvent *event, xEvent *core); +_X_INTERNAL int EventToXI(InternalEvent *ev, xEvent **xi, int *count); +_X_INTERNAL int EventToXI2(InternalEvent *ev, xEvent **xi); +_X_INTERNAL int GetCoreType(InternalEvent* ev); +_X_INTERNAL int GetXIType(InternalEvent* ev); +_X_INTERNAL int GetXI2Type(InternalEvent* ev); + +#endif /* _EVENTCONVERT_H_ */ diff --git a/xorg-server/include/events.h b/xorg-server/include/events.h new file mode 100644 index 000000000..9f6a94c5b --- /dev/null +++ b/xorg-server/include/events.h @@ -0,0 +1,35 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + */ + +#ifndef EVENTS_H +#define EVENTS_H +typedef struct _DeviceEvent DeviceEvent; +typedef struct _DeviceChangedEvent DeviceChangedEvent; +#if XFreeXDGA +typedef struct _DGAEvent DGAEvent; +#endif +typedef struct _RawDeviceEvent RawDeviceEvent; +typedef union _InternalEvent InternalEvent; + +#endif diff --git a/xorg-server/include/eventstr.h b/xorg-server/include/eventstr.h new file mode 100644 index 000000000..f082db34a --- /dev/null +++ b/xorg-server/include/eventstr.h @@ -0,0 +1,232 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * 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. + * + */ + +#ifndef EVENTSTR_H +#define EVENTSTR_H + +#include +/** + * @file events.h + * This file describes the event structures used internally by the X + * server during event generation and event processing. + * + * When are internal events used? + * Events from input devices are stored as internal events in the EQ and + * processed as internal events until late in the processing cycle. Only then + * do they switch to their respective wire events. + */ + +/** + * Event types. Used exclusively internal to the server, not visible on the + * protocol. + * + * Note: Keep KeyPress to Motion aligned with the core events. + * Keep ET_Raw* in the same order as KeyPress - Motion + */ +enum EventType { + ET_KeyPress = 2, + ET_KeyRelease, + ET_ButtonPress, + ET_ButtonRelease, + ET_Motion, + ET_Enter, + ET_Leave, + ET_FocusIn, + ET_FocusOut, + ET_ProximityIn, + ET_ProximityOut, + ET_DeviceChanged, + ET_Hierarchy, +#if XFreeXDGA + ET_DGAEvent, +#endif + ET_RawKeyPress, + ET_RawKeyRelease, + ET_RawButtonPress, + ET_RawButtonRelease, + ET_RawMotion, + ET_Internal = 0xFF /* First byte */ +}; + +#define CHECKEVENT(ev) if (ev && ((InternalEvent*)(ev))->any.header != 0xFF) \ + FatalError("Wrong event type %d.\n", \ + ((InternalEvent*)(ev))->any.header); + +/** + * Used for ALL input device events internal in the server until + * copied into the matching protocol event. + * + * Note: We only use the device id because the DeviceIntPtr may become invalid while + * the event is in the EQ. + */ +struct _DeviceEvent +{ + unsigned char header; /**< Always ET_Internal */ + enum EventType type; /**< One of EventType */ + int length; /**< Length in bytes */ + Time time; /**< Time in ms */ + int deviceid; /**< Device to post this event for */ + int sourceid; /**< The physical source device */ + union { + uint32_t button; /**< Button number */ + uint32_t key; /**< Key code */ + } detail; + uint16_t root_x; /**< Pos relative to root window in integral data */ + float root_x_frac; /**< Pos relative to root window in frac part */ + uint16_t root_y; /**< Pos relative to root window in integral part */ + float root_y_frac; /**< Pos relative to root window in frac part */ + uint8_t buttons[(MAX_BUTTONS + 7)/8]; /**< Button mask */ + struct { + uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */ + uint8_t mode[(MAX_VALUATORS + 7)/8]; /**< Valuator mode (Abs or Rel)*/ + uint32_t data[MAX_VALUATORS]; /**< Valuator data */ + int32_t data_frac[MAX_VALUATORS]; /**< Fractional part for data */ + } valuators; + struct { + uint32_t base; /**< XKB base modifiers */ + uint32_t latched; /**< XKB latched modifiers */ + uint32_t locked; /**< XKB locked modifiers */ + uint32_t effective;/**< XKB effective modifiers */ + } mods; + struct { + uint8_t base; /**< XKB base group */ + uint8_t latched; /**< XKB latched group */ + uint8_t locked; /**< XKB locked group */ + uint8_t effective;/**< XKB effective group */ + } group; + Window root; /**< Root window of the event */ + int corestate; /**< Core key/button state BEFORE the event */ + int key_repeat; /**< Internally-generated key repeat event */ +}; + + +/* Flags used in DeviceChangedEvent to signal if the slave has changed */ +#define DEVCHANGE_SLAVE_SWITCH 0x2 +/* Flags used in DeviceChangedEvent to signal whether the event was a + * pointer event or a keyboard event */ +#define DEVCHANGE_POINTER_EVENT 0x4 +#define DEVCHANGE_KEYBOARD_EVENT 0x8 +/* device capabilities changed */ +#define DEVCHANGE_DEVICE_CHANGE 0x10 + +/** + * Sent whenever a device's capabilities have changed. + */ +struct _DeviceChangedEvent +{ + unsigned char header; /**< Always ET_Internal */ + enum EventType type; /**< ET_DeviceChanged */ + int length; /**< Length in bytes */ + Time time; /**< Time in ms */ + int deviceid; /**< Device whose capabilities have changed */ + int flags; /**< Mask of ::HAS_NEW_SLAVE, + ::POINTER_EVENT, ::KEYBOARD_EVENT */ + int masterid; /**< MD when event was generated */ + int sourceid; /**< The device that caused the change */ + + struct { + int num_buttons; /**< Number of buttons */ + Atom names[MAX_BUTTONS];/**< Button names */ + } buttons; + + int num_valuators; /**< Number of axes */ + struct { + uint32_t min; /**< Minimum value */ + uint32_t max; /**< Maximum value */ + /* FIXME: frac parts of min/max */ + uint32_t resolution; /**< Resolution counts/m */ + uint8_t mode; /**< Relative or Absolute */ + Atom name; /**< Axis name */ + } valuators[MAX_VALUATORS]; + + struct { + int min_keycode; + int max_keycode; + } keys; +}; + +#if XFreeXDGA +/** + * DGAEvent, used by DGA to intercept and emulate input events. + */ +struct _DGAEvent +{ + unsigned char header; /**< Always ET_Internal */ + enum EventType type; /**< ET_DGAEvent */ + int length; /**< Length in bytes */ + Time time; /**< Time in ms */ + int subtype; /**< KeyPress, KeyRelease, ButtonPress, + ButtonRelease, MotionNotify */ + int detail; /**< Relative x coordinate */ + int dx; /**< Relative x coordinate */ + int dy; /**< Relative y coordinate */ + int screen; /**< Screen number this event applies to */ + uint16_t state; /**< Core modifier/button state */ +}; +#endif + +/** + * Raw event, contains the data as posted by the device. + */ +struct _RawDeviceEvent +{ + unsigned char header; /**< Always ET_Internal */ + enum EventType type; /**< ET_Raw */ + int length; /**< Length in bytes */ + Time time; /**< Time in ms */ + int deviceid; /**< Device to post this event for */ + int sourceid; /**< The physical source device */ + union { + uint32_t button; /**< Button number */ + uint32_t key; /**< Key code */ + } detail; + struct { + uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */ + int32_t data[MAX_VALUATORS]; /**< Valuator data */ + int32_t data_frac[MAX_VALUATORS]; /**< Fractional part for data */ + int32_t data_raw[MAX_VALUATORS]; /**< Valuator data as posted */ + int32_t data_raw_frac[MAX_VALUATORS];/**< Fractional part for data_raw */ + } valuators; +}; + +/** + * Event type used inside the X server for input event + * processing. + */ +union _InternalEvent { + struct { + unsigned char header; /**< Always ET_Internal */ + enum EventType type; /**< One of ET_* */ + int length; /**< Length in bytes */ + Time time; /**< Time in ms. */ + } any; + DeviceEvent device; + DeviceChangedEvent changed; +#if XFreeXDGA + DGAEvent dga; +#endif + RawDeviceEvent raw; +}; + +#endif diff --git a/xorg-server/include/exevents.h b/xorg-server/include/exevents.h index 971afc2ea..39e1c70fe 100644 --- a/xorg-server/include/exevents.h +++ b/xorg-server/include/exevents.h @@ -31,6 +31,98 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define EXEVENTS_H #include +#include "inputstr.h" + +/*************************************************************** + * Interface available to drivers * + ***************************************************************/ + +extern _X_EXPORT int InitProximityClassDeviceStruct( + DeviceIntPtr /* dev */); + +extern _X_EXPORT void InitValuatorAxisStruct( + DeviceIntPtr /* dev */, + int /* axnum */, + Atom /* label */, + int /* minval */, + int /* maxval */, + int /* resolution */, + int /* min_res */, + int /* max_res */); + +/* Input device properties */ +extern _X_EXPORT void XIDeleteAllDeviceProperties( + DeviceIntPtr /* device */ +); + +extern _X_EXPORT int XIDeleteDeviceProperty( + DeviceIntPtr /* device */, + Atom /* property */, + Bool /* fromClient */ +); + +extern _X_EXPORT int XIChangeDeviceProperty( + DeviceIntPtr /* dev */, + Atom /* property */, + Atom /* type */, + int /* format*/, + int /* mode*/, + unsigned long /* len*/, + pointer /* value*/, + Bool /* sendevent*/ + ); + +extern _X_EXPORT int XIGetDeviceProperty( + DeviceIntPtr /* dev */, + Atom /* property */, + XIPropertyValuePtr* /* value */ +); + +extern _X_EXPORT int XISetDevicePropertyDeletable( + DeviceIntPtr /* dev */, + Atom /* property */, + Bool /* deletable */ +); + +extern _X_EXPORT long XIRegisterPropertyHandler( + DeviceIntPtr dev, + int (*SetProperty) (DeviceIntPtr dev, + Atom property, + XIPropertyValuePtr prop, + BOOL checkonly), + int (*GetProperty) (DeviceIntPtr dev, + Atom property), + int (*DeleteProperty) (DeviceIntPtr dev, + Atom property) +); + +extern _X_EXPORT void XIUnregisterPropertyHandler( + DeviceIntPtr dev, + long id +); + +extern _X_EXPORT Atom XIGetKnownProperty( + char* name +); + +extern _X_EXPORT DeviceIntPtr XIGetDevice(xEvent *ev); + +extern _X_EXPORT int XIPropToInt( + XIPropertyValuePtr val, + int *nelem_return, + int **buf_return +); + +extern _X_EXPORT int XIPropToFloat( + XIPropertyValuePtr val, + int *nelem_return, + float **buf_return +); + +/**************************************************************************** + * End of driver interface * + ****************************************************************************/ + /** * Attached to the devPrivates of each client. Specifies the version number as @@ -41,87 +133,100 @@ typedef struct _XIClientRec { int minor_version; } XIClientRec, *XIClientPtr; -extern void RegisterOtherDevice ( + +typedef struct _GrabParameters { + int grabtype; /* GRABTYPE_CORE, etc. */ + unsigned int ownerEvents; + unsigned int this_device_mode; + unsigned int other_devices_mode; + Window grabWindow; + Window confineTo; + Cursor cursor; + unsigned int modifiers; +} GrabParameters; + + +extern void +RegisterOtherDevice ( DeviceIntPtr /* device */); extern int UpdateDeviceState ( DeviceIntPtr /* device */, - xEventPtr /* xE */, - int /* count */); + DeviceEvent* /* xE */); -extern void ProcessOtherEvent ( - xEventPtr /* FIXME deviceKeyButtonPointer * xE */, - DeviceIntPtr /* other */, - int /* count */); +extern void +ProcessOtherEvent ( + InternalEvent* /* ev */, + DeviceIntPtr /* other */); -extern int InitProximityClassDeviceStruct( - DeviceIntPtr /* dev */); - -extern void InitValuatorAxisStruct( - DeviceIntPtr /* dev */, - int /* axnum */, - int /* minval */, - int /* maxval */, - int /* resolution */, - int /* min_res */, - int /* max_res */); - -extern void DeviceFocusEvent( +extern void +DeviceFocusEvent( DeviceIntPtr /* dev */, int /* type */, int /* mode */, int /* detail */, WindowPtr /* pWin */); -extern int GrabButton( +extern int +CheckGrabValues( + ClientPtr /* client */, + GrabParameters* /* param */); + +extern int +GrabButton( ClientPtr /* client */, DeviceIntPtr /* dev */, - BYTE /* this_device_mode */, - BYTE /* other_devices_mode */, - CARD16 /* modifiers */, DeviceIntPtr /* modifier_device */, - CARD8 /* button */, - Window /* grabWindow */, - BOOL /* ownerEvents */, - Cursor /* rcursor */, - Window /* rconfineTo */, - Mask /* eventMask */); - -extern int GrabKey( + int /* button */, + GrabParameters* /* param */, + GrabType /* grabtype */, + GrabMask* /* eventMask */); + +extern int +GrabKey( ClientPtr /* client */, DeviceIntPtr /* dev */, - BYTE /* this_device_mode */, - BYTE /* other_devices_mode */, - CARD16 /* modifiers */, DeviceIntPtr /* modifier_device */, - CARD8 /* key */, - Window /* grabWindow */, - BOOL /* ownerEvents */, - Mask /* mask */); + int /* key */, + GrabParameters* /* param */, + GrabType /* grabtype */, + GrabMask* /* eventMask */); + +extern int +GrabWindow( + ClientPtr /* client */, + DeviceIntPtr /* dev */, + int /* type */, + GrabParameters* /* param */, + GrabMask* /* eventMask */); -extern int SelectForWindow( +extern int +SelectForWindow( DeviceIntPtr /* dev */, WindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, - Mask /* exclusivemasks */, - Mask /* validmasks */); + Mask /* exclusivemasks */); -extern int AddExtensionClient ( +extern int +AddExtensionClient ( WindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, int /* mskidx */); -extern void RecalculateDeviceDeliverableEvents( +extern void +RecalculateDeviceDeliverableEvents( WindowPtr /* pWin */); -extern int InputClientGone( +extern int +InputClientGone( WindowPtr /* pWin */, XID /* id */); -extern int SendEvent ( +extern int +SendEvent ( ClientPtr /* client */, DeviceIntPtr /* d */, Window /* dest */, @@ -130,29 +235,15 @@ extern int SendEvent ( Mask /* mask */, int /* count */); -extern int SetButtonMapping ( +extern int +SetButtonMapping ( ClientPtr /* client */, DeviceIntPtr /* dev */, int /* nElts */, BYTE * /* map */); -extern int SetModifierMapping( - ClientPtr /* client */, - DeviceIntPtr /* dev */, - int /* len */, - int /* rlen */, - int /* numKeyPerModifier */, - KeyCode * /* inputMap */, - KeyClassPtr * /* k */); - -extern void SendDeviceMappingNotify( - ClientPtr /* client, */, - CARD8 /* request, */, - KeyCode /* firstKeyCode */, - CARD8 /* count */, - DeviceIntPtr /* dev */); - -extern int ChangeKeyMapping( +extern int +ChangeKeyMapping( ClientPtr /* client */, DeviceIntPtr /* dev */, unsigned /* len */, @@ -162,15 +253,18 @@ extern int ChangeKeyMapping( CARD8 /* keySymsPerKeyCode */, KeySym * /* map */); -extern void DeleteWindowFromAnyExtEvents( +extern void +DeleteWindowFromAnyExtEvents( WindowPtr /* pWin */, Bool /* freeResources */); -extern int MaybeSendDeviceMotionNotifyHint ( +extern int +MaybeSendDeviceMotionNotifyHint ( deviceKeyButtonPointer * /* pEvents */, Mask /* mask */); -extern void CheckDeviceGrabAndHintWindow ( +extern void +CheckDeviceGrabAndHintWindow ( WindowPtr /* pWin */, int /* type */, deviceKeyButtonPointer * /* xE */, @@ -178,89 +272,44 @@ extern void CheckDeviceGrabAndHintWindow ( ClientPtr /* client */, Mask /* deliveryMask */); -extern void MaybeStopDeviceHint( +extern void +MaybeStopDeviceHint( DeviceIntPtr /* dev */, ClientPtr /* client */); -extern int DeviceEventSuppressForWindow( +extern int +DeviceEventSuppressForWindow( WindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, int /* maskndx */); -extern void SendEventToAllWindows( +extern void +SendEventToAllWindows( DeviceIntPtr /* dev */, Mask /* mask */, xEvent * /* ev */, int /* count */); -/* Input device properties */ -extern void XIDeleteAllDeviceProperties( - DeviceIntPtr /* device */ -); +extern _X_HIDDEN void XI2EventSwap( + xGenericEvent * /* from */, + xGenericEvent * /* to */); -extern int XIDeleteDeviceProperty( - DeviceIntPtr /* device */, - Atom /* property */, - Bool /* fromClient */ -); - -extern int XIChangeDeviceProperty( - DeviceIntPtr /* dev */, - Atom /* property */, - Atom /* type */, - int /* format*/, - int /* mode*/, - unsigned long /* len*/, - pointer /* value*/, - Bool /* sendevent*/ - ); - -extern int XIGetDeviceProperty( - DeviceIntPtr /* dev */, - Atom /* property */, - XIPropertyValuePtr* /* value */ -); - -extern int XISetDevicePropertyDeletable( - DeviceIntPtr /* dev */, - Atom /* property */, - Bool /* deletable */ -); - -extern long XIRegisterPropertyHandler( - DeviceIntPtr dev, - int (*SetProperty) (DeviceIntPtr dev, - Atom property, - XIPropertyValuePtr prop, - BOOL checkonly), - int (*GetProperty) (DeviceIntPtr dev, - Atom property), - int (*DeleteProperty) (DeviceIntPtr dev, - Atom property) -); - -extern _X_EXPORT void XIUnregisterPropertyHandler( - DeviceIntPtr dev, - long id -); - -extern Atom XIGetKnownProperty( - char* name -); +/* For an event such as MappingNotify which affects client interpretation + * of input events sent by device dev, should we notify the client, or + * would it merely be irrelevant and confusing? */ +extern int +XIShouldNotify(ClientPtr client, DeviceIntPtr dev); -extern DeviceIntPtr XIGetDevice(xEvent *ev); +extern void +XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, + DeviceChangedEvent *dce); -extern _X_EXPORT int XIPropToInt( - XIPropertyValuePtr val, - int *nelem_return, - int **buf_return -); +extern int +XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, + unsigned int len, unsigned char* mask); -extern _X_EXPORT int XIPropToFloat( - XIPropertyValuePtr val, - int *nelem_return, - float **buf_return -); +extern int +XICheckInvalidMaskBits(unsigned char *mask, int len); #endif /* EXEVENTS_H */ diff --git a/xorg-server/include/extension.h b/xorg-server/include/extension.h index 14526e9b5..29a11c300 100644 --- a/xorg-server/include/extension.h +++ b/xorg-server/include/extension.h @@ -50,17 +50,17 @@ SOFTWARE. _XFUNCPROTOBEGIN -extern unsigned short StandardMinorOpcode(ClientPtr /*client*/); +extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/); -extern unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/); +extern _X_EXPORT unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/); -extern Bool EnableDisableExtension(char *name, Bool enable); +extern _X_EXPORT Bool EnableDisableExtension(char *name, Bool enable); -extern void EnableDisableExtensionError(char *name, Bool enable); +extern _X_EXPORT void EnableDisableExtensionError(char *name, Bool enable); -extern void InitExtensions(int argc, char **argv); +extern _X_EXPORT void InitExtensions(int argc, char **argv); -extern void CloseDownExtensions(void); +extern _X_EXPORT void CloseDownExtensions(void); _XFUNCPROTOEND diff --git a/xorg-server/include/extinit.h b/xorg-server/include/extinit.h index d9964805e..c3aa7b681 100644 --- a/xorg-server/include/extinit.h +++ b/xorg-server/include/extinit.h @@ -32,17 +32,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "extnsionst.h" -void +extern void XInputExtensionInit( void ); -Bool -DeviceIsPointerType( - DeviceIntPtr dev - ); - -void +extern _X_EXPORT void AssignTypeAndName ( DeviceIntPtr /* dev */, Atom /* type */, diff --git a/xorg-server/include/extnsionst.h b/xorg-server/include/extnsionst.h index 59acd0ef4..19c76fcc4 100644 --- a/xorg-server/include/extnsionst.h +++ b/xorg-server/include/extnsionst.h @@ -80,9 +80,9 @@ typedef struct _ExtensionEntry { */ typedef void (*EventSwapPtr) (xEvent *, xEvent *); -extern EventSwapPtr EventSwapVector[128]; +extern _X_EXPORT EventSwapPtr EventSwapVector[128]; -extern void NotImplemented ( /* FIXME: this may move to another file... */ +extern _X_EXPORT void NotImplemented ( /* FIXME: this may move to another file... */ xEvent *, xEvent *); @@ -91,7 +91,7 @@ extern void NotImplemented ( /* FIXME: this may move to another file... */ #define GetGCValue(pGC, GCElement) (pGC->GCElement) -extern ExtensionEntry *AddExtension( +extern _X_EXPORT ExtensionEntry *AddExtension( char* /*name*/, int /*NumEvents*/, int /*NumErrors*/, @@ -101,12 +101,12 @@ extern ExtensionEntry *AddExtension( unsigned short (* /*MinorOpcodeProc*/)(ClientPtr /*client*/) ); -extern Bool AddExtensionAlias( +extern _X_EXPORT Bool AddExtensionAlias( char* /*alias*/, ExtensionEntry * /*extension*/); -extern ExtensionEntry *CheckExtension(const char *extname); -extern ExtensionEntry *GetExtensionEntry(int major); +extern _X_EXPORT ExtensionEntry *CheckExtension(const char *extname); +extern _X_EXPORT ExtensionEntry *GetExtensionEntry(int major); #endif /* EXTENSIONSTRUCT_H */ diff --git a/xorg-server/include/gc.h b/xorg-server/include/gc.h index bf4c268a8..e75cc5e83 100644 --- a/xorg-server/include/gc.h +++ b/xorg-server/include/gc.h @@ -84,16 +84,16 @@ typedef struct _GCInterest *GCInterestPtr; typedef struct _GC *GCPtr; typedef struct _GCOps *GCOpsPtr; -extern void ValidateGC( +extern _X_EXPORT void ValidateGC( DrawablePtr /*pDraw*/, GCPtr /*pGC*/); -extern int ChangeGC( +extern _X_EXPORT int ChangeGC( GCPtr/*pGC*/, BITS32 /*mask*/, XID* /*pval*/); -extern int DoChangeGC( +extern _X_EXPORT int DoChangeGC( GCPtr/*pGC*/, BITS32 /*mask*/, XID* /*pval*/, @@ -104,14 +104,14 @@ typedef union { pointer ptr; } ChangeGCVal, *ChangeGCValPtr; -extern int dixChangeGC( +extern _X_EXPORT int dixChangeGC( ClientPtr /*client*/, GCPtr /*pGC*/, BITS32 /*mask*/, CARD32 * /*pval*/, ChangeGCValPtr /*pCGCV*/); -extern GCPtr CreateGC( +extern _X_EXPORT GCPtr CreateGC( DrawablePtr /*pDrawable*/, BITS32 /*mask*/, XID* /*pval*/, @@ -119,43 +119,43 @@ extern GCPtr CreateGC( XID /*gcid*/, ClientPtr /*client*/); -extern int CopyGC( +extern _X_EXPORT int CopyGC( GCPtr/*pgcSrc*/, GCPtr/*pgcDst*/, BITS32 /*mask*/); -extern int FreeGC( +extern _X_EXPORT int FreeGC( pointer /*pGC*/, XID /*gid*/); -extern GCPtr CreateScratchGC( +extern _X_EXPORT GCPtr CreateScratchGC( ScreenPtr /*pScreen*/, unsigned /*depth*/); -extern void FreeGCperDepth( +extern _X_EXPORT void FreeGCperDepth( int /*screenNum*/); -extern Bool CreateGCperDepth( +extern _X_EXPORT Bool CreateGCperDepth( int /*screenNum*/); -extern Bool CreateDefaultStipple( +extern _X_EXPORT Bool CreateDefaultStipple( int /*screenNum*/); -extern void FreeDefaultStipple( +extern _X_EXPORT void FreeDefaultStipple( int /*screenNum*/); -extern int SetDashes( +extern _X_EXPORT int SetDashes( GCPtr /*pGC*/, unsigned /*offset*/, unsigned /*ndash*/, unsigned char* /*pdash*/); -extern int VerifyRectOrder( +extern _X_EXPORT int VerifyRectOrder( int /*nrects*/, xRectangle* /*prects*/, int /*ordering*/); -extern int SetClipRects( +extern _X_EXPORT int SetClipRects( GCPtr /*pGC*/, int /*xOrigin*/, int /*yOrigin*/, @@ -163,11 +163,11 @@ extern int SetClipRects( xRectangle* /*prects*/, int /*ordering*/); -extern GCPtr GetScratchGC( +extern _X_EXPORT GCPtr GetScratchGC( unsigned /*depth*/, ScreenPtr /*pScreen*/); -extern void FreeScratchGC( +extern _X_EXPORT void FreeScratchGC( GCPtr /*pGC*/); #endif /* GC_H */ diff --git a/xorg-server/include/globals.h b/xorg-server/include/globals.h index c3d2dcfa2..52c19a490 100644 --- a/xorg-server/include/globals.h +++ b/xorg-server/include/globals.h @@ -6,135 +6,129 @@ /* Global X server variables that are visible to mi, dix, os, and ddx */ -extern CARD32 defaultScreenSaverTime; -extern CARD32 defaultScreenSaverInterval; -extern CARD32 ScreenSaverTime; -extern CARD32 ScreenSaverInterval; +extern _X_EXPORT CARD32 defaultScreenSaverTime; +extern _X_EXPORT CARD32 defaultScreenSaverInterval; +extern _X_EXPORT CARD32 ScreenSaverTime; +extern _X_EXPORT CARD32 ScreenSaverInterval; #ifdef SCREENSAVER -extern Bool screenSaverSuspended; +extern _X_EXPORT Bool screenSaverSuspended; #endif -extern char *defaultFontPath; -extern int monitorResolution; -extern int defaultColorVisualClass; +extern _X_EXPORT char *defaultFontPath; +extern _X_EXPORT int monitorResolution; +extern _X_EXPORT int defaultColorVisualClass; -extern WindowPtr WindowTable[MAXSCREENS]; -extern int GrabInProgress; -extern Bool noTestExtensions; +extern _X_EXPORT WindowPtr WindowTable[MAXSCREENS]; +extern _X_EXPORT int GrabInProgress; +extern _X_EXPORT Bool noTestExtensions; -extern DDXPointRec dixScreenOrigins[MAXSCREENS]; +extern _X_EXPORT DDXPointRec dixScreenOrigins[MAXSCREENS]; -extern char *ConnectionInfo; +extern _X_EXPORT char *ConnectionInfo; #ifdef DPMSExtension -extern CARD32 defaultDPMSStandbyTime; -extern CARD32 defaultDPMSSuspendTime; -extern CARD32 defaultDPMSOffTime; -extern CARD32 DPMSStandbyTime; -extern CARD32 DPMSSuspendTime; -extern CARD32 DPMSOffTime; -extern CARD16 DPMSPowerLevel; -extern Bool defaultDPMSEnabled; -extern Bool DPMSEnabled; -extern Bool DPMSEnabledSwitch; -extern Bool DPMSDisabledSwitch; -extern Bool DPMSCapableFlag; +extern _X_EXPORT CARD32 DPMSStandbyTime; +extern _X_EXPORT CARD32 DPMSSuspendTime; +extern _X_EXPORT CARD32 DPMSOffTime; +extern _X_EXPORT CARD16 DPMSPowerLevel; +extern _X_EXPORT Bool DPMSEnabled; +extern _X_EXPORT Bool DPMSDisabledSwitch; +extern _X_EXPORT Bool DPMSCapableFlag; #endif #ifdef PANORAMIX -extern Bool PanoramiXExtensionDisabledHack; +extern _X_EXPORT Bool PanoramiXExtensionDisabledHack; #endif #ifdef COMPOSITE -extern Bool noCompositeExtension; +extern _X_EXPORT Bool noCompositeExtension; #endif #ifdef DAMAGE -extern Bool noDamageExtension; +extern _X_EXPORT Bool noDamageExtension; #endif #ifdef DBE -extern Bool noDbeExtension; +extern _X_EXPORT Bool noDbeExtension; #endif #ifdef DPMSExtension -extern Bool noDPMSExtension; +extern _X_EXPORT Bool noDPMSExtension; #endif #ifdef GLXEXT -extern Bool noGlxExtension; +extern _X_EXPORT Bool noGlxExtension; #endif #ifdef SCREENSAVER -extern Bool noScreenSaverExtension; +extern _X_EXPORT Bool noScreenSaverExtension; #endif #ifdef MITSHM -extern Bool noMITShmExtension; +extern _X_EXPORT Bool noMITShmExtension; #endif #ifdef MULTIBUFFER -extern Bool noMultibufferExtension; +extern _X_EXPORT Bool noMultibufferExtension; #endif #ifdef RANDR -extern Bool noRRExtension; +extern _X_EXPORT Bool noRRExtension; #endif #ifdef RENDER -extern Bool noRenderExtension; +extern _X_EXPORT Bool noRenderExtension; #endif #ifdef XCSECURITY -extern Bool noSecurityExtension; +extern _X_EXPORT Bool noSecurityExtension; #endif #ifdef RES -extern Bool noResExtension; +extern _X_EXPORT Bool noResExtension; #endif #ifdef XF86BIGFONT -extern Bool noXFree86BigfontExtension; +extern _X_EXPORT Bool noXFree86BigfontExtension; #endif #ifdef XFreeXDGA -extern Bool noXFree86DGAExtension; +extern _X_EXPORT Bool noXFree86DGAExtension; #endif #ifdef XF86DRI -extern Bool noXFree86DRIExtension; +extern _X_EXPORT Bool noXFree86DRIExtension; #endif #ifdef XF86VIDMODE -extern Bool noXFree86VidModeExtension; +extern _X_EXPORT Bool noXFree86VidModeExtension; #endif #ifdef XFIXES -extern Bool noXFixesExtension; -#endif - -#ifdef XKB -/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */ -extern Bool noXkbExtension; +extern _X_EXPORT Bool noXFixesExtension; #endif #ifdef PANORAMIX -extern Bool noPanoramiXExtension; +extern _X_EXPORT Bool noPanoramiXExtension; #endif #ifdef XSELINUX -extern Bool noSELinuxExtension; +extern _X_EXPORT Bool noSELinuxExtension; #define SELINUX_MODE_DEFAULT 0 #define SELINUX_MODE_DISABLED 1 #define SELINUX_MODE_PERMISSIVE 2 #define SELINUX_MODE_ENFORCING 3 -extern int selinuxEnforcingState; +extern _X_EXPORT int selinuxEnforcingState; #endif #ifdef XV -extern Bool noXvExtension; +extern _X_EXPORT Bool noXvExtension; +#endif + +#ifdef DRI2 +extern _X_EXPORT Bool noDRI2Extension; #endif #endif /* !_XSERV_GLOBAL_H_ */ diff --git a/xorg-server/include/hotplug.h b/xorg-server/include/hotplug.h index b4f1bb60d..d074df31d 100644 --- a/xorg-server/include/hotplug.h +++ b/xorg-server/include/hotplug.h @@ -26,7 +26,7 @@ #ifndef HOTPLUG_H #define HOTPLUG_H -void config_init(void); -void config_fini(void); +extern _X_EXPORT void config_init(void); +extern _X_EXPORT void config_fini(void); #endif /* HOTPLUG_H */ diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h index 2ab815b80..7ab5e9d65 100644 --- a/xorg-server/include/input.h +++ b/xorg-server/include/input.h @@ -53,6 +53,8 @@ SOFTWARE. #include #include #include "window.h" /* for WindowPtr */ +#include "xkbrules.h" +#include "events.h" #define DEVICE_INIT 0 #define DEVICE_ON 1 @@ -74,6 +76,7 @@ SOFTWARE. /* Maximum number of valuators, divided by six, rounded up, to get number * of events. */ #define MAX_VALUATOR_EVENTS 6 +#define MAX_BUTTONS 256 /* completely arbitrarily chosen */ #define NO_AXIS_LIMITS -1 @@ -94,34 +97,21 @@ SOFTWARE. #define RevertToFollowKeyboard 3 #endif -/* Used for enter/leave and focus in/out semaphores */ -#define SEMAPHORE_FIELD_SET(win, dev, field) \ - (win)->field[(dev)->id/8] |= (1 << ((dev)->id % 8)); \ - -#define SEMAPHORE_FIELD_UNSET(win, dev, field) \ - (win)->field[(dev)->id/8] &= ~(1 << ((dev)->id % 8)); - -#define FOCUS_SEMAPHORE_SET(win, dev) \ - SEMAPHORE_FIELD_SET(win, dev, focusinout); - -#define FOCUS_SEMAPHORE_UNSET(win, dev) \ - SEMAPHORE_FIELD_UNSET(win, dev, focusinout); - -#define FOCUS_SEMAPHORE_ISSET(win, dev) \ - (win)->focusinout[(dev)->id/8] & (1 << ((dev)->id % 8)) - typedef unsigned long Leds; typedef struct _OtherClients *OtherClientsPtr; typedef struct _InputClients *InputClientsPtr; typedef struct _DeviceIntRec *DeviceIntPtr; typedef struct _ClassesRec *ClassesPtr; +typedef union _GrabMask GrabMask; typedef struct _EventList { xEvent* event; int evlen; /* length of allocated memory for event in bytes. This is not the actual length of the event. The event's actual length is 32 for standard events or 32 + - ((xGenericEvent*)event)->length * 4 for GenericEvents */ + ((xGenericEvent*)event)->length * 4 for GenericEvents. + For events in the EQ, the length is + ((InternalEvent*)event)->u.any.length */ } EventList, *EventListPtr; /* The DIX stores incoming input events in this list */ @@ -133,9 +123,8 @@ typedef int (*DeviceProc)( int /*what*/); typedef void (*ProcessInputProc)( - xEventPtr /*events*/, - DeviceIntPtr /*device*/, - int /*count*/); + InternalEvent * /*event*/, + DeviceIntPtr /*device*/); typedef Bool (*DeviceHandleProc)( DeviceIntPtr /*device*/, @@ -212,8 +201,8 @@ typedef struct { unsigned char id; } LedCtrl; -extern KeybdCtrl defaultKeyboardControl; -extern PtrCtrl defaultPointerControl; +extern _X_EXPORT KeybdCtrl defaultKeyboardControl; +extern _X_EXPORT PtrCtrl defaultPointerControl; typedef struct _InputOption { char *key; @@ -221,21 +210,34 @@ typedef struct _InputOption { struct _InputOption *next; } InputOption; +/* Key has been run through all input processing and events sent to clients. */ +#define KEY_PROCESSED 1 +/* Key has not been fully processed, no events have been sent. */ +#define KEY_POSTED 2 + +extern void set_key_down(DeviceIntPtr pDev, int key_code, int type); +extern void set_key_up(DeviceIntPtr pDev, int key_code, int type); +extern int key_is_down(DeviceIntPtr pDev, int key_code, int type); + extern void InitCoreDevices(void); +extern void InitXTestDevices(void); -extern DeviceIntPtr AddInputDevice( +extern _X_EXPORT DeviceIntPtr AddInputDevice( ClientPtr /*client*/, DeviceProc /*deviceProc*/, Bool /*autoStart*/); -extern Bool EnableDevice( - DeviceIntPtr /*device*/); +extern _X_EXPORT Bool EnableDevice( + DeviceIntPtr /*device*/, + BOOL /* sendevent */); -extern Bool ActivateDevice( - DeviceIntPtr /*device*/); +extern _X_EXPORT Bool ActivateDevice( + DeviceIntPtr /*device*/, + BOOL /* sendevent */); -extern Bool DisableDevice( - DeviceIntPtr /*device*/); +extern _X_EXPORT Bool DisableDevice( + DeviceIntPtr /*device*/, + BOOL /* sendevent */); extern int InitAndStartDevices(void); @@ -243,10 +245,11 @@ extern void CloseDownDevices(void); extern void UndisplayDevices(void); -extern int RemoveDevice( - DeviceIntPtr /*dev*/); +extern _X_EXPORT int RemoveDevice( + DeviceIntPtr /*dev*/, + BOOL /* sendevent */); -extern int NumMotionEvents(void); +extern _X_EXPORT int NumMotionEvents(void); extern void RegisterPointerDevice( DeviceIntPtr /*device*/); @@ -254,44 +257,41 @@ extern void RegisterPointerDevice( extern void RegisterKeyboardDevice( DeviceIntPtr /*device*/); -extern int dixLookupDevice( +extern _X_EXPORT int dixLookupDevice( DeviceIntPtr * /* dev */, int /* id */, ClientPtr /* client */, Mask /* access_mode */); -extern void QueryMinMaxKeyCodes( +extern _X_EXPORT void QueryMinMaxKeyCodes( KeyCode* /*minCode*/, KeyCode* /*maxCode*/); -extern Bool SetKeySymsMap( +extern _X_EXPORT Bool SetKeySymsMap( KeySymsPtr /*dst*/, KeySymsPtr /*src*/); -extern Bool InitKeyClassDeviceStruct( - DeviceIntPtr /*device*/, - KeySymsPtr /*pKeySyms*/, - CARD8 /*pModifiers*/[]); - -extern Bool InitButtonClassDeviceStruct( +extern _X_EXPORT Bool InitButtonClassDeviceStruct( DeviceIntPtr /*device*/, int /*numButtons*/, + Atom* /* labels */, CARD8* /*map*/); -extern Bool InitValuatorClassDeviceStruct( +extern _X_EXPORT Bool InitValuatorClassDeviceStruct( DeviceIntPtr /*device*/, int /*numAxes*/, + Atom* /* labels */, int /*numMotionEvents*/, int /*mode*/); -extern Bool InitPointerAccelerationScheme( +extern _X_EXPORT Bool InitPointerAccelerationScheme( DeviceIntPtr /*dev*/, int /*scheme*/); -extern Bool InitAbsoluteClassDeviceStruct( +extern _X_EXPORT Bool InitAbsoluteClassDeviceStruct( DeviceIntPtr /*device*/); -extern Bool InitFocusClassDeviceStruct( +extern _X_EXPORT Bool InitFocusClassDeviceStruct( DeviceIntPtr /*device*/); typedef void (*BellProcPtr)( @@ -304,16 +304,11 @@ typedef void (*KbdCtrlProcPtr)( DeviceIntPtr /*device*/, KeybdCtrl * /*ctrl*/); -extern Bool InitKbdFeedbackClassDeviceStruct( - DeviceIntPtr /*device*/, - BellProcPtr /*bellProc*/, - KbdCtrlProcPtr /*controlProc*/); - typedef void (*PtrCtrlProcPtr)( DeviceIntPtr /*device*/, PtrCtrl * /*ctrl*/); -extern Bool InitPtrFeedbackClassDeviceStruct( +extern _X_EXPORT Bool InitPtrFeedbackClassDeviceStruct( DeviceIntPtr /*device*/, PtrCtrlProcPtr /*controlProc*/); @@ -321,7 +316,7 @@ typedef void (*StringCtrlProcPtr)( DeviceIntPtr /*device*/, StringCtrl * /*ctrl*/); -extern Bool InitStringFeedbackClassDeviceStruct( +extern _X_EXPORT Bool InitStringFeedbackClassDeviceStruct( DeviceIntPtr /*device*/, StringCtrlProcPtr /*controlProc*/, int /*max_symbols*/, @@ -332,7 +327,7 @@ typedef void (*BellCtrlProcPtr)( DeviceIntPtr /*device*/, BellCtrl * /*ctrl*/); -extern Bool InitBellFeedbackClassDeviceStruct( +extern _X_EXPORT Bool InitBellFeedbackClassDeviceStruct( DeviceIntPtr /*device*/, BellProcPtr /*bellProc*/, BellCtrlProcPtr /*controlProc*/); @@ -341,7 +336,7 @@ typedef void (*LedCtrlProcPtr)( DeviceIntPtr /*device*/, LedCtrl * /*ctrl*/); -extern Bool InitLedFeedbackClassDeviceStruct( +extern _X_EXPORT Bool InitLedFeedbackClassDeviceStruct( DeviceIntPtr /*device*/, LedCtrlProcPtr /*controlProc*/); @@ -350,30 +345,30 @@ typedef void (*IntegerCtrlProcPtr)( IntegerCtrl * /*ctrl*/); -extern Bool InitIntegerFeedbackClassDeviceStruct( +extern _X_EXPORT Bool InitIntegerFeedbackClassDeviceStruct( DeviceIntPtr /*device*/, IntegerCtrlProcPtr /*controlProc*/); -extern Bool InitPointerDeviceStruct( +extern _X_EXPORT Bool InitPointerDeviceStruct( DevicePtr /*device*/, CARD8* /*map*/, int /*numButtons*/, + Atom* /* btn_labels */, PtrCtrlProcPtr /*controlProc*/, int /*numMotionEvents*/, - int /*numAxes*/); + int /*numAxes*/, + Atom* /* axes_labels */); -extern Bool InitKeyboardDeviceStruct( - DevicePtr /*device*/, - KeySymsPtr /*pKeySyms*/, - CARD8 /*pModifiers*/[], +extern _X_EXPORT Bool InitKeyboardDeviceStruct( + DeviceIntPtr /*device*/, + XkbRMLVOSet * /*rmlvo*/, BellProcPtr /*bellProc*/, KbdCtrlProcPtr /*controlProc*/); -extern void SendMappingNotify( +extern int ApplyPointerMapping( DeviceIntPtr /* pDev */, - unsigned int /*request*/, - unsigned int /*firstKeyCode*/, - unsigned int /*count*/, + CARD8 * /* map */, + int /* len */, ClientPtr /* client */); extern Bool BadDeviceMap( @@ -383,13 +378,6 @@ extern Bool BadDeviceMap( unsigned /*high*/, XID* /*errval*/); -extern Bool AllModifierKeysAreUp( - DeviceIntPtr /*device*/, - CARD8* /*map1*/, - int /*per1*/, - CARD8* /*map2*/, - int /*per2*/); - extern void NoteLedState( DeviceIntPtr /*keybd*/, int /*led*/, @@ -400,49 +388,36 @@ extern void MaybeStopHint( ClientPtr /*client*/); extern void ProcessPointerEvent( - xEventPtr /*xE*/, - DeviceIntPtr /*mouse*/, - int /*count*/); + InternalEvent* /* ev */, + DeviceIntPtr /*mouse*/); extern void ProcessKeyboardEvent( - xEventPtr /*xE*/, - DeviceIntPtr /*keybd*/, - int /*count*/); - -#ifdef XKB -extern void CoreProcessPointerEvent( - xEventPtr /*xE*/, - DeviceIntPtr /*mouse*/, - int /*count*/) _X_DEPRECATED; - -extern _X_DEPRECATED void CoreProcessKeyboardEvent( - xEventPtr /*xE*/, - DeviceIntPtr /*keybd*/, - int /*count*/) _X_DEPRECATED; -#endif + InternalEvent* /*ev*/, + DeviceIntPtr /*keybd*/); extern Bool LegalModifier( unsigned int /*key*/, DeviceIntPtr /*pDev*/); -extern void ProcessInputEvents(void); +extern _X_EXPORT void ProcessInputEvents(void); -extern void InitInput( +extern _X_EXPORT void InitInput( int /*argc*/, char ** /*argv*/); -extern int GetMaximumEventsNum(void); +extern _X_EXPORT int GetMaximumEventsNum(void); -extern int GetEventList(EventListPtr* list); -extern EventListPtr InitEventList(int num_events); -extern void SetMinimumEventSize(EventListPtr list, +extern _X_EXPORT int GetEventList(EventListPtr* list); +extern _X_EXPORT EventListPtr InitEventList(int num_events); +extern _X_EXPORT void SetMinimumEventSize(EventListPtr list, int num_events, int min_size); -extern void FreeEventList(EventListPtr list, int num_events); +extern _X_EXPORT void FreeEventList(EventListPtr list, int num_events); -extern void CreateClassesChangedEvent(EventListPtr event, +extern void CreateClassesChangedEvent(EventListPtr event, DeviceIntPtr master, - DeviceIntPtr slave); + DeviceIntPtr slave, + int type); extern int GetPointerEvents( EventListPtr events, DeviceIntPtr pDev, @@ -483,13 +458,13 @@ extern void PostSyntheticMotion( int screen, unsigned long time); -extern int GetMotionHistorySize( +extern _X_EXPORT int GetMotionHistorySize( void); -extern void AllocateMotionHistory( +extern _X_EXPORT void AllocateMotionHistory( DeviceIntPtr pDev); -extern int GetMotionHistory( +extern _X_EXPORT int GetMotionHistory( DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, @@ -501,25 +476,57 @@ extern int AttachDevice(ClientPtr client, DeviceIntPtr slave, DeviceIntPtr master); -extern DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd); +extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd); +extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type); -extern int AllocMasterDevice(ClientPtr client, +extern int AllocDevicePair(ClientPtr client, char* name, DeviceIntPtr* ptr, - DeviceIntPtr* keybd); + DeviceIntPtr* keybd, + DeviceProc ptr_proc, + DeviceProc keybd_proc, + Bool master); extern void DeepCopyDeviceClasses(DeviceIntPtr from, - DeviceIntPtr to); + DeviceIntPtr to, + DeviceChangedEvent *dce); + +/* Helper functions. */ +extern int generate_modkeymap(ClientPtr client, DeviceIntPtr dev, + KeyCode **modkeymap, int *max_keys_per_mod); +extern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map, + int max_keys_per_mod); +extern int AllocXTestDevice(ClientPtr client, + char* name, + DeviceIntPtr* ptr, + DeviceIntPtr* keybd, + DeviceIntPtr master_ptr, + DeviceIntPtr master_keybd); +extern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master); +extern DeviceIntPtr GetXTestDevice(DeviceIntPtr master); + +/* misc event helpers */ +extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event); +extern Mask GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev); +void FixUpEventFromWindow(DeviceIntPtr pDev, + xEvent *xE, + WindowPtr pWin, + Window child, + Bool calcChild); /* Implemented by the DDX. */ -extern int NewInputDeviceRequest( +extern _X_EXPORT int NewInputDeviceRequest( InputOption *options, DeviceIntPtr *dev); -extern void DeleteInputDeviceRequest( +extern _X_EXPORT void DeleteInputDeviceRequest( DeviceIntPtr dev); -extern void DDXRingBell( +extern _X_EXPORT void DDXRingBell( int volume, int pitch, int duration); +/* Set to TRUE by default - os/utils.c sets it to FALSE on user request, + xfixes/cursor.c uses it to determine if the cursor is enabled */ +extern Bool EnableCursor; + #endif /* INPUT_H */ diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h index a6f823cd5..29ad5a814 100644 --- a/xorg-server/include/inputstr.h +++ b/xorg-server/include/inputstr.h @@ -57,33 +57,86 @@ SOFTWARE. #include "privates.h" #define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))) +#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7))) +#define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7))) #define SameClient(obj,client) \ (CLIENT_BITS((obj)->resource) == (client)->clientAsMask) -#define EMASKSIZE MAXDEVICES + 1 +#define EMASKSIZE MAXDEVICES + 2 -extern DevPrivateKey CoreDevicePrivateKey; - -/* Kludge: OtherClients and InputClients must be compatible, see code */ +/* This is the last XI2 event supported by the server. If you add + * events to the protocol, the server will not support these events until + * this number here is bumped. + */ +#define XI2LASTEVENT 17 /* XI_RawMotion */ +#define XI2MASKSIZE ((XI2LASTEVENT + 7)/8) /* no of bits for masks */ +/** + * This struct stores the core event mask for each client except the client + * that created the window. + * + * Each window that has events selected from other clients has at least one of + * these masks. If multiple clients selected for events on the same window, + * these masks are in a linked list. + * + * The event mask for the client that created the window is stored in + * win->eventMask instead. + * + * The resource id is simply a fake client ID to associate this mask with a + * client. + * + * Kludge: OtherClients and InputClients must be compatible, see code. + */ typedef struct _OtherClients { - OtherClientsPtr next; - XID resource; /* id for putting into resource manager */ - Mask mask; + OtherClientsPtr next; /**< Pointer to the next mask */ + XID resource; /**< id for putting into resource manager */ + Mask mask; /**< Core event mask */ } OtherClients; +/** + * This struct stores the XI event mask for each client. + * + * Each window that has events selected has at least one of these masks. If + * multiple client selected for events on the same window, these masks are in + * a linked list. + */ typedef struct _InputClients { - InputClientsPtr next; - XID resource; /* id for putting into resource manager */ - Mask mask[EMASKSIZE]; + InputClientsPtr next; /**< Pointer to the next mask */ + XID resource; /**< id for putting into resource manager */ + Mask mask[EMASKSIZE]; /**< Actual XI event mask, deviceid is index */ + /** XI2 event masks. One per device, each bit is a mask of (1 << type) */ + unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE]; } InputClients; +/** + * Combined XI event masks from all devices. + * + * This is the XI equivalent of the deliverableEvents, eventMask and + * dontPropagate mask of the WindowRec (or WindowOptRec). + * + * A window that has an XI client selecting for events has exactly one + * OtherInputMasks struct and exactly one InputClients struct hanging off + * inputClients. Each further client appends to the inputClients list. + * Each Mask field is per-device, with the device id as the index. + * Exception: for non-device events (Presence events), the MAXDEVICES + * deviceid is used. + */ typedef struct _OtherInputMasks { + /** + * Bitwise OR of all masks by all clients and the window's parent's masks. + */ Mask deliverableEvents[EMASKSIZE]; + /** + * Bitwise OR of all masks by all clients on this window. + */ Mask inputEvents[EMASKSIZE]; + /** The do-not-propagate masks for each device. */ Mask dontPropagateMask[EMASKSIZE]; + /** The clients that selected for events */ InputClientsPtr inputClients; + /* XI2 event masks. One per device, each bit is a mask of (1 << type) */ + unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE]; } OtherInputMasks; /* @@ -98,10 +151,22 @@ typedef struct _OtherInputMasks { 3 buttons. */ typedef struct _DetailRec { /* Grab details may be bit masks */ - unsigned short exact; + unsigned int exact; Mask *pMask; } DetailRec; +typedef enum { + GRABTYPE_CORE, + GRABTYPE_XI, + GRABTYPE_XI2 +} GrabType; + +union _GrabMask { + Mask core; + Mask xi; + char xi2mask[EMASKSIZE][XI2MASKSIZE]; +}; + /** * Central struct for device grabs. * The same struct is used for both core grabs and device grabs, with @@ -123,8 +188,7 @@ typedef struct _GrabRec { unsigned ownerEvents:1; unsigned keyboardMode:1; unsigned pointerMode:1; - unsigned coreGrab:1; /* grab is on core device */ - unsigned coreMods:1; /* modifiers are on core keyboard */ + GrabType grabtype; CARD8 type; /* event type */ DetailRec modifiersDetail; DeviceIntPtr modifierDevice; @@ -133,24 +197,16 @@ typedef struct _GrabRec { CursorPtr cursor; /* always NULL for keyboards */ Mask eventMask; Mask deviceMask; - GenericMaskPtr genericMasks; + /* XI2 event masks. One per device, each bit is a mask of (1 << type) */ + unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE]; } GrabRec; typedef struct _KeyClassRec { + int sourceid; CARD8 down[DOWN_LENGTH]; CARD8 postdown[DOWN_LENGTH]; - KeyCode *modifierKeyMap; - KeySymsRec curKeySyms; - int modifierKeyCount[8]; - CARD8 modifierMap[MAP_LENGTH]; - CARD8 maxKeysPerModifier; - unsigned short state; - unsigned short prev_state; -#ifdef XKB + int modifierKeyCount[8]; struct _XkbSrvInfo *xkbInfo; -#else - void *pad0; -#endif } KeyClassRec, *KeyClassPtr; typedef struct _AxisInfo { @@ -159,6 +215,7 @@ typedef struct _AxisInfo { int max_resolution; int min_value; int max_value; + Atom label; } AxisInfo, *AxisInfoPtr; typedef struct _ValuatorAccelerationRec { @@ -169,6 +226,7 @@ typedef struct _ValuatorAccelerationRec { } ValuatorAccelerationRec, *ValuatorAccelerationPtr; typedef struct _ValuatorClassRec { + int sourceid; int numMotionEvents; int first_motion; int last_motion; @@ -178,12 +236,13 @@ typedef struct _ValuatorClassRec { AxisInfoPtr axes; unsigned short numAxes; - int *axisVal; /* always absolute, but device-coord system */ + double *axisVal; /* always absolute, but device-coord system */ CARD8 mode; ValuatorAccelerationRec accelScheme; } ValuatorClassRec, *ValuatorClassPtr; typedef struct _ButtonClassRec { + int sourceid; CARD8 numButtons; CARD8 buttonsDown; /* number of buttons currently down This counts logical buttons, not @@ -193,15 +252,14 @@ typedef struct _ButtonClassRec { unsigned short state; Mask motionMask; CARD8 down[DOWN_LENGTH]; + CARD8 postdown[DOWN_LENGTH]; CARD8 map[MAP_LENGTH]; -#ifdef XKB union _XkbAction *xkb_acts; -#else - void *pad0; -#endif + Atom labels[MAX_BUTTONS]; } ButtonClassRec, *ButtonClassPtr; typedef struct _FocusClassRec { + int sourceid; WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */ int revert; TimeStamp time; @@ -211,10 +269,12 @@ typedef struct _FocusClassRec { } FocusClassRec, *FocusClassPtr; typedef struct _ProximityClassRec { + int sourceid; char pad; } ProximityClassRec, *ProximityClassPtr; typedef struct _AbsoluteClassRec { + int sourceid; /* Calibration. */ int min_x; int max_x; @@ -246,11 +306,7 @@ typedef struct _KbdFeedbackClassRec { KbdCtrlProcPtr CtrlProc; KeybdCtrl ctrl; KbdFeedbackPtr next; -#ifdef XKB struct _XkbSrvLedInfo *xkb_sli; -#else - void *pad0; -#endif } KbdFeedbackClassRec; typedef struct _PtrFeedbackClassRec { @@ -282,11 +338,7 @@ typedef struct _LedFeedbackClassRec { LedCtrlProcPtr CtrlProc; LedCtrl ctrl; LedFeedbackPtr next; -#ifdef XKB struct _XkbSrvLedInfo *xkb_sli; -#else - void *pad0; -#endif } LedFeedbackClassRec; @@ -405,8 +457,7 @@ typedef struct _GrabInfoRec { Bool frozen; int state; GrabPtr other; /* if other grab has this frozen */ - xEvent *event; /* saved to be replayed */ - int evcount; + DeviceEvent *event; /* saved to be replayed */ } sync; } GrabInfoRec, *GrabInfoPtr; @@ -420,6 +471,11 @@ typedef struct _SpriteInfoRec { pointer that owns the sprite. */ } SpriteInfoRec, *SpriteInfoPtr; +/* device types */ +#define MASTER_POINTER 1 +#define MASTER_KEYBOARD 2 +#define SLAVE 3 + typedef struct _DeviceIntRec { DeviceRec public; DeviceIntPtr next; @@ -432,10 +488,10 @@ typedef struct _DeviceIntRec { Bool enabled; /* TRUE if ON returns Success */ Bool coreEvents; /* TRUE if device also sends core */ GrabInfoRec deviceGrab; /* grab on the device */ - Bool isMaster; /* TRUE if device is master */ - Atom type; + int type; /* MASTER_POINTER, MASTER_KEYBOARD, SLAVE */ + Atom xinput_type; char *name; - CARD8 id; + int id; KeyClassPtr key; ValuatorClassPtr valuator; ButtonClassPtr button; @@ -448,19 +504,15 @@ typedef struct _DeviceIntRec { StringFeedbackPtr stringfeed; BellFeedbackPtr bell; LedFeedbackPtr leds; -#ifdef XKB struct _XkbInterest *xkb_interest; -#else - void *pad0; -#endif char *config_info; /* used by the hotplug layer */ PrivateRec *devPrivates; int nPrivates; DeviceUnwrapProc unwrapProc; SpriteInfoPtr spriteInfo; union { - DeviceIntPtr master; /* master device */ - DeviceIntPtr lastSlave; /* last slave device used */ + DeviceIntPtr master; /* master device */ + DeviceIntPtr lastSlave; /* last slave device used */ } u; /* last valuator values recorded, not posted to client; @@ -473,6 +525,7 @@ typedef struct _DeviceIntRec { int valuators[MAX_VALUATORS]; float remainder[MAX_VALUATORS]; int numValuators; + DeviceIntPtr slave; } last; /* Input device property handling. */ @@ -488,9 +541,11 @@ typedef struct { DeviceIntPtr off_devices; /* all devices turned off */ DeviceIntPtr keyboard; /* the main one for the server */ DeviceIntPtr pointer; + DeviceIntPtr all_devices; + DeviceIntPtr all_master_devices; } InputInfo; -extern InputInfo inputInfo; +extern _X_EXPORT InputInfo inputInfo; /* for keeping the events for devices grabbed synchronously */ typedef struct _QdEvent *QdEventPtr; @@ -499,8 +554,7 @@ typedef struct _QdEvent { DeviceIntPtr device; ScreenPtr pScreen; /* what screen the pointer was on */ unsigned long months; /* milliseconds is in the event */ - xEvent *event; - int evcount; -} QdEventRec; + InternalEvent *event; +} QdEventRec; #endif /* INPUTSTRUCT_H */ diff --git a/xorg-server/include/misc.h b/xorg-server/include/misc.h index 85f9e5d4f..877c682d4 100644 --- a/xorg-server/include/misc.h +++ b/xorg-server/include/misc.h @@ -72,9 +72,6 @@ OF THIS SOFTWARE. * */ -extern unsigned long globalSerialNumber; -extern unsigned long serverGeneration; - #include #include #include @@ -89,7 +86,7 @@ extern unsigned long serverGeneration; #define MAXCLIENTS 256 #define MAXEXTENSIONS 128 #define MAXFORMATS 8 -#define MAXDEVICES 20 /* input devices */ +#define MAXDEVICES 40 /* input devices */ #define EXTENSION_EVENT_BASE 64 #define EXTENSION_BASE 128 @@ -183,6 +180,36 @@ typedef struct _xReq *xReqPtr; #endif +/** + * Calculate the number of bytes needed to hold bits. + * @param bits The minimum number of bits needed. + * @return The number of bytes needed to hold bits. + */ +static inline int +bits_to_bytes(const int bits) { + return ((bits + 7) >> 3); +} +/** + * Calculate the number of 4-byte units needed to hold the given number of + * bytes. + * @param bytes The minimum number of bytes needed. + * @return The number of 4-byte units needed to hold bytes. + */ +static inline int +bytes_to_int32(const int bytes) { + return (((bytes) + 3) >> 2); +} + +/** + * Calculate the number of bytes (in multiples of 4) needed to hold bytes. + * @param bytes The minimum number of bytes needed. + * @return The closest multiple of 4 that is equal or higher than bytes. + */ +static inline int +pad_to_int32(const int bytes) { + return (((bytes) + 3) & ~3); +} + /* some macros to help swap requests, replies, and events */ #define LengthRestB(stuff) \ @@ -227,17 +254,17 @@ typedef struct _xReq *xReqPtr; ((char *) &(dst))[0] = ((char *) &(src))[1];\ ((char *) &(dst))[1] = ((char *) &(src))[0]; } -extern void SwapLongs( +extern _X_EXPORT void SwapLongs( CARD32 *list, unsigned long count); -extern void SwapShorts( +extern _X_EXPORT void SwapShorts( short *list, unsigned long count); -extern void MakePredeclaredAtoms(void); +extern _X_EXPORT void MakePredeclaredAtoms(void); -extern int Ones( +extern _X_EXPORT int Ones( unsigned long /*mask*/); typedef struct _xPoint *DDXPointPtr; @@ -256,4 +283,7 @@ typedef struct _CharInfo *CharInfoPtr; /* also in fonts/include/font.h */ #define _XTYPEDEF_CHARINFOPTR #endif +extern _X_EXPORT unsigned long globalSerialNumber; +extern _X_EXPORT unsigned long serverGeneration; + #endif /* MISC_H */ diff --git a/xorg-server/include/opaque.h b/xorg-server/include/opaque.h index 07a0715ef..b3c7c70d6 100644 --- a/xorg-server/include/opaque.h +++ b/xorg-server/include/opaque.h @@ -33,46 +33,46 @@ from The Open Group. #include "globals.h" -extern char *defaultTextFont; -extern char *defaultCursorFont; -extern int MaxClients; -extern volatile char isItTimeToYield; -extern volatile char dispatchException; +extern _X_EXPORT char *defaultTextFont; +extern _X_EXPORT char *defaultCursorFont; +extern _X_EXPORT int MaxClients; +extern _X_EXPORT volatile char isItTimeToYield; +extern _X_EXPORT volatile char dispatchException; /* bit values for dispatchException */ #define DE_RESET 1 #define DE_TERMINATE 2 #define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */ -extern CARD32 TimeOutValue; -extern int ScreenSaverBlanking; -extern int ScreenSaverAllowExposures; -extern int defaultScreenSaverBlanking; -extern int defaultScreenSaverAllowExposures; -extern char *display; - -extern int defaultBackingStore; -extern Bool disableBackingStore; -extern Bool enableBackingStore; -extern Bool PartialNetwork; +extern _X_EXPORT CARD32 TimeOutValue; +extern _X_EXPORT int ScreenSaverBlanking; +extern _X_EXPORT int ScreenSaverAllowExposures; +extern _X_EXPORT int defaultScreenSaverBlanking; +extern _X_EXPORT int defaultScreenSaverAllowExposures; +extern _X_EXPORT char *display; + +extern _X_EXPORT int defaultBackingStore; +extern _X_EXPORT Bool disableBackingStore; +extern _X_EXPORT Bool enableBackingStore; +extern _X_EXPORT Bool PartialNetwork; #ifndef NOLOGOHACK -extern int logoScreenSaver; +extern _X_EXPORT int logoScreenSaver; #endif #ifdef RLIMIT_DATA -extern int limitDataSpace; +extern _X_EXPORT int limitDataSpace; #endif #ifdef RLIMIT_STACK -extern int limitStackSpace; +extern _X_EXPORT int limitStackSpace; #endif #ifdef RLIMIT_NOFILE -extern int limitNoFile; +extern _X_EXPORT int limitNoFile; #endif -extern Bool defeatAccessControl; -extern long maxBigRequestSize; -extern Bool party_like_its_1989; -extern Bool whiteRoot; +extern _X_EXPORT Bool defeatAccessControl; +extern _X_EXPORT long maxBigRequestSize; +extern _X_EXPORT Bool party_like_its_1989; +extern _X_EXPORT Bool whiteRoot; -extern Bool CoreDump; +extern _X_EXPORT Bool CoreDump; #endif /* OPAQUE_H */ diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h index 77e94486a..2f6b0c06f 100644 --- a/xorg-server/include/os.h +++ b/xorg-server/include/os.h @@ -52,8 +52,6 @@ SOFTWARE. #include "misc.h" #include -#define NullFID ((FID) 0) - #define SCREEN_SAVER_ON 0 #define SCREEN_SAVER_OFF 1 #define SCREEN_SAVER_FORCER 2 @@ -66,7 +64,6 @@ SOFTWARE. #define MAX_BIG_REQUEST_SIZE 4194303 #endif -typedef pointer FID; typedef struct _FontPathRec *FontPathPtr; typedef struct _NewClientRec *NewClientPtr; @@ -86,92 +83,87 @@ typedef struct _NewClientRec *NewClientPtr; #include #include -/* have to put $(SIGNAL_DEFINES) in DEFINES in Imakefile to get this right */ -#ifdef SIGNALRETURNSINT -#define SIGVAL int -#else -#define SIGVAL void +#ifdef DDXOSVERRORF +extern _X_EXPORT void (*OsVendorVErrorFProc)(const char *, va_list args); #endif -extern void (*OsVendorVErrorFProc)(const char *, va_list args); - -extern int WaitForSomething( +extern _X_EXPORT int WaitForSomething( int* /*pClientsReady*/ ); -extern int ReadRequestFromClient(ClientPtr /*client*/); +extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client*/); -extern Bool InsertFakeRequest( +extern _X_EXPORT Bool InsertFakeRequest( ClientPtr /*client*/, char* /*data*/, int /*count*/); -extern void ResetCurrentRequest(ClientPtr /*client*/); +extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client*/); -extern void FlushAllOutput(void); +extern _X_EXPORT void FlushAllOutput(void); -extern void FlushIfCriticalOutputPending(void); +extern _X_EXPORT void FlushIfCriticalOutputPending(void); -extern void SetCriticalOutputPending(void); +extern _X_EXPORT void SetCriticalOutputPending(void); -extern int WriteToClient(ClientPtr /*who*/, int /*count*/, const void* /*buf*/); +extern _X_EXPORT int WriteToClient(ClientPtr /*who*/, int /*count*/, const void* /*buf*/); -extern void ResetOsBuffers(void); +extern _X_EXPORT void ResetOsBuffers(void); -extern void InitConnectionLimits(void); +extern _X_EXPORT void InitConnectionLimits(void); -extern void NotifyParentProcess(void); +extern _X_EXPORT void NotifyParentProcess(void); -extern void CreateWellKnownSockets(void); +extern _X_EXPORT void CreateWellKnownSockets(void); -extern void ResetWellKnownSockets(void); +extern _X_EXPORT void ResetWellKnownSockets(void); -extern void CloseWellKnownConnections(void); +extern _X_EXPORT void CloseWellKnownConnections(void); -extern XID AuthorizationIDOfClient(ClientPtr /*client*/); +extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client*/); -extern char *ClientAuthorized( +extern _X_EXPORT char *ClientAuthorized( ClientPtr /*client*/, unsigned int /*proto_n*/, char* /*auth_proto*/, unsigned int /*string_n*/, char* /*auth_string*/); -extern Bool EstablishNewConnections( +extern _X_EXPORT Bool EstablishNewConnections( ClientPtr /*clientUnused*/, pointer /*closure*/); -extern void CheckConnections(void); +extern _X_EXPORT void CheckConnections(void); -extern void CloseDownConnection(ClientPtr /*client*/); +extern _X_EXPORT void CloseDownConnection(ClientPtr /*client*/); -extern void AddGeneralSocket(int /*fd*/); +extern _X_EXPORT void AddGeneralSocket(int /*fd*/); -extern void RemoveGeneralSocket(int /*fd*/); +extern _X_EXPORT void RemoveGeneralSocket(int /*fd*/); -extern void AddEnabledDevice(int /*fd*/); +extern _X_EXPORT void AddEnabledDevice(int /*fd*/); -extern void RemoveEnabledDevice(int /*fd*/); +extern _X_EXPORT void RemoveEnabledDevice(int /*fd*/); -extern int OnlyListenToOneClient(ClientPtr /*client*/); +extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client*/); -extern void ListenToAllClients(void); +extern _X_EXPORT void ListenToAllClients(void); -extern void IgnoreClient(ClientPtr /*client*/); +extern _X_EXPORT void IgnoreClient(ClientPtr /*client*/); -extern void AttendClient(ClientPtr /*client*/); +extern _X_EXPORT void AttendClient(ClientPtr /*client*/); -extern void MakeClientGrabImpervious(ClientPtr /*client*/); +extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client*/); -extern void MakeClientGrabPervious(ClientPtr /*client*/); +extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client*/); #ifdef XQUARTZ extern void ListenOnOpenFD(int /* fd */, int /* noxauth */); #endif -extern CARD32 GetTimeInMillis(void); +extern _X_EXPORT CARD32 GetTimeInMillis(void); -extern void AdjustWaitForDelay( +extern _X_EXPORT void AdjustWaitForDelay( pointer /*waitTime*/, unsigned long /*newdelay*/); @@ -182,69 +174,71 @@ typedef CARD32 (*OsTimerCallback)( CARD32 /* time */, pointer /* arg */); -extern void TimerInit(void); +extern _X_EXPORT void TimerInit(void); -extern Bool TimerForce(OsTimerPtr /* timer */); +extern _X_EXPORT Bool TimerForce(OsTimerPtr /* timer */); #define TimerAbsolute (1<<0) #define TimerForceOld (1<<1) -extern OsTimerPtr TimerSet( +extern _X_EXPORT OsTimerPtr TimerSet( OsTimerPtr /* timer */, int /* flags */, CARD32 /* millis */, OsTimerCallback /* func */, pointer /* arg */); -extern void TimerCheck(void); -extern void TimerCancel(OsTimerPtr /* pTimer */); -extern void TimerFree(OsTimerPtr /* pTimer */); +extern _X_EXPORT void TimerCheck(void); +extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */); +extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */); -extern void SetScreenSaverTimer(void); -extern void FreeScreenSaverTimer(void); +extern _X_EXPORT void SetScreenSaverTimer(void); +extern _X_EXPORT void FreeScreenSaverTimer(void); -extern SIGVAL AutoResetServer(int /*sig*/); +extern _X_EXPORT void AutoResetServer(int /*sig*/); -extern SIGVAL GiveUp(int /*sig*/); +extern _X_EXPORT void GiveUp(int /*sig*/); -extern void UseMsg(void); +extern _X_EXPORT void UseMsg(void); -extern void ProcessCommandLine(int /*argc*/, char* /*argv*/[]); +extern _X_EXPORT void ProcessCommandLine(int /*argc*/, char* /*argv*/[]); -extern int set_font_authorizations( +extern _X_EXPORT int set_font_authorizations( char ** /* authorizations */, int * /*authlen */, pointer /* client */); #ifndef _HAVE_XALLOC_DECLS #define _HAVE_XALLOC_DECLS -extern pointer Xalloc(unsigned long /*amount*/); -extern pointer Xcalloc(unsigned long /*amount*/); -extern pointer Xrealloc(pointer /*ptr*/, unsigned long /*amount*/); -extern void Xfree(pointer /*ptr*/); +extern _X_EXPORT pointer Xalloc(unsigned long /*amount*/); +extern _X_EXPORT pointer Xcalloc(unsigned long /*amount*/); +extern _X_EXPORT pointer Xrealloc(pointer /*ptr*/, unsigned long /*amount*/); +extern _X_EXPORT void Xfree(pointer /*ptr*/); #endif -extern pointer XNFalloc(unsigned long /*amount*/); -extern pointer XNFcalloc(unsigned long /*amount*/); -extern pointer XNFrealloc(pointer /*ptr*/, unsigned long /*amount*/); +extern _X_EXPORT pointer XNFalloc(unsigned long /*amount*/); +extern _X_EXPORT pointer XNFcalloc(unsigned long /*amount*/); +extern _X_EXPORT pointer XNFrealloc(pointer /*ptr*/, unsigned long /*amount*/); -extern char *Xstrdup(const char *s); -extern char *XNFstrdup(const char *s); -extern char *Xprintf(const char *fmt, ...); -extern char *Xvprintf(const char *fmt, va_list va); -extern char *XNFprintf(const char *fmt, ...); -extern char *XNFvprintf(const char *fmt, va_list va); +extern _X_EXPORT char *Xstrdup(const char *s); +extern _X_EXPORT char *XNFstrdup(const char *s); +extern _X_EXPORT char *Xprintf(const char *fmt, ...); +extern _X_EXPORT char *Xvprintf(const char *fmt, va_list va); +extern _X_EXPORT char *XNFprintf(const char *fmt, ...); +extern _X_EXPORT char *XNFvprintf(const char *fmt, va_list va); -typedef SIGVAL (*OsSigHandlerPtr)(int /* sig */); +typedef void (*OsSigHandlerPtr)(int /* sig */); +typedef int (*OsSigWrapperPtr)(int /* sig */); -extern OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */); +extern _X_EXPORT OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */); +extern _X_EXPORT OsSigWrapperPtr OsRegisterSigWrapper(OsSigWrapperPtr newWrap); -extern int auditTrailLevel; +extern _X_EXPORT int auditTrailLevel; -extern void LockServer(void); -extern void UnlockServer(void); +extern _X_EXPORT void LockServer(void); +extern _X_EXPORT void UnlockServer(void); -extern int OsLookupColor( +extern _X_EXPORT int OsLookupColor( int /*screen*/, char * /*name*/, unsigned /*len*/, @@ -252,24 +246,24 @@ extern int OsLookupColor( unsigned short * /*pgreen*/, unsigned short * /*pblue*/); -extern void OsInit(void); +extern _X_EXPORT void OsInit(void); -extern void OsCleanup(Bool); +extern _X_EXPORT void OsCleanup(Bool); -extern void OsVendorFatalError(void); +extern _X_EXPORT void OsVendorFatalError(void); -extern void OsVendorInit(void); +extern _X_EXPORT void OsVendorInit(void); -void OsBlockSignals (void); +extern _X_EXPORT void OsBlockSignals (void); -void OsReleaseSignals (void); +extern _X_EXPORT void OsReleaseSignals (void); #if !defined(WIN32) -extern int System(char *); -extern pointer Popen(char *, char *); -extern int Pclose(pointer); -extern pointer Fopen(char *, char *); -extern int Fclose(pointer); +extern _X_EXPORT int System(char *); +extern _X_EXPORT pointer Popen(char *, char *); +extern _X_EXPORT int Pclose(pointer); +extern _X_EXPORT pointer Fopen(char *, char *); +extern _X_EXPORT int Fclose(pointer); #else #define System(a) system(a) #define Popen(a,b) popen(a,b) @@ -278,16 +272,16 @@ extern int Fclose(pointer); #define Fclose(a) fclose(a) #endif -extern void CheckUserParameters(int argc, char **argv, char **envp); -extern void CheckUserAuthorization(void); +extern _X_EXPORT void CheckUserParameters(int argc, char **argv, char **envp); +extern _X_EXPORT void CheckUserAuthorization(void); -extern int AddHost( +extern _X_EXPORT int AddHost( ClientPtr /*client*/, int /*family*/, unsigned /*length*/, pointer /*pAddr*/); -extern Bool ForEachHostInFamily ( +extern _X_EXPORT Bool ForEachHostInFamily ( int /*family*/, Bool (* /*func*/ )( unsigned char * /* addr */, @@ -295,13 +289,13 @@ extern Bool ForEachHostInFamily ( pointer /* closure */), pointer /*closure*/); -extern int RemoveHost( +extern _X_EXPORT int RemoveHost( ClientPtr /*client*/, int /*family*/, unsigned /*length*/, pointer /*pAddr*/); -extern int GetHosts( +extern _X_EXPORT int GetHosts( pointer * /*data*/, int * /*pnHosts*/, int * /*pLen*/, @@ -309,11 +303,11 @@ extern int GetHosts( typedef struct sockaddr * sockaddrPtr; -extern int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client); +extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client); -extern int LocalClient(ClientPtr /* client */); +extern _X_EXPORT int LocalClient(ClientPtr /* client */); -extern int LocalClientCred(ClientPtr, int *, int *); +extern _X_EXPORT int LocalClientCred(ClientPtr, int *, int *); #define LCC_UID_SET (1 << 0) #define LCC_GID_SET (1 << 1) @@ -330,42 +324,44 @@ typedef struct { int zoneid; /* Only set on Solaris 10 & later */ } LocalClientCredRec; -extern int GetLocalClientCreds(ClientPtr, LocalClientCredRec **); -extern void FreeLocalClientCreds(LocalClientCredRec *); +extern _X_EXPORT int GetLocalClientCreds(ClientPtr, LocalClientCredRec **); +extern _X_EXPORT void FreeLocalClientCreds(LocalClientCredRec *); -extern int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/); +extern _X_EXPORT int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/); -extern int GetAccessControl(void); +extern _X_EXPORT int GetAccessControl(void); -extern void AddLocalHosts(void); +extern _X_EXPORT void AddLocalHosts(void); -extern void ResetHosts(char *display); +extern _X_EXPORT void ResetHosts(char *display); -extern void EnableLocalHost(void); +extern _X_EXPORT void EnableLocalHost(void); -extern void DisableLocalHost(void); +extern _X_EXPORT void DisableLocalHost(void); -extern void AccessUsingXdmcp(void); +extern _X_EXPORT void AccessUsingXdmcp(void); -extern void DefineSelf(int /*fd*/); +extern _X_EXPORT void DefineSelf(int /*fd*/); -extern void AugmentSelf(pointer /*from*/, int /*len*/); +#if XDMCP +extern _X_EXPORT void AugmentSelf(pointer /*from*/, int /*len*/); -extern void InitAuthorization(char * /*filename*/); +extern _X_EXPORT void RegisterAuthorizations(void); +#endif -/* extern int LoadAuthorization(void); */ +extern _X_EXPORT void InitAuthorization(char * /*filename*/); -extern void RegisterAuthorizations(void); +/* extern int LoadAuthorization(void); */ -extern int AuthorizationFromID ( +extern _X_EXPORT int AuthorizationFromID ( XID id, unsigned short *name_lenp, char **namep, unsigned short *data_lenp, char **datap); -extern XID CheckAuthorization( +extern _X_EXPORT XID CheckAuthorization( unsigned int /*namelength*/, char * /*name*/, unsigned int /*datalength*/, @@ -374,31 +370,33 @@ extern XID CheckAuthorization( char ** /*reason*/ ); -extern void ResetAuthorization(void); +extern _X_EXPORT void ResetAuthorization(void); -extern int RemoveAuthorization ( +extern _X_EXPORT int RemoveAuthorization ( unsigned short name_length, char *name, unsigned short data_length, char *data); -extern int AddAuthorization( +extern _X_EXPORT int AddAuthorization( unsigned int /*name_length*/, char * /*name*/, unsigned int /*data_length*/, char * /*data*/); -extern XID GenerateAuthorization( +#ifdef XCSECURITY +extern _X_EXPORT XID GenerateAuthorization( unsigned int /* name_length */, char * /* name */, unsigned int /* data_length */, char * /* data */, unsigned int * /* data_length_return */, char ** /* data_return */); +#endif -extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/); +extern _X_EXPORT int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/); -extern void ddxUseMsg(void); +extern _X_EXPORT void ddxUseMsg(void); /* int ReqLen(xReq *req, ClientPtr client) * Given a pointer to a *complete* request, return its length in bytes. @@ -424,7 +422,7 @@ extern void ddxUseMsg(void); : (otherReqTypePtr)(((CARD32*)_pxReq)+1)) /* stuff for ReplyCallback */ -extern CallbackListPtr ReplyCallback; +extern _X_EXPORT CallbackListPtr ReplyCallback; typedef struct { ClientPtr client; const void *replyData; @@ -434,31 +432,31 @@ typedef struct { } ReplyInfoRec; /* stuff for FlushCallback */ -extern CallbackListPtr FlushCallback; +extern _X_EXPORT CallbackListPtr FlushCallback; -extern void AbortDDX(void); -extern void ddxGiveUp(void); -extern int TimeSinceLastInputEvent(void); +extern _X_EXPORT void AbortDDX(void); +extern _X_EXPORT void ddxGiveUp(void); +extern _X_EXPORT int TimeSinceLastInputEvent(void); /* strcasecmp.c */ #if NEED_STRCASECMP #define strcasecmp xstrcasecmp -extern int xstrcasecmp(const char *s1, const char *s2); +extern _X_EXPORT int xstrcasecmp(const char *s1, const char *s2); #endif #if NEED_STRNCASECMP #define strncasecmp xstrncasecmp -extern int xstrncasecmp(const char *s1, const char *s2, size_t n); +extern _X_EXPORT int xstrncasecmp(const char *s1, const char *s2, size_t n); #endif #if NEED_STRCASESTR #define strcasestr xstrcasestr -extern char *xstrcasestr(const char *s, const char *find); +extern _X_EXPORT char *xstrcasestr(const char *s, const char *find); #endif #ifndef HAS_STRLCPY -extern size_t strlcpy(char *dst, const char *src, size_t siz); -extern size_t strlcat(char *dst, const char *src, size_t siz); +extern _X_EXPORT size_t strlcpy(char *dst, const char *src, size_t siz); +extern _X_EXPORT size_t strlcat(char *dst, const char *src, size_t siz); #endif /* Logging. */ @@ -491,21 +489,21 @@ typedef enum { #define _printf_attribute(a,b) /**/ #endif -extern const char *LogInit(const char *fname, const char *backup); -extern void LogClose(void); -extern Bool LogSetParameter(LogParameter param, int value); -extern void LogVWrite(int verb, const char *f, va_list args); -extern void LogWrite(int verb, const char *f, ...) _printf_attribute(2,3); -extern void LogVMessageVerb(MessageType type, int verb, const char *format, +extern _X_EXPORT const char *LogInit(const char *fname, const char *backup); +extern _X_EXPORT void LogClose(void); +extern _X_EXPORT Bool LogSetParameter(LogParameter param, int value); +extern _X_EXPORT void LogVWrite(int verb, const char *f, va_list args); +extern _X_EXPORT void LogWrite(int verb, const char *f, ...) _printf_attribute(2,3); +extern _X_EXPORT void LogVMessageVerb(MessageType type, int verb, const char *format, va_list args); -extern void LogMessageVerb(MessageType type, int verb, const char *format, +extern _X_EXPORT void LogMessageVerb(MessageType type, int verb, const char *format, ...) _printf_attribute(3,4); -extern void LogMessage(MessageType type, const char *format, ...) +extern _X_EXPORT void LogMessage(MessageType type, const char *format, ...) _printf_attribute(2,3); -extern void FreeAuditTimer(void); -extern void AuditF(const char *f, ...) _printf_attribute(1,2); -extern void VAuditF(const char *f, va_list args); -extern void FatalError(const char *f, ...) _printf_attribute(1,2) +extern _X_EXPORT void FreeAuditTimer(void); +extern _X_EXPORT void AuditF(const char *f, ...) _printf_attribute(1,2); +extern _X_EXPORT void VAuditF(const char *f, va_list args); +extern _X_EXPORT void FatalError(const char *f, ...) _printf_attribute(1,2) #if defined(__GNUC__) && (__GNUC__ > 2) __attribute((noreturn)) #endif @@ -517,11 +515,11 @@ __attribute((noreturn)) #define DebugF(...) /* */ #endif -extern void VErrorF(const char *f, va_list args); -extern void ErrorF(const char *f, ...) _printf_attribute(1,2); -extern void Error(char *str); -extern void LogPrintMarkers(void); +extern _X_EXPORT void VErrorF(const char *f, va_list args); +extern _X_EXPORT void ErrorF(const char *f, ...) _printf_attribute(1,2); +extern _X_EXPORT void Error(char *str); +extern _X_EXPORT void LogPrintMarkers(void); -extern void xorg_backtrace(void); +extern _X_EXPORT void xorg_backtrace(void); #endif /* OS_H */ diff --git a/xorg-server/include/pixmap.h b/xorg-server/include/pixmap.h index 5ff0b8c16..55a9c818a 100644 --- a/xorg-server/include/pixmap.h +++ b/xorg-server/include/pixmap.h @@ -93,7 +93,7 @@ typedef union _PixUnion { #define WindowDrawable(type) \ ((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW)) -extern PixmapPtr GetScratchPixmapHeader( +extern _X_EXPORT PixmapPtr GetScratchPixmapHeader( ScreenPtr /*pScreen*/, int /*width*/, int /*height*/, @@ -102,16 +102,16 @@ extern PixmapPtr GetScratchPixmapHeader( int /*devKind*/, pointer /*pPixData*/); -extern void FreeScratchPixmapHeader( +extern _X_EXPORT void FreeScratchPixmapHeader( PixmapPtr /*pPixmap*/); -extern Bool CreateScratchPixmapsForScreen( +extern _X_EXPORT Bool CreateScratchPixmapsForScreen( int /*scrnum*/); -extern void FreeScratchPixmapsForScreen( +extern _X_EXPORT void FreeScratchPixmapsForScreen( int /*scrnum*/); -extern PixmapPtr AllocatePixmap( +extern _X_EXPORT PixmapPtr AllocatePixmap( ScreenPtr /*pScreen*/, int /*pixDataSize*/); diff --git a/xorg-server/include/privates.h b/xorg-server/include/privates.h index e3fa83cde..3c5c32175 100644 --- a/xorg-server/include/privates.h +++ b/xorg-server/include/privates.h @@ -27,31 +27,31 @@ typedef struct _Private PrivateRec; * Request pre-allocated private space for your driver/module. * Calling this is not necessary if only a pointer by itself is needed. */ -extern int +extern _X_EXPORT int dixRequestPrivate(const DevPrivateKey key, unsigned size); /* * Allocates a new private and attaches it to an existing object. */ -extern pointer * +extern _X_EXPORT pointer * dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key); /* * Look up a private pointer. */ -pointer +extern _X_EXPORT pointer dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key); /* * Look up the address of a private pointer. */ -pointer * +extern _X_EXPORT pointer * dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key); /* * Set a private pointer. */ -int +extern _X_EXPORT int dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val); /* @@ -63,24 +63,24 @@ typedef struct _PrivateCallback { pointer *value; /* address of private pointer */ } PrivateCallbackRec; -extern int +extern _X_EXPORT int dixRegisterPrivateInitFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer userdata); -extern int +extern _X_EXPORT int dixRegisterPrivateDeleteFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer userdata); /* * Frees private data. */ -extern void +extern _X_EXPORT void dixFreePrivates(PrivateRec *privates); /* * Resets the subsystem, called from the main loop. */ -extern int +extern _X_EXPORT int dixResetPrivates(void); /* @@ -93,14 +93,14 @@ dixResetPrivates(void); * Looks up the offset where the devPrivates field is located. * Returns -1 if no offset has been registered for the resource type. */ -extern int +extern _X_EXPORT int dixLookupPrivateOffset(RESTYPE type); /* * Specifies the offset where the devPrivates field is located. * A negative value indicates no devPrivates field is available. */ -extern int +extern _X_EXPORT int dixRegisterPrivateOffset(RESTYPE type, int offset); /* diff --git a/xorg-server/include/property.h b/xorg-server/include/property.h index 1207e8191..075eb4a0d 100644 --- a/xorg-server/include/property.h +++ b/xorg-server/include/property.h @@ -52,14 +52,14 @@ SOFTWARE. typedef struct _Property *PropertyPtr; -extern int dixLookupProperty( +extern _X_EXPORT int dixLookupProperty( PropertyPtr * /*result*/, WindowPtr /*pWin*/, Atom /*proprty*/, ClientPtr /*pClient*/, Mask /*access_mode*/); -extern int dixChangeWindowProperty( +extern _X_EXPORT int dixChangeWindowProperty( ClientPtr /*pClient*/, WindowPtr /*pWin*/, Atom /*property*/, @@ -70,7 +70,7 @@ extern int dixChangeWindowProperty( pointer /*value*/, Bool /*sendevent*/); -extern int ChangeWindowProperty( +extern _X_EXPORT int ChangeWindowProperty( WindowPtr /*pWin*/, Atom /*property*/, Atom /*type*/, @@ -80,12 +80,12 @@ extern int ChangeWindowProperty( pointer /*value*/, Bool /*sendevent*/); -extern int DeleteProperty( +extern _X_EXPORT int DeleteProperty( ClientPtr /*client*/, WindowPtr /*pWin*/, Atom /*propName*/); -extern void DeleteAllWindowProperties( +extern _X_EXPORT void DeleteAllWindowProperties( WindowPtr /*pWin*/); #endif /* PROPERTY_H */ diff --git a/xorg-server/include/ptrveloc.h b/xorg-server/include/ptrveloc.h index 384f9a6f2..fa2156b0d 100644 --- a/xorg-server/include/ptrveloc.h +++ b/xorg-server/include/ptrveloc.h @@ -1,6 +1,6 @@ /* * - * Copyright © 2006-2008 Simon Thum simon dot thum at gmx dot de + * Copyright © 2006-2009 Simon Thum simon dot thum at gmx dot de * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -27,14 +27,9 @@ #include /* DeviceIntPtr */ -/* maximum number of filters to approximate velocity. - * ABI-breaker! - */ -#define MAX_VELOCITY_FILTERS 8 - -/* constants for acceleration profiles; - * see */ +/* constants for acceleration profiles */ +#define AccelProfileNone -1 #define AccelProfileClassic 0 #define AccelProfileDeviceSpecific 1 #define AccelProfilePolynomial 2 @@ -42,7 +37,7 @@ #define AccelProfileSimple 4 #define AccelProfilePower 5 #define AccelProfileLinear 6 -#define AccelProfileReserved 7 +#define AccelProfileLAST AccelProfileLinear /* fwd */ struct _DeviceVelocityRec; @@ -52,80 +47,87 @@ struct _DeviceVelocityRec; * returns actual acceleration depending on velocity, acceleration control,... */ typedef float (*PointerAccelerationProfileFunc) - (struct _DeviceVelocityRec* /*pVel*/, - float /*velocity*/, float /*threshold*/, float /*acc*/); + (DeviceIntPtr dev, struct _DeviceVelocityRec* vel, + float velocity, float threshold, float accelCoeff); /** - * a filter stage contains the data for adaptive IIR filtering. - * To improve results, one may run several parallel filters - * which have different decays. Since more integration means more - * delay, a given filter only does good matches in a specific phase of - * a stroke. - * - * Basically, the coupling feature makes one filter fairly enough, - * so that is the default. + * a motion history, with just enough information to + * calc mean velocity and decide which motion was along + * a more or less straight line */ -typedef struct _FilterStage { - float* fading_lut; /* lookup for adaptive IIR filter */ - int fading_lut_size; /* size of lookup table */ - float rdecay; /* reciprocal weighting halflife in ms */ - float current; -} FilterStage, *FilterStagePtr; +typedef struct _MotionTracker { + int dx, dy; /* accumulated delta for each axis */ + int time; /* time of creation */ + int dir; /* initial direction bitfield */ +} MotionTracker, *MotionTrackerPtr; /** * Contains all data needed to implement mouse ballistics */ typedef struct _DeviceVelocityRec { - FilterStage filters[MAX_VELOCITY_FILTERS]; + MotionTrackerPtr tracker; + int num_tracker; + int cur_tracker; /* current index */ float velocity; /* velocity as guessed by algorithm */ float last_velocity; /* previous velocity estimate */ - int lrm_time; /* time the last motion event was processed */ - int last_dx, last_dy; /* last motion delta */ - int last_diff; /* last time-difference */ - Bool last_reset; /* whether a nv-reset occurred just before */ + int last_dx; /* last time-difference */ + int last_dy ; /* phase of last/current estimate */ float corr_mul; /* config: multiply this into velocity */ float const_acceleration; /* config: (recipr.) const deceleration */ float min_acceleration; /* config: minimum acceleration */ short reset_time; /* config: reset non-visible state after # ms */ short use_softening; /* config: use softening of mouse values */ - float coupling; /* config: max. divergence before coupling */ + float max_rel_diff; /* config: max. relative difference */ + float max_diff; /* config: max. difference */ + int initial_range; /* config: max. offset used as initial velocity */ Bool average_accel; /* config: average acceleration over velocity */ PointerAccelerationProfileFunc Profile; PointerAccelerationProfileFunc deviceSpecificProfile; void* profile_private;/* extended data, see SetAccelerationProfile() */ struct { /* to be able to query this information */ int profile_number; - int filter_usecount[MAX_VELOCITY_FILTERS +1]; } statistics; } DeviceVelocityRec, *DeviceVelocityPtr; -extern void -InitVelocityData(DeviceVelocityPtr s); +extern _X_EXPORT void +InitVelocityData(DeviceVelocityPtr vel); + +extern _X_EXPORT void +InitTrackers(DeviceVelocityPtr vel, int ntracker); + +extern _X_EXPORT short +ProcessVelocityData2D(DeviceVelocityPtr vel, int dx, int dy, int time); + +extern _X_EXPORT float +BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel, + float velocity, float threshold, float acc); + +extern _X_EXPORT void +FreeVelocityData(DeviceVelocityPtr vel); -extern void -InitFilterChain(DeviceVelocityPtr s, float rdecay, float degression, - int lutsize, int stages); +extern _X_INTERNAL BOOL +InitializePredictableAccelerationProperties(DeviceIntPtr dev); -extern int -SetAccelerationProfile(DeviceVelocityPtr s, int profile_num); +extern _X_EXPORT int +SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num); -extern DeviceVelocityPtr -GetDevicePredictableAccelData(DeviceIntPtr pDev); +extern _X_EXPORT DeviceVelocityPtr +GetDevicePredictableAccelData(DeviceIntPtr dev); -extern void -SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr s, +extern _X_EXPORT void +SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel, PointerAccelerationProfileFunc profile); -extern void -AccelerationDefaultCleanup(DeviceIntPtr pDev); +extern _X_INTERNAL void +AccelerationDefaultCleanup(DeviceIntPtr dev); -extern void -acceleratePointerPredictable(DeviceIntPtr pDev, int first_valuator, +extern _X_INTERNAL void +acceleratePointerPredictable(DeviceIntPtr dev, int first_valuator, int num_valuators, int *valuators, int evtime); -extern void -acceleratePointerLightweight(DeviceIntPtr pDev, int first_valuator, - int num_valuators, int *valuators, int ignore); +extern _X_INTERNAL void +acceleratePointerLightweight(DeviceIntPtr dev, int first_valuator, + int num_valuators, int *valuators, int ignored); #endif /* POINTERVELOCITY_H */ diff --git a/xorg-server/include/regionstr.h b/xorg-server/include/regionstr.h index db712f8ae..eead1a1f2 100644 --- a/xorg-server/include/regionstr.h +++ b/xorg-server/include/regionstr.h @@ -66,9 +66,9 @@ typedef struct pixman_region16 RegionRec, *RegionPtr; typedef struct pixman_region16_data RegDataRec, *RegDataPtr; -extern BoxRec miEmptyBox; -extern RegDataRec miEmptyData; -extern RegDataRec miBrokenData; +extern _X_EXPORT BoxRec miEmptyBox; +extern _X_EXPORT RegDataRec miEmptyData; +extern _X_EXPORT RegDataRec miBrokenData; #define REGION_NIL(reg) ((reg)->data && !(reg)->data->numRects) /* not a region */ @@ -198,96 +198,96 @@ extern RegDataRec miBrokenData; /* moved from mi.h */ -extern void InitRegions (void); +extern _X_EXPORT void InitRegions (void); -extern RegionPtr miRegionCreate( +extern _X_EXPORT RegionPtr miRegionCreate( BoxPtr /*rect*/, int /*size*/); -extern void miRegionInit( +extern _X_EXPORT void miRegionInit( RegionPtr /*pReg*/, BoxPtr /*rect*/, int /*size*/); -extern void miRegionDestroy( +extern _X_EXPORT void miRegionDestroy( RegionPtr /*pReg*/); -extern void miRegionUninit( +extern _X_EXPORT void miRegionUninit( RegionPtr /*pReg*/); -extern Bool miRegionCopy( +extern _X_EXPORT Bool miRegionCopy( RegionPtr /*dst*/, RegionPtr /*src*/); -extern Bool miIntersect( +extern _X_EXPORT Bool miIntersect( RegionPtr /*newReg*/, RegionPtr /*reg1*/, RegionPtr /*reg2*/); -extern Bool miUnion( +extern _X_EXPORT Bool miUnion( RegionPtr /*newReg*/, RegionPtr /*reg1*/, RegionPtr /*reg2*/); -extern Bool miRegionAppend( +extern _X_EXPORT Bool miRegionAppend( RegionPtr /*dstrgn*/, RegionPtr /*rgn*/); -extern Bool miRegionValidate( +extern _X_EXPORT Bool miRegionValidate( RegionPtr /*badreg*/, Bool * /*pOverlap*/); -extern RegionPtr miRectsToRegion( +extern _X_EXPORT RegionPtr miRectsToRegion( int /*nrects*/, xRectanglePtr /*prect*/, int /*ctype*/); -extern Bool miSubtract( +extern _X_EXPORT Bool miSubtract( RegionPtr /*regD*/, RegionPtr /*regM*/, RegionPtr /*regS*/); -extern Bool miInverse( +extern _X_EXPORT Bool miInverse( RegionPtr /*newReg*/, RegionPtr /*reg1*/, BoxPtr /*invRect*/); -extern int miRectIn( +extern _X_EXPORT int miRectIn( RegionPtr /*region*/, BoxPtr /*prect*/); -extern void miTranslateRegion( +extern _X_EXPORT void miTranslateRegion( RegionPtr /*pReg*/, int /*x*/, int /*y*/); -extern void miRegionReset( +extern _X_EXPORT void miRegionReset( RegionPtr /*pReg*/, BoxPtr /*pBox*/); -extern Bool miRegionBreak( +extern _X_EXPORT Bool miRegionBreak( RegionPtr /*pReg*/); -extern Bool miPointInRegion( +extern _X_EXPORT Bool miPointInRegion( RegionPtr /*pReg*/, int /*x*/, int /*y*/, BoxPtr /*box*/); -extern Bool miRegionEqual( +extern _X_EXPORT Bool miRegionEqual( RegionPtr /*pReg1*/, RegionPtr /*pReg2*/); -extern Bool miRegionNotEmpty( +extern _X_EXPORT Bool miRegionNotEmpty( RegionPtr /*pReg*/); -extern void miRegionEmpty( +extern _X_EXPORT void miRegionEmpty( RegionPtr /*pReg*/); -extern BoxPtr miRegionExtents( +extern _X_EXPORT BoxPtr miRegionExtents( RegionPtr /*pReg*/); -extern void miPrintRegion( +extern _X_EXPORT void miPrintRegion( RegionPtr /*pReg*/); #endif /* REGIONSTRUCT_H */ diff --git a/xorg-server/include/registry.h b/xorg-server/include/registry.h index 29e5fdfd3..325f76515 100644 --- a/xorg-server/include/registry.h +++ b/xorg-server/include/registry.h @@ -28,22 +28,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Registration functions. The name string is not copied, so it must * not be a stack variable. */ -void RegisterResourceName(RESTYPE type, char *name); -void RegisterExtensionNames(ExtensionEntry *ext); +extern _X_EXPORT void RegisterResourceName(RESTYPE type, char *name); +extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry *ext); /* * Lookup functions. The returned string must not be modified or freed. */ -const char *LookupMajorName(int major); -const char *LookupRequestName(int major, int minor); -const char *LookupEventName(int event); -const char *LookupErrorName(int error); -const char *LookupResourceName(RESTYPE rtype); +extern _X_EXPORT const char *LookupMajorName(int major); +extern _X_EXPORT const char *LookupRequestName(int major, int minor); +extern _X_EXPORT const char *LookupEventName(int event); +extern _X_EXPORT const char *LookupErrorName(int error); +extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); /* * Setup and teardown */ -void dixResetRegistry(void); +extern _X_EXPORT void dixResetRegistry(void); #else /* XREGISTRY */ diff --git a/xorg-server/include/resource.h b/xorg-server/include/resource.h index 9b5792e30..774f81b56 100644 --- a/xorg-server/include/resource.h +++ b/xorg-server/include/resource.h @@ -122,7 +122,7 @@ typedef unsigned long RESTYPE; #define BAD_RESOURCE 0xe0000000 /* Resource state callback */ -extern CallbackListPtr ResourceStateCallback; +extern _X_EXPORT CallbackListPtr ResourceStateCallback; typedef enum {ResourceStateAdding, ResourceStateFreeing} ResourceState; @@ -154,15 +154,15 @@ typedef Bool (*FindComplexResType)( XID /*id*/, pointer /*cdata*/); -extern RESTYPE CreateNewResourceType( +extern _X_EXPORT RESTYPE CreateNewResourceType( DeleteType /*deleteFunc*/); -extern RESTYPE CreateNewResourceClass(void); +extern _X_EXPORT RESTYPE CreateNewResourceClass(void); -extern Bool InitClientResources( +extern _X_EXPORT Bool InitClientResources( ClientPtr /*client*/); -extern XID FakeClientID( +extern _X_EXPORT XID FakeClientID( int /*client*/); /* Quartz support on Mac OS X uses the CarbonCore @@ -170,81 +170,81 @@ extern XID FakeClientID( #ifdef __APPLE__ #define AddResource Darwin_X_AddResource #endif -extern Bool AddResource( +extern _X_EXPORT Bool AddResource( XID /*id*/, RESTYPE /*type*/, pointer /*value*/); -extern void FreeResource( +extern _X_EXPORT void FreeResource( XID /*id*/, RESTYPE /*skipDeleteFuncType*/); -extern void FreeResourceByType( +extern _X_EXPORT void FreeResourceByType( XID /*id*/, RESTYPE /*type*/, Bool /*skipFree*/); -extern Bool ChangeResourceValue( +extern _X_EXPORT Bool ChangeResourceValue( XID /*id*/, RESTYPE /*rtype*/, pointer /*value*/); -extern void FindClientResourcesByType( +extern _X_EXPORT void FindClientResourcesByType( ClientPtr /*client*/, RESTYPE /*type*/, FindResType /*func*/, pointer /*cdata*/); -extern void FindAllClientResources( +extern _X_EXPORT void FindAllClientResources( ClientPtr /*client*/, FindAllRes /*func*/, pointer /*cdata*/); -extern void FreeClientNeverRetainResources( +extern _X_EXPORT void FreeClientNeverRetainResources( ClientPtr /*client*/); -extern void FreeClientResources( +extern _X_EXPORT void FreeClientResources( ClientPtr /*client*/); -extern void FreeAllResources(void); +extern _X_EXPORT void FreeAllResources(void); -extern Bool LegalNewID( +extern _X_EXPORT Bool LegalNewID( XID /*id*/, ClientPtr /*client*/); -extern pointer LookupClientResourceComplex( +extern _X_EXPORT pointer LookupClientResourceComplex( ClientPtr client, RESTYPE type, FindComplexResType func, pointer cdata); -extern int dixLookupResourceByType( +extern _X_EXPORT int dixLookupResourceByType( pointer *result, XID id, RESTYPE rtype, ClientPtr client, Mask access_mode); -extern int dixLookupResourceByClass( +extern _X_EXPORT int dixLookupResourceByClass( pointer *result, XID id, RESTYPE rclass, ClientPtr client, Mask access_mode); -extern void GetXIDRange( +extern _X_EXPORT void GetXIDRange( int /*client*/, Bool /*server*/, XID * /*minp*/, XID * /*maxp*/); -extern unsigned int GetXIDList( +extern _X_EXPORT unsigned int GetXIDList( ClientPtr /*client*/, unsigned int /*count*/, XID * /*pids*/); -extern RESTYPE lastResourceType; -extern RESTYPE TypeMask; +extern _X_EXPORT RESTYPE lastResourceType; +extern _X_EXPORT RESTYPE TypeMask; /* * These are deprecated compatibility functions and will be removed soon! @@ -265,26 +265,27 @@ extern int dixLookupResource( ClientPtr client, Mask access_mode) X_DEPRECATED; -extern pointer SecurityLookupIDByType( +/* replaced by dixLookupResourceByType */ +extern _X_EXPORT pointer SecurityLookupIDByType( ClientPtr client, XID id, RESTYPE rtype, Mask access_mode) X_DEPRECATED; /* replaced by dixLookupResourceByClass */ -extern pointer SecurityLookupIDByClass( +extern _X_EXPORT pointer SecurityLookupIDByClass( ClientPtr client, XID id, RESTYPE classes, Mask access_mode) X_DEPRECATED; /* replaced by dixLookupResourceByType */ -extern pointer LookupIDByType( +extern _X_EXPORT pointer LookupIDByType( XID id, RESTYPE rtype) X_DEPRECATED; /* replaced by dixLookupResourceByClass */ -extern pointer LookupIDByClass( +extern _X_EXPORT pointer LookupIDByClass( XID id, RESTYPE classes) X_DEPRECATED; diff --git a/xorg-server/include/screenint.h b/xorg-server/include/screenint.h index 6d074a375..4e6c574e7 100644 --- a/xorg-server/include/screenint.h +++ b/xorg-server/include/screenint.h @@ -55,7 +55,7 @@ typedef struct _Visual *VisualPtr; typedef struct _Depth *DepthPtr; typedef struct _Screen *ScreenPtr; -extern int AddScreen( +extern _X_EXPORT int AddScreen( Bool (* /*pfnInit*/)( int /*index*/, ScreenPtr /*pScreen*/, diff --git a/xorg-server/include/scrnintstr.h b/xorg-server/include/scrnintstr.h index a309077ce..ab50e7a32 100644 --- a/xorg-server/include/scrnintstr.h +++ b/xorg-server/include/scrnintstr.h @@ -611,9 +611,9 @@ typedef struct _ScreenInfo { int unused; } ScreenInfo; -extern ScreenInfo screenInfo; +extern _X_EXPORT ScreenInfo screenInfo; -extern void InitOutput( +extern _X_EXPORT void InitOutput( ScreenInfo * /*pScreenInfo*/, int /*argc*/, char ** /*argv*/); diff --git a/xorg-server/include/selection.h b/xorg-server/include/selection.h index dd9b056fe..3271f6abb 100644 --- a/xorg-server/include/selection.h +++ b/xorg-server/include/selection.h @@ -70,12 +70,12 @@ typedef struct _Selection { * Selection API */ -int dixLookupSelection(Selection **result, Atom name, +extern _X_EXPORT int dixLookupSelection(Selection **result, Atom name, ClientPtr client, Mask access_mode); -extern Selection *CurrentSelections; +extern _X_EXPORT Selection *CurrentSelections; -extern CallbackListPtr SelectionCallback; +extern _X_EXPORT CallbackListPtr SelectionCallback; typedef enum { SelectionSetOwner, @@ -94,11 +94,11 @@ typedef struct { * Selection server internals */ -void InitSelections(void); +extern _X_EXPORT void InitSelections(void); -void DeleteWindowFromAnySelections(WindowPtr pWin); +extern _X_EXPORT void DeleteWindowFromAnySelections(WindowPtr pWin); -void DeleteClientFromAnySelections(ClientPtr client); +extern _X_EXPORT void DeleteClientFromAnySelections(ClientPtr client); #endif /* SELECTION_H */ diff --git a/xorg-server/include/servermd.h b/xorg-server/include/servermd.h index dec9f3b9e..e1d644e00 100644 --- a/xorg-server/include/servermd.h +++ b/xorg-server/include/servermd.h @@ -288,6 +288,7 @@ SOFTWARE. #define LOG2_BYTES_PER_SCANLINE_PAD 2 #endif +#include /* * This returns the number of padding units, for depth d and width w. * For bitmaps this can be calculated with the macros above. @@ -303,7 +304,7 @@ typedef struct _PaddingInfo { int bytesPerPixel; /* only set when notPower2 is TRUE */ int bitsPerPixel; /* bits per pixel */ } PaddingInfo; -extern PaddingInfo PixmapWidthPaddingInfo[]; +extern _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[]; /* The only portable way to get the bpp from the depth is to look it up */ #define BitsPerPixel(d) (PixmapWidthPaddingInfo[d].bitsPerPixel) diff --git a/xorg-server/include/site.h b/xorg-server/include/site.h index fec87070b..c07cbbfe6 100644 --- a/xorg-server/include/site.h +++ b/xorg-server/include/site.h @@ -90,11 +90,7 @@ SOFTWARE. #define DEFAULT_BELL 50 #define DEFAULT_BELL_PITCH 400 #define DEFAULT_BELL_DURATION 100 -#ifdef XKB #define DEFAULT_AUTOREPEAT TRUE -#else -#define DEFAULT_AUTOREPEAT FALSE -#endif #define DEFAULT_AUTOREPEATS {\ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\ diff --git a/xorg-server/include/swaprep.h b/xorg-server/include/swaprep.h index bebd3a814..8c02737d3 100644 --- a/xorg-server/include/swaprep.h +++ b/xorg-server/include/swaprep.h @@ -26,239 +26,239 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef SWAPREP_H #define SWAPREP_H 1 -extern void Swap32Write( +extern _X_EXPORT void Swap32Write( ClientPtr /* pClient */, int /* size */, CARD32 * /* pbuf */); -extern void CopySwap32Write( +extern _X_EXPORT void CopySwap32Write( ClientPtr /* pClient */, int /* size */, CARD32 * /* pbuf */); -extern void CopySwap16Write( +extern _X_EXPORT void CopySwap16Write( ClientPtr /* pClient */, int /* size */, short * /* pbuf */); -extern void SGenericReply( +extern _X_EXPORT void SGenericReply( ClientPtr /* pClient */, int /* size */, xGenericReply * /* pRep */); -extern void SGetWindowAttributesReply( +extern _X_EXPORT void SGetWindowAttributesReply( ClientPtr /* pClient */, int /* size */, xGetWindowAttributesReply * /* pRep */); -extern void SGetGeometryReply( +extern _X_EXPORT void SGetGeometryReply( ClientPtr /* pClient */, int /* size */, xGetGeometryReply * /* pRep */); -extern void SQueryTreeReply( +extern _X_EXPORT void SQueryTreeReply( ClientPtr /* pClient */, int /* size */, xQueryTreeReply * /* pRep */); -extern void SInternAtomReply( +extern _X_EXPORT void SInternAtomReply( ClientPtr /* pClient */, int /* size */, xInternAtomReply * /* pRep */); -extern void SGetAtomNameReply( +extern _X_EXPORT void SGetAtomNameReply( ClientPtr /* pClient */, int /* size */, xGetAtomNameReply * /* pRep */); -extern void SGetPropertyReply( +extern _X_EXPORT void SGetPropertyReply( ClientPtr /* pClient */, int /* size */, xGetPropertyReply * /* pRep */); -extern void SListPropertiesReply( +extern _X_EXPORT void SListPropertiesReply( ClientPtr /* pClient */, int /* size */, xListPropertiesReply * /* pRep */); -extern void SGetSelectionOwnerReply( +extern _X_EXPORT void SGetSelectionOwnerReply( ClientPtr /* pClient */, int /* size */, xGetSelectionOwnerReply * /* pRep */); -extern void SQueryPointerReply( +extern _X_EXPORT void SQueryPointerReply( ClientPtr /* pClient */, int /* size */, xQueryPointerReply * /* pRep */); -extern void SwapTimeCoordWrite( +extern _X_EXPORT void SwapTimeCoordWrite( ClientPtr /* pClient */, int /* size */, xTimecoord * /* pRep */); -extern void SGetMotionEventsReply( +extern _X_EXPORT void SGetMotionEventsReply( ClientPtr /* pClient */, int /* size */, xGetMotionEventsReply * /* pRep */); -extern void STranslateCoordsReply( +extern _X_EXPORT void STranslateCoordsReply( ClientPtr /* pClient */, int /* size */, xTranslateCoordsReply * /* pRep */); -extern void SGetInputFocusReply( +extern _X_EXPORT void SGetInputFocusReply( ClientPtr /* pClient */, int /* size */, xGetInputFocusReply * /* pRep */); -extern void SQueryKeymapReply( +extern _X_EXPORT void SQueryKeymapReply( ClientPtr /* pClient */, int /* size */, xQueryKeymapReply * /* pRep */); -extern void SQueryFontReply( +extern _X_EXPORT void SQueryFontReply( ClientPtr /* pClient */, int /* size */, xQueryFontReply * /* pRep */); -extern void SQueryTextExtentsReply( +extern _X_EXPORT void SQueryTextExtentsReply( ClientPtr /* pClient */, int /* size */, xQueryTextExtentsReply * /* pRep */); -extern void SListFontsReply( +extern _X_EXPORT void SListFontsReply( ClientPtr /* pClient */, int /* size */, xListFontsReply * /* pRep */); -extern void SListFontsWithInfoReply( +extern _X_EXPORT void SListFontsWithInfoReply( ClientPtr /* pClient */, int /* size */, xListFontsWithInfoReply * /* pRep */); -extern void SGetFontPathReply( +extern _X_EXPORT void SGetFontPathReply( ClientPtr /* pClient */, int /* size */, xGetFontPathReply * /* pRep */); -extern void SGetImageReply( +extern _X_EXPORT void SGetImageReply( ClientPtr /* pClient */, int /* size */, xGetImageReply * /* pRep */); -extern void SListInstalledColormapsReply( +extern _X_EXPORT void SListInstalledColormapsReply( ClientPtr /* pClient */, int /* size */, xListInstalledColormapsReply * /* pRep */); -extern void SAllocColorReply( +extern _X_EXPORT void SAllocColorReply( ClientPtr /* pClient */, int /* size */, xAllocColorReply * /* pRep */); -extern void SAllocNamedColorReply( +extern _X_EXPORT void SAllocNamedColorReply( ClientPtr /* pClient */, int /* size */, xAllocNamedColorReply * /* pRep */); -extern void SAllocColorCellsReply( +extern _X_EXPORT void SAllocColorCellsReply( ClientPtr /* pClient */, int /* size */, xAllocColorCellsReply * /* pRep */); -extern void SAllocColorPlanesReply( +extern _X_EXPORT void SAllocColorPlanesReply( ClientPtr /* pClient */, int /* size */, xAllocColorPlanesReply * /* pRep */); -extern void SQColorsExtend( +extern _X_EXPORT void SQColorsExtend( ClientPtr /* pClient */, int /* size */, xrgb * /* prgb */); -extern void SQueryColorsReply( +extern _X_EXPORT void SQueryColorsReply( ClientPtr /* pClient */, int /* size */, xQueryColorsReply * /* pRep */); -extern void SLookupColorReply( +extern _X_EXPORT void SLookupColorReply( ClientPtr /* pClient */, int /* size */, xLookupColorReply * /* pRep */); -extern void SQueryBestSizeReply( +extern _X_EXPORT void SQueryBestSizeReply( ClientPtr /* pClient */, int /* size */, xQueryBestSizeReply * /* pRep */); -extern void SListExtensionsReply( +extern _X_EXPORT void SListExtensionsReply( ClientPtr /* pClient */, int /* size */, xListExtensionsReply * /* pRep */); -extern void SGetKeyboardMappingReply( +extern _X_EXPORT void SGetKeyboardMappingReply( ClientPtr /* pClient */, int /* size */, xGetKeyboardMappingReply * /* pRep */); -extern void SGetPointerMappingReply( +extern _X_EXPORT void SGetPointerMappingReply( ClientPtr /* pClient */, int /* size */, xGetPointerMappingReply * /* pRep */); -extern void SGetModifierMappingReply( +extern _X_EXPORT void SGetModifierMappingReply( ClientPtr /* pClient */, int /* size */, xGetModifierMappingReply * /* pRep */); -extern void SGetKeyboardControlReply( +extern _X_EXPORT void SGetKeyboardControlReply( ClientPtr /* pClient */, int /* size */, xGetKeyboardControlReply * /* pRep */); -extern void SGetPointerControlReply( +extern _X_EXPORT void SGetPointerControlReply( ClientPtr /* pClient */, int /* size */, xGetPointerControlReply * /* pRep */); -extern void SGetScreenSaverReply( +extern _X_EXPORT void SGetScreenSaverReply( ClientPtr /* pClient */, int /* size */, xGetScreenSaverReply * /* pRep */); -extern void SLHostsExtend( +extern _X_EXPORT void SLHostsExtend( ClientPtr /* pClient */, int /* size */, char * /* buf */); -extern void SListHostsReply( +extern _X_EXPORT void SListHostsReply( ClientPtr /* pClient */, int /* size */, xListHostsReply * /* pRep */); -extern void SErrorEvent( +extern _X_EXPORT void SErrorEvent( xError * /* from */, xError * /* to */); -extern void SwapConnSetupInfo( +extern _X_EXPORT void SwapConnSetupInfo( char * /* pInfo */, char * /* pInfoTBase */); -extern void WriteSConnectionInfo( +extern _X_EXPORT void WriteSConnectionInfo( ClientPtr /* pClient */, unsigned long /* size */, char * /* pInfo */); -extern void SwapConnSetupPrefix( +extern _X_EXPORT void SwapConnSetupPrefix( xConnSetupPrefix * /* pcspFrom */, xConnSetupPrefix * /* pcspTo */); -extern void WriteSConnSetupPrefix( +extern _X_EXPORT void WriteSConnSetupPrefix( ClientPtr /* pClient */, xConnSetupPrefix * /* pcsp */); #undef SWAPREP_PROC -#define SWAPREP_PROC(func) void func(xEvent * /* from */, xEvent * /* to */) +#define SWAPREP_PROC(func) extern _X_EXPORT void func(xEvent * /* from */, xEvent * /* to */) SWAPREP_PROC(SCirculateEvent); SWAPREP_PROC(SClientMessageEvent); diff --git a/xorg-server/include/swapreq.h b/xorg-server/include/swapreq.h index 83e524bab..8038f0272 100644 --- a/xorg-server/include/swapreq.h +++ b/xorg-server/include/swapreq.h @@ -26,15 +26,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef SWAPREQ_H #define SWAPREQ_H 1 -extern void SwapColorItem( +extern _X_EXPORT void SwapColorItem( xColorItem * /* pItem */); -extern void SwapConnClientPrefix( +extern _X_EXPORT void SwapConnClientPrefix( xConnClientPrefix * /* pCCP */); #undef SWAPREQ_PROC -#define SWAPREQ_PROC(func) int func(ClientPtr /* client */) +#define SWAPREQ_PROC(func) extern _X_EXPORT int func(ClientPtr /* client */) SWAPREQ_PROC(SProcAllocColor); SWAPREQ_PROC(SProcAllocColorCells); diff --git a/xorg-server/include/version-config.h.in b/xorg-server/include/version-config.h.in new file mode 100644 index 000000000..8180dff8e --- /dev/null +++ b/xorg-server/include/version-config.h.in @@ -0,0 +1,16 @@ +/* version-config.h.in: not generated */ + +#ifndef VERSION_CONFIG_H +#define VERSION_CONFIG_H + +/* Vendor man version */ +#undef VENDOR_MAN_VERSION + +/* Vendor name */ +#undef VENDOR_NAME + +/* Vendor release */ +#undef VENDOR_RELEASE + +#endif /* VERSION_CONFIG_H */ + diff --git a/xorg-server/include/window.h b/xorg-server/include/window.h index 04cbe2627..6fb2f8c18 100644 --- a/xorg-server/include/window.h +++ b/xorg-server/include/window.h @@ -77,30 +77,30 @@ typedef int (*VisitWindowProcPtr)( WindowPtr /*pWin*/, pointer /*data*/); -extern int TraverseTree( +extern _X_EXPORT int TraverseTree( WindowPtr /*pWin*/, VisitWindowProcPtr /*func*/, pointer /*data*/); -extern int WalkTree( +extern _X_EXPORT int WalkTree( ScreenPtr /*pScreen*/, VisitWindowProcPtr /*func*/, pointer /*data*/); -extern Bool CreateRootWindow( +extern _X_EXPORT Bool CreateRootWindow( ScreenPtr /*pScreen*/); -extern void InitRootWindow( +extern _X_EXPORT void InitRootWindow( WindowPtr /*pWin*/); typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin); -void RegisterRealChildHeadProc (RealChildHeadProc proc); +extern _X_EXPORT void RegisterRealChildHeadProc (RealChildHeadProc proc); -extern WindowPtr RealChildHead( +extern _X_EXPORT WindowPtr RealChildHead( WindowPtr /*pWin*/); -extern WindowPtr CreateWindow( +extern _X_EXPORT WindowPtr CreateWindow( Window /*wid*/, WindowPtr /*pParent*/, int /*x*/, @@ -116,11 +116,11 @@ extern WindowPtr CreateWindow( VisualID /*visual*/, int* /*error*/); -extern int DeleteWindow( +extern _X_EXPORT int DeleteWindow( pointer /*pWin*/, XID /*wid*/); -extern int DestroySubwindows( +extern _X_EXPORT int DestroySubwindows( WindowPtr /*pWin*/, ClientPtr /*client*/); @@ -129,18 +129,18 @@ extern int DestroySubwindows( #ifdef __APPLE__ #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes #endif -extern int ChangeWindowAttributes( +extern _X_EXPORT int ChangeWindowAttributes( WindowPtr /*pWin*/, Mask /*vmask*/, XID* /*vlist*/, ClientPtr /*client*/); -extern int ChangeWindowDeviceCursor( +extern _X_EXPORT int ChangeWindowDeviceCursor( WindowPtr /*pWin*/, struct _DeviceIntRec* /*pDev*/, struct _Cursor* /*pCursor*/); -extern struct _Cursor* WindowGetDeviceCursor( +extern _X_EXPORT struct _Cursor* WindowGetDeviceCursor( WindowPtr /*pWin*/, struct _DeviceIntRec* /*pDev*/); @@ -150,16 +150,13 @@ extern struct _Cursor* WindowGetDeviceCursor( #define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x) extern void Darwin_X_GetWindowAttributes( #else -extern void GetWindowAttributes( +extern _X_EXPORT void GetWindowAttributes( #endif WindowPtr /*pWin*/, ClientPtr /*client*/, xGetWindowAttributesReply* /* wa */); -extern RegionPtr CreateUnclippedWinSize( - WindowPtr /*pWin*/); - -extern void GravityTranslate( +extern _X_EXPORT void GravityTranslate( int /*x*/, int /*y*/, int /*oldx*/, @@ -170,103 +167,103 @@ extern void GravityTranslate( int* /*destx*/, int* /*desty*/); -extern int ConfigureWindow( +extern _X_EXPORT int ConfigureWindow( WindowPtr /*pWin*/, Mask /*mask*/, XID* /*vlist*/, ClientPtr /*client*/); -extern int CirculateWindow( +extern _X_EXPORT int CirculateWindow( WindowPtr /*pParent*/, int /*direction*/, ClientPtr /*client*/); -extern int ReparentWindow( +extern _X_EXPORT int ReparentWindow( WindowPtr /*pWin*/, WindowPtr /*pParent*/, int /*x*/, int /*y*/, ClientPtr /*client*/); -extern int MapWindow( +extern _X_EXPORT int MapWindow( WindowPtr /*pWin*/, ClientPtr /*client*/); -extern void MapSubwindows( +extern _X_EXPORT void MapSubwindows( WindowPtr /*pParent*/, ClientPtr /*client*/); -extern int UnmapWindow( +extern _X_EXPORT int UnmapWindow( WindowPtr /*pWin*/, Bool /*fromConfigure*/); -extern void UnmapSubwindows( +extern _X_EXPORT void UnmapSubwindows( WindowPtr /*pWin*/); -extern void HandleSaveSet( +extern _X_EXPORT void HandleSaveSet( ClientPtr /*client*/); -extern Bool PointInWindowIsVisible( +extern _X_EXPORT Bool PointInWindowIsVisible( WindowPtr /*pWin*/, int /*x*/, int /*y*/); -extern RegionPtr NotClippedByChildren( +extern _X_EXPORT RegionPtr NotClippedByChildren( WindowPtr /*pWin*/); -extern void SendVisibilityNotify( +extern _X_EXPORT void SendVisibilityNotify( WindowPtr /*pWin*/); -extern int dixSaveScreens( +extern _X_EXPORT int dixSaveScreens( ClientPtr client, int on, int mode); -extern int SaveScreens( +extern _X_EXPORT int SaveScreens( int on, int mode); -extern WindowPtr FindWindowWithOptional( +extern _X_EXPORT WindowPtr FindWindowWithOptional( WindowPtr /*w*/); -extern void CheckWindowOptionalNeed( +extern _X_EXPORT void CheckWindowOptionalNeed( WindowPtr /*w*/); -extern Bool MakeWindowOptional( +extern _X_EXPORT Bool MakeWindowOptional( WindowPtr /*pWin*/); -extern WindowPtr MoveWindowInStack( +extern _X_EXPORT WindowPtr MoveWindowInStack( WindowPtr /*pWin*/, WindowPtr /*pNextSib*/); -void SetWinSize( +extern _X_EXPORT void SetWinSize( WindowPtr /*pWin*/); -void SetBorderSize( +extern _X_EXPORT void SetBorderSize( WindowPtr /*pWin*/); -void ResizeChildrenWinSize( +extern _X_EXPORT void ResizeChildrenWinSize( WindowPtr /*pWin*/, int /*dx*/, int /*dy*/, int /*dw*/, int /*dh*/); -extern void ShapeExtensionInit(void); +extern _X_EXPORT void ShapeExtensionInit(void); -extern void SendShapeNotify( +extern _X_EXPORT void SendShapeNotify( WindowPtr /* pWin */, int /* which */ ); -extern RegionPtr CreateBoundingShape( +extern _X_EXPORT RegionPtr CreateBoundingShape( WindowPtr /* pWin */ ); -extern RegionPtr CreateClipShape( +extern _X_EXPORT RegionPtr CreateClipShape( WindowPtr /* pWin */ ); -extern void DisableMapUnmapEvents( +extern _X_EXPORT void DisableMapUnmapEvents( WindowPtr /* pWin */ ); -extern void EnableMapUnmapEvents( +extern _X_EXPORT void EnableMapUnmapEvents( WindowPtr /* pWin */ ); #endif /* WINDOW_H */ diff --git a/xorg-server/include/windowstr.h b/xorg-server/include/windowstr.h index a31fdc1df..96bee9b93 100644 --- a/xorg-server/include/windowstr.h +++ b/xorg-server/include/windowstr.h @@ -59,7 +59,6 @@ SOFTWARE. #include "miscstruct.h" #include #include "opaque.h" -#include "inputstr.h" #define GuaranteeNothing 0 #define GuaranteeVisBack 1 @@ -79,24 +78,6 @@ typedef struct _DevCursorNode { struct _DevCursorNode* next; } DevCursNodeRec, *DevCursNodePtr, *DevCursorList; -/* Mask structure for GE extension as stored on the window. - * Allows one mask per extension. - * .eventMask - Summary mask for all clients, used for quick checking. - * .geClients - list of clients with their specific mask. - */ -typedef struct _GenericClientMasks { - Mask eventMasks[MAXEXTENSIONS]; - GenericMaskPtr geClients; -} GenericClientMasksRec, *GenericClientMasksPtr; - -typedef struct _WindowAccessRec { - int defaultRule; /* WindowAccessDenyAll */ - DeviceIntPtr* perm; - int nperm; - DeviceIntPtr* deny; - int ndeny; -} WindowAccessRec, *WindowAccessPtr; - typedef struct _WindowOpt { VisualID visual; /* default: same as parent */ CursorPtr cursor; /* default: window.cursorNone */ @@ -113,8 +94,6 @@ typedef struct _WindowOpt { RegionPtr inputShape; /* default: NULL */ struct _OtherInputMasks *inputMasks; /* default: NULL */ DevCursorList deviceCursors; /* default: NULL */ - struct _GenericClientMasks *geMasks; /* default: NULL */ - WindowAccessRec access; } WindowOptRec, *WindowOptPtr; #define BackgroundPixel 2L @@ -162,8 +141,8 @@ typedef struct _Window { RegionRec borderSize; DDXPointRec origin; /* position relative to parent */ unsigned short borderWidth; - unsigned short deliverableEvents; - Mask eventMask; + unsigned short deliverableEvents; /* all masks from all clients */ + Mask eventMask; /* mask from the creating client */ PixUnion background; PixUnion border; pointer backStorage; /* null when BS disabled */ @@ -195,7 +174,7 @@ typedef struct _Window { * fields (or filling the appropriate default value) */ -extern Mask DontPropagateMasks[]; +extern _X_EXPORT Mask DontPropagateMasks[]; #define wTrackParent(w,field) ((w)->optional ? \ (w)->optional->field \ @@ -242,7 +221,7 @@ typedef struct _ScreenSaverStuff { #define HasSaverWindow(i) (savedScreenInfo[i].pWindow != NullWindow) -extern int screenIsSaved; -extern ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; +extern _X_EXPORT int screenIsSaved; +extern _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; #endif /* WINDOWSTRUCT_H */ diff --git a/xorg-server/include/xkb-config.h.in b/xorg-server/include/xkb-config.h.in index 29261def7..d3cdd1916 100644 --- a/xorg-server/include/xkb-config.h.in +++ b/xorg-server/include/xkb-config.h.in @@ -6,7 +6,19 @@ #define _XKB_CONFIG_H_ /* Default set of XKB rules. */ -#undef __XKBDEFRULES__ +#undef XKB_DFLT_RULES + +/* Default XKB model. */ +#undef XKB_DFLT_MODEL + +/* Default XKB layout. */ +#undef XKB_DFLT_LAYOUT + +/* Default XKB variant. */ +#undef XKB_DFLT_VARIANT + +/* Default XKB options. */ +#undef XKB_DFLT_OPTIONS /* Path to XKB definitions. */ #undef XKB_BASE_DIRECTORY diff --git a/xorg-server/include/xkbfile.h b/xorg-server/include/xkbfile.h index 948d6ca4a..a4b99ee07 100644 --- a/xorg-server/include/xkbfile.h +++ b/xorg-server/include/xkbfile.h @@ -27,6 +27,8 @@ #ifndef _XKBFILE_H_ #define _XKBFILE_H_ 1 +#include "xkbstr.h" + /***====================================================================***/ #define XkbXKMFile 0 @@ -76,116 +78,101 @@ typedef void (*XkbFileAddOnFunc)( #define _XkbErrXReqFailure 25 #define _XkbErrBadImplementation 26 -extern char * _XkbErrMessages[]; -extern unsigned _XkbErrCode; -extern char * _XkbErrLocation; -extern unsigned _XkbErrData; - /***====================================================================***/ _XFUNCPROTOBEGIN -extern char * XkbIndentText( +extern _X_EXPORT char * XkbIndentText( unsigned /* size */ ); -extern char * XkbAtomText( +extern _X_EXPORT char * XkbAtomText( Atom /* atm */, unsigned /* format */ ); -extern char * XkbKeysymText( +extern _X_EXPORT char * XkbKeysymText( KeySym /* sym */, unsigned /* format */ ); -extern char * XkbStringText( +extern _X_EXPORT char * XkbStringText( char * /* str */, unsigned /* format */ ); -extern char * XkbKeyNameText( +extern _X_EXPORT char * XkbKeyNameText( char * /* name */, unsigned /* format */ ); -extern char * +extern _X_EXPORT char * XkbModIndexText( unsigned /* ndx */, unsigned /* format */ ); -extern char * +extern _X_EXPORT char * XkbModMaskText( unsigned /* mask */, unsigned /* format */ ); -extern char * XkbVModIndexText( +extern _X_EXPORT char * XkbVModIndexText( XkbDescPtr /* xkb */, unsigned /* ndx */, unsigned /* format */ ); -extern char * XkbVModMaskText( +extern _X_EXPORT char * XkbVModMaskText( XkbDescPtr /* xkb */, unsigned /* modMask */, unsigned /* mask */, unsigned /* format */ ); -extern char * XkbConfigText( +extern _X_EXPORT char * XkbConfigText( unsigned /* config */, unsigned /* format */ ); -extern char * XkbSIMatchText( +extern _X_EXPORT char * XkbSIMatchText( unsigned /* type */, unsigned /* format */ ); -extern char * XkbIMWhichStateMaskText( +extern _X_EXPORT char * XkbIMWhichStateMaskText( unsigned /* use_which */, unsigned /* format */ ); -extern char * XkbAccessXDetailText( - unsigned /* state */, - unsigned /* format */ -); - -extern char * XkbNKNDetailMaskText( - unsigned /* detail */, - unsigned /* format */ -); - -extern char * XkbControlsMaskText( +extern _X_EXPORT char * XkbControlsMaskText( unsigned /* ctrls */, unsigned /* format */ ); -extern char * XkbGeomFPText( +extern _X_EXPORT char * XkbGeomFPText( int /* val */, unsigned /* format */ ); -extern char * XkbDoodadTypeText( +extern _X_EXPORT char * XkbDoodadTypeText( unsigned /* type */, unsigned /* format */ ); -extern char * XkbActionTypeText( +extern _X_EXPORT char * XkbActionTypeText( unsigned /* type */, unsigned /* format */ ); -extern char * XkbActionText( +extern _X_EXPORT char * XkbActionText( XkbDescPtr /* xkb */, XkbAction * /* action */, unsigned /* format */ ); -extern char * XkbBehaviorText( +extern _X_EXPORT char * XkbBehaviorText( XkbDescPtr /* xkb */, XkbBehavior * /* behavior */, unsigned /* format */ @@ -202,33 +189,23 @@ extern char * XkbBehaviorText( #define XkbKSIsDeadKey(k) \ (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound)) -extern unsigned _XkbKSCheckCase( +extern _X_EXPORT unsigned _XkbKSCheckCase( KeySym /* sym */ ); -extern int XkbFindKeycodeByName( +extern _X_EXPORT 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 */ -); - /***====================================================================***/ -extern Atom XkbInternAtom( +extern _X_EXPORT Atom XkbInternAtom( char * /* name */, Bool /* onlyIfExists */ ); -extern void XkbInitAtoms(void); - /***====================================================================***/ #ifdef _XKBGEOM_H_ @@ -246,39 +223,23 @@ typedef struct _XkbDrawable { struct _XkbDrawable * next; } XkbDrawableRec,*XkbDrawablePtr; -extern XkbDrawablePtr -XkbGetOrderedDrawables( - XkbGeometryPtr /* geom */, - XkbSectionPtr /* section */ -); - -extern void -XkbFreeOrderedDrawables( - XkbDrawablePtr /* draw */ -); - #endif /***====================================================================***/ -extern unsigned XkbConvertGetByNameComponents( +extern _X_EXPORT unsigned XkbConvertGetByNameComponents( Bool /* toXkm */, unsigned /* orig */ ); -extern unsigned XkbConvertXkbComponents( - Bool /* toXkm */, - unsigned /* orig */ -); - -extern Bool XkbNameMatchesPattern( +extern _X_EXPORT Bool XkbNameMatchesPattern( char * /* name */, char * /* pattern */ ); /***====================================================================***/ -extern Bool XkbWriteXKBKeycodes( +extern _X_EXPORT Bool XkbWriteXKBKeycodes( FILE * /* file */, XkbDescPtr /* result */, Bool /* topLevel */, @@ -287,7 +248,7 @@ extern Bool XkbWriteXKBKeycodes( void * /* priv */ ); -extern Bool XkbWriteXKBKeyTypes( +extern _X_EXPORT Bool XkbWriteXKBKeyTypes( FILE * /* file */, XkbDescPtr /* result */, Bool /* topLevel */, @@ -296,34 +257,7 @@ extern Bool XkbWriteXKBKeyTypes( void * /* priv */ ); -extern Bool XkbWriteXKBCompatMap( - FILE * /* file */, - XkbDescPtr /* result */, - Bool /* topLevel */, - Bool /* showImplicit */, - XkbFileAddOnFunc /* addOn */, - void * /* priv */ -); - -extern Bool XkbWriteXKBSymbols( - FILE * /* file */, - XkbDescPtr /* result */, - Bool /* topLevel */, - Bool /* showImplicit */, - XkbFileAddOnFunc /* addOn */, - void * /* priv */ -); - -extern Bool XkbWriteXKBGeometry( - FILE * /* file */, - XkbDescPtr /* result */, - Bool /* topLevel */, - Bool /* showImplicit */, - XkbFileAddOnFunc /* addOn */, - void * /* priv */ -); - -extern Bool XkbWriteXKBSemantics( +extern _X_EXPORT Bool XkbWriteXKBCompatMap( FILE * /* file */, XkbDescPtr /* result */, Bool /* topLevel */, @@ -332,7 +266,7 @@ extern Bool XkbWriteXKBSemantics( void * /* priv */ ); -extern Bool XkbWriteXKBLayout( +extern _X_EXPORT Bool XkbWriteXKBSymbols( FILE * /* file */, XkbDescPtr /* result */, Bool /* topLevel */, @@ -341,7 +275,7 @@ extern Bool XkbWriteXKBLayout( void * /* priv */ ); -extern Bool XkbWriteXKBKeymap( +extern _X_EXPORT Bool XkbWriteXKBGeometry( FILE * /* file */, XkbDescPtr /* result */, Bool /* topLevel */, @@ -350,34 +284,7 @@ extern Bool XkbWriteXKBKeymap( void * /* priv */ ); -extern Bool XkbWriteXKBFile( - FILE * /* file */, - XkbDescPtr /* result */, - Bool /* showImplicit */, - XkbFileAddOnFunc /* addOn */, - void * /* priv */ -); - -extern Bool XkbWriteCFile( - FILE * /* file */, - char * /* name */, - XkbDescPtr /* info */ -); - -extern Bool XkbWriteXKMFile( - FILE * /* file */, - XkbDescPtr /* result */ -); - -extern Bool XkbWriteToServer( - XkbDescPtr /* result */ -); - -extern void XkbEnsureSafeMapName( - char * /* name */ -); - -extern Bool XkbWriteXKBKeymapForNames( +extern _X_EXPORT Bool XkbWriteXKBKeymapForNames( FILE * /* file */, XkbComponentNamesPtr /* names */, XkbDescPtr /* xkb */, @@ -385,17 +292,13 @@ extern Bool XkbWriteXKBKeymapForNames( unsigned /* need */ ); -extern Status XkbMergeFile( - XkbDescPtr /* xkb */ -); - /***====================================================================***/ -extern Bool XkmProbe( +extern _X_EXPORT Bool XkmProbe( FILE * /* file */ ); -extern unsigned XkmReadFile( +extern _X_EXPORT unsigned XkmReadFile( FILE * /* file */, unsigned /* need */, unsigned /* want */, diff --git a/xorg-server/include/xkbrules.h b/xorg-server/include/xkbrules.h index 648e2e9c6..0f3f93490 100644 --- a/xorg-server/include/xkbrules.h +++ b/xorg-server/include/xkbrules.h @@ -29,28 +29,21 @@ /***====================================================================***/ +typedef struct _XkbRMLVOSet { + char * rules; + char * model; + char * layout; + char * variant; + char * options; +} XkbRMLVOSet; + 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; @@ -65,7 +58,6 @@ typedef struct _XkbRF_Rule { char * types; char * compat; char * geometry; - char * keymap; unsigned flags; } XkbRF_RuleRec,*XkbRF_RulePtr; @@ -82,15 +74,6 @@ typedef struct _XkbRF_Group { #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; @@ -103,24 +86,21 @@ typedef struct _XkbRF_Rules { _XFUNCPROTOBEGIN -extern Bool XkbRF_GetComponents( +/* Seems preferable to dragging xkbstr.h in. */ +struct _XkbComponentNames; + +extern _X_EXPORT Bool XkbRF_GetComponents( XkbRF_RulesPtr /* rules */, XkbRF_VarDefsPtr /* var_defs */, - XkbComponentNamesPtr /* names */ -); - -extern XkbRF_RulePtr XkbRF_AddRule( - XkbRF_RulesPtr /* rules */ + struct _XkbComponentNames * /* names */ ); -extern XkbRF_GroupPtr XkbRF_AddGroup(XkbRF_RulesPtr rules); - -extern Bool XkbRF_LoadRules( +extern _X_EXPORT Bool XkbRF_LoadRules( FILE * /* file */, XkbRF_RulesPtr /* rules */ ); -extern Bool XkbRF_LoadRulesByName( +extern _X_EXPORT Bool XkbRF_LoadRulesByName( char * /* base */, char * /* locale */, XkbRF_RulesPtr /* rules */ @@ -128,51 +108,13 @@ extern Bool XkbRF_LoadRulesByName( /***====================================================================***/ -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 _X_EXPORT XkbRF_RulesPtr XkbRF_Create(void); -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( +extern _X_EXPORT void XkbRF_Free( XkbRF_RulesPtr /* rules */, Bool /* freeRules */ ); - /***====================================================================***/ #define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES" diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h index d43755e06..2c7d86aaa 100644 --- a/xorg-server/include/xkbsrv.h +++ b/xorg-server/include/xkbsrv.h @@ -54,7 +54,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "xkbstr.h" +#include "xkbrules.h" #include "inputstr.h" +#include "events.h" typedef struct _XkbInterest { DeviceIntPtr dev; @@ -273,10 +275,10 @@ typedef struct device->public.realInputProc = oldprocs->realInputProc; \ device->unwrapProc = oldprocs->unwrapProc; -extern DevPrivateKey xkbDevicePrivateKey; +extern _X_EXPORT DevPrivateKey xkbDevicePrivateKey; #define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey)) -extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer); +extern _X_EXPORT void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer); /***====================================================================***/ @@ -289,48 +291,31 @@ extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer); /***====================================================================***/ -extern int XkbReqCode; -extern int XkbEventBase; -extern int XkbDisableLockActions; -extern int XkbKeyboardErrorCode; -extern char * XkbBaseDirectory; -extern char * XkbBinDirectory; -extern char * XkbInitialMap; -extern unsigned int XkbXIUnsupported; - -extern Bool noXkbExtension; - -extern pointer XkbLastRepeatEvent; +extern _X_EXPORT int XkbReqCode; +extern _X_EXPORT int XkbEventBase; +extern _X_EXPORT int XkbKeyboardErrorCode; +extern _X_EXPORT char * XkbBaseDirectory; +extern _X_EXPORT char * XkbBinDirectory; -extern CARD32 xkbDebugFlags; +extern _X_EXPORT CARD32 xkbDebugFlags; -#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) /* Epoch fail */ #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,DeviceMotionNotify; -extern int DeviceButtonPress,DeviceButtonRelease; -extern int DeviceEnterNotify,DeviceLeaveNotify; +extern _X_EXPORT int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify; +extern _X_EXPORT int DeviceButtonPress,DeviceButtonRelease; #define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress)) #define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease)) -#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) @@ -342,33 +327,31 @@ extern int DeviceEnterNotify,DeviceLeaveNotify; #define False FALSE #endif -_XFUNCPROTOBEGIN - -extern void XkbUseMsg( +extern _X_EXPORT void XkbUseMsg( void ); -extern int XkbProcessArguments( +extern _X_EXPORT int XkbProcessArguments( int /* argc */, char ** /* argv */, int /* i */ ); -extern void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc); +extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc); -extern void XkbFreeCompatMap( +extern _X_EXPORT void XkbFreeCompatMap( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ ); -extern void XkbFreeNames( +extern _X_EXPORT void XkbFreeNames( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ ); -extern int _XkbLookupAnyDevice( +extern _X_EXPORT int _XkbLookupAnyDevice( DeviceIntPtr *pDev, int id, ClientPtr client, @@ -376,7 +359,7 @@ extern int _XkbLookupAnyDevice( int *xkb_err ); -extern int _XkbLookupKeyboard( +extern _X_EXPORT int _XkbLookupKeyboard( DeviceIntPtr *pDev, int id, ClientPtr client, @@ -384,7 +367,7 @@ extern int _XkbLookupKeyboard( int *xkb_err ); -extern int _XkbLookupBellDevice( +extern _X_EXPORT int _XkbLookupBellDevice( DeviceIntPtr *pDev, int id, ClientPtr client, @@ -392,7 +375,7 @@ extern int _XkbLookupBellDevice( int *xkb_err ); -extern int _XkbLookupLedDevice( +extern _X_EXPORT int _XkbLookupLedDevice( DeviceIntPtr *pDev, int id, ClientPtr client, @@ -400,7 +383,7 @@ extern int _XkbLookupLedDevice( int *xkb_err ); -extern int _XkbLookupButtonDevice( +extern _X_EXPORT int _XkbLookupButtonDevice( DeviceIntPtr *pDev, int id, ClientPtr client, @@ -408,63 +391,63 @@ extern int _XkbLookupButtonDevice( int *xkb_err ); -extern XkbDescPtr XkbAllocKeyboard( +extern _X_EXPORT XkbDescPtr XkbAllocKeyboard( void ); -extern Status XkbAllocClientMap( +extern _X_EXPORT Status XkbAllocClientMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nTypes */ ); -extern Status XkbAllocServerMap( +extern _X_EXPORT Status XkbAllocServerMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nNewActions */ ); -extern void XkbFreeClientMap( +extern _X_EXPORT void XkbFreeClientMap( XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */ ); -extern void XkbFreeServerMap( +extern _X_EXPORT void XkbFreeServerMap( XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */ ); -extern Status XkbAllocIndicatorMaps( +extern _X_EXPORT Status XkbAllocIndicatorMaps( XkbDescPtr /* xkb */ ); -extern Status XkbAllocCompatMap( +extern _X_EXPORT Status XkbAllocCompatMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nInterpret */ ); -extern Status XkbAllocNames( +extern _X_EXPORT Status XkbAllocNames( XkbDescPtr /* xkb */, unsigned int /* which */, int /* nTotalRG */, int /* nTotalAliases */ ); -extern Status XkbAllocControls( +extern _X_EXPORT Status XkbAllocControls( XkbDescPtr /* xkb */, unsigned int /* which*/ ); -extern Status XkbCopyKeyTypes( +extern _X_EXPORT Status XkbCopyKeyTypes( XkbKeyTypePtr /* from */, XkbKeyTypePtr /* into */, int /* num_types */ ); -extern Status XkbResizeKeyType( +extern _X_EXPORT Status XkbResizeKeyType( XkbDescPtr /* xkb */, int /* type_ndx */, int /* map_count */, @@ -472,67 +455,62 @@ extern Status XkbResizeKeyType( int /* new_num_lvls */ ); -extern void XkbFreeKeyboard( +extern _X_EXPORT void XkbFreeKeyboard( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeDesc */ ); -extern void XkbSetActionKeyMods( +extern _X_EXPORT void XkbSetActionKeyMods( XkbDescPtr /* xkb */, XkbAction * /* act */, unsigned int /* mods */ ); -extern Bool XkbCheckActionVMods( - XkbDescPtr /* xkb */, - XkbAction * /* act */, - unsigned int /* changed */ -); - -extern unsigned int XkbMaskForVMask( +extern _X_EXPORT unsigned int XkbMaskForVMask( XkbDescPtr /* xkb */, unsigned int /* vmask */ ); -extern Bool XkbVirtualModsToReal( +extern _X_EXPORT Bool XkbVirtualModsToReal( XkbDescPtr /* xkb */, unsigned int /* virtua_mask */, unsigned int * /* mask_rtrn */ ); -extern unsigned int XkbAdjustGroup( +extern _X_EXPORT unsigned int XkbAdjustGroup( int /* group */, XkbControlsPtr /* ctrls */ ); -extern KeySym *XkbResizeKeySyms( +extern _X_EXPORT KeySym *XkbResizeKeySyms( XkbDescPtr /* xkb */, int /* key */, int /* needed */ ); -extern XkbAction *XkbResizeKeyActions( +extern _X_EXPORT XkbAction *XkbResizeKeyActions( XkbDescPtr /* xkb */, int /* key */, int /* needed */ ); -extern void XkbUpdateKeyTypesFromCore( +extern _X_EXPORT void XkbUpdateKeyTypesFromCore( DeviceIntPtr /* pXDev */, + KeySymsPtr /* syms */, KeyCode /* first */, CARD8 /* num */, XkbChangesPtr /* pChanges */ ); -extern void XkbUpdateDescActions( +extern _X_EXPORT void XkbUpdateDescActions( XkbDescPtr /* xkb */, KeyCode /* first */, CARD8 /* num */, XkbChangesPtr /* changes */ ); -extern void XkbUpdateActions( +extern _X_EXPORT void XkbUpdateActions( DeviceIntPtr /* pXDev */, KeyCode /* first */, CARD8 /* num */, @@ -541,27 +519,27 @@ extern void XkbUpdateActions( XkbEventCausePtr /* cause */ ); -extern void XkbUpdateCoreDescription( - DeviceIntPtr /* keybd */, - Bool /* resize */ +extern _X_EXPORT KeySymsPtr XkbGetCoreMap( + DeviceIntPtr /* keybd */ ); -extern void XkbApplyMappingChange( +extern _X_EXPORT void XkbApplyMappingChange( DeviceIntPtr /* pXDev */, - CARD8 /* request */, - KeyCode /* firstKey */, - CARD8 /* num */, + KeySymsPtr /* map */, + KeyCode /* firstKey */, + CARD8 /* num */, + CARD8 * /* modmap */, ClientPtr /* client */ ); -extern void XkbSetIndicators( +extern _X_EXPORT void XkbSetIndicators( DeviceIntPtr /* pXDev */, CARD32 /* affect */, CARD32 /* values */, XkbEventCausePtr /* cause */ ); -extern void XkbUpdateIndicators( +extern _X_EXPORT void XkbUpdateIndicators( DeviceIntPtr /* keybd */, CARD32 /* changed */, Bool /* check_edevs */, @@ -569,14 +547,14 @@ extern void XkbUpdateIndicators( XkbEventCausePtr /* cause */ ); -extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo( +extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo( DeviceIntPtr /* dev */, KbdFeedbackPtr /* kf */, LedFeedbackPtr /* lf */, unsigned int /* needed_parts */ ); -extern XkbSrvLedInfoPtr XkbCopySrvLedInfo( +extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* src */, KbdFeedbackPtr /* kf */, @@ -584,14 +562,14 @@ extern XkbSrvLedInfoPtr XkbCopySrvLedInfo( ); -extern XkbSrvLedInfoPtr XkbFindSrvLedInfo( +extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo( DeviceIntPtr /* dev */, unsigned int /* class */, unsigned int /* id */, unsigned int /* needed_parts */ ); -extern void XkbApplyLedNameChanges( +extern _X_EXPORT void XkbApplyLedNameChanges( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, unsigned int /* changed_names */, @@ -600,7 +578,7 @@ extern void XkbApplyLedNameChanges( XkbEventCausePtr /* cause */ ); -extern void XkbApplyLedMapChanges( +extern _X_EXPORT void XkbApplyLedMapChanges( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, unsigned int /* changed_maps */, @@ -609,7 +587,7 @@ extern void XkbApplyLedMapChanges( XkbEventCausePtr /* cause */ ); -extern void XkbApplyLedStateChanges( +extern _X_EXPORT void XkbApplyLedStateChanges( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, unsigned int /* changed_leds */, @@ -618,7 +596,7 @@ extern void XkbApplyLedStateChanges( XkbEventCausePtr /* cause */ ); -extern void XkbFlushLedEvents( +extern _X_EXPORT void XkbFlushLedEvents( DeviceIntPtr /* dev */, DeviceIntPtr /* kbd */, XkbSrvLedInfoPtr /* sli */, @@ -627,45 +605,45 @@ extern void XkbFlushLedEvents( XkbEventCausePtr /* cause */ ); -extern unsigned int XkbIndicatorsToUpdate( +extern _X_EXPORT unsigned int XkbIndicatorsToUpdate( DeviceIntPtr /* dev */, unsigned long /* state_changes */, Bool /* enabled_ctrl_changes */ ); -extern void XkbComputeDerivedState( +extern _X_EXPORT void XkbComputeDerivedState( XkbSrvInfoPtr /* xkbi */ ); -extern void XkbCheckSecondaryEffects( +extern _X_EXPORT void XkbCheckSecondaryEffects( XkbSrvInfoPtr /* xkbi */, unsigned int /* which */, XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); -extern void XkbCheckIndicatorMaps( +extern _X_EXPORT void XkbCheckIndicatorMaps( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, unsigned int /* which */ ); -extern unsigned int XkbStateChangedFlags( +extern _X_EXPORT unsigned int XkbStateChangedFlags( XkbStatePtr /* old */, XkbStatePtr /* new */ ); -extern void XkbSendStateNotify( +extern _X_EXPORT void XkbSendStateNotify( DeviceIntPtr /* kbd */, xkbStateNotify * /* pSN */ ); -extern void XkbSendMapNotify( +extern _X_EXPORT void XkbSendMapNotify( DeviceIntPtr /* kbd */, xkbMapNotify * /* ev */ ); -extern int XkbComputeControlsNotify( +extern _X_EXPORT int XkbComputeControlsNotify( DeviceIntPtr /* kbd */, XkbControlsPtr /* old */, XkbControlsPtr /* new */, @@ -673,17 +651,17 @@ extern int XkbComputeControlsNotify( Bool /* forceCtrlProc */ ); -extern void XkbSendControlsNotify( +extern _X_EXPORT void XkbSendControlsNotify( DeviceIntPtr /* kbd */, xkbControlsNotify * /* ev */ ); -extern void XkbSendCompatMapNotify( +extern _X_EXPORT void XkbSendCompatMapNotify( DeviceIntPtr /* kbd */, xkbCompatMapNotify * /* ev */ ); -extern void XkbHandleBell( +extern _X_EXPORT void XkbHandleBell( BOOL /* force */, BOOL /* eventOnly */, DeviceIntPtr /* kbd */, @@ -695,52 +673,45 @@ extern void XkbHandleBell( ClientPtr /* pClient */ ); -extern void XkbSendAccessXNotify( +extern _X_EXPORT void XkbSendAccessXNotify( DeviceIntPtr /* kbd */, xkbAccessXNotify * /* pEv */ ); -extern void XkbSendNamesNotify( +extern _X_EXPORT void XkbSendNamesNotify( DeviceIntPtr /* kbd */, xkbNamesNotify * /* ev */ ); -extern void XkbSendCompatNotify( - DeviceIntPtr /* kbd */, - xkbCompatMapNotify * /* ev */ -); - -extern void XkbSendActionMessage( +extern _X_EXPORT void XkbSendActionMessage( DeviceIntPtr /* kbd */, xkbActionMessage * /* ev */ ); -extern void XkbSendExtensionDeviceNotify( +extern _X_EXPORT void XkbSendExtensionDeviceNotify( DeviceIntPtr /* kbd */, ClientPtr /* client */, xkbExtensionDeviceNotify * /* ev */ ); -extern void XkbSendNotification( +extern _X_EXPORT void XkbSendNotification( DeviceIntPtr /* kbd */, XkbChangesPtr /* pChanges */, XkbEventCausePtr /* cause */ ); -extern void XkbProcessKeyboardEvent( - struct _xEvent * /* xE */, - DeviceIntPtr /* keybd */, - int /* count */ +extern _X_EXPORT void XkbProcessKeyboardEvent( + DeviceEvent* /* event */, + DeviceIntPtr /* keybd */ ); -extern void XkbHandleActions( +extern _X_EXPORT void XkbHandleActions( DeviceIntPtr /* dev */, DeviceIntPtr /* kbd */, - struct _xEvent * /* xE */, - int /* count */ + DeviceEvent* /* event */ ); -extern Bool XkbEnableDisableControls( +extern _X_EXPORT Bool XkbEnableDisableControls( XkbSrvInfoPtr /* xkbi */, unsigned long /* change */, unsigned long /* newValues */, @@ -748,214 +719,185 @@ extern Bool XkbEnableDisableControls( XkbEventCausePtr /* cause */ ); -extern void AccessXInit( +extern _X_EXPORT void AccessXInit( DeviceIntPtr /* dev */ ); -extern Bool AccessXFilterPressEvent( - struct _xEvent * /* xE */, - DeviceIntPtr /* keybd */, - int /* count */ +extern _X_EXPORT Bool AccessXFilterPressEvent( + DeviceEvent* /* event */, + DeviceIntPtr /* keybd */ ); -extern Bool AccessXFilterReleaseEvent( - struct _xEvent * /* xE */, - DeviceIntPtr /* keybd */, - int /* count */ +extern _X_EXPORT Bool AccessXFilterReleaseEvent( + DeviceEvent* /* event */, + DeviceIntPtr /* keybd */ ); -extern void AccessXCancelRepeatKey( +extern _X_EXPORT void AccessXCancelRepeatKey( XkbSrvInfoPtr /* xkbi */, KeyCode /* key */ ); -extern void AccessXComputeCurveFactor( +extern _X_EXPORT void AccessXComputeCurveFactor( XkbSrvInfoPtr /* xkbi */, XkbControlsPtr /* ctrls */ ); -extern XkbInterestPtr XkbFindClientResource( +extern _X_EXPORT XkbInterestPtr XkbFindClientResource( DevicePtr /* inDev */, ClientPtr /* client */ ); -extern XkbInterestPtr XkbAddClientResource( +extern _X_EXPORT XkbInterestPtr XkbAddClientResource( DevicePtr /* inDev */, ClientPtr /* client */, XID /* id */ ); -extern int XkbRemoveResourceClient( +extern _X_EXPORT int XkbRemoveResourceClient( DevicePtr /* inDev */, XID /* id */ ); -extern int XkbDDXInitDevice( - DeviceIntPtr /* dev */ -); - -extern int XkbDDXAccessXBeep( +extern _X_EXPORT int XkbDDXAccessXBeep( DeviceIntPtr /* dev */, unsigned int /* what */, unsigned int /* which */ ); -extern void XkbDDXKeyClick( - DeviceIntPtr /* dev */, - int /* keycode */, - int /* synthetic */ -); - -extern int XkbDDXUsesSoftRepeat( +extern _X_EXPORT int XkbDDXUsesSoftRepeat( DeviceIntPtr /* dev */ ); -extern void XkbDDXKeybdCtrlProc( +extern _X_EXPORT void XkbDDXKeybdCtrlProc( DeviceIntPtr /* dev */, KeybdCtrl * /* ctrl */ ); -extern void XkbDDXChangeControls( +extern _X_EXPORT void XkbDDXChangeControls( DeviceIntPtr /* dev */, XkbControlsPtr /* old */, XkbControlsPtr /* new */ ); -extern void XkbDDXUpdateDeviceIndicators( +extern _X_EXPORT void XkbDDXUpdateDeviceIndicators( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, CARD32 /* newState */ ); -extern void XkbDDXFakePointerButton( - int /* event */, - int /* button */ -); - -extern void XkbDDXFakePointerMotion( +extern _X_EXPORT void XkbDDXFakePointerMotion( unsigned int /* flags */, int /* x */, int /* y */ ); -extern void XkbDDXFakeDeviceButton( +extern _X_EXPORT void XkbDDXFakeDeviceButton( DeviceIntPtr /* dev */, Bool /* press */, int /* button */ ); -extern int XkbDDXTerminateServer( +extern _X_EXPORT int XkbDDXTerminateServer( DeviceIntPtr /* dev */, KeyCode /* key */, XkbAction * /* act */ ); -extern int XkbDDXSwitchScreen( +extern _X_EXPORT int XkbDDXSwitchScreen( DeviceIntPtr /* dev */, KeyCode /* key */, XkbAction * /* act */ ); -extern int XkbDDXPrivate( +extern _X_EXPORT int XkbDDXPrivate( DeviceIntPtr /* dev */, KeyCode /* key */, XkbAction * /* act */ ); -extern void XkbDisableComputedAutoRepeats( +extern _X_EXPORT void XkbDisableComputedAutoRepeats( DeviceIntPtr /* pXDev */, unsigned int /* key */ ); -extern void XkbSetRepeatKeys( +extern _X_EXPORT void XkbSetRepeatKeys( DeviceIntPtr /* pXDev */, int /* key */, int /* onoff */ ); -extern int XkbLatchModifiers( +extern _X_EXPORT int XkbLatchModifiers( DeviceIntPtr /* pXDev */, CARD8 /* mask */, CARD8 /* latches */ ); -extern int XkbLatchGroup( +extern _X_EXPORT int XkbLatchGroup( DeviceIntPtr /* pXDev */, int /* group */ ); -extern void XkbClearAllLatchesAndLocks( +extern _X_EXPORT void XkbClearAllLatchesAndLocks( DeviceIntPtr /* dev */, XkbSrvInfoPtr /* xkbi */, Bool /* genEv */, XkbEventCausePtr /* cause */ ); -extern void XkbSetRulesDflts( - char * /* rulesFile */, - char * /* model */, - char * /* layout */, - char * /* variant */, - char * /* options */ +extern _X_EXPORT void XkbGetRulesDflts( + XkbRMLVOSet * /* rmlvo */ ); -extern void XkbDeleteRulesDflts( - void +extern _X_EXPORT void XkbFreeRMLVOSet( + XkbRMLVOSet * /* rmlvo */, + Bool /* freeRMLVO */ ); -extern void XkbInitDevice( - DeviceIntPtr /* pXDev */ +extern _X_EXPORT void XkbSetRulesDflts( + XkbRMLVOSet * /* rmlvo */ ); -extern Bool XkbInitKeyboardDeviceStruct( - DeviceIntPtr /* pXDev */, - XkbComponentNamesPtr /* pNames */, - KeySymsPtr /* pSyms */, - CARD8 /* pMods */[], - BellProcPtr /* bellProc */, - KbdCtrlProcPtr /* ctrlProc */ +extern _X_EXPORT void XkbDeleteRulesDflts( + void ); -extern int SProcXkbDispatch( +extern _X_EXPORT int SProcXkbDispatch( ClientPtr /* client */ ); -extern XkbGeometryPtr XkbLookupNamedGeometry( +extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry( DeviceIntPtr /* dev */, Atom /* name */, Bool * /* shouldFree */ ); -extern char * _XkbDupString( - char * /* str */ +extern _X_EXPORT char * _XkbDupString( + const char * /* str */ ); -extern void XkbConvertCase( +extern _X_EXPORT void XkbConvertCase( KeySym /* sym */, KeySym * /* lower */, KeySym * /* upper */ ); -extern Status XkbChangeKeycodeRange( +extern _X_EXPORT Status XkbChangeKeycodeRange( XkbDescPtr /* xkb */, int /* minKC */, int /* maxKC */, XkbChangesPtr /* changes */ ); -extern int XkbFinishDeviceInit( - DeviceIntPtr /* pXDev */ -); - -extern void XkbFreeSrvLedInfo( +extern _X_EXPORT void XkbFreeSrvLedInfo( XkbSrvLedInfoPtr /* sli */ ); -extern void XkbFreeInfo( +extern _X_EXPORT void XkbFreeInfo( XkbSrvInfoPtr /* xkbi */ ); -extern Status XkbChangeTypesOfKey( +extern _X_EXPORT Status XkbChangeTypesOfKey( XkbDescPtr /* xkb */, int /* key */, int /* nGroups */, @@ -964,7 +906,7 @@ extern Status XkbChangeTypesOfKey( XkbMapChangesPtr /* changes */ ); -extern int XkbKeyTypesForCoreSymbols( +extern _X_EXPORT int XkbKeyTypesForCoreSymbols( XkbDescPtr /* xkb */, int /* map_width */, KeySym * /* core_syms */, @@ -973,34 +915,45 @@ extern int XkbKeyTypesForCoreSymbols( KeySym * /* xkb_syms_rtrn */ ); -extern Bool XkbApplyCompatMapToKey( +extern _X_EXPORT Bool XkbApplyCompatMapToKey( XkbDescPtr /* xkb */, KeyCode /* key */, XkbChangesPtr /* changes */ ); -extern Bool XkbApplyVirtualModChanges( +extern _X_EXPORT Bool XkbApplyVirtualModChanges( XkbDescPtr /* xkb */, unsigned int /* changed */, XkbChangesPtr /* changes */ ); -extern void XkbSendNewKeyboardNotify( +extern _X_EXPORT void XkbSendNewKeyboardNotify( DeviceIntPtr /* kbd */, xkbNewKeyboardNotify * /* pNKN */ ); +extern Bool XkbCopyKeymap( + XkbDescPtr /* dst */, + XkbDescPtr /* src */); + +extern Bool XkbCopyDeviceKeymap( + DeviceIntPtr /* dst */, + DeviceIntPtr /* src */); + +extern void XkbFilterEvents( + ClientPtr /* pClient */, + int /* nEvents */, + xEvent* /* xE */); + #include "xkbfile.h" -#include #include "xkbrules.h" -#define _XkbListKeymaps 0 -#define _XkbListKeycodes 1 -#define _XkbListTypes 2 -#define _XkbListCompat 3 -#define _XkbListSymbols 4 -#define _XkbListGeometry 5 -#define _XkbListNumComponents 6 +#define _XkbListKeycodes 0 +#define _XkbListTypes 1 +#define _XkbListCompat 2 +#define _XkbListSymbols 3 +#define _XkbListGeometry 4 +#define _XkbListNumComponents 5 typedef struct _XkbSrvListInfo { int szPool; @@ -1014,13 +967,13 @@ typedef struct _XkbSrvListInfo { int nFound[_XkbListNumComponents]; } XkbSrvListInfoRec,*XkbSrvListInfoPtr; -extern Status XkbDDXList( +extern _X_EXPORT Status XkbDDXList( DeviceIntPtr /* dev */, XkbSrvListInfoPtr /* listing */, ClientPtr /* client */ ); -extern unsigned int XkbDDXLoadKeymapByNames( +extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames( DeviceIntPtr /* keybd */, XkbComponentNamesPtr /* names */, unsigned int /* want */, @@ -1030,25 +983,18 @@ extern unsigned int XkbDDXLoadKeymapByNames( int /* keymapNameRtrnLen */ ); -extern Bool XkbDDXNamesFromRules( +extern _X_EXPORT Bool XkbDDXNamesFromRules( DeviceIntPtr /* keybd */, char * /* rules */, XkbRF_VarDefsPtr /* defs */, XkbComponentNamesPtr /* names */ ); -extern Bool XkbDDXApplyConfig( - void * /* cfg_in */, - XkbSrvInfoPtr /* xkbi */ -); - -extern int _XkbStrCaseCmp( - char * /* str1 */, - char * /* str2 */ +extern _X_EXPORT XkbDescPtr XkbCompileKeymap( + DeviceIntPtr /* dev */, + XkbRMLVOSet * /* rmlvo */ ); -_XFUNCPROTOEND - #define XkbAtomGetString(s) NameForAtom(s) #endif /* _XKBSRV_H_ */ diff --git a/xorg-server/include/xkbstr.h b/xorg-server/include/xkbstr.h index 5eebe41e3..4afe010d2 100644 --- a/xorg-server/include/xkbstr.h +++ b/xorg-server/include/xkbstr.h @@ -29,12 +29,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include -#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) -#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) +#define XkbCharToInt(v) ((int) ((v) & 0x80 ? ((v) | (~0xff)) : ((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)) +#define Xkb2CharsToInt(h, l) ((int) ((h) & 0x80 ? \ + (((h) << 8) | (l) | (~0xffff)) : \ + (((h) << 8) | (l) & 0x7fff)) #else #define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) #endif @@ -44,20 +45,30 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. */ typedef struct _XkbStateRec { - unsigned char group; + unsigned char group; /* base + latched + locked */ + /* FIXME: Why are base + latched short and not char?? */ + unsigned short base_group; /* physically ... down? */ + unsigned short latched_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; + + unsigned char mods; /* base + latched + locked */ + unsigned char base_mods; /* physically down */ + unsigned char latched_mods; + unsigned char locked_mods; + + unsigned char compat_state; /* mods + group for core state */ + + /* grab mods = all depressed and latched mods, _not_ locked mods */ + unsigned char grab_mods; /* grab mods minus internal mods */ + unsigned char compat_grab_mods; /* grab mods + group for core state, + but not locked groups if + IgnoreGroupLocks set */ + + /* effective mods = all mods (depressed, latched, locked) */ + unsigned char lookup_mods; /* effective mods minus internal mods */ + unsigned char compat_lookup_mods; /* effective mods + group */ + + unsigned short ptr_buttons; /* core pointer buttons */ } XkbStateRec,*XkbStatePtr; #define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group) #define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group) @@ -88,7 +99,8 @@ typedef struct _XkbKeyType { #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 XkbSetGroupInfo(g, w, n) (((w) & 0xc0) | (((n) & 3) << 4) | \ + ((g) & 0x0f)) #define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f)) /* @@ -111,17 +123,19 @@ typedef struct _XkbModAction { unsigned char flags; unsigned char mask; unsigned char real_mods; + /* FIXME: Make this an int. */ unsigned char vmods1; unsigned char vmods2; } XkbModAction; -#define XkbModActionVMods(a) \ - ((short)(((a)->vmods1<<8)|((a)->vmods2))) +#define XkbModActionVMods(a) ((short) (((a)->vmods1 << 8) | (a)->vmods2)) #define XkbSetModActionVMods(a,v) \ - (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff)) + ((a)->vmods1 = (((v) >> 8) & 0xff), \ + (a)->vmods2 = (v) & 0xff) typedef struct _XkbGroupAction { unsigned char type; unsigned char flags; + /* FIXME: Make this an int. */ char group_XXX; } XkbGroupAction; #define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX)) @@ -132,6 +146,7 @@ typedef struct _XkbISOAction { unsigned char flags; unsigned char mask; unsigned char real_mods; + /* FIXME: Make this an int. */ char group_XXX; unsigned char affect; unsigned char vmods1; @@ -141,6 +156,7 @@ typedef struct _XkbISOAction { typedef struct _XkbPtrAction { unsigned char type; unsigned char flags; + /* FIXME: Make this an int. */ unsigned char high_XXX; unsigned char low_XXX; unsigned char high_YYY; @@ -165,7 +181,7 @@ typedef struct _XkbPtrDfltAction { char valueXXX; } XkbPtrDfltAction; #define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX)) -#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff)) +#define XkbSASetPtrDfltValue(a, c) ((a)->valueXXX = (c) & 0xff) typedef struct _XkbSwitchScreenAction { unsigned char type; @@ -173,24 +189,25 @@ typedef struct _XkbSwitchScreenAction { char screenXXX; } XkbSwitchScreenAction; #define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX)) -#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff)) +#define XkbSASetScreen(a, s) ((a)->screenXXX = (s) & 0xff) typedef struct _XkbCtrlsAction { unsigned char type; unsigned char flags; + /* FIXME: Make this an int. */ 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 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))) + ((unsigned int) (a)->ctrls0)) typedef struct _XkbMessageAction { unsigned char type; @@ -203,6 +220,7 @@ typedef struct _XkbRedirectKeyAction { unsigned char new_key; unsigned char mods_mask; unsigned char mods; + /* FIXME: Make this an int. */ unsigned char vmods_mask0; unsigned char vmods_mask1; unsigned char vmods0; @@ -211,6 +229,7 @@ typedef struct _XkbRedirectKeyAction { #define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\ ((unsigned int)(a)->vmods0)) +/* FIXME: This is blatantly not setting vmods. Yeesh. */ #define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ ((a)->vmods_mask0=((m)&0xff))) #define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\ @@ -281,7 +300,8 @@ typedef struct _XkbControls { #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)) +#define XkbAX_NeedFeedback(c, w) (XkbAX_AnyFeedback((c)) && \ + XkbAX_NeedOption((c), (w))) typedef struct _XkbServerMapRec { unsigned short num_acts; @@ -300,7 +320,7 @@ typedef struct _XkbServerMapRec { unsigned short *vmodmap; } XkbServerMapRec, *XkbServerMapPtr; -#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]]) +#define XkbSMKeyActionsPtr(m, k) (&(m)->acts[(m)->key_acts[(k)]]) /* * Structures and access macros used primarily by clients @@ -326,15 +346,16 @@ typedef struct _XkbClientMapRec { 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)]) +#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 @@ -358,6 +379,8 @@ typedef struct _XkbCompatMapRec { typedef struct _XkbIndicatorMapRec { unsigned char flags; + /* FIXME: For some reason, interepretation of groups is wildly + * different between which being base/latched/locked. */ unsigned char which_groups; unsigned char groups; unsigned char which_mods; @@ -365,12 +388,12 @@ typedef struct _XkbIndicatorMapRec { unsigned int ctrls; } XkbIndicatorMapRec, *XkbIndicatorMapPtr; -#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\ +#define XkbIM_IsAuto(i) (!((i)->flags & XkbIM_NoAutomatic) && \ (((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)) + (i)->ctrls)) +#define XkbIM_InUse(i) ((i)->flags || (i)->which_groups || (i)->which_mods || \ + (i)->ctrls) typedef struct _XkbIndicatorRec { @@ -428,28 +451,30 @@ typedef struct _XkbDesc { 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 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 XkbKeySym(d, k, n) (XkbKeySymsPtr((d), (k))[(n)]) #define XkbKeySymEntry(d,k,sl,g) \ - (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl)))) + (XkbKeySym((d), (k), (XkbKeyGroupsWidth((d), (k)) * (g)) + (sl))) #define XkbKeyAction(d,k,n) \ - (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL) + (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)) + (XkbKeyHasActions((d), (k)) ? \ + XkbKeyAction((d), (k), ((XkbKeyGroupsWidth((d), (k)) * (g)) + (sl))) : \ + NULL) + +#define XkbKeyHasActions(d, k) (!!(d)->server->key_acts[(k)]) +#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) @@ -527,7 +552,6 @@ typedef struct _XkbChanges { * database. */ typedef struct _XkbComponentNames { - char * keymap; char * keycodes; char * types; char * compat; @@ -588,9 +612,9 @@ typedef struct _XkbDeviceInfo { 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)) +#define XkbXI_DevHasBtnActs(d) ((d)->num_btns > 0 && (d)->btn_acts) +#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d) && (b) < (d)->num_btns) +#define XkbXI_DevHasLeds(d) ((d)->num_leds > 0 && (d)->leds) typedef struct _XkbDeviceLedChanges { unsigned short led_class; diff --git a/xorg-server/include/xorg-config.h.in b/xorg-server/include/xorg-config.h.in index f9b77d03d..d1594202e 100644 --- a/xorg-server/include/xorg-config.h.in +++ b/xorg-server/include/xorg-config.h.in @@ -51,12 +51,15 @@ /* Build DRI2 extension */ #undef DRI2 -/* Solaris 8 or later? */ -#undef __SOL8__ +/* Define to 1 if you have the header file. */ +#undef HAVE_STROPTS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_KD_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VT_H + /* Define to 1 if you have the `walkcontext' function (used on Solaris for xorg_backtrace in hw/xfree86/common/xf86Events.c */ #undef HAVE_WALKCONTEXT @@ -115,9 +118,15 @@ /* Have pci_system_init_dev_mem() */ #undef HAVE_PCI_SYSTEM_INIT_DEV_MEM +/* Define to 1 if you have the `pci_device_is_boot_vga' function. */ +#undef HAVE_PCI_DEVICE_IS_BOOT_VGA + /* Have pci_enable_device */ #undef HAVE_PCI_DEVICE_ENABLE +/* Define to 1 if you have the `pci_device_vgaarb_init' function. */ +#undef HAVE_PCI_DEVICE_VGAARB_INIT + /* Path to text files containing PCI IDs */ #undef PCI_TXT_IDS_PATH diff --git a/xorg-server/include/xorg-server.h.in b/xorg-server/include/xorg-server.h.in index 4cf1bbf0e..76cab16b6 100644 --- a/xorg-server/include/xorg-server.h.in +++ b/xorg-server/include/xorg-server.h.in @@ -100,14 +100,8 @@ /* Support X Input extension */ #undef XINPUT -/* Build XKB */ -#undef XKB - -/* Enable XKB per default */ -#undef XKB_DFLT_DISABLED - -/* Build XKB server */ -#undef XKB_IN_SERVER +/* XKB default rules */ +#undef XKB_DFLT_RULES /* Support loadable input and output drivers */ #undef XLOADABLE @@ -160,9 +154,6 @@ /* Location of configuration file */ #undef __XCONFIGFILE__ -/* XKB default rules */ -#undef __XKBDEFRULES__ - /* Name of X server */ #undef __XSERVERNAME__ @@ -175,9 +166,6 @@ /* System is BSD-like */ #undef CSRG_BASED -/* Solaris 8 or later? */ -#undef __SOL8__ - /* System has PC console */ #undef PCCONS_SUPPORT @@ -196,4 +184,7 @@ /* Use libpciaccess */ #undef XSERVER_LIBPCIACCESS +/* X Access Control Extension */ +#undef XACE + #endif /* _XORG_SERVER_H_ */ diff --git a/xorg-server/include/xserver-properties.h b/xorg-server/include/xserver-properties.h index f8aeab65d..626d0ad27 100644 --- a/xorg-server/include/xserver-properties.h +++ b/xorg-server/include/xserver-properties.h @@ -32,5 +32,142 @@ /* BOOL. 0 - device disabled, 1 - device enabled */ #define XI_PROP_ENABLED "Device Enabled" +/* BOOL. If present, device is a virtual XTEST device */ +#define XI_PROP_XTEST_DEVICE "XTEST Device" + +/* Pointer acceleration properties */ +/* INTEGER of any format */ +#define ACCEL_PROP_PROFILE_NUMBER "Device Accel Profile" +/* FLOAT, format 32 */ +#define ACCEL_PROP_CONSTANT_DECELERATION "Device Accel Constant Deceleration" +/* FLOAT, format 32 */ +#define ACCEL_PROP_ADAPTIVE_DECELERATION "Device Accel Adaptive Deceleration" +/* FLOAT, format 32 */ +#define ACCEL_PROP_VELOCITY_SCALING "Device Accel Velocity Scaling" + + +/* Axis labels */ +#define AXIS_LABEL_PROP "Axis Labels" + +#define AXIS_LABEL_PROP_REL_X "Rel X" +#define AXIS_LABEL_PROP_REL_Y "Rel Y" +#define AXIS_LABEL_PROP_REL_Z "Rel Z" +#define AXIS_LABEL_PROP_REL_RX "Rel Rotary X" +#define AXIS_LABEL_PROP_REL_RY "Rel Rotary Y" +#define AXIS_LABEL_PROP_REL_RZ "Rel Rotary Z" +#define AXIS_LABEL_PROP_REL_HWHEEL "Rel Horiz Wheel" +#define AXIS_LABEL_PROP_REL_DIAL "Rel Dial" +#define AXIS_LABEL_PROP_REL_WHEEL "Rel Vert Wheel" +#define AXIS_LABEL_PROP_REL_MISC "Rel Misc" + +/* + * Absolute axes + */ + +#define AXIS_LABEL_PROP_ABS_X "Abs X" +#define AXIS_LABEL_PROP_ABS_Y "Abs Y" +#define AXIS_LABEL_PROP_ABS_Z "Abs Z" +#define AXIS_LABEL_PROP_ABS_RX "Abs Rotary X" +#define AXIS_LABEL_PROP_ABS_RY "Abs Rotary Y" +#define AXIS_LABEL_PROP_ABS_RZ "Abs Rotary Z" +#define AXIS_LABEL_PROP_ABS_THROTTLE "Abs Throttle" +#define AXIS_LABEL_PROP_ABS_RUDDER "Abs Rudder" +#define AXIS_LABEL_PROP_ABS_WHEEL "Abs Wheel" +#define AXIS_LABEL_PROP_ABS_GAS "Abs Gas" +#define AXIS_LABEL_PROP_ABS_BRAKE "Abs Brake" +#define AXIS_LABEL_PROP_ABS_HAT0X "Abs Hat 0 X" +#define AXIS_LABEL_PROP_ABS_HAT0Y "Abs Hat 0 Y" +#define AXIS_LABEL_PROP_ABS_HAT1X "Abs Hat 1 X" +#define AXIS_LABEL_PROP_ABS_HAT1Y "Abs Hat 1 Y" +#define AXIS_LABEL_PROP_ABS_HAT2X "Abs Hat 2 X" +#define AXIS_LABEL_PROP_ABS_HAT2Y "Abs Hat 2 Y" +#define AXIS_LABEL_PROP_ABS_HAT3X "Abs Hat 3 X" +#define AXIS_LABEL_PROP_ABS_HAT3Y "Abs Hat 3 Y" +#define AXIS_LABEL_PROP_ABS_PRESSURE "Abs Pressure" +#define AXIS_LABEL_PROP_ABS_DISTANCE "Abs Distance" +#define AXIS_LABEL_PROP_ABS_TILT_X "Abs Tilt X" +#define AXIS_LABEL_PROP_ABS_TILT_Y "Abs Tilt Y" +#define AXIS_LABEL_PROP_ABS_TOOL_WIDTH "Abs Tool Width" +#define AXIS_LABEL_PROP_ABS_VOLUME "Abs Volume" +#define AXIS_LABEL_PROP_ABS_MISC "Abs Misc" + +/* Button names */ +#define BTN_LABEL_PROP "Button Labels" + +/* Default label */ +#define BTN_LABEL_PROP_BTN_UNKNOWN "Button Unknown" +/* Wheel buttons */ +#define BTN_LABEL_PROP_BTN_WHEEL_UP "Button Wheel Up" +#define BTN_LABEL_PROP_BTN_WHEEL_DOWN "Button Wheel Down" +#define BTN_LABEL_PROP_BTN_HWHEEL_LEFT "Button Horiz Wheel Left" +#define BTN_LABEL_PROP_BTN_HWHEEL_RIGHT "Button Horiz Wheel Right" + +/* The following are from linux/input.h */ +#define BTN_LABEL_PROP_BTN_0 "Button 0" +#define BTN_LABEL_PROP_BTN_1 "Button 1" +#define BTN_LABEL_PROP_BTN_2 "Button 2" +#define BTN_LABEL_PROP_BTN_3 "Button 3" +#define BTN_LABEL_PROP_BTN_4 "Button 4" +#define BTN_LABEL_PROP_BTN_5 "Button 5" +#define BTN_LABEL_PROP_BTN_6 "Button 6" +#define BTN_LABEL_PROP_BTN_7 "Button 7" +#define BTN_LABEL_PROP_BTN_8 "Button 8" +#define BTN_LABEL_PROP_BTN_9 "Button 9" + +#define BTN_LABEL_PROP_BTN_LEFT "Button Left" +#define BTN_LABEL_PROP_BTN_RIGHT "Button Right" +#define BTN_LABEL_PROP_BTN_MIDDLE "Button Middle" +#define BTN_LABEL_PROP_BTN_SIDE "Button Side" +#define BTN_LABEL_PROP_BTN_EXTRA "Button Extra" +#define BTN_LABEL_PROP_BTN_FORWARD "Button Forward" +#define BTN_LABEL_PROP_BTN_BACK "Button Back" +#define BTN_LABEL_PROP_BTN_TASK "Button Task" + +#define BTN_LABEL_PROP_BTN_TRIGGER "Button Trigger" +#define BTN_LABEL_PROP_BTN_THUMB "Button Thumb" +#define BTN_LABEL_PROP_BTN_THUMB2 "Button Thumb2" +#define BTN_LABEL_PROP_BTN_TOP "Button Top" +#define BTN_LABEL_PROP_BTN_TOP2 "Button Top2" +#define BTN_LABEL_PROP_BTN_PINKIE "Button Pinkie" +#define BTN_LABEL_PROP_BTN_BASE "Button Base" +#define BTN_LABEL_PROP_BTN_BASE2 "Button Base2" +#define BTN_LABEL_PROP_BTN_BASE3 "Button Base3" +#define BTN_LABEL_PROP_BTN_BASE4 "Button Base4" +#define BTN_LABEL_PROP_BTN_BASE5 "Button Base5" +#define BTN_LABEL_PROP_BTN_BASE6 "Button Base6" +#define BTN_LABEL_PROP_BTN_DEAD "Button Dead" + +#define BTN_LABEL_PROP_BTN_A "Button A" +#define BTN_LABEL_PROP_BTN_B "Button B" +#define BTN_LABEL_PROP_BTN_C "Button C" +#define BTN_LABEL_PROP_BTN_X "Button X" +#define BTN_LABEL_PROP_BTN_Y "Button Y" +#define BTN_LABEL_PROP_BTN_Z "Button Z" +#define BTN_LABEL_PROP_BTN_TL "Button T Left" +#define BTN_LABEL_PROP_BTN_TR "Button T Right" +#define BTN_LABEL_PROP_BTN_TL2 "Button T Left2" +#define BTN_LABEL_PROP_BTN_TR2 "Button T Right2" +#define BTN_LABEL_PROP_BTN_SELECT "Button Select" +#define BTN_LABEL_PROP_BTN_START "Button Start" +#define BTN_LABEL_PROP_BTN_MODE "Button Mode" +#define BTN_LABEL_PROP_BTN_THUMBL "Button Thumb Left" +#define BTN_LABEL_PROP_BTN_THUMBR "Button Thumb Right" + +#define BTN_LABEL_PROP_BTN_TOOL_PEN "Button Tool Pen" +#define BTN_LABEL_PROP_BTN_TOOL_RUBBER "Button Tool Rubber" +#define BTN_LABEL_PROP_BTN_TOOL_BRUSH "Button Tool Brush" +#define BTN_LABEL_PROP_BTN_TOOL_PENCIL "Button Tool Pencil" +#define BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH "Button Tool Airbrush" +#define BTN_LABEL_PROP_BTN_TOOL_FINGER "Button Tool Finger" +#define BTN_LABEL_PROP_BTN_TOOL_MOUSE "Button Tool Mouse" +#define BTN_LABEL_PROP_BTN_TOOL_LENS "Button Tool Lens" +#define BTN_LABEL_PROP_BTN_TOUCH "Button Touch" +#define BTN_LABEL_PROP_BTN_STYLUS "Button Stylus" +#define BTN_LABEL_PROP_BTN_STYLUS2 "Button Stylus2" +#define BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP "Button Tool Doubletap" +#define BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP "Button Tool Tripletap" + +#define BTN_LABEL_PROP_BTN_GEAR_DOWN "Button Gear down" +#define BTN_LABEL_PROP_BTN_GEAR_UP "Button Gear up" #endif diff --git a/xorg-server/ltmain.sh b/xorg-server/ltmain.sh index 3506ead39..6939dcc4a 100644 --- a/xorg-server/ltmain.sh +++ b/xorg-server/ltmain.sh @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-4 +# $progname: (GNU libtool) 2.2.6 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6 Debian-2.2.6a-4" +VERSION=2.2.6 TIMESTAMP="" package_revision=1.3012 @@ -5033,10 +5033,7 @@ func_mode_link () case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then @@ -5347,19 +5344,19 @@ func_mode_link () # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done continue fi # $pass = conv @@ -5896,7 +5893,6 @@ func_mode_link () if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do - path= case $deplib in -L*) path="$deplib" ;; *.la) @@ -6210,9 +6206,6 @@ func_mode_link () revision="$number_minor" lt_irix_increment=no ;; - *) - func_fatal_configuration "$modename: unknown library version type \`$version_type'" - ;; esac ;; no) diff --git a/xorg-server/m4/ac_define_dir.m4 b/xorg-server/m4/ac_define_dir.m4 new file mode 100644 index 000000000..db42d3eb0 --- /dev/null +++ b/xorg-server/m4/ac_define_dir.m4 @@ -0,0 +1,49 @@ +# =========================================================================== +# http://autoconf-archive.cryp.to/ac_define_dir.html +# =========================================================================== +# +# SYNOPSIS +# +# AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) +# +# DESCRIPTION +# +# This macro sets VARNAME to the expansion of the DIR variable, taking +# care of fixing up ${prefix} and such. +# +# VARNAME is then offered as both an output variable and a C preprocessor +# symbol. +# +# Example: +# +# AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) +# +# LAST MODIFICATION +# +# 2008-04-12 +# +# COPYLEFT +# +# Copyright (c) 2008 Stepan Kasal +# Copyright (c) 2008 Andreas Schwab +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2008 Alexandre Oliva +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AC_DEFINE_DIR], [ + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix +dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn +dnl refers to ${prefix}. Thus we have to use `eval' twice. + eval ac_define_dir="\"[$]$2\"" + eval ac_define_dir="\"$ac_define_dir\"" + AC_SUBST($1, "$ac_define_dir") + AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3]) + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE +]) diff --git a/xorg-server/m4/dolt.m4 b/xorg-server/m4/dolt.m4 new file mode 100644 index 000000000..1109bdb0c --- /dev/null +++ b/xorg-server/m4/dolt.m4 @@ -0,0 +1,178 @@ +dnl dolt, a replacement for libtool +dnl Copyright © 2007-2008 Josh Triplett +dnl Copying and distribution of this file, with or without modification, +dnl are permitted in any medium without royalty provided the copyright +dnl notice and this notice are preserved. +dnl +dnl To use dolt, invoke the DOLT macro immediately after the libtool macros. +dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it +dnl installed when running autoconf on your project. + +AC_DEFUN([DOLT], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +# dolt, a replacement for libtool +# Josh Triplett +AC_PATH_PROG(DOLT_BASH, bash) +AC_MSG_CHECKING([if dolt supports this host]) +dolt_supported=yes +if test x$DOLT_BASH = x; then + dolt_supported=no +fi +if test x$GCC != xyes; then + dolt_supported=no +fi +case $host in +i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \ +|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*) + pic_options='-fPIC' + ;; +i?86-apple-darwin*) + pic_options='-fno-common' + ;; +*) + dolt_supported=no + ;; +esac +if test x$dolt_supported = xno ; then + AC_MSG_RESULT([no, falling back to libtool]) + LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)' + LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)' +else + AC_MSG_RESULT([yes, replacing libtool]) + +dnl Start writing out doltcompile. + cat <<__DOLTCOMPILE__EOF__ >doltcompile +#!$DOLT_BASH +__DOLTCOMPILE__EOF__ + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +args=("$[]@") +for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do + if test x"${args@<:@$arg@:>@}" = x-o ; then + objarg=$((arg+1)) + break + fi +done +if test x$objarg = x ; then + echo 'Error: no -o on compiler command line' 1>&2 + exit 1 +fi +lo="${args@<:@$objarg@:>@}" +obj="${lo%.lo}" +if test x"$lo" = x"$obj" ; then + echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2 + exit 1 +fi +objbase="${obj##*/}" +__DOLTCOMPILE__EOF__ + +dnl Write out shared compilation code. + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +libobjdir="${obj%$objbase}.libs" +if test ! -d "$libobjdir" ; then + mkdir_out="$(mkdir "$libobjdir" 2>&1)" + mkdir_ret=$? + if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then + echo "$mkdir_out" 1>&2 + exit $mkdir_ret + fi +fi +pic_object="$libobjdir/$objbase.o" +args@<:@$objarg@:>@="$pic_object" +__DOLTCOMPILE__EOF__ + cat <<__DOLTCOMPILE__EOF__ >>doltcompile +"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$? +__DOLTCOMPILE__EOF__ + fi + +dnl Write out static compilation code. +dnl Avoid duplicate compiler output if also building shared objects. + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +non_pic_object="$obj.o" +args@<:@$objarg@:>@="$non_pic_object" +__DOLTCOMPILE__EOF__ + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $? +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args@<:@@@:>@}" || exit $? +__DOLTCOMPILE__EOF__ + fi + fi + +dnl Write out the code to write the .lo file. +dnl The second line of the .lo file must match "^# Generated by .*libtool" + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +{ +echo "# $lo - a libtool object file" +echo "# Generated by doltcompile, not libtool" +__DOLTCOMPILE__EOF__ + + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "pic_object='.libs/${objbase}.o'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo pic_object=none +__DOLTCOMPILE__EOF__ + fi + + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "non_pic_object='${objbase}.o'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo non_pic_object=none +__DOLTCOMPILE__EOF__ + fi + + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +} > "$lo" +__DOLTCOMPILE__EOF__ + +dnl Done writing out doltcompile; substitute it for libtool compilation. + chmod +x doltcompile + LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)' + LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)' + +dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for +dnl a target, so write out a libtool wrapper to handle that case. +dnl Note that doltlibtool does not handle inferred tags or option arguments +dnl without '=', because automake does not use them. + cat <<__DOLTLIBTOOL__EOF__ > doltlibtool +#!$DOLT_BASH +__DOLTLIBTOOL__EOF__ + cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool +top_builddir_slash="${0%%doltlibtool}" +: ${top_builddir_slash:=./} +args=() +modeok=false +tagok=false +for arg in "$[]@"; do + case "$arg" in + --silent) ;; + --mode=compile) modeok=true ;; + --tag=CC|--tag=CXX) tagok=true ;; + *) args@<:@${#args[@]}@:>@="$arg" ;; + esac +done +if $modeok && $tagok ; then + . ${top_builddir_slash}doltcompile "${args@<:@@@:>@}" +else + exec ${top_builddir_slash}libtool "$[]@" +fi +__DOLTLIBTOOL__EOF__ + +dnl Done writing out doltlibtool; substitute it for libtool. + chmod +x doltlibtool + LIBTOOL='$(top_builddir)/doltlibtool' +fi +AC_SUBST(LTCOMPILE) +AC_SUBST(LTCXXCOMPILE) +# end dolt +]) diff --git a/xorg-server/m4/libtool.m4 b/xorg-server/m4/libtool.m4 new file mode 100644 index 000000000..671cde117 --- /dev/null +++ b/xorg-server/m4/libtool.m4 @@ -0,0 +1,7360 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# 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. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -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 + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) diff --git a/xorg-server/m4/ltoptions.m4 b/xorg-server/m4/ltoptions.m4 new file mode 100644 index 000000000..34151a3ba --- /dev/null +++ b/xorg-server/m4/ltoptions.m4 @@ -0,0 +1,368 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# 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 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/xorg-server/m4/ltsugar.m4 b/xorg-server/m4/ltsugar.m4 new file mode 100644 index 000000000..9000a057d --- /dev/null +++ b/xorg-server/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# 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 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/xorg-server/m4/ltversion.m4 b/xorg-server/m4/ltversion.m4 new file mode 100644 index 000000000..b8e154fe6 --- /dev/null +++ b/xorg-server/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# 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. + +# Generated from ltversion.in. + +# serial 3012 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6' +macro_revision='1.3012' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/xorg-server/m4/lt~obsolete.m4 b/xorg-server/m4/lt~obsolete.m4 new file mode 100644 index 000000000..637bb2066 --- /dev/null +++ b/xorg-server/m4/lt~obsolete.m4 @@ -0,0 +1,92 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# 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 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/xorg-server/m4/shave.m4 b/xorg-server/m4/shave.m4 new file mode 100644 index 000000000..0c2c9f5a0 --- /dev/null +++ b/xorg-server/m4/shave.m4 @@ -0,0 +1,73 @@ +dnl Make automake/libtool output more friendly to humans +dnl +dnl SHAVE_INIT([shavedir],[default_mode]) +dnl +dnl shavedir: the directory where the shave scripts are, it defaults to +dnl $(top_builddir) +dnl default_mode: (enable|disable) default shave mode. This parameter +dnl controls shave's behaviour when no option has been +dnl given to configure. It defaults to disable. +dnl +dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just +dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and +dnl LIBTOOL, you don't want the configure tests to have these variables +dnl re-defined. +dnl * This macro requires GNU make's -s option. + +AC_DEFUN([_SHAVE_ARG_ENABLE], +[ + AC_ARG_ENABLE([shave], + AS_HELP_STRING( + [--enable-shave], + [use shave to make the build pretty [[default=$1]]]),, + [enable_shave=$1] + ) +]) + +AC_DEFUN([SHAVE_INIT], +[ + dnl you can tweak the default value of enable_shave + m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)]) + + if test x"$enable_shave" = xyes; then + dnl where can we find the shave scripts? + m4_if([$1],, + [shavedir="$ac_pwd"], + [shavedir="$ac_pwd/$1"]) + AC_SUBST(shavedir) + + dnl make is now quiet + AC_SUBST([MAKEFLAGS], [-s]) + AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`']) + + dnl we need sed + AC_CHECK_PROG(SED,sed,sed,false) + + dnl substitute libtool + SHAVE_SAVED_LIBTOOL=$LIBTOOL + LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'" + AC_SUBST(LIBTOOL) + + dnl substitute cc/cxx + SHAVE_SAVED_CC=$CC + SHAVE_SAVED_CXX=$CXX + SHAVE_SAVED_FC=$FC + SHAVE_SAVED_F77=$F77 + CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}" + CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}" + FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}" + F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}" + AC_SUBST(CC) + AC_SUBST(CXX) + AC_SUBST(FC) + AC_SUBST(F77) + + V=@ + else + V=1 + fi + Q='$(V:1=)' + AC_SUBST(V) + AC_SUBST(Q) +]) + diff --git a/xorg-server/mi/Makefile.am b/xorg-server/mi/Makefile.am index 7d76929ef..9714a21ca 100644 --- a/xorg-server/mi/Makefile.am +++ b/xorg-server/mi/Makefile.am @@ -3,7 +3,7 @@ noinst_LTLIBRARIES = libmi.la if XORG sdk_HEADERS = mibank.h micmap.h miline.h mipointer.h mi.h mibstore.h \ migc.h mipointrst.h mizerarc.h micoord.h mifillarc.h \ - mispans.h miwideline.h mistruct.h mifpoly.h + mispans.h miwideline.h mistruct.h mifpoly.h mioverlay.h endif AM_CFLAGS = $(DIX_CFLAGS) @@ -20,6 +20,7 @@ libmi_la_SOURCES = \ micmap.c \ micmap.h \ micoord.h \ + micopy.c \ micursor.c \ midash.c \ midispcur.c \ @@ -56,7 +57,6 @@ libmi_la_SOURCES = \ mispans.h \ misprite.c \ misprite.h \ - mispritest.h \ mistruct.h \ mivaltree.c \ mivalidate.h \ diff --git a/xorg-server/mi/Makefile.in b/xorg-server/mi/Makefile.in index 4b2cc4ed4..7d79421be 100644 --- a/xorg-server/mi/Makefile.in +++ b/xorg-server/mi/Makefile.in @@ -39,8 +39,11 @@ subdir = mi DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,13 +53,14 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmi_la_LIBADD = am_libmi_la_OBJECTS = miarc.lo mibank.lo mibitblt.lo mibstore.lo \ - micmap.lo micursor.lo midash.lo midispcur.lo mieq.lo \ + micmap.lo micopy.lo micursor.lo midash.lo midispcur.lo mieq.lo \ miexpose.lo mifillarc.lo mifillrct.lo mifpolycon.lo migc.lo \ miglblt.lo mioverlay.lo mipointer.lo mipoly.lo mipolycon.lo \ mipolygen.lo mipolypnt.lo mipolyrect.lo mipolyseg.lo \ @@ -78,7 +82,8 @@ SOURCES = $(libmi_la_SOURCES) DIST_SOURCES = $(libmi_la_SOURCES) am__sdk_HEADERS_DIST = mibank.h micmap.h miline.h mipointer.h mi.h \ mibstore.h migc.h mipointrst.h mizerarc.h micoord.h \ - mifillarc.h mispans.h miwideline.h mistruct.h mifpoly.h + mifillarc.h mispans.h miwideline.h mistruct.h mifpoly.h \ + mioverlay.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -110,6 +115,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -130,9 +136,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -161,7 +170,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -170,9 +181,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -211,12 +226,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -236,7 +252,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -246,6 +261,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -259,11 +275,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -299,6 +314,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -323,7 +339,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -346,6 +361,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -377,7 +393,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -386,7 +404,7 @@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmi.la @XORG_TRUE@sdk_HEADERS = mibank.h micmap.h miline.h mipointer.h mi.h mibstore.h \ @XORG_TRUE@ migc.h mipointrst.h mizerarc.h micoord.h mifillarc.h \ -@XORG_TRUE@ mispans.h miwideline.h mistruct.h mifpoly.h +@XORG_TRUE@ mispans.h miwideline.h mistruct.h mifpoly.h mioverlay.h AM_CFLAGS = $(DIX_CFLAGS) libmi_la_SOURCES = \ @@ -401,6 +419,7 @@ libmi_la_SOURCES = \ micmap.c \ micmap.h \ micoord.h \ + micopy.c \ micursor.c \ midash.c \ midispcur.c \ @@ -437,7 +456,6 @@ libmi_la_SOURCES = \ mispans.h \ misprite.c \ misprite.h \ - mispritest.h \ mistruct.h \ mivaltree.c \ mivalidate.h \ @@ -506,6 +524,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mibitblt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mibstore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/micmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/micopy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/micursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midispcur.Plo@am__quote@ diff --git a/xorg-server/mi/mi.h b/xorg-server/mi/mi.h index 6e8b89e19..3db8bfcf1 100644 --- a/xorg-server/mi/mi.h +++ b/xorg-server/mi/mi.h @@ -56,6 +56,8 @@ SOFTWARE. #include "input.h" #include "cursor.h" #include "privates.h" +#include "colormap.h" +#include "events.h" #define MiBits CARD32 @@ -65,7 +67,7 @@ typedef struct _miDash *miDashPtr; /* miarc.c */ -extern void miPolyArc( +extern _X_EXPORT void miPolyArc( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*narcs*/, @@ -74,7 +76,7 @@ extern void miPolyArc( /* mibitblt.c */ -extern RegionPtr miCopyArea( +extern _X_EXPORT RegionPtr miCopyArea( DrawablePtr /*pSrcDrawable*/, DrawablePtr /*pDstDrawable*/, GCPtr /*pGC*/, @@ -86,7 +88,7 @@ extern RegionPtr miCopyArea( int /*yOut*/ ); -extern RegionPtr miCopyPlane( +extern _X_EXPORT RegionPtr miCopyPlane( DrawablePtr /*pSrcDrawable*/, DrawablePtr /*pDstDrawable*/, GCPtr /*pGC*/, @@ -99,7 +101,7 @@ extern RegionPtr miCopyPlane( unsigned long /*bitPlane*/ ); -extern void miGetImage( +extern _X_EXPORT void miGetImage( DrawablePtr /*pDraw*/, int /*sx*/, int /*sy*/, @@ -110,7 +112,7 @@ extern void miGetImage( char * /*pdstLine*/ ); -extern void miPutImage( +extern _X_EXPORT void miPutImage( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*depth*/, @@ -123,9 +125,50 @@ extern void miPutImage( char * /*pImage*/ ); +/* micopy.c */ + +#define miGetCompositeClip(pGC) ((pGC)->pCompositeClip) + +typedef void (*miCopyProc) (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pDstBox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +extern _X_EXPORT void +miCopyRegion (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + RegionPtr pDstRegion, + int dx, + int dy, + miCopyProc copyProc, + Pixel bitPlane, + void *closure); + +extern _X_EXPORT RegionPtr +miDoCopy (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + miCopyProc copyProc, + Pixel bitplane, + void *closure); + /* micursor.c */ -extern void miRecolorCursor( +extern _X_EXPORT void miRecolorCursor( DeviceIntPtr /* pDev */, ScreenPtr /*pScr*/, CursorPtr /*pCurs*/, @@ -134,7 +177,7 @@ extern void miRecolorCursor( /* midash.c */ -extern void miStepDash( +extern _X_EXPORT void miStepDash( int /*dist*/, int * /*pDashIndex*/, unsigned char * /*pDash*/, @@ -149,39 +192,52 @@ extern void miStepDash( typedef struct _DeviceRec *DevicePtr; #endif -extern Bool mieqInit( +extern _X_EXPORT Bool mieqInit( void ); -extern void mieqResizeEvents( +extern _X_EXPORT void mieqResizeEvents( int /* min_size */ ); -extern void mieqEnqueue( +extern _X_EXPORT void mieqEnqueue( DeviceIntPtr /*pDev*/, - xEventPtr /*e*/ + InternalEvent* /*e*/ ); -extern void mieqSwitchScreen( +extern _X_EXPORT void mieqSwitchScreen( DeviceIntPtr /* pDev */, ScreenPtr /*pScreen*/, Bool /*fromDIX*/ ); -extern void mieqProcessInputEvents( +extern _X_EXPORT void mieqProcessDeviceEvent( + DeviceIntPtr /* dev*/, + InternalEvent* /* event */, + ScreenPtr /* screen*/ +); + +extern _X_EXPORT void mieqProcessInputEvents( void ); -typedef void (*mieqHandler)(int, xEventPtr, DeviceIntPtr, int); -void mieqSetHandler(int event, mieqHandler handler); +extern DeviceIntPtr CopyGetMasterEvent( + DeviceIntPtr /* sdev */, + InternalEvent* /* original */, + InternalEvent* /* copy */ +); -void -CopyGetMasterEvent(DeviceIntPtr mdev, DeviceIntPtr sdev, xEvent* original, - EventListPtr master, int count); +/** + * Custom input event handler. If you need to process input events in some + * other way than the default path, register an input event handler for the + * given internal event type. + */ +typedef void (*mieqHandler)(int screen, InternalEvent* event, DeviceIntPtr dev); +void _X_EXPORT mieqSetHandler(int event, mieqHandler handler); /* miexpose.c */ -extern RegionPtr miHandleExposures( +extern _X_EXPORT RegionPtr miHandleExposures( DrawablePtr /*pSrcDrawable*/, DrawablePtr /*pDstDrawable*/, GCPtr /*pGC*/, @@ -194,7 +250,7 @@ extern RegionPtr miHandleExposures( unsigned long /*plane*/ ); -extern void miSendGraphicsExpose( +extern _X_EXPORT void miSendGraphicsExpose( ClientPtr /*client*/, RegionPtr /*pRgn*/, XID /*drawable*/, @@ -202,33 +258,33 @@ extern void miSendGraphicsExpose( int /*minor*/ ); -extern void miSendExposures( +extern _X_EXPORT void miSendExposures( WindowPtr /*pWin*/, RegionPtr /*pRgn*/, int /*dx*/, int /*dy*/ ); -extern void miWindowExposures( +extern _X_EXPORT void miWindowExposures( WindowPtr /*pWin*/, RegionPtr /*prgn*/, RegionPtr /*other_exposed*/ ); -extern void miPaintWindow( +extern _X_EXPORT void miPaintWindow( WindowPtr /*pWin*/, RegionPtr /*prgn*/, int /*what*/ ); -extern void miClearDrawable( +extern _X_EXPORT void miClearDrawable( DrawablePtr /*pDraw*/, GCPtr /*pGC*/ ); /* mifillrct.c */ -extern void miPolyFillRect( +extern _X_EXPORT void miPolyFillRect( DrawablePtr /*pDrawable*/, GCPtr /*pGC*/, int /*nrectFill*/, @@ -237,7 +293,7 @@ extern void miPolyFillRect( /* miglblt.c */ -extern void miPolyGlyphBlt( +extern _X_EXPORT void miPolyGlyphBlt( DrawablePtr /*pDrawable*/, GCPtr /*pGC*/, int /*x*/, @@ -247,7 +303,7 @@ extern void miPolyGlyphBlt( pointer /*pglyphBase*/ ); -extern void miImageGlyphBlt( +extern _X_EXPORT void miImageGlyphBlt( DrawablePtr /*pDrawable*/, GCPtr /*pGC*/, int /*x*/, @@ -259,7 +315,7 @@ extern void miImageGlyphBlt( /* mipoly.c */ -extern void miFillPolygon( +extern _X_EXPORT void miFillPolygon( DrawablePtr /*dst*/, GCPtr /*pgc*/, int /*shape*/, @@ -270,7 +326,7 @@ extern void miFillPolygon( /* mipolycon.c */ -extern Bool miFillConvexPoly( +extern _X_EXPORT Bool miFillConvexPoly( DrawablePtr /*dst*/, GCPtr /*pgc*/, int /*count*/, @@ -279,7 +335,7 @@ extern Bool miFillConvexPoly( /* mipolygen.c */ -extern Bool miFillGeneralPoly( +extern _X_EXPORT Bool miFillGeneralPoly( DrawablePtr /*dst*/, GCPtr /*pgc*/, int /*count*/, @@ -288,7 +344,7 @@ extern Bool miFillGeneralPoly( /* mipolypnt.c */ -extern void miPolyPoint( +extern _X_EXPORT void miPolyPoint( DrawablePtr /*pDrawable*/, GCPtr /*pGC*/, int /*mode*/, @@ -298,7 +354,7 @@ extern void miPolyPoint( /* mipolyrect.c */ -extern void miPolyRectangle( +extern _X_EXPORT void miPolyRectangle( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*nrects*/, @@ -307,7 +363,7 @@ extern void miPolyRectangle( /* mipolyseg.c */ -extern void miPolySegment( +extern _X_EXPORT void miPolySegment( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*nseg*/, @@ -316,7 +372,7 @@ extern void miPolySegment( /* mipolytext.c */ -extern int miPolyText8( +extern _X_EXPORT int miPolyText8( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*x*/, @@ -325,7 +381,7 @@ extern int miPolyText8( char * /*chars*/ ); -extern int miPolyText16( +extern _X_EXPORT int miPolyText16( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*x*/, @@ -334,7 +390,7 @@ extern int miPolyText16( unsigned short * /*chars*/ ); -extern void miImageText8( +extern _X_EXPORT void miImageText8( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*x*/, @@ -343,7 +399,7 @@ extern void miImageText8( char * /*chars*/ ); -extern void miImageText16( +extern _X_EXPORT void miImageText16( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*x*/, @@ -354,7 +410,7 @@ extern void miImageText16( /* mipushpxl.c */ -extern void miPushPixels( +extern _X_EXPORT void miPushPixels( GCPtr /*pGC*/, PixmapPtr /*pBitMap*/, DrawablePtr /*pDrawable*/, @@ -368,22 +424,22 @@ extern void miPushPixels( /* see also region.h */ -extern Bool miRectAlloc( +extern _X_EXPORT Bool miRectAlloc( RegionPtr /*pRgn*/, int /*n*/ ); #ifdef DEBUG -extern Bool miValidRegion( +extern _X_EXPORT Bool miValidRegion( RegionPtr /*prgn*/ ); #endif -extern Bool miRegionBroken(RegionPtr pReg); +extern _X_EXPORT Bool miRegionBroken(RegionPtr pReg); /* miscrinit.c */ -extern Bool miModifyPixmapHeader( +extern _X_EXPORT Bool miModifyPixmapHeader( PixmapPtr /*pPixmap*/, int /*width*/, int /*height*/, @@ -393,17 +449,17 @@ extern Bool miModifyPixmapHeader( pointer /*pPixData*/ ); -extern Bool miCreateScreenResources( +extern _X_EXPORT Bool miCreateScreenResources( ScreenPtr /*pScreen*/ ); -extern Bool miScreenDevPrivateInit( +extern _X_EXPORT Bool miScreenDevPrivateInit( ScreenPtr /*pScreen*/, int /*width*/, pointer /*pbits*/ ); -extern Bool miScreenInit( +extern _X_EXPORT Bool miScreenInit( ScreenPtr /*pScreen*/, pointer /*pbits*/, int /*xsize*/, @@ -419,13 +475,13 @@ extern Bool miScreenInit( VisualPtr /*visuals*/ ); -extern DevPrivateKey miAllocateGCPrivateIndex( +extern _X_EXPORT DevPrivateKey miAllocateGCPrivateIndex( void ); /* mivaltree.c */ -extern int miShapedWindowIn( +extern _X_EXPORT int miShapedWindowIn( ScreenPtr /*pScreen*/, RegionPtr /*universe*/, RegionPtr /*bounding*/, @@ -440,17 +496,17 @@ typedef void typedef RegionPtr (*GetRedirectBorderClipProcPtr) (WindowPtr pWindow); -void +extern _X_EXPORT void miRegisterRedirectBorderClipProc (SetRedirectBorderClipProcPtr setBorderClip, GetRedirectBorderClipProcPtr getBorderClip); -extern int miValidateTree( +extern _X_EXPORT int miValidateTree( WindowPtr /*pParent*/, WindowPtr /*pChild*/, VTKind /*kind*/ ); -extern void miWideLine( +extern _X_EXPORT void miWideLine( DrawablePtr /*pDrawable*/, GCPtr /*pGC*/, int /*mode*/, @@ -458,7 +514,7 @@ extern void miWideLine( DDXPointPtr /*pPts*/ ); -extern void miWideDash( +extern _X_EXPORT void miWideDash( DrawablePtr /*pDrawable*/, GCPtr /*pGC*/, int /*mode*/, @@ -468,7 +524,7 @@ extern void miWideDash( /* miwindow.c */ -extern void miClearToBackground( +extern _X_EXPORT void miClearToBackground( WindowPtr /*pWin*/, int /*x*/, int /*y*/, @@ -477,21 +533,21 @@ extern void miClearToBackground( Bool /*generateExposures*/ ); -extern void miMarkWindow( +extern _X_EXPORT void miMarkWindow( WindowPtr /*pWin*/ ); -extern Bool miMarkOverlappedWindows( +extern _X_EXPORT Bool miMarkOverlappedWindows( WindowPtr /*pWin*/, WindowPtr /*pFirst*/, WindowPtr * /*ppLayerWin*/ ); -extern void miHandleValidateExposures( +extern _X_EXPORT void miHandleValidateExposures( WindowPtr /*pWin*/ ); -extern void miMoveWindow( +extern _X_EXPORT void miMoveWindow( WindowPtr /*pWin*/, int /*x*/, int /*y*/, @@ -499,7 +555,7 @@ extern void miMoveWindow( VTKind /*kind*/ ); -extern void miSlideAndSizeWindow( +extern _X_EXPORT void miSlideAndSizeWindow( WindowPtr /*pWin*/, int /*x*/, int /*y*/, @@ -508,30 +564,30 @@ extern void miSlideAndSizeWindow( WindowPtr /*pSib*/ ); -extern WindowPtr miGetLayerWindow( +extern _X_EXPORT WindowPtr miGetLayerWindow( WindowPtr /*pWin*/ ); -extern void miSetShape( +extern _X_EXPORT void miSetShape( WindowPtr /*pWin*/ ); -extern void miChangeBorderWidth( +extern _X_EXPORT void miChangeBorderWidth( WindowPtr /*pWin*/, unsigned int /*width*/ ); -extern void miMarkUnrealizedWindow( +extern _X_EXPORT void miMarkUnrealizedWindow( WindowPtr /*pChild*/, WindowPtr /*pWin*/, Bool /*fromConfigure*/ ); -extern void miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth); +extern _X_EXPORT void miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth); /* mizerarc.c */ -extern void miZeroPolyArc( +extern _X_EXPORT void miZeroPolyArc( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*narcs*/, @@ -540,7 +596,7 @@ extern void miZeroPolyArc( /* mizerline.c */ -extern void miZeroLine( +extern _X_EXPORT void miZeroLine( DrawablePtr /*dst*/, GCPtr /*pgc*/, int /*mode*/, @@ -548,7 +604,7 @@ extern void miZeroLine( DDXPointRec * /*pptInit*/ ); -extern void miZeroDashLine( +extern _X_EXPORT void miZeroDashLine( DrawablePtr /*dst*/, GCPtr /*pgc*/, int /*mode*/, @@ -556,7 +612,7 @@ extern void miZeroDashLine( DDXPointRec * /*pptInit*/ ); -extern void miPolyFillArc( +extern _X_EXPORT void miPolyFillArc( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, int /*narcs*/, diff --git a/xorg-server/mi/miarc.c b/xorg-server/mi/miarc.c index f0c863fd9..a3e258030 100644 --- a/xorg-server/mi/miarc.c +++ b/xorg-server/mi/miarc.c @@ -880,8 +880,7 @@ miComputeWideEllipse( { if (spdata) xfree(spdata); - spdata = (miArcSpanData *)xalloc(sizeof(miArcSpanData) + - sizeof(miArcSpan) * (k + 2)); + spdata = xalloc(sizeof(miArcSpanData) + sizeof(miArcSpan) * (k + 2)); lruent->spdata = spdata; if (!spdata) { @@ -925,7 +924,7 @@ miFillWideEllipse( yorgu = parc->height + pGC->lineWidth; n = (sizeof(int) * 2) * yorgu; - widths = (int *)xalloc(n + (sizeof(DDXPointRec) * 2) * yorgu); + widths = xalloc(n + (sizeof(DDXPointRec) * 2) * yorgu); if (!widths) return; points = (DDXPointPtr)((char *)widths + n); @@ -1041,7 +1040,7 @@ miFillWideEllipse( * fuller explanation of this.) */ -_X_EXPORT void +void miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { int i; @@ -1361,7 +1360,7 @@ miArcJoin(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pLeft, arc.height = width; arc.angle1 = -miDatan2 (corner.y - center.y, corner.x - center.x); arc.angle2 = a; - pArcPts = (SppPointPtr) xalloc (3 * sizeof (SppPointRec)); + pArcPts = xalloc (3 * sizeof (SppPointRec)); if (!pArcPts) return; pArcPts[0].x = otherCorner.x; @@ -1783,7 +1782,7 @@ addArc ( arc = (miArcDataPtr) xrealloc (*arcsp, newsize * sizeof (**arcsp)); if (!arc) - return (miArcDataPtr)NULL; + return NULL; *sizep = newsize; *arcsp = arc; } @@ -1885,7 +1884,7 @@ miComputeArcs ( int arcsJoin; int selfJoin; - int iDash = 0, dashRemaining; + int iDash = 0, dashRemaining = 0; int iDashStart = 0, dashRemainingStart = 0, iphaseStart; int startAngle, spanAngle, endAngle, backwards = 0; int prevDashAngle, dashAngle; @@ -1895,14 +1894,14 @@ miComputeArcs ( isDoubleDash = (pGC->lineStyle == LineDoubleDash); dashOffset = pGC->dashOffset; - data = (struct arcData *) xalloc (narcs * sizeof (struct arcData)); + data = xalloc (narcs * sizeof (struct arcData)); if (!data) - return (miPolyArcPtr)NULL; - arcs = (miPolyArcPtr) xalloc (sizeof (*arcs) * (isDoubleDash ? 2 : 1)); + return NULL; + arcs = xalloc (sizeof (*arcs) * (isDoubleDash ? 2 : 1)); if (!arcs) { xfree(data); - return (miPolyArcPtr)NULL; + return NULL; } for (i = 0; i < narcs; i++) { a0 = todeg (parcs[i].angle1); @@ -2255,7 +2254,7 @@ miComputeArcs ( arcfail: miFreeArcs(arcs, pGC); xfree(data); - return (miPolyArcPtr)NULL; + return NULL; } static double @@ -3111,7 +3110,7 @@ realAllocSpan (void) struct finalSpan *span; int i; - newChunk = (struct finalSpanChunk *) xalloc (sizeof (struct finalSpanChunk)); + newChunk = xalloc (sizeof (struct finalSpanChunk)); if (!newChunk) return (struct finalSpan *) NULL; newChunk->next = chunks; @@ -3158,8 +3157,8 @@ fillSpans ( if (nspans == 0) return; - xSpan = xSpans = (DDXPointPtr) xalloc (nspans * sizeof (DDXPointRec)); - xWidth = xWidths = (int *) xalloc (nspans * sizeof (int)); + xSpan = xSpans = xalloc (nspans * sizeof (DDXPointRec)); + xWidth = xWidths = xalloc (nspans * sizeof (int)); if (xSpans && xWidths) { i = 0; @@ -3216,10 +3215,9 @@ realFindSpan (int y) else change = SPAN_REALLOC; newSize = finalSize + change; - newSpans = (struct finalSpan **) xalloc - (newSize * sizeof (struct finalSpan *)); + newSpans = xalloc(newSize * sizeof (struct finalSpan *)); if (!newSpans) - return (struct finalSpan **)NULL; + return NULL; newMiny = finalMiny; newMaxy = finalMaxy; if (y < finalMiny) diff --git a/xorg-server/mi/mibank.c b/xorg-server/mi/mibank.c index dcaf4a14f..9e4d63162 100644 --- a/xorg-server/mi/mibank.c +++ b/xorg-server/mi/mibank.c @@ -171,8 +171,7 @@ typedef struct _miBankQueue (*pScreenPriv->BankInfo.SetDestinationBank)(pScreen, (_no)) - \ (pScreenPriv->BankInfo.BankSize * (_no))) -#define xalloc_ARRAY(atype, ntype) \ - (atype *)xalloc((ntype) * sizeof(atype)) +#define xalloc_ARRAY(atype, ntype) xalloc((ntype) * sizeof(atype)) static int miBankScreenKeyIndex; static DevPrivateKey miBankScreenKey = &miBankScreenKeyIndex; @@ -955,7 +954,7 @@ miBankCopy( paddedWidth = PixmapBytePad(maxWidth, pScreenPriv->pScreenPixmap->drawable.depth); - pImage = (char *)xalloc(paddedWidth * maxHeight); + pImage = xalloc(paddedWidth * maxHeight); pGC->fExpose = FALSE; @@ -1750,7 +1749,7 @@ miBankGetImage( paddedWidth = PixmapBytePad(w, pScreenPriv->pScreenPixmap->drawable.depth); - pBankImage = (char *)xalloc(paddedWidth * h); + pBankImage = xalloc(paddedWidth * h); if (pBankImage) { @@ -1811,7 +1810,7 @@ miBankGetSpans( paddedWidth = PixmapBytePad(pScreenPriv->pScreenPixmap->drawable.width, pScreenPriv->pScreenPixmap->drawable.depth); - pBankImage = (char *)xalloc(paddedWidth); + pBankImage = xalloc(paddedWidth); if (pBankImage) { @@ -1985,7 +1984,7 @@ miBankCopyWindow( xfree(pBoxNew1); } -_X_EXPORT Bool +Bool miInitializeBanking( ScreenPtr pScreen, unsigned int xsize, diff --git a/xorg-server/mi/mibank.h b/xorg-server/mi/mibank.h index 327507db9..0c10540a7 100644 --- a/xorg-server/mi/mibank.h +++ b/xorg-server/mi/mibank.h @@ -85,7 +85,7 @@ typedef struct _miBankInfo unsigned int nBankDepth; } miBankInfoRec, *miBankInfoPtr; -Bool +extern _X_EXPORT Bool miInitializeBanking( ScreenPtr /*pScreen*/, unsigned int /*xsize*/, @@ -99,7 +99,7 @@ miInitializeBanking( * and various screen attributes. DDX needs to determine this width before * initializing the screen. */ -int +extern _X_EXPORT int miScanLineWidth( unsigned int /*xsize*/, unsigned int /*ysize*/, diff --git a/xorg-server/mi/mibitblt.c b/xorg-server/mi/mibitblt.c index 3e82a5592..cc8b11d9c 100644 --- a/xorg-server/mi/mibitblt.c +++ b/xorg-server/mi/mibitblt.c @@ -104,7 +104,7 @@ miCopyArea(DrawablePtr pSrcDrawable, /* If the destination isn't realized, this is easy */ if (pDstDrawable->type == DRAWABLE_WINDOW && !((WindowPtr)pDstDrawable)->realized) - return (RegionPtr)NULL; + return NULL; /* clip the source */ if (pSrcDrawable->type == DRAWABLE_PIXMAP) @@ -143,14 +143,11 @@ miCopyArea(DrawablePtr pSrcDrawable, dsty += pDstDrawable->y; } - pptFirst = ppt = (DDXPointPtr) - xalloc(heightSrc * sizeof(DDXPointRec)); - pwidthFirst = pwidth = (unsigned int *) - xalloc(heightSrc * sizeof(unsigned int)); + pptFirst = ppt = xalloc(heightSrc * sizeof(DDXPointRec)); + pwidthFirst = pwidth = xalloc(heightSrc * sizeof(unsigned int)); numRects = REGION_NUM_RECTS(prgnSrcClip); boxes = REGION_RECTS(prgnSrcClip); - ordering = (unsigned int *) - xalloc(numRects * sizeof(unsigned int)); + ordering = xalloc(numRects * sizeof(unsigned int)); if(!pptFirst || !pwidthFirst || !ordering) { if (ordering) @@ -159,7 +156,7 @@ miCopyArea(DrawablePtr pSrcDrawable, xfree(pwidthFirst); if (pptFirst) xfree(pptFirst); - return (RegionPtr)NULL; + return NULL; } /* If not the same drawable then order of move doesn't matter. @@ -238,8 +235,7 @@ miCopyArea(DrawablePtr pSrcDrawable, ppt++->y = y++; *pwidth++ = width; } - pbits = (unsigned int *)xalloc(height * PixmapBytePad(width, - pSrcDrawable->depth)); + pbits = xalloc(height * PixmapBytePad(width, pSrcDrawable->depth)); if (pbits) { (*pSrcDrawable->pScreen->GetSpans)(pSrcDrawable, width, pptFirst, @@ -319,7 +315,7 @@ miGetPlane( if(!result) result = xcalloc(h, widthInBytes); if (!result) - return (MiBits *)NULL; + return NULL; bitsPerPixel = pDraw->bitsPerPixel; pOut = (OUT_TYPE *) result; if(bitsPerPixel == 1) @@ -433,8 +429,8 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, dixChangeGC(NullClient, pGCT, GCBackground, NULL, gcv); ValidateGC((DrawablePtr)pPixmap, pGCT); miClearDrawable((DrawablePtr)pPixmap, pGCT); - ppt = pptFirst = (DDXPointPtr)xalloc(h * sizeof(DDXPointRec)); - pwidth = pwidthFirst = (int *)xalloc(h * sizeof(int)); + ppt = pptFirst = xalloc(h * sizeof(DDXPointRec)); + pwidth = pwidthFirst = xalloc(h * sizeof(int)); if(!pptFirst || !pwidthFirst) { if (pwidthFirst) xfree(pwidthFirst); @@ -643,7 +639,7 @@ miCopyPlane( DrawablePtr pSrcDrawable, * XY format: * get the single plane specified in planemask */ -_X_EXPORT void +void miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, unsigned int format, unsigned long planeMask, char *pDst) { @@ -651,7 +647,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, int i, linelength, width, srcx, srcy; DDXPointRec pt = {0, 0}; XID gcv[2]; - PixmapPtr pPixmap = (PixmapPtr)NULL; + PixmapPtr pPixmap = NULL; GCPtr pGC = NULL; depth = pDraw->depth; @@ -741,7 +737,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, * ZPixmap format: * This part is simple, just call SetSpans */ -_X_EXPORT void +void miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage) @@ -802,8 +798,8 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, break; case ZPixmap: - ppt = pptFirst = (DDXPointPtr)xalloc(h * sizeof(DDXPointRec)); - pwidth = pwidthFirst = (int *)xalloc(h * sizeof(int)); + ppt = pptFirst = xalloc(h * sizeof(DDXPointRec)); + pwidth = pwidthFirst = xalloc(h * sizeof(int)); if(!pptFirst || !pwidthFirst) { if (pwidthFirst) diff --git a/xorg-server/mi/mibstore.c b/xorg-server/mi/mibstore.c index 294b2caee..262b4944d 100644 --- a/xorg-server/mi/mibstore.c +++ b/xorg-server/mi/mibstore.c @@ -2,22 +2,23 @@ * Copyright 2007 Red Hat, Inc. * * 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 - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * them Software is furnished to do so, subject to the following conditions: + * 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 MERCHANTIBILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS 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. + * 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. */ #ifdef HAVE_DIX_CONFIG_H @@ -36,7 +37,7 @@ * for the implementation. */ -_X_EXPORT void +void miInitializeBackingStore (ScreenPtr pScreen) { pScreen->SaveDoomedAreas = NULL; diff --git a/xorg-server/mi/mibstore.h b/xorg-server/mi/mibstore.h index baa59202b..ef7e18790 100644 --- a/xorg-server/mi/mibstore.h +++ b/xorg-server/mi/mibstore.h @@ -18,7 +18,7 @@ #include "screenint.h" -extern void miInitializeBackingStore( +extern _X_EXPORT void miInitializeBackingStore( ScreenPtr /*pScreen*/ ); diff --git a/xorg-server/mi/micmap.c b/xorg-server/mi/micmap.c index b92ddece5..1d26a5232 100644 --- a/xorg-server/mi/micmap.c +++ b/xorg-server/mi/micmap.c @@ -46,9 +46,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "globals.h" #include "micmap.h" -_X_EXPORT ColormapPtr miInstalledMaps[MAXSCREENS]; +ColormapPtr miInstalledMaps[MAXSCREENS]; -_X_EXPORT int +int miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) { if (miInstalledMaps[pScreen->myNum]) { @@ -58,7 +58,7 @@ miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) return 0; } -_X_EXPORT void +void miInstallColormap(ColormapPtr pmap) { int index = pmap->pScreen->myNum; @@ -77,7 +77,7 @@ miInstallColormap(ColormapPtr pmap) } } -_X_EXPORT void +void miUninstallColormap(ColormapPtr pmap) { int index = pmap->pScreen->myNum; @@ -87,14 +87,16 @@ miUninstallColormap(ColormapPtr pmap) { if (pmap->mid != pmap->pScreen->defColormap) { - curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&curpmap, + pmap->pScreen->defColormap, + RT_COLORMAP, serverClient, + DixUseAccess); (*pmap->pScreen->InstallColormap)(curpmap); } } } -_X_EXPORT void +void miResolveColor(unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, VisualPtr pVisual) { @@ -116,7 +118,7 @@ miResolveColor(unsigned short *pred, unsigned short *pgreen, } } -_X_EXPORT Bool +Bool miInitializeColormap(ColormapPtr pmap) { unsigned i; @@ -201,7 +203,7 @@ miInitializeColormap(ColormapPtr pmap) outdefs[i].blue = pmap->blue[blue >> pVisual->offsetBlue].co.local.blue; \ } -_X_EXPORT int +int miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem *indefs, xColorItem *outdefs) { @@ -261,7 +263,7 @@ miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem *indefs, return nresult; } -_X_EXPORT Bool +Bool miCreateDefColormap(ScreenPtr pScreen) { /* @@ -378,7 +380,7 @@ static int miVisualPriority[] = { static miVisualsPtr miVisuals; -_X_EXPORT void +void miClearVisualTypes(void) { miVisualsPtr v; @@ -390,7 +392,7 @@ miClearVisualTypes(void) } -_X_EXPORT Bool +Bool miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, int preferredCVC, Pixel redMask, Pixel greenMask, Pixel blueMask) @@ -398,7 +400,7 @@ miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, miVisualsPtr new, *prev, v; int count; - new = (miVisualsPtr) xalloc (sizeof *new); + new = xalloc (sizeof *new); if (!new) return FALSE; if (!redMask || !greenMask || !blueMask) @@ -424,14 +426,14 @@ miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, return TRUE; } -_X_EXPORT Bool +Bool miSetVisualTypes(int depth, int visuals, int bitsPerRGB, int preferredCVC) { return miSetVisualTypesAndMasks (depth, visuals, bitsPerRGB, preferredCVC, 0, 0, 0); } -_X_EXPORT int +int miGetDefaultVisualMask(int depth) { if (depth > MAX_PSEUDO_DEPTH) @@ -455,7 +457,7 @@ miVisualTypesSet (int depth) return FALSE; } -_X_EXPORT Bool +Bool miSetPixmapDepths (void) { int d, f; @@ -497,7 +499,7 @@ maskShift (Pixel p) * the set which can be used with this version of cfb. */ -_X_EXPORT Bool +Bool miInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, int *ndepthp, int *rootDepthp, VisualID *defaultVisp, unsigned long sizes, int bitsPerRGB, int preferredVis) @@ -539,9 +541,9 @@ miInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, ndepth++; nvisual += visuals->count; } - depth = (DepthPtr) xalloc (ndepth * sizeof (DepthRec)); - visual = (VisualPtr) xalloc (nvisual * sizeof (VisualRec)); - preferredCVCs = (int *)xalloc(ndepth * sizeof(int)); + depth = xalloc (ndepth * sizeof (DepthRec)); + visual = xalloc (nvisual * sizeof (VisualRec)); + preferredCVCs = xalloc(ndepth * sizeof(int)); if (!depth || !visual || !preferredCVCs) { xfree (depth); @@ -565,7 +567,7 @@ miInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, vid = NULL; if (nvtype) { - vid = (VisualID *) xalloc (nvtype * sizeof (VisualID)); + vid = xalloc (nvtype * sizeof (VisualID)); if (!vid) { xfree(preferredCVCs); return FALSE; diff --git a/xorg-server/mi/micmap.h b/xorg-server/mi/micmap.h index 667004b49..5c8448a95 100644 --- a/xorg-server/mi/micmap.h +++ b/xorg-server/mi/micmap.h @@ -4,29 +4,29 @@ #ifndef _MICMAP_H_ #define _MICMAP_H_ -extern ColormapPtr miInstalledMaps[MAXSCREENS]; +extern _X_EXPORT ColormapPtr miInstalledMaps[MAXSCREENS]; typedef Bool (* miInitVisualsProcPtr)(VisualPtr *, DepthPtr *, int *, int *, int *, VisualID *, unsigned long, int, int); -int miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps); -void miInstallColormap(ColormapPtr pmap); -void miUninstallColormap(ColormapPtr pmap); +extern _X_EXPORT int miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps); +extern _X_EXPORT void miInstallColormap(ColormapPtr pmap); +extern _X_EXPORT void miUninstallColormap(ColormapPtr pmap); -void miResolveColor(unsigned short *, unsigned short *, unsigned short *, +extern _X_EXPORT void miResolveColor(unsigned short *, unsigned short *, unsigned short *, VisualPtr); -Bool miInitializeColormap(ColormapPtr); -int miExpandDirectColors(ColormapPtr, int, xColorItem *, xColorItem *); -Bool miCreateDefColormap(ScreenPtr); -void miClearVisualTypes(void); -Bool miSetVisualTypes(int, int, int, int); -Bool miSetPixmapDepths(void); -Bool miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, +extern _X_EXPORT Bool miInitializeColormap(ColormapPtr); +extern _X_EXPORT int miExpandDirectColors(ColormapPtr, int, xColorItem *, xColorItem *); +extern _X_EXPORT Bool miCreateDefColormap(ScreenPtr); +extern _X_EXPORT void miClearVisualTypes(void); +extern _X_EXPORT Bool miSetVisualTypes(int, int, int, int); +extern _X_EXPORT Bool miSetPixmapDepths(void); +extern _X_EXPORT Bool miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, int preferredCVC, Pixel redMask, Pixel greenMask, Pixel blueMask); -int miGetDefaultVisualMask(int); -Bool miInitVisuals(VisualPtr *, DepthPtr *, int *, int *, int *, VisualID *, +extern _X_EXPORT int miGetDefaultVisualMask(int); +extern _X_EXPORT Bool miInitVisuals(VisualPtr *, DepthPtr *, int *, int *, int *, VisualID *, unsigned long, int, int); #define MAX_PSEUDO_DEPTH 10 diff --git a/xorg-server/mi/micopy.c b/xorg-server/mi/micopy.c new file mode 100644 index 000000000..3719f4646 --- /dev/null +++ b/xorg-server/mi/micopy.c @@ -0,0 +1,354 @@ +/* + * Copyright © 1998 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmap.h" +#include "pixmapstr.h" +#include "windowstr.h" + +void +miCopyRegion (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + RegionPtr pDstRegion, + int dx, + int dy, + miCopyProc copyProc, + Pixel bitPlane, + void *closure) +{ + int careful; + Bool reverse; + Bool upsidedown; + BoxPtr pbox; + int nbox; + BoxPtr pboxNew1, pboxNew2, pboxBase, pboxNext, pboxTmp; + + pbox = REGION_RECTS(pDstRegion); + nbox = REGION_NUM_RECTS(pDstRegion); + + /* XXX we have to err on the side of safety when both are windows, + * because we don't know if IncludeInferiors is being used. + */ + careful = ((pSrcDrawable == pDstDrawable) || + ((pSrcDrawable->type == DRAWABLE_WINDOW) && + (pDstDrawable->type == DRAWABLE_WINDOW))); + + pboxNew1 = NULL; + pboxNew2 = NULL; + if (careful && dy < 0) + { + upsidedown = TRUE; + + if (nbox > 1) + { + /* keep ordering in each band, reverse order of bands */ + pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); + if(!pboxNew1) + return; + pboxBase = pboxNext = pbox+nbox-1; + while (pboxBase >= pbox) + { + while ((pboxNext >= pbox) && + (pboxBase->y1 == pboxNext->y1)) + pboxNext--; + pboxTmp = pboxNext+1; + while (pboxTmp <= pboxBase) + { + *pboxNew1++ = *pboxTmp++; + } + pboxBase = pboxNext; + } + pboxNew1 -= nbox; + pbox = pboxNew1; + } + } + else + { + /* walk source top to bottom */ + upsidedown = FALSE; + } + + if (careful && dx < 0) + { + /* walk source right to left */ + if (dy <= 0) + reverse = TRUE; + else + reverse = FALSE; + + if (nbox > 1) + { + /* reverse order of rects in each band */ + pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); + if(!pboxNew2) + { + if (pboxNew1) + xfree(pboxNew1); + return; + } + pboxBase = pboxNext = pbox; + while (pboxBase < pbox+nbox) + { + while ((pboxNext < pbox+nbox) && + (pboxNext->y1 == pboxBase->y1)) + pboxNext++; + pboxTmp = pboxNext; + while (pboxTmp != pboxBase) + { + *pboxNew2++ = *--pboxTmp; + } + pboxBase = pboxNext; + } + pboxNew2 -= nbox; + pbox = pboxNew2; + } + } + else + { + /* walk source left to right */ + reverse = FALSE; + } + + (*copyProc) (pSrcDrawable, + pDstDrawable, + pGC, + pbox, + nbox, + dx, dy, + reverse, upsidedown, bitPlane, closure); + + if (pboxNew1) + xfree (pboxNew1); + if (pboxNew2) + xfree (pboxNew2); +} + +RegionPtr +miDoCopy (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + miCopyProc copyProc, + Pixel bitPlane, + void *closure) +{ + RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ + Bool freeSrcClip = FALSE; + RegionPtr prgnExposed = NULL; + RegionRec rgnDst; + int dx; + int dy; + int numRects; + int box_x1; + int box_y1; + int box_x2; + int box_y2; + Bool fastSrc = FALSE; /* for fast clipping with pixmap source */ + Bool fastDst = FALSE; /* for fast clipping with one rect dest */ + Bool fastExpose = FALSE; /* for fast exposures with pixmap source */ + + /* Short cut for unmapped windows */ + + if (pDstDrawable->type == DRAWABLE_WINDOW && + !((WindowPtr)pDstDrawable)->realized) + { + return NULL; + } + + if ((pSrcDrawable != pDstDrawable) && + pSrcDrawable->pScreen->SourceValidate) + { + (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc); + } + + /* Compute source clip region */ + if (pSrcDrawable->type == DRAWABLE_PIXMAP) + { + if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE)) + prgnSrcClip = miGetCompositeClip(pGC); + else + fastSrc = TRUE; + } + else + { + if (pGC->subWindowMode == IncludeInferiors) + { + /* + * XFree86 DDX empties the border clip when the + * VT is inactive, make sure the region isn't empty + */ + if (!((WindowPtr) pSrcDrawable)->parent && + REGION_NOTEMPTY (pSrcDrawable->pScreen, + &((WindowPtr) pSrcDrawable)->borderClip)) + { + /* + * special case bitblt from root window in + * IncludeInferiors mode; just like from a pixmap + */ + fastSrc = TRUE; + } + else if ((pSrcDrawable == pDstDrawable) && + (pGC->clientClipType == CT_NONE)) + { + prgnSrcClip = miGetCompositeClip(pGC); + } + else + { + prgnSrcClip = NotClippedByChildren((WindowPtr)pSrcDrawable); + freeSrcClip = TRUE; + } + } + else + { + prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; + } + } + + xIn += pSrcDrawable->x; + yIn += pSrcDrawable->y; + + xOut += pDstDrawable->x; + yOut += pDstDrawable->y; + + box_x1 = xIn; + box_y1 = yIn; + box_x2 = xIn + widthSrc; + box_y2 = yIn + heightSrc; + + dx = xIn - xOut; + dy = yIn - yOut; + + /* Don't create a source region if we are doing a fast clip */ + if (fastSrc) + { + RegionPtr cclip; + + fastExpose = TRUE; + /* + * clip the source; if regions extend beyond the source size, + * make sure exposure events get sent + */ + if (box_x1 < pSrcDrawable->x) + { + box_x1 = pSrcDrawable->x; + fastExpose = FALSE; + } + if (box_y1 < pSrcDrawable->y) + { + box_y1 = pSrcDrawable->y; + fastExpose = FALSE; + } + if (box_x2 > pSrcDrawable->x + (int) pSrcDrawable->width) + { + box_x2 = pSrcDrawable->x + (int) pSrcDrawable->width; + fastExpose = FALSE; + } + if (box_y2 > pSrcDrawable->y + (int) pSrcDrawable->height) + { + box_y2 = pSrcDrawable->y + (int) pSrcDrawable->height; + fastExpose = FALSE; + } + + /* Translate and clip the dst to the destination composite clip */ + box_x1 -= dx; + box_x2 -= dx; + box_y1 -= dy; + box_y2 -= dy; + + /* If the destination composite clip is one rectangle we can + do the clip directly. Otherwise we have to create a full + blown region and call intersect */ + + cclip = miGetCompositeClip(pGC); + if (REGION_NUM_RECTS(cclip) == 1) + { + BoxPtr pBox = REGION_RECTS(cclip); + + if (box_x1 < pBox->x1) box_x1 = pBox->x1; + if (box_x2 > pBox->x2) box_x2 = pBox->x2; + if (box_y1 < pBox->y1) box_y1 = pBox->y1; + if (box_y2 > pBox->y2) box_y2 = pBox->y2; + fastDst = TRUE; + } + } + + /* Check to see if the region is empty */ + if (box_x1 >= box_x2 || box_y1 >= box_y2) + { + REGION_NULL(pGC->pScreen, &rgnDst); + } + else + { + BoxRec box; + box.x1 = box_x1; + box.y1 = box_y1; + box.x2 = box_x2; + box.y2 = box_y2; + REGION_INIT(pGC->pScreen, &rgnDst, &box, 1); + } + + /* Clip against complex source if needed */ + if (!fastSrc) + { + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); + REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + } + + /* Clip against complex dest if needed */ + if (!fastDst) + { + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, + miGetCompositeClip(pGC)); + } + + /* Do bit blitting */ + numRects = REGION_NUM_RECTS(&rgnDst); + if (numRects && widthSrc && heightSrc) + miCopyRegion (pSrcDrawable, pDstDrawable, pGC, + &rgnDst, dx, dy, copyProc, bitPlane, closure); + + /* Pixmap sources generate a NoExposed (we return NULL to do this) */ + if (!fastExpose && pGC->fExpose) + prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, + xIn - pSrcDrawable->x, + yIn - pSrcDrawable->y, + widthSrc, heightSrc, + xOut - pDstDrawable->x, + yOut - pDstDrawable->y, + (unsigned long) bitPlane); + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return prgnExposed; +} diff --git a/xorg-server/mi/midispcur.c b/xorg-server/mi/midispcur.c index 05352fc89..3fb7e02b5 100644 --- a/xorg-server/mi/midispcur.c +++ b/xorg-server/mi/midispcur.c @@ -34,7 +34,6 @@ in this Software without prior written authorization from The Open Group. #include #endif -#define NEED_EVENTS # include # include "misc.h" # include "input.h" @@ -52,7 +51,7 @@ in this Software without prior written authorization from The Open Group. # include "picturestr.h" #endif -# include "inputstr.h" /* for MAX_DEVICES */ +# include "inputstr.h" /* per-screen private data */ static int miDCScreenKeyIndex; @@ -136,12 +135,12 @@ static miSpriteCursorFuncRec miDCFuncs = { miDCDeviceCleanup }; -_X_EXPORT Bool +Bool miDCInitialize (ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs) { miDCScreenPtr pScreenPriv; - pScreenPriv = (miDCScreenPtr) xalloc (sizeof (miDCScreenRec)); + pScreenPriv = xalloc (sizeof (miDCScreenRec)); if (!pScreenPriv) return FALSE; @@ -230,9 +229,9 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) GCPtr pGC; XID gcvals[3]; - pPriv = (miDCCursorPtr) xalloc (sizeof (miDCCursorRec)); + pPriv = xalloc (sizeof (miDCCursorRec)); if (!pPriv) - return (miDCCursorPtr)NULL; + return NULL; #ifdef ARGB_CURSOR if (pCursor->bits->argb) { @@ -244,7 +243,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) if (!pFormat) { xfree ((pointer) pPriv); - return (miDCCursorPtr)NULL; + return NULL; } pPriv->sourceBits = 0; @@ -255,14 +254,14 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) if (!pPixmap) { xfree ((pointer) pPriv); - return (miDCCursorPtr)NULL; + return NULL; } pGC = GetScratchGC (32, pScreen); if (!pGC) { (*pScreen->DestroyPixmap) (pPixmap); xfree ((pointer) pPriv); - return (miDCCursorPtr)NULL; + return NULL; } ValidateGC (&pPixmap->drawable, pGC); (*pGC->ops->PutImage) (&pPixmap->drawable, pGC, 32, @@ -276,7 +275,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) if (!pPriv->pPicture) { xfree ((pointer) pPriv); - return (miDCCursorPtr)NULL; + return NULL; } dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), pPriv); return pPriv; @@ -287,14 +286,14 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) if (!pPriv->sourceBits) { xfree ((pointer) pPriv); - return (miDCCursorPtr)NULL; + return NULL; } pPriv->maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0); if (!pPriv->maskBits) { (*pScreen->DestroyPixmap) (pPriv->sourceBits); xfree ((pointer) pPriv); - return (miDCCursorPtr)NULL; + return NULL; } dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), pPriv); @@ -304,7 +303,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) if (!pGC) { (void) miDCUnrealizeCursor (pScreen, pCursor); - return (miDCCursorPtr)NULL; + return NULL; } ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC); diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c index 213ad5b40..1b81e4d99 100644 --- a/xorg-server/mi/mieq.c +++ b/xorg-server/mi/mieq.c @@ -36,7 +36,6 @@ in this Software without prior written authorization from The Open Group. #include #endif -# define NEED_EVENTS # include # include # include @@ -52,11 +51,11 @@ in this Software without prior written authorization from The Open Group. # include # include "extinit.h" # include "exglobals.h" +# include "eventstr.h" #ifdef DPMSExtension # include "dpmsproc.h" -# define DPMS_SERVER -# include +# include #endif #define QUEUE_SIZE 512 @@ -66,7 +65,6 @@ in this Software without prior written authorization from The Open Group. typedef struct _Event { EventListPtr events; - int nevents; ScreenPtr pScreen; DeviceIntPtr pDev; /* device this event _originated_ from */ } EventRec, *EventPtr; @@ -80,7 +78,6 @@ typedef struct _EventQueue { } EventQueueRec, *EventQueuePtr; static EventQueueRec miEventQueue; -static EventListPtr masterEvents; /* for use in mieqProcessInputEvents */ #ifdef XQUARTZ #include @@ -113,22 +110,12 @@ mieqInit(void) miEventQueue.handlers[i] = NULL; for (i = 0; i < QUEUE_SIZE; i++) { - EventListPtr evlist = InitEventList(1 + MAX_VALUATOR_EVENTS); + EventListPtr evlist = InitEventList(1); if (!evlist) FatalError("Could not allocate event queue.\n"); miEventQueue.events[i].events = evlist; } - /* XXX: mE is just 1 event long, if we have Motion + Valuator they are - * squashed into the first event to make passing it into the event - * processing handlers easier. This should be fixed when the processing - * handlers switch to EventListPtr instead of xEvent */ - masterEvents = InitEventList(1); - if (!masterEvents) - FatalError("Could not allocated MD event queue.\n"); - SetMinimumEventSize(masterEvents, 1, - (1 + MAX_VALUATOR_EVENTS) * sizeof(xEvent)); - SetInputCheck(&miEventQueue.head, &miEventQueue.tail); return TRUE; } @@ -140,7 +127,7 @@ mieqResizeEvents(int min_size) int i; for (i = 0; i < QUEUE_SIZE; i++) - SetMinimumEventSize(miEventQueue.events[i].events, 7, min_size); + SetMinimumEventSize(miEventQueue.events[i].events, 1, min_size); } /* @@ -151,92 +138,50 @@ mieqResizeEvents(int min_size) */ void -mieqEnqueue(DeviceIntPtr pDev, xEvent *e) +mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e) { unsigned int oldtail = miEventQueue.tail; EventListPtr evt; int isMotion = 0; int evlen; + Time time; #ifdef XQUARTZ wait_for_server_init(); pthread_mutex_lock(&miEventQueueMutex); #endif + CHECKEVENT(e); + /* avoid merging events from different devices */ - if (e->u.u.type == MotionNotify) + if (e->any.type == ET_Motion) isMotion = pDev->id; - else if (e->u.u.type == DeviceMotionNotify) - isMotion = pDev->id | (1 << 8); /* flag to indicate DeviceMotion */ - - /* We silently steal valuator events: just tack them on to the last - * motion event they need to be attached to. Sigh. */ - if (e->u.u.type == DeviceValuator) { - deviceValuator *v = (deviceValuator *) e; - EventPtr laste; - deviceKeyButtonPointer *lastkbp; - - laste = &miEventQueue.events[(oldtail - 1) % QUEUE_SIZE]; - lastkbp = (deviceKeyButtonPointer *) laste->events->event; - - if (laste->nevents > 6) { -#ifdef XQUARTZ - pthread_mutex_unlock(&miEventQueueMutex); -#endif - - ErrorF("[mi] mieqEnqueue: more than six valuator events; dropping.\n"); - return; - } - if (oldtail == miEventQueue.head || - !(lastkbp->type == DeviceMotionNotify || - lastkbp->type == DeviceButtonPress || - lastkbp->type == DeviceButtonRelease || - lastkbp->type == ProximityIn || - lastkbp->type == ProximityOut) || - ((lastkbp->deviceid & DEVICE_BITS) != - (v->deviceid & DEVICE_BITS))) { -#ifdef XQUARTZ - pthread_mutex_unlock(&miEventQueueMutex); -#endif - ErrorF("[mi] mieqEnequeue: out-of-order valuator event; dropping.\n"); - return; - } - - memcpy((laste->events[laste->nevents++].event), e, sizeof(xEvent)); -#ifdef XQUARTZ - pthread_mutex_unlock(&miEventQueueMutex); -#endif - return; - } if (isMotion && isMotion == miEventQueue.lastMotion && oldtail != miEventQueue.head) { - oldtail = (oldtail - 1) % QUEUE_SIZE; + oldtail = (oldtail - 1) % QUEUE_SIZE; } else { - static int stuck = 0; - /* Toss events which come in late. Usually this means your server's + static int stuck = 0; + /* Toss events which come in late. Usually this means your server's * stuck in an infinite loop somewhere, but SIGIO is still getting * handled. */ - if (((oldtail + 1) % QUEUE_SIZE) == miEventQueue.head) { - ErrorF("[mi] EQ overflowing. The server is probably stuck " - "in an infinite loop.\n"); - if (!stuck) { - xorg_backtrace(); - stuck = 1; - } + if (((oldtail + 1) % QUEUE_SIZE) == miEventQueue.head) { + if (!stuck) { + ErrorF("[mi] EQ overflowing. The server is probably stuck " + "in an infinite loop.\n"); + xorg_backtrace(); + stuck = 1; + } #ifdef XQUARTZ - pthread_mutex_unlock(&miEventQueueMutex); + pthread_mutex_unlock(&miEventQueueMutex); #endif - return; + return; } - stuck = 0; + stuck = 0; } - evlen = sizeof(xEvent); - if (e->u.u.type == GenericEvent) - evlen += ((xGenericEvent*)e)->length * 4; - + evlen = e->any.length; evt = miEventQueue.events[oldtail].events; if (evt->evlen < evlen) { @@ -253,17 +198,16 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) } memcpy(evt->event, e, evlen); - miEventQueue.events[oldtail].nevents = 1; + time = e->any.time; /* Make sure that event times don't go backwards - this * is "unnecessary", but very useful. */ - if (e->u.u.type != GenericEvent && - e->u.keyButtonPointer.time < miEventQueue.lastEventTime && - miEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000) - evt->event->u.keyButtonPointer.time = miEventQueue.lastEventTime; + if (time < miEventQueue.lastEventTime && + miEventQueue.lastEventTime - time < 10000) + e->any.time = miEventQueue.lastEventTime; - miEventQueue.lastEventTime = evt->event->u.keyButtonPointer.time; - miEventQueue.events[oldtail].pScreen = EnqueueScreen(pDev); + miEventQueue.lastEventTime = ((InternalEvent*)evt->event)->any.time; + miEventQueue.events[oldtail].pScreen = pDev ? EnqueueScreen(pDev) : NULL; miEventQueue.events[oldtail].pDev = pDev; miEventQueue.lastMotion = isMotion; @@ -281,7 +225,7 @@ mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool fromDIX) #endif EnqueueScreen(pDev) = pScreen; if (fromDIX) - DequeueScreen(pDev) = pScreen; + DequeueScreen(pDev) = pScreen; #ifdef XQUARTZ pthread_mutex_unlock(&miEventQueueMutex); #endif @@ -307,86 +251,175 @@ mieqSetHandler(int event, mieqHandler handler) * Change the device id of the given event to the given device's id. */ static void -ChangeDeviceID(DeviceIntPtr dev, xEvent* event) +ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event) { - int type = event->u.u.type; - - if (type == DeviceKeyPress || type == DeviceKeyRelease || - type == DeviceButtonPress || type == DeviceButtonRelease || - type == DeviceMotionNotify || type == ProximityIn || - type == ProximityOut) - ((deviceKeyButtonPointer*)event)->deviceid = dev->id; - else if (type == DeviceValuator) - ((deviceValuator*)event)->deviceid = dev->id; - else if (type == GenericEvent) + switch(event->any.type) { - DebugF("[mi] Unknown generic event (%d/%d), cannot change id.\n", - ((xGenericEvent*)event)->extension, - ((xGenericEvent*)event)->evtype); - } else - DebugF("[mi] Unknown event type (%d), cannot change id.\n", type); + case ET_Motion: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_ProximityIn: + case ET_ProximityOut: + case ET_Hierarchy: + case ET_DeviceChanged: + event->device.deviceid = dev->id; + break; +#if XFreeXDGA + case ET_DGAEvent: + break; +#endif + case ET_RawKeyPress: + case ET_RawKeyRelease: + case ET_RawButtonPress: + case ET_RawButtonRelease: + case ET_RawMotion: + event->raw.deviceid = dev->id; + break; + default: + ErrorF("[mi] Unknown event type (%d), cannot change id.\n", + event->any.type); + } } static void -FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev, xEvent* original, - EventListPtr master, int count) +FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev, + InternalEvent* original, InternalEvent *master) { + CHECKEVENT(original); + CHECKEVENT(master); /* Ensure chained button mappings, i.e. that the detail field is the * value of the mapped button on the SD, not the physical button */ - if (original->u.u.type == DeviceButtonPress || original->u.u.type == DeviceButtonRelease) + if (original->any.type == ET_ButtonPress || + original->any.type == ET_ButtonRelease) { - int btn = original->u.u.detail; + int btn = original->device.detail.button; if (!sdev->button) return; /* Should never happen */ - master->event->u.u.detail = sdev->button->map[btn]; + master->device.detail.button = sdev->button->map[btn]; } } /** * Copy the given event into master. - * @param mdev The master device * @param sdev The slave device the original event comes from * @param original The event as it came from the EQ - * @param master The event after being copied - * @param count Number of events in original. + * @param copy The event after being copied + * @return The master device or NULL if the device is a floating slave. */ -void -CopyGetMasterEvent(DeviceIntPtr mdev, DeviceIntPtr sdev, xEvent* original, - EventListPtr master, int count) +DeviceIntPtr +CopyGetMasterEvent(DeviceIntPtr sdev, + InternalEvent* original, InternalEvent *copy) { - int len = count * sizeof(xEvent); - - /* Assumption: GenericEvents always have count 1 */ + DeviceIntPtr mdev; + int len = original->any.length; - if (GEV(original)->type == GenericEvent) - len += GEV(original)->length * 4; + CHECKEVENT(original); - if (master->evlen < len) - SetMinimumEventSize(master, 1, len); + if (!sdev->u.master) + return NULL; - memcpy(master->event, original, len); - while (count--) + switch(original->any.type) { - ChangeDeviceID(mdev, &master->event[count]); - FixUpEventForMaster(mdev, sdev, original, master, count); + case ET_KeyPress: + case ET_KeyRelease: + mdev = GetMaster(sdev, MASTER_KEYBOARD); + break; + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_Motion: + case ET_ProximityIn: + case ET_ProximityOut: + mdev = GetMaster(sdev, MASTER_POINTER); + break; + default: + mdev = sdev->u.master; + break; } + + memcpy(copy, original, len); + ChangeDeviceID(mdev, copy); + FixUpEventForMaster(mdev, sdev, original, copy); + + return mdev; } -extern void -CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); +/** + * Post the given @event through the device hierarchy, as appropriate. + * Use this function if an event must be posted for a given device during the + * usual event processing cycle. + */ +void +mieqProcessDeviceEvent(DeviceIntPtr dev, + InternalEvent *event, + ScreenPtr screen) +{ + mieqHandler handler; + int x = 0, y = 0; + DeviceIntPtr master; + InternalEvent mevent; /* master event */ + + CHECKEVENT(event); + + /* Custom event handler */ + handler = miEventQueue.handlers[event->any.type]; + + switch (event->any.type) { + /* Catch events that include valuator information and check if they + * are changing the screen */ + case ET_Motion: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ButtonPress: + case ET_ButtonRelease: + if (dev && screen && screen != DequeueScreen(dev) && !handler) { + DequeueScreen(dev) = screen; + x = event->device.root_x; + y = event->device.root_y; + NewCurrentScreen (dev, DequeueScreen(dev), x, y); + } + break; + default: + break; + } + master = CopyGetMasterEvent(dev, event, &mevent); + + if (master) + master->u.lastSlave = dev; + + /* If someone's registered a custom event handler, let them + * steal it. */ + if (handler) + { + int screenNum = dev && DequeueScreen(dev) ? DequeueScreen(dev)->myNum : (screen ? screen->myNum : 0); + handler(screenNum, event, dev); + /* Check for the SD's master in case the device got detached + * during event processing */ + if (master && dev->u.master) + handler(screenNum, &mevent, master); + } else + { + /* process slave first, then master */ + dev->public.processInputProc(event, dev); + + /* Check for the SD's master in case the device got detached + * during event processing */ + if (master && dev->u.master) + master->public.processInputProc(&mevent, master); + } +} /* Call this from ProcessInputEvents(). */ void mieqProcessInputEvents(void) { - mieqHandler handler; EventRec *e = NULL; - int x = 0, y = 0; - int type, nevents, evlen, i; + int evlen; ScreenPtr screen; - static xEvent *event = NULL; + static InternalEvent *event = NULL; static size_t event_size = 0; DeviceIntPtr dev = NULL, master = NULL; @@ -398,19 +431,14 @@ mieqProcessInputEvents(void) while (miEventQueue.head != miEventQueue.tail) { e = &miEventQueue.events[miEventQueue.head]; - /* GenericEvents always have nevents == 1 */ - nevents = e->nevents; - evlen = (nevents > 1) ? sizeof(xEvent) : e->events->evlen; - if((nevents * evlen) > event_size) { - event_size = nevents * evlen; - event = (xEvent *)xrealloc(event, event_size); - } + evlen = e->events->evlen; + if(evlen > event_size) + event = xrealloc(event, evlen); if (!event) FatalError("[mi] No memory left for event processing.\n"); - for (i = 0; i < nevents; i++) - memcpy(&event[i], e->events[i].event, evlen); + memcpy(event, e->events->event, evlen); dev = e->pDev; @@ -421,9 +449,8 @@ mieqProcessInputEvents(void) #ifdef XQUARTZ pthread_mutex_unlock(&miEventQueueMutex); #endif - - type = event->u.u.type; - master = (!dev->isMaster && dev->u.master) ? dev->u.master : NULL; + + master = (dev && !IsMaster(dev) && dev->u.master) ? dev->u.master : NULL; if (screenIsSaved == SCREEN_SAVER_ON) dixSaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); @@ -435,52 +462,10 @@ mieqProcessInputEvents(void) DPMSSet(serverClient, DPMSModeOn); #endif - /* Custom event handler */ - handler = miEventQueue.handlers[type]; - - if (screen != DequeueScreen(dev) && !handler) { - /* Assumption - screen switching can only occur on motion events. */ - DequeueScreen(dev) = screen; - x = event->u.keyButtonPointer.rootX; - y = event->u.keyButtonPointer.rootY; - NewCurrentScreen (dev, DequeueScreen(dev), x, y); - } - else { - if (master) { - /* Force a copy of the key class into the VCK so that the layout - is transferred. */ - if (event->u.u.type == DeviceKeyPress || - event->u.u.type == DeviceKeyRelease) - { - if (!master->key) - master = GetPairedDevice(master); - CopyKeyClass(dev, master); - } - - CopyGetMasterEvent(master, dev, event, masterEvents, nevents); - } - - /* If someone's registered a custom event handler, let them - * steal it. */ - if (handler) - { - handler(DequeueScreen(dev)->myNum, event, dev, nevents); - if (master) - handler(DequeueScreen(master)->myNum, - masterEvents->event, master, nevents); - } else - { - /* process slave first, then master */ - dev->public.processInputProc(event, dev, nevents); - - if (master) - master->public.processInputProc(masterEvents->event, master, - nevents); - } - } + mieqProcessDeviceEvent(dev, event, screen); /* Update the sprite now. Next event may be from different device. */ - if (type == DeviceMotionNotify && dev->coreEvents) + if (event->any.type == ET_Motion && master) miPointerUpdateSprite(dev); #ifdef XQUARTZ diff --git a/xorg-server/mi/miexpose.c b/xorg-server/mi/miexpose.c index f8a9e2fe4..6ce56ee85 100644 --- a/xorg-server/mi/miexpose.c +++ b/xorg-server/mi/miexpose.c @@ -78,7 +78,6 @@ Equipment Corporation. #endif #include -#define NEED_EVENTS #include #include @@ -127,7 +126,7 @@ exposing is done by the backing store's GraphicsExpose function, of course. */ -_X_EXPORT RegionPtr +RegionPtr miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long plane) @@ -208,7 +207,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, box.y2 = pSrcDrawable->height; prgnSrcClip = &rgnSrcRec; REGION_INIT(pscr, prgnSrcClip, &box, 1); - pSrcWin = (WindowPtr)NULL; + pSrcWin = NULL; } if (pDstDrawable == pSrcDrawable) @@ -255,6 +254,10 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, /* intersect with visible areas of dest */ REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, prgnDstClip); + /* intersect with client clip region. */ + if (pGC->clientClipType == CT_REGION) + REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, pGC->clientClip); + /* * If we have LOTS of rectangles, we decide to take the extents * and force an exposure on that. This should require much less @@ -355,7 +358,7 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, numRects = REGION_NUM_RECTS(pRgn); pBox = REGION_RECTS(pRgn); - if(!(pEvent = (xEvent *)xalloc(numRects * sizeof(xEvent)))) + if(!(pEvent = xalloc(numRects * sizeof(xEvent)))) return; pe = pEvent; @@ -378,6 +381,7 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, else { xEvent event; + memset(&event, 0, sizeof(xEvent)); event.u.u.type = NoExpose; event.u.noExposure.drawable = drawable; event.u.noExposure.majorEvent = major; @@ -398,7 +402,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) pBox = REGION_RECTS(pRgn); numRects = REGION_NUM_RECTS(pRgn); - if(!(pEvent = (xEvent *) xalloc(numRects * sizeof(xEvent)))) + if(!(pEvent = xcalloc(1, numRects * sizeof(xEvent)))) return; for (i=numRects, pe = pEvent; --i >= 0; pe++, pBox++) @@ -432,7 +436,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) return; } realWin = win->info[0].id; - pWin = LookupIDByType(realWin, RT_WINDOW); + dixLookupWindow(&pWin, realWin, serverClient, DixSendAccess); } if(x || y || scrnum) for (i = 0; i < numRects; i++) { @@ -448,7 +452,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) xfree(pEvent); } -_X_EXPORT void +void miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) { RegionPtr exposures = prgn; @@ -518,7 +522,7 @@ void miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) { ScreenPtr pScreen = pWin->drawable.pScreen; - ChangeGCVal gcval[5]; + ChangeGCVal gcval[6]; BITS32 gcmask; GCPtr pGC; int i; @@ -586,23 +590,39 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) gcval[0].val = GXcopy; gcmask = GCFunction; +#ifdef ROOTLESS_SAFEALPHA +/* Bit mask for alpha channel with a particular number of bits per + * pixel. Note that we only care for 32bpp data. Mac OS X uses planar + * alpha for 16bpp. + */ +#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0) +#endif + if (solid) { +#ifdef ROOTLESS_SAFEALPHA + gcval[1].val = fill.pixel | RootlessAlphaMask(pWin->drawable.bitsPerPixel); +#else gcval[1].val = fill.pixel; +#endif gcval[2].val = FillSolid; gcmask |= GCForeground | GCFillStyle; } else { - gcval[1].val = FillTiled; - gcval[2].ptr = (pointer)fill.pixmap; - gcval[3].val = tile_x_off; - gcval[4].val = tile_y_off; + int c=1; +#ifdef ROOTLESS_SAFEALPHA + gcval[c++].val = ((CARD32)-1) & ~RootlessAlphaMask(pWin->drawable.bitsPerPixel); + gcmask |= GCPlaneMask; +#endif + gcval[c++].val = FillTiled; + gcval[c++].ptr = (pointer)fill.pixmap; + gcval[c++].val = tile_x_off; + gcval[c++].val = tile_y_off; gcmask |= GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin; } - prect = (xRectangle *)xalloc(REGION_NUM_RECTS(prgn) * - sizeof(xRectangle)); + prect = xalloc(REGION_NUM_RECTS(prgn) * sizeof(xRectangle)); if (!prect) return; @@ -636,7 +656,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) /* MICLEARDRAWABLE -- sets the entire drawable to the background color of * the GC. Useful when we have a scratch drawable and need to initialize * it. */ -_X_EXPORT void +void miClearDrawable(DrawablePtr pDraw, GCPtr pGC) { XID fg = pGC->fgPixel; diff --git a/xorg-server/mi/mifillarc.c b/xorg-server/mi/mifillarc.c index f2ab5ceb1..c22baf54c 100644 --- a/xorg-server/mi/mifillarc.c +++ b/xorg-server/mi/mifillarc.c @@ -52,7 +52,7 @@ Author: Bob Scheifler, MIT X Consortium #define Dsin(d) sin((double)d*(M_PI/11520.0)) #define Dcos(d) cos((double)d*(M_PI/11520.0)) -_X_EXPORT void +void miFillArcSetup(xArc *arc, miFillArcRec *info) { info->y = arc->height >> 1; @@ -304,7 +304,7 @@ miGetPieEdge( miGetArcEdge(arc, edge, k, top, left); } -_X_EXPORT void +void miFillArcSliceSetup(xArc *arc, miArcSliceRec *slice, GCPtr pGC) { int angle1, angle2; @@ -546,10 +546,10 @@ miFillEllipseI( int *widths; int *wids; - points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * arc->height); + points = xalloc(sizeof(DDXPointRec) * arc->height); if (!points) return; - widths = (int *)xalloc(sizeof(int) * arc->height); + widths = xalloc(sizeof(int) * arc->height); if (!widths) { xfree(points); @@ -589,10 +589,10 @@ miFillEllipseD( int *widths; int *wids; - points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * arc->height); + points = xalloc(sizeof(DDXPointRec) * arc->height); if (!points) return; - widths = (int *)xalloc(sizeof(int) * arc->height); + widths = xalloc(sizeof(int) * arc->height); if (!widths) { xfree(points); @@ -661,10 +661,10 @@ miFillArcSliceI( slw = arc->height; if (slice.flip_top || slice.flip_bot) slw += (arc->height >> 1) + 1; - points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * slw); + points = xalloc(sizeof(DDXPointRec) * slw); if (!points) return; - widths = (int *)xalloc(sizeof(int) * slw); + widths = xalloc(sizeof(int) * slw); if (!widths) { xfree(points); @@ -725,10 +725,10 @@ miFillArcSliceD( slw = arc->height; if (slice.flip_top || slice.flip_bot) slw += (arc->height >> 1) + 1; - points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * slw); + points = xalloc(sizeof(DDXPointRec) * slw); if (!points) return; - widths = (int *)xalloc(sizeof(int) * slw); + widths = xalloc(sizeof(int) * slw); if (!widths) { xfree(points); @@ -770,7 +770,7 @@ miFillArcSliceD( * Since we don't have to worry about overlapping segments, we can just * fill each arc as it comes. */ -_X_EXPORT void +void miPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { int i; diff --git a/xorg-server/mi/mifillarc.h b/xorg-server/mi/mifillarc.h index 3e3bb9858..11587540f 100644 --- a/xorg-server/mi/mifillarc.h +++ b/xorg-server/mi/mifillarc.h @@ -176,12 +176,12 @@ typedef struct _miArcSlice { #define miFillInArcLower(slw) (((iny + dy) != 0) && \ ((slw > 1) || (ine != inxk))) -extern void miFillArcSetup( +extern _X_EXPORT void miFillArcSetup( xArc * /*arc*/, miFillArcRec * /*info*/ ); -extern void miFillArcSliceSetup( +extern _X_EXPORT void miFillArcSliceSetup( xArc * /*arc*/, miArcSliceRec * /*slice*/, GCPtr /*pGC*/ diff --git a/xorg-server/mi/mifillrct.c b/xorg-server/mi/mifillrct.c index 06f018e27..6e9979099 100644 --- a/xorg-server/mi/mifillrct.c +++ b/xorg-server/mi/mifillrct.c @@ -66,7 +66,7 @@ SOFTWARE. * then call FillSpans to fill each rectangle. We let FillSpans worry about * clipping to the destination */ -_X_EXPORT void +void miPolyFillRect( DrawablePtr pDrawable, GCPtr pGC, @@ -107,8 +107,8 @@ miPolyFillRect( maxheight = max(maxheight, prect->height); } - pptFirst = (DDXPointPtr) xalloc(maxheight * sizeof(DDXPointRec)); - pwFirst = (int *) xalloc(maxheight * sizeof(int)); + pptFirst = xalloc(maxheight * sizeof(DDXPointRec)); + pwFirst = xalloc(maxheight * sizeof(int)); if(!pptFirst || !pwFirst) { if (pwFirst) xfree(pwFirst); diff --git a/xorg-server/mi/mifpoly.h b/xorg-server/mi/mifpoly.h index 7bd77b356..ffd19a341 100644 --- a/xorg-server/mi/mifpoly.h +++ b/xorg-server/mi/mifpoly.h @@ -88,7 +88,7 @@ typedef struct _SppArc { /* mifpolycon.c */ -extern void miFillSppPoly( +extern _X_EXPORT void miFillSppPoly( DrawablePtr /*dst*/, GCPtr /*pgc*/, int /*count*/, diff --git a/xorg-server/mi/mifpolycon.c b/xorg-server/mi/mifpolycon.c index 4a3acfd2b..383502f64 100644 --- a/xorg-server/mi/mifpolycon.c +++ b/xorg-server/mi/mifpolycon.c @@ -116,9 +116,9 @@ miFillSppPoly( y = ymax - ymin + 1; if ((count < 3) || (y <= 0)) return; - ptsOut = FirstPoint = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * y); - width = FirstWidth = (int *) xalloc(sizeof(int) * y); - Marked = (int *) xalloc(sizeof(int) * count); + ptsOut = FirstPoint = xalloc(sizeof(DDXPointRec) * y); + width = FirstWidth = xalloc(sizeof(int) * y); + Marked = xalloc(sizeof(int) * count); if(!ptsOut || !width || !Marked) { diff --git a/xorg-server/mi/migc.c b/xorg-server/mi/migc.c index e6bec31c4..a797099cd 100644 --- a/xorg-server/mi/migc.c +++ b/xorg-server/mi/migc.c @@ -38,13 +38,13 @@ from The Open Group. #include "migc.h" /* ARGSUSED */ -_X_EXPORT void +void miChangeGC(GCPtr pGC, unsigned long mask) { return; } -_X_EXPORT void +void miDestroyGC(GCPtr pGC) { if (pGC->pRotatedPixmap) @@ -53,7 +53,7 @@ miDestroyGC(GCPtr pGC) REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); } -_X_EXPORT void +void miDestroyClip(GCPtr pGC) { if (pGC->clientClipType == CT_NONE) @@ -74,7 +74,7 @@ miDestroyClip(GCPtr pGC) pGC->clientClipType = CT_NONE; } -_X_EXPORT void +void miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects) { (*pGC->funcs->DestroyClip) (pGC); @@ -101,7 +101,7 @@ miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects) pGC->stateChanges |= GCClipMask; } -_X_EXPORT void +void miCopyClip(GCPtr pgcDst, GCPtr pgcSrc) { RegionPtr prgnNew; @@ -125,13 +125,13 @@ miCopyClip(GCPtr pgcDst, GCPtr pgcSrc) } /* ARGSUSED */ -_X_EXPORT void +void miCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst) { return; } -_X_EXPORT void +void miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable) { ScreenPtr pScreen; diff --git a/xorg-server/mi/migc.h b/xorg-server/mi/migc.h index 51ed7b671..df5805f4d 100644 --- a/xorg-server/mi/migc.h +++ b/xorg-server/mi/migc.h @@ -27,38 +27,38 @@ from The Open Group. */ -extern void miChangeGC( +extern _X_EXPORT void miChangeGC( GCPtr /*pGC*/, unsigned long /*mask*/ ); -extern void miDestroyGC( +extern _X_EXPORT void miDestroyGC( GCPtr /*pGC*/ ); -extern void miDestroyClip( +extern _X_EXPORT void miDestroyClip( GCPtr /*pGC*/ ); -extern void miChangeClip( +extern _X_EXPORT void miChangeClip( GCPtr /*pGC*/, int /*type*/, pointer /*pvalue*/, int /*nrects*/ ); -extern void miCopyClip( +extern _X_EXPORT void miCopyClip( GCPtr /*pgcDst*/, GCPtr /*pgcSrc*/ ); -extern void miCopyGC( +extern _X_EXPORT void miCopyGC( GCPtr /*pGCSrc*/, unsigned long /*changes*/, GCPtr /*pGCDst*/ ); -extern void miComputeCompositeClip( +extern _X_EXPORT void miComputeCompositeClip( GCPtr /*pGC*/, DrawablePtr /*pDrawable*/ ); diff --git a/xorg-server/mi/miglblt.c b/xorg-server/mi/miglblt.c index 414773608..bc715aee9 100644 --- a/xorg-server/mi/miglblt.c +++ b/xorg-server/mi/miglblt.c @@ -81,7 +81,7 @@ with the sample server. use the bitmap in a call to PushPixels */ -_X_EXPORT void +void miPolyGlyphBlt( DrawablePtr pDrawable, GC *pGC, @@ -141,7 +141,7 @@ miPolyGlyphBlt( DoChangeGC(pGCtmp, GCFunction|GCForeground|GCBackground, gcvals, 0); nbyLine = BitmapBytePad(width); - pbits = (unsigned char *)xalloc(height*nbyLine); + pbits = xalloc(height*nbyLine); if (!pbits) { (*pDrawable->pScreen->DestroyPixmap)(pPixmap); @@ -197,7 +197,7 @@ miPolyGlyphBlt( } -_X_EXPORT void +void miImageGlyphBlt( DrawablePtr pDrawable, GC *pGC, diff --git a/xorg-server/mi/miinitext.c b/xorg-server/mi/miinitext.c index 92d6cd2f0..7f59126a4 100644 --- a/xorg-server/mi/miinitext.c +++ b/xorg-server/mi/miinitext.c @@ -134,10 +134,6 @@ extern Bool noXFree86VidModeExtension; #ifdef XFIXES extern Bool noXFixesExtension; #endif -#ifdef XKB -/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */ -extern Bool noXkbExtension; -#endif #ifdef PANORAMIX extern Bool noPanoramiXExtension; #endif @@ -160,19 +156,15 @@ typedef void (*InitExtension)(INITARGS); #endif #ifdef MITSHM -#define _XSHM_SERVER_ -#include +#include #endif #ifdef XTEST -#define _XTEST_SERVER_ -#include +#include #endif -#ifdef XKB #include -#endif #ifdef XCSECURITY #include "securitysrv.h" -#include +#include #endif #ifdef XSELINUX #include "xselinux.h" @@ -213,9 +205,7 @@ extern void XvExtensionInit(INITARGS); extern void XvMCExtensionInit(INITARGS); #endif extern void SyncExtensionInit(INITARGS); -#ifdef XKB extern void XkbExtensionInit(INITARGS); -#endif extern void XCMiscExtensionInit(INITARGS); #ifdef XRECORD extern void RecordExtensionInit(INITARGS); @@ -340,9 +330,7 @@ static ExtensionToggle ExtensionToggleList[] = { "XINERAMA", &noPanoramiXExtension }, #endif { "XInputExtension", NULL }, -#ifdef XKB - { "XKEYBOARD", &noXkbExtension }, -#endif + { "XKEYBOARD", NULL }, #ifdef XSELINUX { "SELinux", &noSELinuxExtension }, #endif @@ -416,9 +404,7 @@ InitExtensions(int argc, char *argv[]) } #endif SyncExtensionInit(); -#if defined(XKB) - if (!noXkbExtension) XkbExtensionInit(); -#endif + XkbExtensionInit(); XCMiscExtensionInit(); #ifdef XRECORD if (!noTestExtensions) RecordExtensionInit(); @@ -493,9 +479,7 @@ static ExtensionModule staticExtensions[] = { #endif { BigReqExtensionInit, "BIG-REQUESTS", NULL, NULL, NULL }, { SyncExtensionInit, "SYNC", NULL, NULL, NULL }, -#ifdef XKB - { XkbExtensionInit, XkbName, &noXkbExtension, NULL, NULL }, -#endif + { XkbExtensionInit, XkbName, NULL, NULL, NULL }, { XCMiscExtensionInit, "XC-MISC", NULL, NULL, NULL }, #ifdef XCSECURITY { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL }, diff --git a/xorg-server/mi/miline.h b/xorg-server/mi/miline.h index 036c2b5df..b5f706dbf 100644 --- a/xorg-server/mi/miline.h +++ b/xorg-server/mi/miline.h @@ -77,7 +77,7 @@ in this Software without prior written authorization from The Open Group. * Jack E. Bresenham, IEEE CG&A, May 1987. */ -extern void miSetZeroLineBias( +extern _X_EXPORT void miSetZeroLineBias( ScreenPtr /* pScreen */, unsigned int /* bias */ ); @@ -120,7 +120,7 @@ extern void miSetZeroLineBias( t = y1; y1 = y2; y2 = t;\ } -#define miGetZeroLineBias(_pScreen) ((unsigned long) \ +#define miGetZeroLineBias(_pScreen) ((unsigned long) (unsigned long*)\ dixLookupPrivate(&(_pScreen)->devPrivates, miZeroLineScreenKey)) #define CalcLineDeltas(_x1,_y1,_x2,_y2,_adx,_ady,_sx,_sy,_SX,_SY,_octant) \ @@ -148,9 +148,9 @@ extern void miSetZeroLineBias( #define IsXDecreasingOctant(_octant) ((_octant) & XDECREASING) #define IsYDecreasingOctant(_octant) ((_octant) & YDECREASING) -extern DevPrivateKey miZeroLineScreenKey; +extern _X_EXPORT DevPrivateKey miZeroLineScreenKey; -extern int miZeroClipLine( +extern _X_EXPORT int miZeroClipLine( int /*xmin*/, int /*ymin*/, int /*xmax*/, diff --git a/xorg-server/mi/mioverlay.c b/xorg-server/mi/mioverlay.c index 395b1aab2..e0aa88017 100644 --- a/xorg-server/mi/mioverlay.c +++ b/xorg-server/mi/mioverlay.c @@ -102,7 +102,7 @@ static void miOverlayChangeBorderWidth(WindowPtr, unsigned int); HasBorder(w) && \ (w)->backgroundState == ParentRelative) -_X_EXPORT Bool +Bool miInitOverlay( ScreenPtr pScreen, miOverlayInOverlayFunc inOverlayFunc, @@ -900,7 +900,7 @@ miOverlayHandleExposures(WindowPtr pWin) REGION_UNINIT(pScreen, &val->after.borderExposed); REGION_UNINIT(pScreen, &val->after.exposed); xfree(val); - pChild->valdata = (ValidatePtr)NULL; + pChild->valdata = NULL; if (pChild->firstChild) { pChild = pChild->firstChild; @@ -1604,7 +1604,7 @@ miOverlayChangeBorderWidth( /* We need this as an addition since the xf86 common code doesn't know about the second tree which is static to this file. */ -_X_EXPORT void +void miOverlaySetRootClip(ScreenPtr pScreen, Bool enable) { WindowPtr pRoot = WindowTable[pScreen->myNum]; @@ -1688,7 +1688,7 @@ miOverlayClearToBackground( /****************************************************************/ /* not used */ -_X_EXPORT Bool +Bool miOverlayGetPrivateClips( WindowPtr pWin, RegionPtr *borderClip, @@ -1707,7 +1707,7 @@ miOverlayGetPrivateClips( return FALSE; } -_X_EXPORT void +void miOverlaySetTransFunction ( ScreenPtr pScreen, miOverlayTransFunc transFunc @@ -1715,13 +1715,13 @@ miOverlaySetTransFunction ( MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->MakeTransparent = transFunc; } -_X_EXPORT Bool +Bool miOverlayCopyUnderlay(ScreenPtr pScreen) { return MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->copyUnderlay; } -_X_EXPORT void +void miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin) { ScreenPtr pScreen = pGC->pScreen; @@ -1777,7 +1777,7 @@ miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin) } } -_X_EXPORT Bool +Bool miOverlayCollectUnderlayRegions( WindowPtr pWin, RegionPtr *region diff --git a/xorg-server/mi/mioverlay.h b/xorg-server/mi/mioverlay.h index 24b74f51c..dca65ad37 100644 --- a/xorg-server/mi/mioverlay.h +++ b/xorg-server/mi/mioverlay.h @@ -9,24 +9,24 @@ typedef void (*miOverlayTransFunc)(ScreenPtr, int, BoxPtr); typedef Bool (*miOverlayInOverlayFunc)(WindowPtr); -Bool +extern _X_EXPORT Bool miInitOverlay( ScreenPtr pScreen, miOverlayInOverlayFunc inOverlay, miOverlayTransFunc trans ); -Bool +extern _X_EXPORT Bool miOverlayGetPrivateClips( WindowPtr pWin, RegionPtr *borderClip, RegionPtr *clipList ); -Bool miOverlayCollectUnderlayRegions(WindowPtr, RegionPtr*); -void miOverlayComputeCompositeClip(GCPtr, WindowPtr); -Bool miOverlayCopyUnderlay(ScreenPtr); -void miOverlaySetTransFunction(ScreenPtr, miOverlayTransFunc); -void miOverlaySetRootClip(ScreenPtr, Bool); +extern _X_EXPORT Bool miOverlayCollectUnderlayRegions(WindowPtr, RegionPtr*); +extern _X_EXPORT void miOverlayComputeCompositeClip(GCPtr, WindowPtr); +extern _X_EXPORT Bool miOverlayCopyUnderlay(ScreenPtr); +extern _X_EXPORT void miOverlaySetTransFunction(ScreenPtr, miOverlayTransFunc); +extern _X_EXPORT void miOverlaySetRootClip(ScreenPtr, Bool); #endif /* __MIOVERLAY_H */ diff --git a/xorg-server/mi/mipointer.c b/xorg-server/mi/mipointer.c index e37316e71..e1f63be4e 100644 --- a/xorg-server/mi/mipointer.c +++ b/xorg-server/mi/mipointer.c @@ -27,7 +27,6 @@ in this Software without prior written authorization from The Open Group. #include #endif -# define NEED_EVENTS # include # include # include @@ -42,7 +41,7 @@ in this Software without prior written authorization from The Open Group. # include "inputstr.h" static int miPointerScreenKeyIndex; -_X_EXPORT DevPrivateKey miPointerScreenKey = &miPointerScreenKeyIndex; +DevPrivateKey miPointerScreenKey = &miPointerScreenKeyIndex; #define GetScreenPrivate(s) ((miPointerScreenPtr) \ dixLookupPrivate(&(s)->devPrivates, miPointerScreenKey)) @@ -52,9 +51,9 @@ static int miPointerPrivKeyIndex; static DevPrivateKey miPointerPrivKey = &miPointerPrivKeyIndex; #define MIPOINTER(dev) \ - ((DevHasCursor((dev)) || (!dev->isMaster && !dev->u.master)) ? \ + ((!IsMaster(dev) && !dev->u.master) ? \ (miPointerPtr)dixLookupPrivate(&(dev)->devPrivates, miPointerPrivKey): \ - (miPointerPtr)dixLookupPrivate(&(dev)->u.master->devPrivates, miPointerPrivKey)) + (miPointerPtr)dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, miPointerPrivKey)) static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); @@ -81,7 +80,7 @@ static void miPointerDeviceCleanup(DeviceIntPtr pDev, static EventList* events; /* for WarpPointer MotionNotifies */ -_X_EXPORT Bool +Bool miPointerInitialize (ScreenPtr pScreen, miPointerSpriteFuncPtr spriteFuncs, miPointerScreenFuncPtr screenFuncs, @@ -89,7 +88,7 @@ miPointerInitialize (ScreenPtr pScreen, { miPointerScreenPtr pScreenPriv; - pScreenPriv = (miPointerScreenPtr) xalloc (sizeof (miPointerScreenRec)); + pScreenPriv = xalloc (sizeof (miPointerScreenRec)); if (!pScreenPriv) return FALSE; pScreenPriv->spriteFuncs = spriteFuncs; @@ -187,8 +186,8 @@ miPointerDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) miPointerPtr pPointer; /* return for keyboards */ - if ((pDev->isMaster && !DevHasCursor(pDev)) || - (!pDev->isMaster && pDev->u.master && !DevHasCursor(pDev->u.master))) + if ((IsMaster(pDev) && !DevHasCursor(pDev)) || + (!IsMaster(pDev) && pDev->u.master && !DevHasCursor(pDev->u.master))) return FALSE; pPointer = MIPOINTER(pDev); @@ -285,10 +284,11 @@ miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) static void miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { - if (!pDev->isMaster && pDev->u.master) + SetupScreen(pScreen); + + if (!IsMaster(pDev) && pDev->u.master) return; - SetupScreen(pScreen); (*pScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); xfree(dixLookupPrivate(&pDev->devPrivates, miPointerPrivKey)); dixSetPrivate(&pDev->devPrivates, miPointerPrivKey, NULL); @@ -297,14 +297,14 @@ miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) /* Once signals are ignored, the WarpCursor function can call this */ -_X_EXPORT void +void miPointerWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { miPointerPtr pPointer; BOOL changedScreen = FALSE; - pPointer = MIPOINTER(pDev); SetupScreen (pScreen); + pPointer = MIPOINTER(pDev); if (pPointer->pScreen != pScreen) { @@ -367,6 +367,9 @@ miPointerUpdateSprite (DeviceIntPtr pDev) pPointer = MIPOINTER(pDev); + if (!pPointer) + return; + pScreen = pPointer->pScreen; if (!pScreen) return; @@ -444,28 +447,19 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) pPointer->limits.y2 = pScreen->height; } -_X_EXPORT ScreenPtr -miPointerCurrentScreen () +ScreenPtr +miPointerCurrentScreen (void) { return miPointerGetScreen(inputInfo.pointer); } -_X_EXPORT ScreenPtr +ScreenPtr miPointerGetScreen(DeviceIntPtr pDev) { miPointerPtr pPointer = MIPOINTER(pDev); return (pPointer) ? pPointer->pScreen : NULL; } -/* Move the pointer to x, y on the current screen, update the sprite, and - * the motion history. Generates no events. Does not return changed x - * and y if they are clipped; use miPointerSetPosition instead. */ -_X_EXPORT void -miPointerAbsoluteCursor (int x, int y, unsigned long time) -{ - miPointerSetPosition(inputInfo.pointer, &x, &y); -} - /* Move the pointer on the current screen, and update the sprite. */ static void miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, @@ -480,7 +474,7 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, * VCP, as this may cause a non-HW rendered cursor to be rendered during * SIGIO. This again leads to allocs during SIGIO which leads to SIGABRT. */ - if ((pDev == inputInfo.pointer || (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + if ((pDev == inputInfo.pointer || (!IsMaster(pDev) && pDev->u.master == inputInfo.pointer)) && !pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) { pPointer->devx = x; @@ -494,7 +488,7 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, pPointer->pScreen = pScreen; } -_X_EXPORT void +void miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y) { miPointerScreenPtr pScreenPriv; @@ -547,7 +541,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y) miPointerMoved(pDev, pScreen, *x, *y); } -_X_EXPORT void +void miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) { *x = MIPOINTER(pDev)->x; @@ -590,7 +584,7 @@ miPointerMove (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) darwinEvents_lock(); #endif for (i = 0; i < nevents; i++) - mieqEnqueue(pDev, events[i].event); + mieqEnqueue(pDev, (InternalEvent*)events[i].event); #ifdef XQUARTZ darwinEvents_unlock(); #endif diff --git a/xorg-server/mi/mipointer.h b/xorg-server/mi/mipointer.h index d1eac987f..22575ea21 100644 --- a/xorg-server/mi/mipointer.h +++ b/xorg-server/mi/mipointer.h @@ -82,7 +82,7 @@ typedef struct _miPointerScreenFuncRec { ); void (*EnqueueEvent)( DeviceIntPtr /* pDev */, - xEventPtr /* event */ + InternalEvent* /* event */ ); void (*NewEventScreen)( DeviceIntPtr /* pDev */, @@ -91,69 +91,54 @@ typedef struct _miPointerScreenFuncRec { ); } miPointerScreenFuncRec, *miPointerScreenFuncPtr; -extern Bool miDCInitialize( +extern _X_EXPORT Bool miDCInitialize( ScreenPtr /*pScreen*/, miPointerScreenFuncPtr /*screenFuncs*/ ); -extern Bool miPointerInitialize( +extern _X_EXPORT Bool miPointerInitialize( ScreenPtr /*pScreen*/, miPointerSpriteFuncPtr /*spriteFuncs*/, miPointerScreenFuncPtr /*screenFuncs*/, Bool /*waitForUpdate*/ ); -extern void miPointerWarpCursor( +extern _X_EXPORT void miPointerWarpCursor( DeviceIntPtr /*pDev*/, ScreenPtr /*pScreen*/, int /*x*/, int /*y*/ -) _X_DEPRECATED; - -extern int miPointerGetMotionEvents( - DeviceIntPtr /*pPtr*/, - xTimecoord * /*coords*/, - unsigned long /*start*/, - unsigned long /*stop*/, - ScreenPtr /*pScreen*/ ); -/* Deprecated in favour of miPointerSetPosition. */ -extern void miPointerAbsoluteCursor( - int /*x*/, - int /*y*/, - unsigned long /*time*/ -) _X_DEPRECATED; - /* Deprecated in favour of miPointerGetScreen. */ -extern ScreenPtr miPointerCurrentScreen( +extern _X_EXPORT ScreenPtr miPointerCurrentScreen( void ) _X_DEPRECATED; -extern ScreenPtr miPointerGetScreen( +extern _X_EXPORT ScreenPtr miPointerGetScreen( DeviceIntPtr pDev); -extern void miPointerSetScreen( +extern _X_EXPORT void miPointerSetScreen( DeviceIntPtr pDev, int screen_num, int x, int y); /* Returns the current cursor position. */ -extern void miPointerGetPosition( +extern _X_EXPORT void miPointerGetPosition( DeviceIntPtr pDev, int *x, int *y); /* Moves the cursor to the specified position. May clip the co-ordinates: * x and y are modified in-place. */ -extern void miPointerSetPosition( +extern _X_EXPORT void miPointerSetPosition( DeviceIntPtr pDev, int *x, int *y); -extern void miPointerUpdateSprite( +extern _X_EXPORT void miPointerUpdateSprite( DeviceIntPtr pDev); -extern DevPrivateKey miPointerScreenKey; +extern _X_EXPORT DevPrivateKey miPointerScreenKey; #endif /* MIPOINTER_H */ diff --git a/xorg-server/mi/mipoly.c b/xorg-server/mi/mipoly.c index 5ec4bfd6a..b3e2c2fb1 100644 --- a/xorg-server/mi/mipoly.c +++ b/xorg-server/mi/mipoly.c @@ -66,7 +66,7 @@ SOFTWARE. #include "regionstr.h" -_X_EXPORT void +void miFillPolygon( DrawablePtr dst, GCPtr pgc, int shape, int mode, int count, DDXPointPtr pPts) diff --git a/xorg-server/mi/mipoly.h b/xorg-server/mi/mipoly.h index c1bab4943..d94796e2f 100644 --- a/xorg-server/mi/mipoly.h +++ b/xorg-server/mi/mipoly.h @@ -180,7 +180,7 @@ typedef struct _ScanLineListBlock { /* mipolyutil.c */ -extern Bool miCreateETandAET( +extern _X_EXPORT Bool miCreateETandAET( int /*count*/, DDXPointPtr /*pts*/, EdgeTable * /*ET*/, @@ -189,19 +189,19 @@ extern Bool miCreateETandAET( ScanLineListBlock * /*pSLLBlock*/ ); -extern void miloadAET( +extern _X_EXPORT void miloadAET( EdgeTableEntry * /*AET*/, EdgeTableEntry * /*ETEs*/ ); -extern void micomputeWAET( +extern _X_EXPORT void micomputeWAET( EdgeTableEntry * /*AET*/ ); -extern int miInsertionSort( +extern _X_EXPORT int miInsertionSort( EdgeTableEntry * /*AET*/ ); -extern void miFreeStorage( +extern _X_EXPORT void miFreeStorage( ScanLineListBlock * /*pSLLBlock*/ ); diff --git a/xorg-server/mi/mipolycon.c b/xorg-server/mi/mipolycon.c index 6e3889621..79384881d 100644 --- a/xorg-server/mi/mipolycon.c +++ b/xorg-server/mi/mipolycon.c @@ -105,8 +105,8 @@ miFillConvexPoly( dy = ymax - ymin + 1; if ((count < 3) || (dy < 0)) return(TRUE); - ptsOut = FirstPoint = (DDXPointPtr )xalloc(sizeof(DDXPointRec)*dy); - width = FirstWidth = (int *)xalloc(sizeof(int) * dy); + ptsOut = FirstPoint = xalloc(sizeof(DDXPointRec)*dy); + width = FirstWidth = xalloc(sizeof(int) * dy); if(!FirstPoint || !FirstWidth) { if (FirstWidth) xfree(FirstWidth); diff --git a/xorg-server/mi/mipolygen.c b/xorg-server/mi/mipolygen.c index 04bc2c67f..4744583c3 100644 --- a/xorg-server/mi/mipolygen.c +++ b/xorg-server/mi/mipolygen.c @@ -92,8 +92,7 @@ miFillGeneralPoly( if (count < 3) return(TRUE); - if(!(pETEs = (EdgeTableEntry *) - xalloc(sizeof(EdgeTableEntry) * count))) + if(!(pETEs = xalloc(sizeof(EdgeTableEntry) * count))) return(FALSE); ptsOut = FirstPoint; width = FirstWidth; diff --git a/xorg-server/mi/mipolypnt.c b/xorg-server/mi/mipolypnt.c index d16a95158..5d6243ab0 100644 --- a/xorg-server/mi/mipolypnt.c +++ b/xorg-server/mi/mipolypnt.c @@ -55,7 +55,7 @@ SOFTWARE. #include "windowstr.h" #include "mi.h" -_X_EXPORT void +void miPolyPoint( DrawablePtr pDrawable, GCPtr pGC, @@ -107,7 +107,7 @@ miPolyPoint( DoChangeGC(pGC, GCFillStyle, &fsNew, 0); ValidateGC(pDrawable, pGC); } - if(!(pwidthInit = (int *)xalloc(npt * sizeof(int)))) + if(!(pwidthInit = xalloc(npt * sizeof(int)))) return; pwidth = pwidthInit; for(i = 0; i < npt; i++) diff --git a/xorg-server/mi/mipolyrect.c b/xorg-server/mi/mipolyrect.c index e7504ef16..033c7a7c8 100644 --- a/xorg-server/mi/mipolyrect.c +++ b/xorg-server/mi/mipolyrect.c @@ -55,7 +55,7 @@ SOFTWARE. #include "pixmap.h" #include "mi.h" -_X_EXPORT void +void miPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nrects, xRectangle *pRects) { int i; @@ -90,7 +90,7 @@ miPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nrects, xRectangle *pRects) offset2 = pGC->lineWidth; offset1 = offset2 >> 1; offset3 = offset2 - offset1; - tmp = (xRectangle *) xalloc(ntmp * sizeof (xRectangle)); + tmp = xalloc(ntmp * sizeof (xRectangle)); if (!tmp) return; t = tmp; diff --git a/xorg-server/mi/mipolyseg.c b/xorg-server/mi/mipolyseg.c index 0832a601b..bf7f0f92e 100644 --- a/xorg-server/mi/mipolyseg.c +++ b/xorg-server/mi/mipolyseg.c @@ -66,7 +66,7 @@ SOFTWARE. *****************************************************************/ -_X_EXPORT void +void miPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, xSegment *pSegs) { int i; diff --git a/xorg-server/mi/mipolytext.c b/xorg-server/mi/mipolytext.c index 7be40aef1..508e0ffa7 100644 --- a/xorg-server/mi/mipolytext.c +++ b/xorg-server/mi/mipolytext.c @@ -66,7 +66,7 @@ SOFTWARE. #include "dixfontstr.h" #include "mi.h" -_X_EXPORT int +int miPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { unsigned long n, i; @@ -83,7 +83,7 @@ miPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) return x+w; } -_X_EXPORT int +int miPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars) { unsigned long n, i; @@ -101,7 +101,7 @@ miPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned sho return x+w; } -_X_EXPORT void +void miImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { unsigned long n; @@ -114,7 +114,7 @@ miImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(font)); } -_X_EXPORT void +void miImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars) { diff --git a/xorg-server/mi/mipolyutil.c b/xorg-server/mi/mipolyutil.c index ed41a7d1a..15561b73d 100644 --- a/xorg-server/mi/mipolyutil.c +++ b/xorg-server/mi/mipolyutil.c @@ -99,19 +99,18 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, { if (*iSLLBlock > SLLSPERBLOCK-1) { - tmpSLLBlock = - (ScanLineListBlock *)xalloc(sizeof(ScanLineListBlock)); + tmpSLLBlock = xalloc(sizeof(ScanLineListBlock)); if (!tmpSLLBlock) return FALSE; (*SLLBlock)->next = tmpSLLBlock; - tmpSLLBlock->next = (ScanLineListBlock *)NULL; + tmpSLLBlock->next = NULL; *SLLBlock = tmpSLLBlock; *iSLLBlock = 0; } pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]); pSLL->next = pPrevSLL->next; - pSLL->edgelist = (EdgeTableEntry *)NULL; + pSLL->edgelist = NULL; pPrevSLL->next = pSLL; } pSLL->scanline = scanline; @@ -119,7 +118,7 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, /* * now insert the edge in the right bucket */ - prev = (EdgeTableEntry *)NULL; + prev = NULL; start = pSLL->edgelist; while (start && (start->bres.minor < ETE->bres.minor)) { @@ -175,18 +174,18 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET, EdgeTableEntry *AET, /* * initialize the Active Edge Table */ - AET->next = (EdgeTableEntry *)NULL; - AET->back = (EdgeTableEntry *)NULL; - AET->nextWETE = (EdgeTableEntry *)NULL; + AET->next = NULL; + AET->back = NULL; + AET->nextWETE = NULL; AET->bres.minor = MININT; /* * initialize the Edge Table. */ - ET->scanlines.next = (ScanLineList *)NULL; + ET->scanlines.next = NULL; ET->ymax = MININT; ET->ymin = MAXINT; - pSLLBlock->next = (ScanLineListBlock *)NULL; + pSLLBlock->next = NULL; PrevPt = &pts[count-1]; @@ -305,7 +304,7 @@ micomputeWAET(EdgeTableEntry *AET) int inside = 1; int isInside = 0; - AET->nextWETE = (EdgeTableEntry *)NULL; + AET->nextWETE = NULL; pWETE = AET; AET = AET->next; while (AET) @@ -324,7 +323,7 @@ micomputeWAET(EdgeTableEntry *AET) } AET = AET->next; } - pWETE->nextWETE = (EdgeTableEntry *)NULL; + pWETE->nextWETE = NULL; } /* diff --git a/xorg-server/mi/mipushpxl.c b/xorg-server/mi/mipushpxl.c index 4b9789047..3844519d8 100644 --- a/xorg-server/mi/mipushpxl.c +++ b/xorg-server/mi/mipushpxl.c @@ -123,7 +123,7 @@ miPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, LONG2CHARSDIFFORDER((MiBits)(-1) >> 1); #endif - pwLineStart = (MiBits *)xalloc(BitmapBytePad(dx)); + pwLineStart = xalloc(BitmapBytePad(dx)); if (!pwLineStart) return; ipt = 0; diff --git a/xorg-server/mi/miregion.c b/xorg-server/mi/miregion.c index bbeac877b..c48befc6f 100644 --- a/xorg-server/mi/miregion.c +++ b/xorg-server/mi/miregion.c @@ -171,7 +171,7 @@ Equipment Corporation. ((r1)->y1 <= (r2)->y1) && \ ((r1)->y2 >= (r2)->y2) ) -#define xallocData(n) (RegDataPtr)xalloc(REGION_SZOF(n)) +#define xallocData(n) xalloc(REGION_SZOF(n)) #define xfreeData(reg) if ((reg)->data && (reg)->data->size) xfree((reg)->data) #define RECTALLOC_BAIL(pReg,n,bail) \ @@ -218,13 +218,13 @@ if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \ } -_X_EXPORT BoxRec miEmptyBox = {0, 0, 0, 0}; -_X_EXPORT RegDataRec miEmptyData = {0, 0}; +BoxRec miEmptyBox = {0, 0, 0, 0}; +RegDataRec miEmptyData = {0, 0}; RegDataRec miBrokenData = {0, 0}; static RegionRec miBrokenRegion = { { 0, 0, 0, 0 }, &miBrokenData }; -extern void +void InitRegions (void) { pixman_region_set_static_pointers (&miEmptyBox, &miEmptyData, &miBrokenData); @@ -236,7 +236,7 @@ InitRegions (void) * REGION of "size" number of rectangles. *****************************************************************/ -_X_EXPORT RegionPtr +RegionPtr miRegionCreate(BoxPtr rect, int size) { RegionPtr pReg; @@ -250,7 +250,7 @@ miRegionCreate(BoxPtr rect, int size) return(pReg); } -_X_EXPORT void +void miRegionDestroy(RegionPtr pReg) { pixman_region_fini (pReg); @@ -258,7 +258,7 @@ miRegionDestroy(RegionPtr pReg) xfree(pReg); } -_X_EXPORT void +void miPrintRegion(RegionPtr rgn) { int num, size; @@ -277,7 +277,7 @@ miPrintRegion(RegionPtr rgn) ErrorF("[mi] \n"); } -_X_EXPORT Bool +Bool miRegionEqual(RegionPtr reg1, RegionPtr reg2) { return pixman_region_equal (reg1, reg2); @@ -335,7 +335,7 @@ miValidRegion(RegionPtr reg) * Outer region rect is statically allocated. *****************************************************************/ -_X_EXPORT void +void miRegionInit(RegionPtr pReg, BoxPtr rect, int size) { if (rect) @@ -344,7 +344,7 @@ miRegionInit(RegionPtr pReg, BoxPtr rect, int size) pixman_region_init (pReg); } -_X_EXPORT void +void miRegionUninit(RegionPtr pReg) { pixman_region_fini (pReg); @@ -359,7 +359,7 @@ miRegionBreak (RegionPtr pReg) return FALSE; } -_X_EXPORT Bool +Bool miRectAlloc(RegionPtr pRgn, int n) { RegDataPtr data; @@ -398,7 +398,7 @@ miRectAlloc(RegionPtr pRgn, int n) return TRUE; } -_X_EXPORT Bool +Bool miRegionCopy(RegionPtr dst, RegionPtr src) { return pixman_region_copy (dst, src); @@ -654,7 +654,7 @@ miRegionOp( assert(r1 != r1End); assert(r2 != r2End); - oldData = (RegDataPtr)NULL; + oldData = NULL; if (((newReg == reg1) && (newSize > 1)) || ((newReg == reg2) && (numRects > 1))) { @@ -808,7 +808,7 @@ miRegionOp( { newReg->extents = *REGION_BOXPTR(newReg); xfreeData(newReg); - newReg->data = (RegDataPtr)NULL; + newReg->data = NULL; } else { @@ -891,7 +891,7 @@ miSetExtents (RegionPtr pReg) *----------------------------------------------------------------------- */ /*ARGSUSED*/ -_X_EXPORT Bool +Bool miIntersect( RegionPtr newReg, /* destination Region */ RegionPtr reg1, @@ -995,7 +995,7 @@ miUnionO ( return TRUE; } -_X_EXPORT Bool +Bool miUnion( RegionPtr newReg, /* destination Region */ RegionPtr reg1, @@ -1026,7 +1026,7 @@ miUnion( * dstrgn is modified if rgn has rectangles. * */ -_X_EXPORT Bool +Bool miRegionAppend(RegionPtr dstrgn, RegionPtr rgn) { int numRects, dnumRects, size; @@ -1039,7 +1039,7 @@ miRegionAppend(RegionPtr dstrgn, RegionPtr rgn) if (!rgn->data && (dstrgn->data == &miEmptyData)) { dstrgn->extents = rgn->extents; - dstrgn->data = (RegDataPtr)NULL; + dstrgn->data = NULL; return TRUE; } @@ -1210,7 +1210,7 @@ QuickSortRects( *----------------------------------------------------------------------- */ -_X_EXPORT Bool +Bool miRegionValidate(RegionPtr badreg, Bool *pOverlap) { /* Descriptor for regions under construction in Step 2. */ @@ -1343,7 +1343,7 @@ miRegionValidate(RegionPtr badreg, Bool *pOverlap) rit->prevBand = 0; rit->curBand = 0; rit->reg.extents = *box; - rit->reg.data = (RegDataPtr)NULL; + rit->reg.data = NULL; if (!miRectAlloc(&rit->reg, (i+numRI) / numRI)) /* MUST force allocation */ goto bail; NextRect: ; @@ -1362,7 +1362,7 @@ NextRect: ; if (reg->data->numRects == 1) /* keep unions happy below */ { xfreeData(reg); - reg->data = (RegDataPtr)NULL; + reg->data = NULL; } } @@ -1399,7 +1399,7 @@ bail: return miRegionBreak (badreg); } -_X_EXPORT RegionPtr +RegionPtr miRectsToRegion(int nrects, xRectangle *prect, int ctype) { @@ -1428,7 +1428,7 @@ miRectsToRegion(int nrects, xRectangle *prect, int ctype) pRgn->extents.y1 = y1; pRgn->extents.x2 = x2; pRgn->extents.y2 = y2; - pRgn->data = (RegDataPtr)NULL; + pRgn->data = NULL; } return pRgn; } @@ -1513,7 +1513,7 @@ miRectsToRegion(int nrects, xRectangle *prect, int ctype) * *----------------------------------------------------------------------- */ -_X_EXPORT Bool +Bool miSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS) { return pixman_region_subtract (regD, regM, regS); @@ -1538,7 +1538,7 @@ miSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS) * *----------------------------------------------------------------------- */ -_X_EXPORT Bool +Bool miInverse( RegionPtr newReg, /* Destination region */ RegionPtr reg1, /* Region to invert */ @@ -1547,7 +1547,7 @@ miInverse( { return pixman_region_inverse (newReg, reg1, invRect); } -_X_EXPORT int +int miRectIn(RegionPtr region, BoxPtr prect) { return pixman_region_contains_rectangle (region, prect); @@ -1557,19 +1557,19 @@ miRectIn(RegionPtr region, BoxPtr prect) translates in place */ -_X_EXPORT void +void miTranslateRegion(RegionPtr pReg, int x, int y) { pixman_region_translate (pReg, x, y); } -_X_EXPORT void +void miRegionReset(RegionPtr pReg, BoxPtr pBox) { pixman_region_reset (pReg, pBox); } -_X_EXPORT Bool +Bool miPointInRegion( RegionPtr pReg, int x, @@ -1580,7 +1580,7 @@ miPointInRegion( return pixman_region_contains_point (pReg, x, y, box); } -_X_EXPORT Bool +Bool miRegionNotEmpty(RegionPtr pReg) { return pixman_region_not_empty (pReg); @@ -1593,7 +1593,7 @@ miRegionBroken(RegionPtr pReg) return (REGION_NAR(pReg)); } -_X_EXPORT void +void miRegionEmpty(RegionPtr pReg) { good(pReg); @@ -1603,7 +1603,7 @@ miRegionEmpty(RegionPtr pReg) pReg->data = &miEmptyData; } -_X_EXPORT BoxPtr +BoxPtr miRegionExtents(RegionPtr pReg) { good(pReg); @@ -1728,7 +1728,7 @@ static void QuickSortSpans( returns the number of new, clipped scanlines. */ -_X_EXPORT int +int miClipSpans( RegionPtr prgnDst, DDXPointPtr ppt, diff --git a/xorg-server/mi/miscrinit.c b/xorg-server/mi/miscrinit.c index 28d331653..96113d65d 100644 --- a/xorg-server/mi/miscrinit.c +++ b/xorg-server/mi/miscrinit.c @@ -39,8 +39,8 @@ from The Open Group. #include "dix.h" #include "miline.h" #ifdef MITSHM -#define _XSHM_SERVER_ -#include +#include +#include "shmint.h" #endif /* We use this structure to propogate some information from miScreenInit to @@ -60,7 +60,7 @@ typedef struct /* this plugs into pScreen->ModifyPixmapHeader */ -_X_EXPORT Bool +Bool miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, pointer pPixData) { @@ -132,7 +132,7 @@ miCloseScreen (int iScreen, ScreenPtr pScreen) * possible private-requesting modules have been inited; we create the * screen pixmap here. */ -_X_EXPORT Bool +Bool miCreateScreenResources(ScreenPtr pScreen) { miScreenInitParmsPtr pScrInitParms; @@ -180,7 +180,7 @@ miScreenDevPrivateInit(ScreenPtr pScreen, int width, pointer pbits) * to the screen, until CreateScreenResources can put them in the * screen pixmap. */ - pScrInitParms = (miScreenInitParmsPtr)xalloc(sizeof(miScreenInitParmsRec)); + pScrInitParms = xalloc(sizeof(miScreenInitParmsRec)); if (!pScrInitParms) return FALSE; pScrInitParms->pbits = pbits; @@ -202,7 +202,7 @@ miSetScreenPixmap(PixmapPtr pPix) pPix->drawable.pScreen->devPrivate = (pointer)pPix; } -_X_EXPORT Bool +Bool miScreenInit( ScreenPtr pScreen, pointer pbits, /* pointer to screen bits */ @@ -297,16 +297,17 @@ static int privateKeyIndex; static DevPrivateKey privateKey = &privateKeyIndex; DevPrivateKey -miAllocateGCPrivateIndex() +miAllocateGCPrivateIndex(void) { return privateKey; } static int miZeroLineScreenKeyIndex; -_X_EXPORT DevPrivateKey miZeroLineScreenKey = &miZeroLineScreenKeyIndex; +DevPrivateKey miZeroLineScreenKey = &miZeroLineScreenKeyIndex; -_X_EXPORT void +void miSetZeroLineBias(ScreenPtr pScreen, unsigned int bias) { - dixSetPrivate(&pScreen->devPrivates, miZeroLineScreenKey, (pointer)bias); + dixSetPrivate(&pScreen->devPrivates, miZeroLineScreenKey, + (unsigned long *)(unsigned long)bias); } diff --git a/xorg-server/mi/mispans.c b/xorg-server/mi/mispans.c index e59d711ae..5504341c4 100644 --- a/xorg-server/mi/mispans.c +++ b/xorg-server/mi/mispans.c @@ -65,8 +65,7 @@ Written by Joel McCormack, Summer 1989. */ -void miInitSpanGroup(spanGroup) - SpanGroup *spanGroup; +void miInitSpanGroup(SpanGroup *spanGroup) { spanGroup->size = 0; spanGroup->count = 0; @@ -406,8 +405,8 @@ void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup) ylength = spanGroup->ymax - ymin + 1; /* Allocate Spans for y buckets */ - yspans = (Spans *) xalloc(ylength * sizeof(Spans)); - ysizes = (int *) xalloc(ylength * sizeof (int)); + yspans = xalloc(ylength * sizeof(Spans)); + ysizes = xalloc(ylength * sizeof (int)); if (!yspans || !ysizes) { @@ -480,8 +479,8 @@ void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup) } /* for i thorough Spans */ /* Now sort by x and uniquify each bucket into the final array */ - points = (DDXPointPtr) xalloc(count * sizeof(DDXPointRec)); - widths = (int *) xalloc(count * sizeof(int)); + points = xalloc(count * sizeof(DDXPointRec)); + widths = xalloc(count * sizeof(int)); if (!points || !widths) { int i; diff --git a/xorg-server/mi/mispans.h b/xorg-server/mi/mispans.h index 258b29279..8151415cc 100644 --- a/xorg-server/mi/mispans.h +++ b/xorg-server/mi/mispans.h @@ -45,6 +45,8 @@ SOFTWARE. ******************************************************************/ +#ifndef MISPANS_H +#define MISPANS_H typedef struct { int count; /* number of spans */ @@ -60,30 +62,30 @@ typedef struct { } SpanGroup; /* Initialize SpanGroup. MUST BE DONE before use. */ -extern void miInitSpanGroup( +extern _X_EXPORT void miInitSpanGroup( SpanGroup * /*spanGroup*/ ); /* Add a Spans to a SpanGroup. The spans MUST BE in y-sorted order */ -extern void miAppendSpans( +extern _X_EXPORT void miAppendSpans( SpanGroup * /*spanGroup*/, SpanGroup * /*otherGroup*/, Spans * /*spans*/ ); /* Paint a span group, insuring that each pixel is painted at most once */ -extern void miFillUniqueSpanGroup( +extern _X_EXPORT void miFillUniqueSpanGroup( DrawablePtr /*pDraw*/, GCPtr /*pGC*/, SpanGroup * /*spanGroup*/ ); /* Free up data in a span group. MUST BE DONE or you'll suffer memory leaks */ -extern void miFreeSpanGroup( +extern _X_EXPORT void miFreeSpanGroup( SpanGroup * /*spanGroup*/ ); -extern int miClipSpans( +extern _X_EXPORT int miClipSpans( RegionPtr /*prgnDst*/, DDXPointPtr /*ppt*/, int * /*pwidth*/, @@ -97,3 +99,4 @@ extern int miClipSpans( #define miSpansCarefulRop(rop) (((rop) & 0xc) == 0x8 || ((rop) & 0x3) == 0x2) #define miSpansEasyRop(rop) (!miSpansCarefulRop(rop)) +#endif /* MISPANS_H */ diff --git a/xorg-server/mi/misprite.c b/xorg-server/mi/misprite.c index 692e6c97a..2ec67827e 100644 --- a/xorg-server/mi/misprite.c +++ b/xorg-server/mi/misprite.c @@ -33,29 +33,106 @@ in this Software without prior written authorization from The Open Group. #include #endif -# include -# include -# include "misc.h" -# include "pixmapstr.h" -# include "input.h" -# include "mi.h" -# include "cursorstr.h" -# include -# include "scrnintstr.h" -# include "colormapst.h" -# include "windowstr.h" -# include "gcstruct.h" -# include "mipointer.h" -# include "mispritest.h" -# include "dixfontstr.h" -# include -# include "inputstr.h" - -#ifdef RENDER -# include "mipict.h" -#endif -# include "damage.h" +#include +#include +#include "misc.h" +#include "pixmapstr.h" +#include "input.h" +#include "mi.h" +#include "cursorstr.h" +#include +#include "scrnintstr.h" +#include "colormapst.h" +#include "windowstr.h" +#include "gcstruct.h" +#include "mipointer.h" +#include "misprite.h" +#include "dixfontstr.h" +#include +#include "inputstr.h" +#include "damage.h" + +typedef struct { + CursorPtr pCursor; + int x; /* cursor hotspot */ + int y; + BoxRec saved; /* saved area from the screen */ + Bool isUp; /* cursor in frame buffer */ + Bool shouldBeUp; /* cursor should be displayed */ + WindowPtr pCacheWin; /* window the cursor last seen in */ + Bool isInCacheWin; + Bool checkPixels; /* check colormap collision */ + ScreenPtr pScreen; +} miCursorInfoRec, *miCursorInfoPtr; + +/* + * per screen information + */ + +typedef struct { + /* screen procedures */ + CloseScreenProcPtr CloseScreen; + GetImageProcPtr GetImage; + GetSpansProcPtr GetSpans; + SourceValidateProcPtr SourceValidate; + + /* window procedures */ + CopyWindowProcPtr CopyWindow; + + /* colormap procedures */ + InstallColormapProcPtr InstallColormap; + StoreColorsProcPtr StoreColors; + + /* os layer procedures */ + ScreenBlockHandlerProcPtr BlockHandler; + + /* device cursor procedures */ + DeviceCursorInitializeProcPtr DeviceCursorInitialize; + DeviceCursorCleanupProcPtr DeviceCursorCleanup; + + xColorItem colors[2]; + ColormapPtr pInstalledMap; + ColormapPtr pColormap; + VisualPtr pVisual; + miSpriteCursorFuncPtr funcs; + DamagePtr pDamage; /* damage tracking structure */ + Bool damageRegistered; +} miSpriteScreenRec, *miSpriteScreenPtr; + +#define SOURCE_COLOR 0 +#define MASK_COLOR 1 + +/* + * Overlap BoxPtr and Box elements + */ +#define BOX_OVERLAP(pCbox,X1,Y1,X2,Y2) \ + (((pCbox)->x1 <= (X2)) && ((X1) <= (pCbox)->x2) && \ + ((pCbox)->y1 <= (Y2)) && ((Y1) <= (pCbox)->y2)) + +/* + * Overlap BoxPtr, origins, and rectangle + */ +#define ORG_OVERLAP(pCbox,xorg,yorg,x,y,w,h) \ + BOX_OVERLAP((pCbox),(x)+(xorg),(y)+(yorg),(x)+(xorg)+(w),(y)+(yorg)+(h)) + +/* + * Overlap BoxPtr, origins and RectPtr + */ +#define ORGRECT_OVERLAP(pCbox,xorg,yorg,pRect) \ + ORG_OVERLAP((pCbox),(xorg),(yorg),(pRect)->x,(pRect)->y, \ + (int)((pRect)->width), (int)((pRect)->height)) +/* + * Overlap BoxPtr and horizontal span + */ +#define SPN_OVERLAP(pCbox,y,x,w) BOX_OVERLAP((pCbox),(x),(y),(x)+(w),(y)) +#define LINE_SORT(x1,y1,x2,y2) \ +{ int _t; \ + if (x1 > x2) { _t = x1; x1 = x2; x2 = _t; } \ + if (y1 > y2) { _t = y1; y1 = y2; y2 = _t; } } + +#define LINE_OVERLAP(pCbox,x1,y1,x2,y2,lw2) \ + BOX_OVERLAP((pCbox), (x1)-(lw2), (y1)-(lw2), (x2)+(lw2), (y2)+(lw2)) #define SPRITE_DEBUG_ENABLE 0 @@ -65,29 +142,26 @@ in this Software without prior written authorization from The Open Group. #define SPRITE_DEBUG(x) #endif - #define MISPRITE(dev) \ - ((DevHasCursor(dev)) ? \ + ((!IsMaster(dev) && !dev->u.master) ? \ (miCursorInfoPtr)dixLookupPrivate(&dev->devPrivates, miSpriteDevPrivatesKey) : \ - (miCursorInfoPtr)dixLookupPrivate(&dev->u.master->devPrivates, miSpriteDevPrivatesKey)) - -static int damageRegister = 0; + (miCursorInfoPtr)dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, miSpriteDevPrivatesKey)) static void miSpriteDisableDamage(ScreenPtr pScreen, miSpriteScreenPtr pScreenPriv) { - if (damageRegister) { + if (pScreenPriv->damageRegistered) { DamageUnregister (&(pScreen->GetScreenPixmap(pScreen)->drawable), pScreenPriv->pDamage); - damageRegister = 0; + pScreenPriv->damageRegistered = 0; } } static void miSpriteEnableDamage(ScreenPtr pScreen, miSpriteScreenPtr pScreenPriv) { - if (!damageRegister) { - damageRegister = 1; + if (!pScreenPriv->damageRegistered) { + pScreenPriv->damageRegistered = 1; DamageRegister (&(pScreen->GetScreenPixmap(pScreen)->drawable), pScreenPriv->pDamage); } @@ -111,8 +185,8 @@ miSpriteIsDown(miCursorInfoPtr pDevCursor) static int miSpriteScreenKeyIndex; static DevPrivateKey miSpriteScreenKey = &miSpriteScreenKeyIndex; -static int mmiSpriteDevPrivatesKeyIndex; -static DevPrivateKey miSpriteDevPrivatesKey = &mmiSpriteDevPrivatesKeyIndex; +static int miSpriteDevPrivatesKeyIndex; +static DevPrivateKey miSpriteDevPrivatesKey = &miSpriteDevPrivatesKeyIndex; static Bool miSpriteCloseScreen(int i, ScreenPtr pScreen); static void miSpriteGetImage(DrawablePtr pDrawable, int sx, int sy, @@ -160,7 +234,7 @@ static void miSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, static void miSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); -_X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = { +miPointerSpriteFuncRec miSpritePointerFuncs = { miSpriteRealizeCursor, miSpriteUnrealizeCursor, miSpriteSetCursor, @@ -188,8 +262,7 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) miCursorInfoPtr pCursorInfo; DeviceIntPtr pDev; - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { @@ -199,8 +272,7 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && - RECT_IN_REGION (pScreen, pRegion, &pCursorInfo->saved) - != rgnOUT) + miRectIn(pRegion, &pCursorInfo->saved) != rgnOUT) { SPRITE_DEBUG(("Damage remove\n")); miSpriteRemoveCursor (pDev, pScreen); @@ -226,20 +298,20 @@ miSpriteInitialize (ScreenPtr pScreen, if (!DamageSetup (pScreen)) return FALSE; - pScreenPriv = (miSpriteScreenPtr) xalloc (sizeof (miSpriteScreenRec)); + pScreenPriv = xalloc (sizeof (miSpriteScreenRec)); if (!pScreenPriv) return FALSE; pScreenPriv->pDamage = DamageCreate (miSpriteReportDamage, - (DamageDestroyFunc) 0, + NULL, DamageReportRawRegion, TRUE, pScreen, - (void *) pScreen); + pScreen); if (!miPointerInitialize (pScreen, &miSpritePointerFuncs, screenFuncs,TRUE)) { - xfree ((pointer) pScreenPriv); + xfree (pScreenPriv); return FALSE; } for (pVisual = pScreen->visuals; @@ -271,6 +343,8 @@ miSpriteInitialize (ScreenPtr pScreen, pScreenPriv->colors[MASK_COLOR].red = 0; pScreenPriv->colors[MASK_COLOR].green = 0; pScreenPriv->colors[MASK_COLOR].blue = 0; + pScreenPriv->damageRegistered = 0; + dixSetPrivate(&pScreen->devPrivates, miSpriteScreenKey, pScreenPriv); pScreen->CloseScreen = miSpriteCloseScreen; @@ -284,8 +358,6 @@ miSpriteInitialize (ScreenPtr pScreen, pScreen->BlockHandler = miSpriteBlockHandler; - damageRegister = 0; - return TRUE; } @@ -303,8 +375,7 @@ miSpriteCloseScreen (int i, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->GetImage = pScreenPriv->GetImage; pScreen->GetSpans = pScreenPriv->GetSpans; @@ -315,7 +386,7 @@ miSpriteCloseScreen (int i, ScreenPtr pScreen) DamageDestroy (pScreenPriv->pDamage); - xfree ((pointer) pScreenPriv); + xfree (pScreenPriv); return (*pScreen->CloseScreen) (i, pScreen); } @@ -327,27 +398,27 @@ miSpriteGetImage (DrawablePtr pDrawable, int sx, int sy, int w, int h, { ScreenPtr pScreen = pDrawable->pScreen; miSpriteScreenPtr pScreenPriv; - DeviceIntPtr pDev = inputInfo.pointer; + DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE (pScreen, GetImage); - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); - for(pDev = inputInfo.devices; pDev; pDev = pDev->next) + if (pDrawable->type == DRAWABLE_WINDOW) { - if (DevHasCursor(pDev)) + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey); + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { - pCursorInfo = MISPRITE(pDev); - if (pDrawable->type == DRAWABLE_WINDOW && - pCursorInfo->isUp && - pCursorInfo->pScreen == pScreen && - ORG_OVERLAP(&pCursorInfo->saved,pDrawable->x,pDrawable->y, - sx, sy, w, h)) - { - SPRITE_DEBUG (("GetImage remove\n")); - miSpriteRemoveCursor (pDev, pScreen); - } + if (DevHasCursor(pDev)) + { + pCursorInfo = MISPRITE(pDev); + if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && + ORG_OVERLAP(&pCursorInfo->saved,pDrawable->x,pDrawable->y, + sx, sy, w, h)) + { + SPRITE_DEBUG (("GetImage remove\n")); + miSpriteRemoveCursor (pDev, pScreen); + } + } } } @@ -363,43 +434,43 @@ miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, { ScreenPtr pScreen = pDrawable->pScreen; miSpriteScreenPtr pScreenPriv; - DeviceIntPtr pDev = inputInfo.pointer; + DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE (pScreen, GetSpans); - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); - - for(pDev = inputInfo.devices; pDev; pDev = pDev->next) + if (pDrawable->type == DRAWABLE_WINDOW) { - if (DevHasCursor(pDev)) - { - pCursorInfo = MISPRITE(pDev); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey); - if (pDrawable->type == DRAWABLE_WINDOW && - pCursorInfo->isUp && - pCursorInfo->pScreen == pScreen) + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) + { + if (DevHasCursor(pDev)) { - DDXPointPtr pts; - int *widths; - int nPts; - int xorg, - yorg; - - xorg = pDrawable->x; - yorg = pDrawable->y; - - for (pts = ppt, widths = pwidth, nPts = nspans; - nPts--; - pts++, widths++) + pCursorInfo = MISPRITE(pDev); + + if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen) { - if (SPN_OVERLAP(&pCursorInfo->saved,pts->y+yorg, - pts->x+xorg,*widths)) + DDXPointPtr pts; + int *widths; + int nPts; + int xorg, + yorg; + + xorg = pDrawable->x; + yorg = pDrawable->y; + + for (pts = ppt, widths = pwidth, nPts = nspans; + nPts--; + pts++, widths++) { - SPRITE_DEBUG (("GetSpans remove\n")); - miSpriteRemoveCursor (pDev, pScreen); - break; + if (SPN_OVERLAP(&pCursorInfo->saved,pts->y+yorg, + pts->x+xorg,*widths)) + { + SPRITE_DEBUG (("GetSpans remove\n")); + miSpriteRemoveCursor (pDev, pScreen); + break; + } } } } @@ -417,28 +488,29 @@ miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width, { ScreenPtr pScreen = pDrawable->pScreen; miSpriteScreenPtr pScreenPriv; - DeviceIntPtr pDev = inputInfo.pointer; + DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE (pScreen, SourceValidate); - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); - - for(pDev = inputInfo.devices; pDev; pDev = pDev->next) + if (pDrawable->type == DRAWABLE_WINDOW) { - if (DevHasCursor(pDev)) - { - pCursorInfo = MISPRITE(pDev); - if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp && - pCursorInfo->pScreen == pScreen && - ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y, - x, y, width, height)) - { - SPRITE_DEBUG (("SourceValidate remove\n")); - miSpriteRemoveCursor (pDev, pScreen); - } - } + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey); + + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) + { + if (DevHasCursor(pDev)) + { + pCursorInfo = MISPRITE(pDev); + if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && + ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y, + x, y, width, height)) + { + SPRITE_DEBUG (("SourceValidate remove\n")); + miSpriteRemoveCursor (pDev, pScreen); + } + } + } } if (pScreen->SourceValidate) @@ -452,13 +524,12 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWindow->drawable.pScreen; miSpriteScreenPtr pScreenPriv; - DeviceIntPtr pDev = inputInfo.pointer; + DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE (pScreen, CopyWindow); - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { @@ -469,7 +540,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) * Damage will take care of destination check */ if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && - RECT_IN_REGION (pScreen, prgnSrc, &pCursorInfo->saved) != rgnOUT) + miRectIn(prgnSrc, &pCursorInfo->saved) != rgnOUT) { SPRITE_DEBUG (("CopyWindow remove\n")); miSpriteRemoveCursor (pDev, pScreen); @@ -487,11 +558,10 @@ miSpriteBlockHandler (int i, pointer blockData, pointer pTimeout, { ScreenPtr pScreen = screenInfo.screens[i]; miSpriteScreenPtr pPriv; - DeviceIntPtr pDev = inputInfo.pointer; + DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; - pPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); SCREEN_PROLOGUE(pScreen, BlockHandler); (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); @@ -534,8 +604,7 @@ miSpriteInstallColormap (ColormapPtr pMap) ScreenPtr pScreen = pMap->pScreen; miSpriteScreenPtr pPriv; - pPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); SCREEN_PROLOGUE(pScreen, InstallColormap); (*pScreen->InstallColormap) (pMap); @@ -570,11 +639,10 @@ miSpriteStoreColors (ColormapPtr pMap, int ndef, xColorItem *pdef) int i; int updated; VisualPtr pVisual; - DeviceIntPtr pDev = inputInfo.pointer; + DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; - pPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); SCREEN_PROLOGUE(pScreen, StoreColors); (*pScreen->StoreColors) (pMap, ndef, pdef); @@ -649,7 +717,7 @@ miSpriteStoreColors (ColormapPtr pMap, int ndef, xColorItem *pdef) static void miSpriteFindColors (miCursorInfoPtr pDevCursor, ScreenPtr pScreen) { - miSpriteScreenPtr pScreenPriv = (miSpriteScreenPtr) + miSpriteScreenPtr pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); CursorPtr pCursor; xColorItem *sourceColor, *maskColor; @@ -695,9 +763,8 @@ miSpriteRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); - if (!pDev->isMaster && !pDev->u.master) + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); + if (!IsMaster(pDev) && !pDev->u.master) { ErrorF("[mi] miSpriteRealizeCursor called for floating device.\n"); return FALSE; @@ -715,8 +782,7 @@ miSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); return (*pScreenPriv->funcs->UnrealizeCursor) (pScreen, pCursor); } @@ -725,12 +791,11 @@ miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { miSpriteScreenPtr pScreenPriv; - - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); miCursorInfoPtr pPointer; - if (!pDev->isMaster && !pDev->u.master) + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); + + if (!IsMaster(pDev) && !pDev->u.master) { ErrorF("[mi] miSpriteSetCursor called for floating device.\n"); return; @@ -846,9 +911,8 @@ miSpriteMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) miSpriteScreenPtr pScreenPriv; CursorPtr pCursor; - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); - if (!pDev->isMaster && !pDev->u.master) + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); + if (!IsMaster(pDev) && !pDev->u.master) { ErrorF("[mi] miSpriteMoveCursor called for floating device.\n"); return; @@ -866,8 +930,7 @@ miSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) miCursorInfoPtr pCursorInfo; int ret = FALSE; - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); pCursorInfo = xalloc(sizeof(miCursorInfoRec)); if (!pCursorInfo) @@ -899,8 +962,8 @@ miSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) if (DevHasCursor(pDev)) { miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr) - dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); (*pScreenPriv->funcs->DeviceCursorCleanup)(pDev, pScreen); } @@ -917,14 +980,13 @@ miSpriteRemoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen) miCursorInfoPtr pCursorInfo; - if (!pDev->isMaster && !pDev->u.master) + if (!IsMaster(pDev) && !pDev->u.master) { ErrorF("[mi] miSpriteRemoveCursor called for floating device.\n"); return; } DamageDrawInternal (pScreen, TRUE); - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); pCursorInfo = MISPRITE(pDev); miSpriteIsDown(pCursorInfo); @@ -958,14 +1020,13 @@ miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen) CursorPtr pCursor; miCursorInfoPtr pCursorInfo; - if (!pDev->isMaster && !pDev->u.master) + if (!IsMaster(pDev) && !pDev->u.master) { ErrorF("[mi] miSpriteSaveUnderCursor called for floating device.\n"); return; } DamageDrawInternal (pScreen, TRUE); - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); pCursorInfo = MISPRITE(pDev); miSpriteComputeSaved (pDev, pScreen); @@ -1002,15 +1063,14 @@ miSpriteRestoreCursor (DeviceIntPtr pDev, ScreenPtr pScreen) CursorPtr pCursor; miCursorInfoPtr pCursorInfo; - if (!pDev->isMaster && !pDev->u.master) + if (!IsMaster(pDev) && !pDev->u.master) { ErrorF("[mi] miSpriteRestoreCursor called for floating device.\n"); return; } DamageDrawInternal (pScreen, TRUE); - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); pCursorInfo = MISPRITE(pDev); miSpriteComputeSaved (pDev, pScreen); @@ -1047,13 +1107,12 @@ miSpriteComputeSaved (DeviceIntPtr pDev, ScreenPtr pScreen) CursorPtr pCursor; miCursorInfoPtr pCursorInfo; - if (!pDev->isMaster && !pDev->u.master) + if (!IsMaster(pDev) && !pDev->u.master) { ErrorF("[mi] miSpriteComputeSaved called for floating device.\n"); return; } - pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); + pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); pCursorInfo = MISPRITE(pDev); pCursor = pCursorInfo->pCursor; diff --git a/xorg-server/mi/mivaltree.c b/xorg-server/mi/mivaltree.c index 2585422bc..cfcdab756 100644 --- a/xorg-server/mi/mivaltree.c +++ b/xorg-server/mi/mivaltree.c @@ -769,7 +769,7 @@ miValidateTree ( if (pScreen->ClipNotify) (* pScreen->ClipNotify) (pWin, 0, 0); REGION_EMPTY( pScreen, &pWin->borderClip); - pWin->valdata = (ValidatePtr)NULL; + pWin->valdata = NULL; } } } diff --git a/xorg-server/mi/miwideline.c b/xorg-server/mi/miwideline.c index 40f0d3e49..210a6251e 100644 --- a/xorg-server/mi/miwideline.c +++ b/xorg-server/mi/miwideline.c @@ -95,10 +95,10 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, if (!spanData) { - pptInit = (DDXPointPtr) xalloc (overall_height * sizeof(*ppt)); + pptInit = xalloc (overall_height * sizeof(*ppt)); if (!pptInit) return; - pwidthInit = (int *) xalloc (overall_height * sizeof(*pwidth)); + pwidthInit = xalloc (overall_height * sizeof(*pwidth)); if (!pwidthInit) { xfree (pptInit); @@ -116,10 +116,10 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, } else { - spanRec.points = (DDXPointPtr) xalloc (overall_height * sizeof (*ppt)); + spanRec.points = xalloc (overall_height * sizeof (*ppt)); if (!spanRec.points) return; - spanRec.widths = (int *) xalloc (overall_height * sizeof (int)); + spanRec.widths = xalloc (overall_height * sizeof (int)); if (!spanRec.widths) { xfree (spanRec.points); @@ -221,10 +221,10 @@ miFillRectPolyHelper ( } else { - spanRec.points = (DDXPointPtr) xalloc (h * sizeof (*ppt)); + spanRec.points = xalloc (h * sizeof (*ppt)); if (!spanRec.points) return; - spanRec.widths = (int *) xalloc (h * sizeof (int)); + spanRec.widths = xalloc (h * sizeof (int)); if (!spanRec.widths) { xfree (spanRec.points); @@ -251,7 +251,7 @@ miFillRectPolyHelper ( } } -_X_EXPORT /* static */ int +/* static */ int miPolyBuildEdge ( double x0, double y0, @@ -313,7 +313,7 @@ miPolyBuildEdge ( #define StepAround(v, incr, max) (((v) + (incr) < 0) ? (max - 1) : ((v) + (incr) == max) ? 0 : ((v) + (incr))) -_X_EXPORT /* static */ int +/* static */ int miPolyBuildPoly ( PolyVertexPtr vertices, PolySlopePtr slopes, @@ -915,7 +915,7 @@ miRoundJoinFace (LineFacePtr face, PolyEdgePtr edge, Bool *leftEdge) return y; } -_X_EXPORT void +void miRoundJoinClip (LineFacePtr pLeft, LineFacePtr pRight, PolyEdgePtr edge1, PolyEdgePtr edge2, int *y1, int *y2, Bool *left1, Bool *left2) @@ -938,7 +938,7 @@ miRoundJoinClip (LineFacePtr pLeft, LineFacePtr pRight, *y2 = miRoundJoinFace (pRight, edge2, left2); } -_X_EXPORT int +int miRoundCapClip (LineFacePtr face, Bool isInt, PolyEdgePtr edge, Bool *leftEdge) { int y; @@ -1045,10 +1045,10 @@ miLineArc ( } if (!spanData) { - points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * pGC->lineWidth); + points = xalloc(sizeof(DDXPointRec) * pGC->lineWidth); if (!points) return; - widths = (int *)xalloc(sizeof(int) * pGC->lineWidth); + widths = xalloc(sizeof(int) * pGC->lineWidth); if (!widths) { xfree(points); @@ -1064,10 +1064,10 @@ miLineArc ( } else { - points = (DDXPointPtr) xalloc (pGC->lineWidth * sizeof (DDXPointRec)); + points = xalloc (pGC->lineWidth * sizeof (DDXPointRec)); if (!points) return; - widths = (int *) xalloc (pGC->lineWidth * sizeof (int)); + widths = xalloc (pGC->lineWidth * sizeof (int)); if (!widths) { xfree (points); @@ -1524,7 +1524,7 @@ miCleanupSpanData (DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData) miFreeSpanGroup (&spanData->fgGroup); } -_X_EXPORT void +void miWideLine (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pPts) { @@ -2018,7 +2018,7 @@ miWideDashSegment ( *pDashOffset = pDash[dashIndex] - dashRemain; } -_X_EXPORT void +void miWideDash (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pPts) { diff --git a/xorg-server/mi/miwideline.h b/xorg-server/mi/miwideline.h index 9d1aa03cb..1f615d689 100644 --- a/xorg-server/mi/miwideline.h +++ b/xorg-server/mi/miwideline.h @@ -153,7 +153,7 @@ typedef struct _LineFace { } \ } -extern void miRoundJoinClip( +extern _X_EXPORT void miRoundJoinClip( LineFacePtr /*pLeft*/, LineFacePtr /*pRight*/, PolyEdgePtr /*edge1*/, @@ -164,16 +164,16 @@ extern void miRoundJoinClip( Bool * /*left2*/ ); -extern int miRoundCapClip( +extern _X_EXPORT int miRoundCapClip( LineFacePtr /*face*/, Bool /*isInt*/, PolyEdgePtr /*edge*/, Bool * /*leftEdge*/ ); -extern int miPolyBuildEdge(double x0, double y0, double k, int dx, int dy, +extern _X_EXPORT int miPolyBuildEdge(double x0, double y0, double k, int dx, int dy, int xi, int yi, int left, PolyEdgePtr edge); -extern int miPolyBuildPoly(PolyVertexPtr vertices, PolySlopePtr slopes, +extern _X_EXPORT int miPolyBuildPoly(PolyVertexPtr vertices, PolySlopePtr slopes, int count, int xi, int yi, PolyEdgePtr left, PolyEdgePtr right, int *pnleft, int *pnright, int *h); diff --git a/xorg-server/mi/miwindow.c b/xorg-server/mi/miwindow.c index 498c8a656..31c028482 100644 --- a/xorg-server/mi/miwindow.c +++ b/xorg-server/mi/miwindow.c @@ -57,7 +57,7 @@ SOFTWARE. #include "pixmapstr.h" #include "mivalidate.h" -_X_EXPORT void +void miClearToBackground(WindowPtr pWin, int x, int y, int w, int h, Bool generateExposures) @@ -245,7 +245,7 @@ miHandleValidateExposures(WindowPtr pWin) (*WindowExposures)(pChild, &val->after.exposed, NullRegion); REGION_UNINIT(pScreen, &val->after.exposed); xfree(val); - pChild->valdata = (ValidatePtr)NULL; + pChild->valdata = NULL; if (pChild->firstChild) { pChild = pChild->firstChild; @@ -305,10 +305,10 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind) { if (pLayerWin == pWin) anyMarked |= (*pScreen->MarkOverlappedWindows) - (pWin, windowToValidate, (WindowPtr *)NULL); + (pWin, windowToValidate, NULL); else anyMarked |= (*pScreen->MarkOverlappedWindows) - (pWin, pLayerWin, (WindowPtr *)NULL); + (pWin, pLayerWin, NULL); if (anyMarked) @@ -500,10 +500,10 @@ miSlideAndSizeWindow(WindowPtr pWin, if (pLayerWin == pWin) anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange, - (WindowPtr *)NULL); + NULL); else anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pLayerWin, - (WindowPtr *)NULL); + NULL); if (pWin->valdata) { @@ -729,7 +729,7 @@ miSetShape(WindowPtr pWin) if (WasViewable) { anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin, - (WindowPtr *)NULL); + NULL); if (anyMarked) @@ -816,7 +816,7 @@ miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure) } } -_X_EXPORT void +void miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth) { ScreenPtr pScreen; diff --git a/xorg-server/mi/mizerarc.c b/xorg-server/mi/mizerarc.c index d3cc1958c..ad84c0123 100644 --- a/xorg-server/mi/mizerarc.c +++ b/xorg-server/mi/mizerarc.c @@ -95,7 +95,7 @@ static miZeroArcPtRec oob = {65536, 65536, 0}; * */ -_X_EXPORT Bool +Bool miZeroArcSetup(xArc *arc, miZeroArcRec *info, Bool ok360) { int l; @@ -702,14 +702,14 @@ miZeroArcDashPts( dinfo->dashOffset = pGC->dash[dinfo->dashIndex] - dashRemaining; } -_X_EXPORT void +void miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { int maxPts = 0; int n, maxw = 0; xArc *arc; int i; - DDXPointPtr points, pts, oddPts; + DDXPointPtr points, pts, oddPts = NULL; DDXPointPtr pt; int numPts; Bool dospans; @@ -737,7 +737,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) dospans = (pGC->fillStyle != FillSolid); if (dospans) { - widths = (int *)xalloc(sizeof(int) * numPts); + widths = xalloc(sizeof(int) * numPts); if (!widths) return; maxw = 0; @@ -754,7 +754,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) (unsigned char *) pGC->dash, (int)pGC->numInDashList, &dinfo.dashOffsetInit); } - points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * numPts); + points = xalloc(sizeof(DDXPointRec) * numPts); if (!points) { if (dospans) diff --git a/xorg-server/mi/mizerarc.h b/xorg-server/mi/mizerarc.h index 28ebbe030..1612a525b 100644 --- a/xorg-server/mi/mizerarc.h +++ b/xorg-server/mi/mizerarc.h @@ -119,7 +119,7 @@ typedef struct { /* mizerarc.c */ -extern Bool miZeroArcSetup( +extern _X_EXPORT Bool miZeroArcSetup( xArc * /*arc*/, miZeroArcRec * /*info*/, Bool /*ok360*/ diff --git a/xorg-server/mi/mizerclip.c b/xorg-server/mi/mizerclip.c index dd05040bc..fb1e25fe4 100644 --- a/xorg-server/mi/mizerclip.c +++ b/xorg-server/mi/mizerclip.c @@ -404,7 +404,7 @@ the numerator is therefore (2^32 - 1), which does not overflow an unsigned * -1 for completely clipped line * */ -_X_EXPORT int +int miZeroClipLine(int xmin, int ymin, int xmax, int ymax, int *new_x1, int *new_y1, int *new_x2, int *new_y2, unsigned int adx, unsigned int ady, diff --git a/xorg-server/mi/mizerline.c b/xorg-server/mi/mizerline.c index a415d73da..46e2e2adc 100644 --- a/xorg-server/mi/mizerline.c +++ b/xorg-server/mi/mizerline.c @@ -97,7 +97,7 @@ SOFTWARE. }\ } -_X_EXPORT void +void miZeroLine( DrawablePtr pDraw, GCPtr pGC, @@ -155,8 +155,8 @@ miZeroLine( width = xright - xleft + 1; height = ybottom - ytop + 1; list_len = (height >= width) ? height : width; - pspanInit = (DDXPointPtr)xalloc(list_len * sizeof(DDXPointRec)); - pwidthInit = (int *)xalloc(list_len * sizeof(int)); + pspanInit = xalloc(list_len * sizeof(DDXPointRec)); + pwidthInit = xalloc(list_len * sizeof(int)); if (!pspanInit || !pwidthInit) return; diff --git a/xorg-server/miext/Makefile.am b/xorg-server/miext/Makefile.am index f138963b4..84ab70855 100644 --- a/xorg-server/miext/Makefile.am +++ b/xorg-server/miext/Makefile.am @@ -5,4 +5,7 @@ endif if XQUARTZ SUBDIRS += rootless endif +if XWIN_MULTIWINDOWEXTWM +SUBDIRS += rootless +endif DIST_SUBDIRS = damage shadow cw rootless diff --git a/xorg-server/miext/Makefile.in b/xorg-server/miext/Makefile.in index 8ba8c9eea..e7485ff9d 100644 --- a/xorg-server/miext/Makefile.in +++ b/xorg-server/miext/Makefile.in @@ -35,11 +35,15 @@ build_triplet = @build@ host_triplet = @host@ @COMPOSITE_TRUE@am__append_1 = cw @XQUARTZ_TRUE@am__append_2 = rootless +@XWIN_MULTIWINDOWEXTWM_TRUE@am__append_3 = rootless subdir = miext DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -49,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = @@ -99,6 +104,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -119,9 +125,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -150,7 +159,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -159,9 +170,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -200,12 +215,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -225,7 +241,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -235,6 +250,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -248,11 +264,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -288,6 +303,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -312,7 +328,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -335,6 +350,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -366,13 +382,16 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = damage shadow $(am__append_1) $(am__append_2) +SUBDIRS = damage shadow $(am__append_1) $(am__append_2) \ + $(am__append_3) DIST_SUBDIRS = damage shadow cw rootless all: all-recursive diff --git a/xorg-server/miext/cw/Makefile.in b/xorg-server/miext/cw/Makefile.in index c3735b05f..1a0732af7 100644 --- a/xorg-server/miext/cw/Makefile.in +++ b/xorg-server/miext/cw/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = miext/cw DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -75,6 +79,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -95,9 +100,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -126,7 +134,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -135,9 +145,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,12 +190,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -201,7 +216,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -211,6 +225,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -224,11 +239,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -264,6 +278,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -288,7 +303,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -311,6 +325,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -342,7 +357,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/miext/cw/cw.c b/xorg-server/miext/cw/cw.c index 56066fe9c..74000ffa0 100644 --- a/xorg-server/miext/cw/cw.c +++ b/xorg-server/miext/cw/cw.c @@ -484,7 +484,7 @@ miInitializeCompositeWrapper(ScreenPtr pScreen) if (!dixRequestPrivate(cwGCKey, sizeof(cwGCRec))) return; - pScreenPriv = (cwScreenPtr)xalloc(sizeof(cwScreenRec)); + pScreenPriv = xalloc(sizeof(cwScreenRec)); if (!pScreenPriv) return; diff --git a/xorg-server/miext/cw/cw.h b/xorg-server/miext/cw/cw.h index 145f3492c..ae65503f5 100644 --- a/xorg-server/miext/cw/cw.h +++ b/xorg-server/miext/cw/cw.h @@ -44,7 +44,7 @@ typedef struct { GCFuncs *wrapFuncs; /* wrapped funcs */ } cwGCRec, *cwGCPtr; -extern DevPrivateKey cwGCKey; +extern _X_EXPORT DevPrivateKey cwGCKey; #define getCwGC(pGC) ((cwGCPtr)dixLookupPrivate(&(pGC)->devPrivates, cwGCKey)) #define setCwGC(pGC,p) dixSetPrivate(&(pGC)->devPrivates, cwGCKey, p) @@ -64,8 +64,8 @@ typedef struct { (cwPicturePtr)dixLookupPrivate(&(pPicture)->devPrivates, cwPictureKey) : 0) #define setCwPicture(pPicture,p) dixSetPrivate(&(pPicture)->devPrivates, cwPictureKey, p) -extern DevPrivateKey cwPictureKey; -extern DevPrivateKey cwWindowKey; +extern _X_EXPORT DevPrivateKey cwPictureKey; +extern _X_EXPORT DevPrivateKey cwWindowKey; #define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey) #define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow)) @@ -110,7 +110,7 @@ typedef struct { #endif } cwScreenRec, *cwScreenPtr; -extern DevPrivateKey cwScreenKey; +extern _X_EXPORT DevPrivateKey cwScreenKey; #define getCwScreen(pScreen) ((cwScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, cwScreenKey)) #define setCwScreen(pScreen,p) dixSetPrivate(&(pScreen)->devPrivates, cwScreenKey, p) @@ -151,18 +151,18 @@ extern DevPrivateKey cwScreenKey; } while (0) /* cw.c */ -DrawablePtr +extern _X_EXPORT DrawablePtr cwGetBackingDrawable(DrawablePtr pDrawable, int *x_off, int *y_off); /* cw_render.c */ -void +extern _X_EXPORT void cwInitializeRender (ScreenPtr pScreen); -void +extern _X_EXPORT void cwFiniRender (ScreenPtr pScreen); /* cw.c */ -void +extern _X_EXPORT void miInitializeCompositeWrapper(ScreenPtr pScreen); diff --git a/xorg-server/miext/damage/Makefile.in b/xorg-server/miext/damage/Makefile.in index 0ee782889..8b2baded2 100644 --- a/xorg-server/miext/damage/Makefile.in +++ b/xorg-server/miext/damage/Makefile.in @@ -39,8 +39,11 @@ subdir = miext/damage DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -101,6 +105,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -121,9 +126,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -152,7 +160,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -161,9 +171,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -202,12 +216,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -227,7 +242,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -237,6 +251,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -250,11 +265,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -290,6 +304,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -314,7 +329,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -337,6 +351,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -368,7 +383,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/miext/damage/damage.c b/xorg-server/miext/damage/damage.c index fa2f27997..b7ec92a5b 100644 --- a/xorg-server/miext/damage/damage.c +++ b/xorg-server/miext/damage/damage.c @@ -1514,7 +1514,7 @@ damageText (DrawablePtr pDrawable, imageblt = (textType == TT_IMAGE8) || (textType == TT_IMAGE16); - charinfo = (CharInfoPtr *) xalloc(count * sizeof(CharInfoPtr)); + charinfo = xalloc(count * sizeof(CharInfoPtr)); if (!charinfo) return x; @@ -1855,6 +1855,25 @@ damageCloseScreen (int i, ScreenPtr pScreen) return (*pScreen->CloseScreen) (i, pScreen); } +/** + * Default implementations of the damage management functions. + */ +void miDamageCreate (DamagePtr pDamage) +{ +} + +void miDamageRegister (DrawablePtr pDrawable, DamagePtr pDamage) +{ +} + +void miDamageUnregister (DrawablePtr pDrawable, DamagePtr pDamage) +{ +} + +void miDamageDestroy (DamagePtr pDamage) +{ +} + /** * Public functions for consumption outside this file. */ @@ -1866,6 +1885,9 @@ DamageSetup (ScreenPtr pScreen) #ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); #endif + const DamageScreenFuncsRec miFuncs = { + miDamageCreate, miDamageRegister, miDamageUnregister, miDamageDestroy + }; if (dixLookupPrivate(&pScreen->devPrivates, damageScrPrivateKey)) return TRUE; @@ -1873,7 +1895,7 @@ DamageSetup (ScreenPtr pScreen) if (!dixRequestPrivate(damageGCPrivateKey, sizeof(DamageGCPrivRec))) return FALSE; - pScrPriv = (DamageScrPrivPtr) xalloc (sizeof (DamageScrPrivRec)); + pScrPriv = xalloc (sizeof (DamageScrPrivRec)); if (!pScrPriv) return FALSE; @@ -1894,6 +1916,8 @@ DamageSetup (ScreenPtr pScreen) } #endif + pScrPriv->funcs = miFuncs; + dixSetPrivate(&pScreen->devPrivates, damageScrPrivateKey, pScrPriv); return TRUE; } @@ -1906,6 +1930,7 @@ DamageCreate (DamageReportFunc damageReport, ScreenPtr pScreen, void *closure) { + damageScrPriv(pScreen); DamagePtr pDamage; pDamage = xalloc (sizeof (DamageRec)); @@ -1927,6 +1952,11 @@ DamageCreate (DamageReportFunc damageReport, pDamage->damageReportPostRendering = NULL; pDamage->damageDestroy = damageDestroy; pDamage->damageMarker = NULL; + pDamage->pScreen = pScreen; + pDamage->devPrivates = NULL; + + (*pScrPriv->funcs.Create) (pDamage); + return pDamage; } @@ -1934,6 +1964,17 @@ void DamageRegister (DrawablePtr pDrawable, DamagePtr pDamage) { + ScreenPtr pScreen = pDrawable->pScreen; + damageScrPriv(pScreen); + +#if DAMAGE_VALIDATE_ENABLE + if (pDrawable->pScreen != pDamage->pScreen) + { + ErrorF ("DamageRegister called with mismatched screens\n"); + abort (); + } +#endif + if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWindow = (WindowPtr) pDrawable; @@ -1956,6 +1997,7 @@ DamageRegister (DrawablePtr pDrawable, pDamage->isWindow = FALSE; pDamage->pDrawable = pDrawable; damageInsertDamage (getDrawableDamageRef (pDrawable), pDamage); + (*pScrPriv->funcs.Register) (pDrawable, pDamage); } void @@ -1970,6 +2012,11 @@ void DamageUnregister (DrawablePtr pDrawable, DamagePtr pDamage) { + ScreenPtr pScreen = pDrawable->pScreen; + damageScrPriv(pScreen); + + (*pScrPriv->funcs.Unregister) (pDrawable, pDamage); + if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWindow = (WindowPtr) pDrawable; @@ -2004,10 +2051,16 @@ DamageUnregister (DrawablePtr pDrawable, void DamageDestroy (DamagePtr pDamage) { + ScreenPtr pScreen = pDamage->pScreen; + damageScrPriv(pScreen); + if (pDamage->damageDestroy) (*pDamage->damageDestroy) (pDamage, pDamage->closure); - REGION_UNINIT (pDamage->pDrawable->pScreen, &pDamage->damage); - REGION_UNINIT (pDamage->pDrawable->pScreen, &pDamage->pendingDamage); + (*pScrPriv->funcs.Destroy) (pDamage); + dixFreePrivates(pDamage->devPrivates); + pDamage->devPrivates = NULL; + REGION_UNINIT (pScreen, &pDamage->damage); + REGION_UNINIT (pScreen, &pDamage->pendingDamage); xfree (pDamage); } @@ -2050,25 +2103,25 @@ DamageEmpty (DamagePtr pDamage) REGION_EMPTY (pDamage->pDrawable->pScreen, &pDamage->damage); } -_X_EXPORT RegionPtr +RegionPtr DamageRegion (DamagePtr pDamage) { return &pDamage->damage; } -_X_EXPORT RegionPtr +RegionPtr DamagePendingRegion (DamagePtr pDamage) { return &pDamage->pendingDamage; } -_X_EXPORT void +void DamageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion) { damageRegionAppend (pDrawable, pRegion, FALSE, -1); } -_X_EXPORT void +void DamageRegionProcessPending (DrawablePtr pDrawable) { damageRegionProcessPending (pDrawable); @@ -2077,7 +2130,7 @@ DamageRegionProcessPending (DrawablePtr pDrawable) /* If a damage marker is provided, then this function must be called after rendering is done. */ /* Please do call back so any future enhancements can assume this function is called. */ /* There are no strict timing requirements for calling this function, just as soon as (is cheaply) possible. */ -_X_EXPORT void +void DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion) { if (pDamage->damageReportPostRendering) @@ -2085,7 +2138,7 @@ DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDa } /* This call is very odd, i'm leaving it intact for API sake, but please don't use it. */ -_X_EXPORT void +void DamageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion) { @@ -2098,16 +2151,23 @@ DamageDamageRegion (DrawablePtr pDrawable, damageRegionProcessPending (pDrawable); } -_X_EXPORT void +void DamageSetReportAfterOp (DamagePtr pDamage, Bool reportAfter) { pDamage->reportAfter = reportAfter; } -_X_EXPORT void +void DamageSetPostRenderingFunctions(DamagePtr pDamage, DamageReportFunc damageReportPostRendering, DamageMarkerFunc damageMarker) { pDamage->damageReportPostRendering = damageReportPostRendering; pDamage->damageMarker = damageMarker; } + +DamageScreenFuncsPtr +DamageGetScreenFuncs (ScreenPtr pScreen) +{ + damageScrPriv(pScreen); + return &pScrPriv->funcs; +} diff --git a/xorg-server/miext/damage/damage.h b/xorg-server/miext/damage/damage.h index a70f1f86e..067016f38 100644 --- a/xorg-server/miext/damage/damage.h +++ b/xorg-server/miext/damage/damage.h @@ -43,10 +43,27 @@ typedef void (*DamageDestroyFunc) (DamagePtr pDamage, void *closure); /* At some point DamageRegionRendered() must be called. */ typedef void (*DamageMarkerFunc) (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion, void *closure); -Bool +typedef void (*DamageScreenCreateFunc) (DamagePtr); +typedef void (*DamageScreenRegisterFunc) (DrawablePtr, DamagePtr); +typedef void (*DamageScreenUnregisterFunc) (DrawablePtr, DamagePtr); +typedef void (*DamageScreenDestroyFunc) (DamagePtr); + +typedef struct _damageScreenFuncs { + DamageScreenCreateFunc Create; + DamageScreenRegisterFunc Register; + DamageScreenUnregisterFunc Unregister; + DamageScreenDestroyFunc Destroy; +} DamageScreenFuncsRec, *DamageScreenFuncsPtr; + +extern _X_EXPORT void miDamageCreate (DamagePtr); +extern _X_EXPORT void miDamageRegister (DrawablePtr, DamagePtr); +extern _X_EXPORT void miDamageUnregister (DrawablePtr, DamagePtr); +extern _X_EXPORT void miDamageDestroy (DamagePtr); + +extern _X_EXPORT Bool DamageSetup (ScreenPtr pScreen); -DamagePtr +extern _X_EXPORT DamagePtr DamageCreate (DamageReportFunc damageReport, DamageDestroyFunc damageDestroy, DamageReportLevel damageLevel, @@ -54,55 +71,58 @@ DamageCreate (DamageReportFunc damageReport, ScreenPtr pScreen, void * closure); -void +extern _X_EXPORT void DamageDrawInternal (ScreenPtr pScreen, Bool enable); -void +extern _X_EXPORT void DamageRegister (DrawablePtr pDrawable, DamagePtr pDamage); -void +extern _X_EXPORT void DamageUnregister (DrawablePtr pDrawable, DamagePtr pDamage); -void +extern _X_EXPORT void DamageDestroy (DamagePtr pDamage); -Bool +extern _X_EXPORT Bool DamageSubtract (DamagePtr pDamage, const RegionPtr pRegion); -void +extern _X_EXPORT void DamageEmpty (DamagePtr pDamage); -RegionPtr +extern _X_EXPORT RegionPtr DamageRegion (DamagePtr pDamage); -RegionPtr +extern _X_EXPORT RegionPtr DamagePendingRegion (DamagePtr pDamage); /* In case of rendering, call this before the submitting the commands. */ -void +extern _X_EXPORT void DamageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion); /* Call this directly after the rendering operation has been submitted. */ -void +extern _X_EXPORT void DamageRegionProcessPending (DrawablePtr pDrawable); /* Call this some time after rendering is done, only relevant when a damageMarker is provided. */ -void +extern _X_EXPORT void DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion); /* Avoid using this call, it only exists for API compatibility. */ -void +extern _X_EXPORT void DamageDamageRegion (DrawablePtr pDrawable, const RegionPtr pRegion); -void +extern _X_EXPORT void DamageSetReportAfterOp (DamagePtr pDamage, Bool reportAfter); -void +extern _X_EXPORT void DamageSetPostRenderingFunctions(DamagePtr pDamage, DamageReportFunc damageReportPostRendering, DamageMarkerFunc damageMarker); +extern _X_EXPORT DamageScreenFuncsPtr +DamageGetScreenFuncs (ScreenPtr); + #endif /* _DAMAGE_H_ */ diff --git a/xorg-server/miext/damage/damagestr.h b/xorg-server/miext/damage/damagestr.h index 559a13659..d7435b2a1 100644 --- a/xorg-server/miext/damage/damagestr.h +++ b/xorg-server/miext/damage/damagestr.h @@ -53,6 +53,8 @@ typedef struct _damage { Bool reportAfter; RegionRec pendingDamage; /* will be flushed post submission at the latest */ RegionRec backupDamage; /* for use with damageMarker */ + ScreenPtr pScreen; + PrivateRec *devPrivates; } DamageRec; typedef struct _damageScrPriv { @@ -75,6 +77,9 @@ typedef struct _damageScrPriv { GlyphsProcPtr Glyphs; AddTrapsProcPtr AddTraps; #endif + + /* Table of wrappable function pointers */ + DamageScreenFuncsRec funcs; } DamageScrPrivRec, *DamageScrPrivPtr; typedef struct _damageGCPriv { diff --git a/xorg-server/miext/rootless/Makefile.in b/xorg-server/miext/rootless/Makefile.in index 1aeceb545..bb4b0c782 100644 --- a/xorg-server/miext/rootless/Makefile.in +++ b/xorg-server/miext/rootless/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = miext/rootless DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -76,6 +80,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -96,9 +101,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -127,7 +135,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -136,9 +146,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -177,12 +191,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -202,7 +217,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -212,6 +226,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -225,11 +240,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -265,6 +279,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -289,7 +304,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -312,6 +326,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -343,7 +358,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/miext/rootless/rootless.h b/xorg-server/miext/rootless/rootless.h index 5224dca2b..bde4cff52 100644 --- a/xorg-server/miext/rootless/rootless.h +++ b/xorg-server/miext/rootless/rootless.h @@ -57,6 +57,7 @@ typedef struct _RootlessWindowRec { int x, y; unsigned int width, height; unsigned int borderWidth; + int level; RootlessFrameID wid; // implementation specific frame id WindowPtr win; // underlying X window diff --git a/xorg-server/miext/rootless/rootlessCommon.c b/xorg-server/miext/rootless/rootlessCommon.c index 97c92d309..e3dd9d97c 100644 --- a/xorg-server/miext/rootless/rootlessCommon.c +++ b/xorg-server/miext/rootless/rootlessCommon.c @@ -109,8 +109,8 @@ RootlessResolveColormap (ScreenPtr pScreen, int first_color, map = RootlessGetColormap (pScreen); if (map == NULL || map->class != PseudoColor) return FALSE; - last = MIN (map->pVisual->ColormapEntries, first_color + n_colors); - for (i = MAX (0, first_color); i < last; i++) { + last = min (map->pVisual->ColormapEntries, first_color + n_colors); + for (i = max (0, first_color); i < last; i++) { Entry *ent = map->red + i; uint16_t red, green, blue; diff --git a/xorg-server/miext/rootless/rootlessCommon.h b/xorg-server/miext/rootless/rootlessCommon.h index a92f1f1e4..ba121c0f4 100644 --- a/xorg-server/miext/rootless/rootlessCommon.h +++ b/xorg-server/miext/rootless/rootlessCommon.h @@ -36,6 +36,7 @@ #ifndef _ROOTLESSCOMMON_H #define _ROOTLESSCOMMON_H +#include "misc.h" #include "rootless.h" #include "fb.h" @@ -120,12 +121,6 @@ typedef struct _RootlessScreenRec { unsigned int colormap_changed :1; } RootlessScreenRec, *RootlessScreenPtr; - -#undef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#undef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) - // "Definition of the Porting Layer for the X11 Sample Server" says // unwrap and rewrap of screen functions is unnecessary, but // screen->CreateGC changes after a call to cfbCreateGC. diff --git a/xorg-server/miext/rootless/rootlessGC.c b/xorg-server/miext/rootless/rootlessGC.c index d60cd270c..0bd314d46 100644 --- a/xorg-server/miext/rootless/rootlessGC.c +++ b/xorg-server/miext/rootless/rootlessGC.c @@ -440,26 +440,12 @@ static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) (pGC)->funcs = saveFuncs; \ (pGC)->ops = &rootlessGCOps; -/* Turn drawing on the root into a no-op */ -#define GC_IS_ROOT(pDst) ((pDst)->type == DRAWABLE_WINDOW \ - && IsRoot ((WindowPtr) (pDst))) - -#define GC_SKIP_ROOT(pDst, pGC) \ - do { \ - if (GC_IS_ROOT (pDst)) { \ - GCOP_WRAP(pGC); \ - return; \ - } \ - } while (0) - - static void RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, DDXPointPtr pptInit, int *pwidthInit, int sorted) { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("fill spans start "); if (nInit <= 0) { @@ -515,7 +501,6 @@ RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, int nspans, int sorted) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("set spans start "); if (nspans <= 0) { @@ -566,7 +551,6 @@ RootlessPutImage(DrawablePtr dst, GCPtr pGC, BoxRec box; GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("put image start "); RootlessStartDrawing((WindowPtr) dst); @@ -597,12 +581,6 @@ RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, GC_SAVE(pGC); GCOP_UNWRAP(pGC); - if (GC_IS_ROOT(dst) || GC_IS_ROOT(pSrc)) - { - GCOP_WRAP(pGC); - return NULL; /* nothing exposed */ - } - RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst); if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) { @@ -650,12 +628,6 @@ static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst, GCOP_UNWRAP(pGC); - if (GC_IS_ROOT(dst) || GC_IS_ROOT(pSrc)) - { - GCOP_WRAP(pGC); - return NULL; /* nothing exposed */ - } - RL_DEBUG_MSG("copy plane start "); if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) { @@ -691,7 +663,6 @@ static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("polypoint start "); RootlessStartDrawing((WindowPtr) dst); @@ -785,7 +756,6 @@ static void RootlessPolylines(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("poly lines start "); RootlessStartDrawing((WindowPtr) dst); @@ -860,7 +830,6 @@ static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, int nseg, xSegment *pSeg) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("poly segment start (win 0x%x)", dst); RootlessStartDrawing((WindowPtr) dst); @@ -931,7 +900,6 @@ static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, int nRects, xRectangle *pRects) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("poly rectangle start "); RootlessStartDrawing((WindowPtr) dst); @@ -992,7 +960,6 @@ static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("poly arc start "); RootlessStartDrawing((WindowPtr) dst); @@ -1048,7 +1015,6 @@ static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("fill poly start (win 0x%x, fillStyle 0x%x)", dst, pGC->fillStyle); @@ -1122,7 +1088,6 @@ static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("fill rect start (win 0x%x, fillStyle 0x%x)", dst, pGC->fillStyle); @@ -1177,7 +1142,6 @@ static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("fill arc start "); if (narcsInit > 0) { @@ -1232,7 +1196,6 @@ static void RootlessImageText8(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("imagetext8 start "); if (count > 0) { @@ -1285,12 +1248,6 @@ static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, GCOP_UNWRAP(pGC); - if (GC_IS_ROOT(dst)) - { - GCOP_WRAP(pGC); - return 0; - } - RL_DEBUG_MSG("polytext8 start "); RootlessStartDrawing((WindowPtr) dst); @@ -1327,7 +1284,6 @@ static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("imagetext16 start "); if (count > 0) { @@ -1380,12 +1336,6 @@ static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC, GCOP_UNWRAP(pGC); - if (GC_IS_ROOT(dst)) - { - GCOP_WRAP(pGC); - return 0; - } - RL_DEBUG_MSG("polytext16 start "); RootlessStartDrawing((WindowPtr) dst); @@ -1423,7 +1373,6 @@ static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("imageglyph start "); if (nglyphInit > 0) { @@ -1484,7 +1433,6 @@ static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, CharInfoPtr *ppci, pointer pglyphBase) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("polyglyph start "); RootlessStartDrawing((WindowPtr) dst); @@ -1530,7 +1478,6 @@ RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, BoxRec box; GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("push pixels start "); RootlessStartDrawing((WindowPtr) dst); diff --git a/xorg-server/miext/rootless/rootlessScreen.c b/xorg-server/miext/rootless/rootlessScreen.c index f40913a6e..b10ca70eb 100644 --- a/xorg-server/miext/rootless/rootlessScreen.c +++ b/xorg-server/miext/rootless/rootlessScreen.c @@ -200,10 +200,10 @@ RootlessGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, x1 = x0 + w; y1 = y0 + h; - x0 = MAX (x0, winRec->x); - y0 = MAX (y0, winRec->y); - x1 = MIN (x1, winRec->x + winRec->width); - y1 = MIN (y1, winRec->y + winRec->height); + x0 = max (x0, winRec->x); + y0 = max (y0, winRec->y); + x1 = min (x1, winRec->x + winRec->width); + y1 = min (y1, winRec->y + winRec->height); sx = x0 - pDrawable->x; sy = y0 - pDrawable->y; @@ -347,10 +347,10 @@ RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, x2 = x1 + glyph->info.width; y2 = y1 + glyph->info.height; - box.x1 = MAX (box.x1, x1); - box.y1 = MAX (box.y1, y1); - box.x2 = MAX (box.x2, x2); - box.y2 = MAX (box.y2, y2); + box.x1 = max (box.x1, x1); + box.y1 = max (box.y1, y1); + box.x2 = max (box.x2, x2); + box.y2 = max (box.y2, y2); x += glyph->info.xOff; y += glyph->info.yOff; @@ -475,14 +475,13 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, return result; } -void expose_1 (WindowPtr pWin) { +static void expose_1 (WindowPtr pWin) { WindowPtr pChild; if (!pWin->realized) return; - (*pWin->drawable.pScreen->PaintWindowBackground) (pWin, &pWin->borderClip, - PW_BACKGROUND); + miPaintWindow(pWin, &pWin->borderClip, PW_BACKGROUND); /* FIXME: comments in windowstr.h indicate that borderClip doesn't include subwindow visibility. But I'm not so sure.. so we may diff --git a/xorg-server/miext/rootless/rootlessValTree.c b/xorg-server/miext/rootless/rootlessValTree.c index 47cd6790b..0ee4919e1 100644 --- a/xorg-server/miext/rootless/rootlessValTree.c +++ b/xorg-server/miext/rootless/rootlessValTree.c @@ -624,7 +624,7 @@ RootlessMiValidateTree (WindowPtr pRoot, /* Parent to validate */ if (pScreen->ClipNotify) (* pScreen->ClipNotify) (pWin, 0, 0); REGION_EMPTY( pScreen, &pWin->borderClip); - pWin->valdata = (ValidatePtr)NULL; + pWin->valdata = NULL; } } } diff --git a/xorg-server/miext/rootless/rootlessWindow.c b/xorg-server/miext/rootless/rootlessWindow.c index 5ce26bd2f..e273d0e38 100644 --- a/xorg-server/miext/rootless/rootlessWindow.c +++ b/xorg-server/miext/rootless/rootlessWindow.c @@ -48,8 +48,6 @@ extern int darwinMainScreenX, darwinMainScreenY; #endif #include "fb.h" -#define AppleWMNumWindowLevels 5 - #include "rootlessCommon.h" #include "rootlessWindow.h" @@ -105,12 +103,6 @@ current_time_in_seconds (void) return t; } */ -static inline Bool -rootlessHasRoot (ScreenPtr pScreen) -{ - return WINREC (WindowTable[pScreen->myNum]) != NULL; -} - void RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state) { @@ -147,7 +139,7 @@ void RootlessNativeWindowMoved (WindowPtr pWin) { mask = CWX | CWY; /* pretend we're the owner of the window! */ - err = dixLookupClient(&pClient, pWin->drawable.id, NullClient, DixUnknownAccess); + err = dixLookupClient(&pClient, pWin->drawable.id, serverClient, DixUnknownAccess); if(err != Success) { ErrorF("RootlessNativeWindowMoved(): Failed to lookup window: 0x%x\n", (unsigned int)pWin->drawable.id); return; @@ -486,6 +478,7 @@ RootlessEnsureFrame(WindowPtr pWin) winRec->is_reorder_pending = FALSE; winRec->pixmap = NULL; winRec->wid = NULL; + winRec->level = 0; SETWINREC(pWin, winRec); diff --git a/xorg-server/miext/shadow/Makefile.in b/xorg-server/miext/shadow/Makefile.in index 6ebea0e82..9fb464429 100644 --- a/xorg-server/miext/shadow/Makefile.in +++ b/xorg-server/miext/shadow/Makefile.in @@ -39,8 +39,11 @@ subdir = miext/shadow DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -106,6 +110,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -126,9 +131,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -157,7 +165,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -166,9 +176,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -207,12 +221,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -232,7 +247,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -242,6 +256,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -255,11 +270,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -295,6 +309,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -319,7 +334,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -342,6 +356,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -373,7 +388,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/miext/shadow/shadow.c b/xorg-server/miext/shadow/shadow.c index 21f1de2d5..608ccd234 100644 --- a/xorg-server/miext/shadow/shadow.c +++ b/xorg-server/miext/shadow/shadow.c @@ -139,7 +139,7 @@ shadowSetup(ScreenPtr pScreen) if (!DamageSetup(pScreen)) return FALSE; - pBuf = (shadowBufPtr) xalloc(sizeof(shadowBufRec)); + pBuf = xalloc(sizeof(shadowBufRec)); if (!pBuf) return FALSE; #ifdef BACKWARDS_COMPATIBILITY @@ -204,7 +204,7 @@ shadowAdd(ScreenPtr pScreen, PixmapPtr pPixmap, ShadowUpdateProc update, pBuf->update = update; pBuf->window = window; pBuf->randr = randr; - pBuf->closure = 0; + pBuf->closure = closure; pBuf->pPixmap = pPixmap; DamageRegister(&pPixmap->drawable, pBuf->pDamage); return TRUE; diff --git a/xorg-server/miext/shadow/shadow.h b/xorg-server/miext/shadow/shadow.h index 2e45df2b5..ef85c0bb9 100644 --- a/xorg-server/miext/shadow/shadow.h +++ b/xorg-server/miext/shadow/shadow.h @@ -74,17 +74,17 @@ typedef struct _shadowBuf { #define SHADOW_REFLECT_Y 32 #define SHADOW_REFLECT_ALL (SHADOW_REFLECT_X|SHADOW_REFLECT_Y) -extern DevPrivateKey shadowScrPrivateKey; +extern _X_EXPORT DevPrivateKey shadowScrPrivateKey; #define shadowGetBuf(pScr) ((shadowBufPtr) \ dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey)) #define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr) #define shadowDamage(pBuf) DamageRegion(pBuf->pDamage) -Bool +extern _X_EXPORT Bool shadowSetup (ScreenPtr pScreen); -Bool +extern _X_EXPORT Bool shadowAdd (ScreenPtr pScreen, PixmapPtr pPixmap, ShadowUpdateProc update, @@ -92,95 +92,92 @@ shadowAdd (ScreenPtr pScreen, int randr, void *closure); -void +extern _X_EXPORT void shadowRemove (ScreenPtr pScreen, PixmapPtr pPixmap); -shadowBufPtr -shadowFindBuf (WindowPtr pWindow); - -Bool +extern _X_EXPORT Bool shadowInit (ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window); -void * +extern _X_EXPORT void * shadowAlloc (int width, int height, int bpp); -void +extern _X_EXPORT void shadowUpdatePacked (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdatePlanar4 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdatePlanar4x8 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotatePacked (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate8_90 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate16_90 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate16_90YX (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate32_90 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate8_180 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate16_180 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate32_180 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate8_270 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate16_270 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate16_270YX (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate32_270 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate8 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate16 (ScreenPtr pScreen, shadowBufPtr pBuf); -void +extern _X_EXPORT void shadowUpdateRotate32 (ScreenPtr pScreen, shadowBufPtr pBuf); typedef void (* shadowUpdateProc)(ScreenPtr, shadowBufPtr); -shadowUpdateProc shadowUpdatePackedWeak(void); -shadowUpdateProc shadowUpdatePlanar4Weak(void); -shadowUpdateProc shadowUpdatePlanar4x8Weak(void); -shadowUpdateProc shadowUpdateRotatePackedWeak(void); +extern _X_EXPORT shadowUpdateProc shadowUpdatePackedWeak(void); +extern _X_EXPORT shadowUpdateProc shadowUpdatePlanar4Weak(void); +extern _X_EXPORT shadowUpdateProc shadowUpdatePlanar4x8Weak(void); +extern _X_EXPORT shadowUpdateProc shadowUpdateRotatePackedWeak(void); #endif /* _SHADOW_H_ */ diff --git a/xorg-server/miext/shadow/shpacked.c b/xorg-server/miext/shadow/shpacked.c index 678f8c629..6736162e2 100644 --- a/xorg-server/miext/shadow/shpacked.c +++ b/xorg-server/miext/shadow/shpacked.c @@ -112,4 +112,7 @@ shadowUpdatePacked (ScreenPtr pScreen, } } -shadowUpdateProc shadowUpdatePackedWeak(void) { return shadowUpdatePacked; } +shadowUpdateProc +shadowUpdatePackedWeak(void) { + return shadowUpdatePacked; +} diff --git a/xorg-server/os/Makefile.in b/xorg-server/os/Makefile.in index 14ece8f09..13a5d616a 100644 --- a/xorg-server/os/Makefile.in +++ b/xorg-server/os/Makefile.in @@ -42,8 +42,11 @@ host_triplet = @host@ subdir = os DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -53,7 +56,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -99,6 +103,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -119,9 +124,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -150,7 +158,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -159,9 +169,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -200,12 +214,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -225,7 +240,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -235,6 +249,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -248,11 +263,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -288,6 +302,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -312,7 +327,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -335,6 +349,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -366,7 +381,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/os/WaitFor.c b/xorg-server/os/WaitFor.c index d6dd99553..dfe85e515 100644 --- a/xorg-server/os/WaitFor.c +++ b/xorg-server/os/WaitFor.c @@ -92,6 +92,8 @@ SOFTWARE. #define GetErrno() errno #endif +/* like ffs, but uses fd_mask instead of int as argument, so it works + when fd_mask is longer than an int, such as common 64-bit platforms */ /* modifications by raphael */ int mffs(fd_mask mask) @@ -109,8 +111,7 @@ mffs(fd_mask mask) } #ifdef DPMSExtension -#define DPMS_SERVER -#include +#include #endif struct _OsTimerRec { @@ -336,7 +337,7 @@ WaitForSomething(int *pClientsReady) { int client_priority, client_index; - curclient = ffs (clientsReadable.fds_bits[i]) - 1; + curclient = mffs (clientsReadable.fds_bits[i]) - 1; client_index = /* raphael: modified */ ConnectionTranslation[curclient + (i * (sizeof(fd_mask) * 8))]; #else @@ -421,7 +422,7 @@ DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev) TimerSet(timer, 0, newTime, timer->callback, timer->arg); } -_X_EXPORT OsTimerPtr +OsTimerPtr TimerSet(OsTimerPtr timer, int flags, CARD32 millis, OsTimerCallback func, pointer arg) { @@ -430,7 +431,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis, if (!timer) { - timer = (OsTimerPtr)xalloc(sizeof(struct _OsTimerRec)); + timer = xalloc(sizeof(struct _OsTimerRec)); if (!timer) return NULL; } @@ -492,7 +493,7 @@ TimerForce(OsTimerPtr timer) } -_X_EXPORT void +void TimerCancel(OsTimerPtr timer) { OsTimerPtr *prev; @@ -509,7 +510,7 @@ TimerCancel(OsTimerPtr timer) } } -_X_EXPORT void +void TimerFree(OsTimerPtr timer) { if (!timer) diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c index 50fc5f9f2..8c5b50af0 100644 --- a/xorg-server/os/access.c +++ b/xorg-server/os/access.c @@ -216,7 +216,7 @@ typedef struct _host { int requested; } HOST; -#define MakeHost(h,l) (h)=(HOST *) xalloc(sizeof *(h)+(l));\ +#define MakeHost(h,l) (h)=xalloc(sizeof *(h)+(l));\ if (h) { \ (h)->addr=(unsigned char *) ((h) + 1);\ (h)->requested = FALSE; \ @@ -415,8 +415,7 @@ DefineSelf (int fd) */ if (family == FamilyInternet && !(len == 4 && - ((addr[0] == 127 && addr[1] == 0 && - addr[2] == 0 && addr[3] == 1) || + ((addr[0] == 127) || (addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] == 0))) ) @@ -1095,7 +1094,7 @@ ResetHosts (char *display) } /* Is client on the local host */ -_X_EXPORT Bool LocalClient(ClientPtr client) +Bool LocalClient(ClientPtr client) { int alen, family, notused; Xtransaddr *from = NULL; @@ -1109,12 +1108,12 @@ _X_EXPORT Bool LocalClient(ClientPtr client) &alen, (pointer *)&addr); if (family == -1) { - xfree ((char *) from); + xfree (from); return FALSE; } if (family == FamilyLocal) { - xfree ((char *) from); + xfree (from); return TRUE; } for (host = selfhosts; host; host = host->next) @@ -1122,7 +1121,7 @@ _X_EXPORT Bool LocalClient(ClientPtr client) if (addrEqual (family, addr, alen, host)) return TRUE; } - xfree ((char *) from); + xfree (from); } return FALSE; } @@ -1458,11 +1457,11 @@ GetHosts ( for (host = validhosts; host; host = host->next) { nHosts++; - n += (((host->len + 3) >> 2) << 2) + sizeof(xHostEntry); + n += pad_to_int32(host->len) + sizeof(xHostEntry); } if (n) { - *data = ptr = (pointer) xalloc (n); + *data = ptr = xalloc (n); if (!ptr) { return(BadAlloc); @@ -1474,7 +1473,7 @@ GetHosts ( ((xHostEntry *)ptr)->length = len; ptr += sizeof(xHostEntry); acopy (host->addr, ptr, len); - ptr += ((len + 3) >> 2) << 2; + ptr += pad_to_int32(len); } } else { *data = NULL; @@ -1721,7 +1720,7 @@ siTypeAdd(const char *typeName, siAddrMatchFunc addrMatch, } } - s = (struct siType *) xalloc(sizeof(struct siType)); + s = xalloc(sizeof(struct siType)); if (s == NULL) return BadAlloc; diff --git a/xorg-server/os/backtrace.c b/xorg-server/os/backtrace.c index b52dcded8..a421140fb 100644 --- a/xorg-server/os/backtrace.c +++ b/xorg-server/os/backtrace.c @@ -2,22 +2,23 @@ * Copyright 2008 Red Hat, Inc. * * 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 - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * them Software is furnished to do so, subject to the following conditions: + * 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 MERCHANTIBILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS 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. + * 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. */ #ifdef HAVE_DIX_CONFIG_H @@ -28,19 +29,30 @@ #include "misc.h" #ifdef HAVE_BACKTRACE +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include #include void xorg_backtrace(void) { - void *array[32]; /* deeper nesting than this means something's wrong */ - size_t size, i; - char **strings; + void *array[64]; + char *mod; + int size, i; + Dl_info info; ErrorF("\nBacktrace:\n"); - size = backtrace(array, 32); - strings = backtrace_symbols(array, size); - for (i = 0; i < size; i++) - ErrorF("%d: %s\n", i, strings[i]); - free(strings); + size = backtrace(array, 64); + for (i = 0; i < size; i++) { + dladdr(array[i], &info); + mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)"; + if (info.dli_saddr) + ErrorF("%d: %s (%s+0x%lx) [%p]\n", i, mod, + info.dli_sname, array[i] - info.dli_saddr, array[i]); + else + ErrorF("%d: %s (%p+0x%lx) [%p]\n", i, mod, + info.dli_fbase, array[i] - info.dli_fbase, array[i]); + } } #else /* not glibc or glibc < 2.1 */ diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c index 8f1f73e43..3ff93bbb6 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -146,7 +146,7 @@ Bool NewOutputPending; /* not yet attempted to write some new output */ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */ static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ -Bool PartialNetwork; /* continue even if unable to bind all addrs */ +Bool PartialNetwork; /* continue even if unable to bind all addrs */ static Pid_t ParentProcess; static Bool debug_conns = FALSE; @@ -156,7 +156,7 @@ static fd_set GrabImperviousClients; static fd_set SavedAllClients; static fd_set SavedAllSockets; static fd_set SavedClientsWithInput; -_X_EXPORT int GrabInProgress = 0; +int GrabInProgress = 0; #if !defined(WIN32) int *ConnectionTranslation = NULL; @@ -172,7 +172,6 @@ int *ConnectionTranslation = NULL; #define MAXSOCKS 500 #undef MAXSELECT #define MAXSELECT 500 -#define MAXFD 500 struct _ct_node { struct _ct_node *next; @@ -227,7 +226,7 @@ void SetConnectionTranslation(int conn, int client) } node = &((*node)->next); } - *node = (struct _ct_node*)xalloc(sizeof(struct _ct_node)); + *node = xalloc(sizeof(struct _ct_node)); (*node)->next = NULL; (*node)->key = conn; (*node)->value = client; @@ -346,15 +345,6 @@ InitParentProcess(void) RunFromSmartParent = TRUE; OsSignal(SIGUSR1, handler); ParentProcess = getppid (); -#ifdef __UNIXOS2__ - /* - * fg030505: under OS/2, xinit is not the parent process but - * the "grant parent" process of the server because execvpe() - * presents us an additional process number; - * GetPPID(pid) is part of libemxfix - */ - ParentProcess = GetPPID (ParentProcess); -#endif /* __UNIXOS2__ */ #endif } @@ -407,7 +397,7 @@ CreateWellKnownSockets(void) } else { - ListenTransFds = (int *) xalloc (ListenTransCount * sizeof (int)); + ListenTransFds = xalloc (ListenTransCount * sizeof (int)); for (i = 0; i < ListenTransCount; i++) { @@ -645,7 +635,7 @@ AuthorizationIDOfClient(ClientPtr client) * *****************************************************************/ -char * +char * ClientAuthorized(ClientPtr client, unsigned int proto_n, char *auth_proto, unsigned int string_n, char *auth_string) @@ -689,7 +679,7 @@ ClientAuthorized(ClientPtr client, proto_n, auth_proto, auth_id); } - xfree ((char *) from); + xfree (from); } if (auth_id == (XID) ~0L) { @@ -711,7 +701,7 @@ ClientAuthorized(ClientPtr client, AuthAudit(client, TRUE, (struct sockaddr *) from, fromlen, proto_n, auth_proto, auth_id); - xfree ((char *) from); + xfree (from); } } priv->auth_id = auth_id; @@ -747,7 +737,7 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time) #endif ) return NullClient; - oc = (OsCommPtr)xalloc(sizeof(OsCommRec)); + oc = xalloc(sizeof(OsCommRec)); if (!oc) return NullClient; oc->trans_conn = trans_conn; @@ -837,7 +827,7 @@ EstablishNewConnections(ClientPtr clientUnused, pointer closure) int status; #ifndef WIN32 - curconn = ffs (readyconnections.fds_bits[i]) - 1; + curconn = mffs (readyconnections.fds_bits[i]) - 1; readyconnections.fds_bits[i] &= ~((fd_mask)1 << curconn); curconn += (i * (sizeof(fd_mask)*8)); #else @@ -1002,7 +992,7 @@ CheckConnections(void) mask = AllClients.fds_bits[i]; while (mask) { - curoff = ffs (mask) - 1; + curoff = mffs (mask) - 1; curclient = curoff + (i * (sizeof(fd_mask)*8)); FD_ZERO(&tmask); FD_SET(curclient, &tmask); @@ -1056,7 +1046,7 @@ CloseDownConnection(ClientPtr client) AuditF("client %d disconnected\n", client->index); } -_X_EXPORT void +void AddGeneralSocket(int fd) { FD_SET(fd, &AllSockets); @@ -1064,14 +1054,14 @@ AddGeneralSocket(int fd) FD_SET(fd, &SavedAllSockets); } -_X_EXPORT void +void AddEnabledDevice(int fd) { FD_SET(fd, &EnabledDevices); AddGeneralSocket(fd); } -_X_EXPORT void +void RemoveGeneralSocket(int fd) { FD_CLR(fd, &AllSockets); @@ -1079,7 +1069,7 @@ RemoveGeneralSocket(int fd) FD_CLR(fd, &SavedAllSockets); } -_X_EXPORT void +void RemoveEnabledDevice(int fd) { FD_CLR(fd, &EnabledDevices); @@ -1151,7 +1141,7 @@ ListenToAllClients(void) * Must have cooresponding call to AttendClient. ****************/ -_X_EXPORT void +void IgnoreClient (ClientPtr client) { OsCommPtr oc = (OsCommPtr)client->osPrivate; @@ -1186,7 +1176,7 @@ IgnoreClient (ClientPtr client) * Adds one client back into the input masks. ****************/ -_X_EXPORT void +void AttendClient (ClientPtr client) { OsCommPtr oc = (OsCommPtr)client->osPrivate; @@ -1260,7 +1250,7 @@ MakeClientGrabPervious(ClientPtr client) #ifdef XQUARTZ /* Add a fd (from launchd) to our listeners */ -_X_EXPORT void ListenOnOpenFD(int fd, int noxauth) { +void ListenOnOpenFD(int fd, int noxauth) { char port[256]; XtransConnInfo ciptr; diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c index f07993e5a..64b64ae75 100644 --- a/xorg-server/os/io.c +++ b/xorg-server/os/io.c @@ -73,7 +73,6 @@ SOFTWARE. #include #endif #include -#define NEED_REPLIES #include #include "os.h" #include "osdep.h" @@ -82,8 +81,8 @@ SOFTWARE. #include "dixstruct.h" #include "misc.h" -_X_EXPORT CallbackListPtr ReplyCallback; -_X_EXPORT CallbackListPtr FlushCallback; +CallbackListPtr ReplyCallback; +CallbackListPtr FlushCallback; static ConnectionInputPtr AllocateInputBuffer(void); static ConnectionOutputPtr AllocateOutputBuffer(void); @@ -106,7 +105,7 @@ static OsCommPtr AvailableInput = (OsCommPtr)NULL; #define get_req_len(req,cli) ((cli)->swapped ? \ lswaps((req)->length) : (req)->length) -#include +#include #define get_big_req_len(req,cli) ((cli)->swapped ? \ lswapl(((xBigReq *)(req))->length) : \ @@ -274,7 +273,7 @@ ReadRequestFromClient(ClientPtr client) if (gotnow < sizeof(xBigReq)) { /* Still need more data to tell just how big. */ - needed = sizeof(xBigReq) >> 2; /* needed is in CARD32s now */ + needed = bytes_to_int32(sizeof(xBigReq)); /* needed is in CARD32s now */ need_header = TRUE; } else @@ -378,7 +377,7 @@ ReadRequestFromClient(ClientPtr client) { move_header = TRUE; if (gotnow < sizeof(xBigReq)) - needed = sizeof(xBigReq) >> 2; + needed = bytes_to_int32(sizeof(xBigReq)); else needed = get_big_req_len(request, client); } @@ -446,7 +445,7 @@ ReadRequestFromClient(ClientPtr client) oci->bufptr += (sizeof(xBigReq) - sizeof(xReq)); *(xReq *)oci->bufptr = *request; oci->lenLastReq -= (sizeof(xBigReq) - sizeof(xReq)); - client->req_len -= (sizeof(xBigReq) - sizeof(xReq)) >> 2; + client->req_len -= bytes_to_int32(sizeof(xBigReq) - sizeof(xReq)); } client->requestBuffer = (pointer)oci->bufptr; #ifdef DEBUG_COMMUNICATION @@ -539,7 +538,7 @@ InsertFakeRequest(ClientPtr client, char *data, int count) * **********************/ -_X_EXPORT void +void ResetCurrentRequest(ClientPtr client) { OsCommPtr oc = (OsCommPtr)client->osPrivate; @@ -679,7 +678,7 @@ FlushIfCriticalOutputPending(void) FlushAllOutput(); } -_X_EXPORT void +void SetCriticalOutputPending(void) { CriticalOutputPending = TRUE; @@ -696,7 +695,7 @@ SetCriticalOutputPending(void) * this routine as int. *****************/ -_X_EXPORT int +int WriteToClient (ClientPtr who, int count, const void *__buf) { OsCommPtr oc = (OsCommPtr)who->osPrivate; @@ -1012,14 +1011,14 @@ AllocateInputBuffer(void) { ConnectionInputPtr oci; - oci = (ConnectionInputPtr)xalloc(sizeof(ConnectionInput)); + oci = xalloc(sizeof(ConnectionInput)); if (!oci) - return (ConnectionInputPtr)NULL; - oci->buffer = (char *)xalloc(BUFSIZE); + return NULL; + oci->buffer = xalloc(BUFSIZE); if (!oci->buffer) { xfree(oci); - return (ConnectionInputPtr)NULL; + return NULL; } oci->size = BUFSIZE; oci->bufptr = oci->buffer; @@ -1033,14 +1032,14 @@ AllocateOutputBuffer(void) { ConnectionOutputPtr oco; - oco = (ConnectionOutputPtr)xalloc(sizeof(ConnectionOutput)); + oco = xalloc(sizeof(ConnectionOutput)); if (!oco) - return (ConnectionOutputPtr)NULL; - oco->buf = (unsigned char *) xcalloc(1, BUFSIZE); + return NULL; + oco->buf = xcalloc(1, BUFSIZE); if (!oco->buf) { xfree(oco); - return (ConnectionOutputPtr)NULL; + return NULL; } oco->size = BUFSIZE; oco->count = 0; diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c index 692e78ad3..8108890b6 100644 --- a/xorg-server/os/log.c +++ b/xorg-server/os/log.c @@ -98,6 +98,10 @@ OR PERFORMANCE OF THIS SOFTWARE. #define getpid(x) _getpid(x) #endif +#ifdef XF86BIGFONT +#define _XF86BIGFONT_SERVER_ +#include +#endif #ifdef DDXOSVERRORF void (*OsVendorVErrorFProc)(const char *, va_list args) = NULL; @@ -249,7 +253,7 @@ LogSetParameter(LogParameter param, int value) /* This function does the actual log message writes. */ -_X_EXPORT void +void LogVWrite(int verb, const char *f, va_list args) { static char tmpBuffer[1024]; @@ -298,7 +302,7 @@ LogVWrite(int verb, const char *f, va_list args) } } -_X_EXPORT void +void LogWrite(int verb, const char *f, ...) { va_list args; @@ -308,7 +312,7 @@ LogWrite(int verb, const char *f, ...) va_end(args); } -_X_EXPORT void +void LogVMessageVerb(MessageType type, int verb, const char *format, va_list args) { const char *s = X_UNKNOWN_STRING; @@ -363,7 +367,7 @@ LogVMessageVerb(MessageType type, int verb, const char *format, va_list args) } /* Log message with verbosity level specified. */ -_X_EXPORT void +void LogMessageVerb(MessageType type, int verb, const char *format, ...) { va_list ap; @@ -374,7 +378,7 @@ LogMessageVerb(MessageType type, int verb, const char *format, ...) } /* Log a message with the standard verbosity level of 1. */ -_X_EXPORT void +void LogMessage(MessageType type, const char *format, ...) { va_list ap; @@ -391,6 +395,9 @@ void AbortServer(void) __attribute__((noreturn)); void AbortServer(void) { +#ifdef XF86BIGFONT + XF86BigfontCleanup(); +#endif CloseWellKnownConnections(); OsCleanup(TRUE); CloseDownDevices(); @@ -410,7 +417,7 @@ static int nrepeat = 0; static int oldlen = -1; static OsTimerPtr auditTimer = NULL; -void +void FreeAuditTimer(void) { if (auditTimer != NULL) { @@ -500,7 +507,7 @@ VAuditF(const char *f, va_list args) free(prefix); } -_X_EXPORT void +void FatalError(const char *f, ...) { va_list args; @@ -525,7 +532,7 @@ FatalError(const char *f, ...) /*NOTREACHED*/ } -_X_EXPORT void +void VErrorF(const char *f, va_list args) { #ifdef DDXOSVERRORF @@ -538,7 +545,7 @@ VErrorF(const char *f, va_list args) #endif } -_X_EXPORT void +void ErrorF(const char * f, ...) { va_list args; @@ -550,7 +557,7 @@ ErrorF(const char * f, ...) /* A perror() workalike. */ -_X_EXPORT void +void Error(char *str) { char *err = NULL; diff --git a/xorg-server/os/mitauth.c b/xorg-server/os/mitauth.c index db66c44fb..a7968cbd7 100644 --- a/xorg-server/os/mitauth.c +++ b/xorg-server/os/mitauth.c @@ -55,10 +55,10 @@ MitAddCookie ( { struct auth *new; - new = (struct auth *) xalloc (sizeof (struct auth)); + new = xalloc (sizeof (struct auth)); if (!new) return 0; - new->data = (char *) xalloc ((unsigned) data_length); + new->data = xalloc ((unsigned) data_length); if (!new->data) { xfree(new); return 0; diff --git a/xorg-server/os/osdep.h b/xorg-server/os/osdep.h index e719f9a70..3d75bbaab 100644 --- a/xorg-server/os/osdep.h +++ b/xorg-server/os/osdep.h @@ -56,7 +56,9 @@ SOFTWARE. #define BUFSIZE 4096 #define BUFWATERMARK 8192 +#if defined(XDMCP) || defined(HASXDMAUTH) #include +#endif #ifdef _POSIX_SOURCE #include @@ -109,9 +111,11 @@ SOFTWARE. #include +#if defined(XDMCP) || defined(HASXDMAUTH) typedef Bool (*ValidatorFunc)(ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type); typedef Bool (*GeneratorFunc)(ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type); typedef Bool (*AddAuthorFunc)(unsigned name_length, char *name, unsigned data_length, char *data); +#endif typedef struct _connectionInput { struct _connectionInput *next; @@ -204,7 +208,7 @@ extern Bool AnyClientsWriteBlocked; extern WorkQueuePtr workQueue; -/* added by raphael */ +/* in WaitFor.c */ #ifdef WIN32 typedef long int fd_mask; #endif @@ -244,6 +248,7 @@ extern int SecureRPCRemove (AuthRemCArgs); extern int SecureRPCReset (AuthRstCArgs); #endif +#ifdef XDMCP /* in xdmcp.c */ extern void XdmcpUseMsg (void); extern int XdmcpOptions(int argc, char **argv, int i); @@ -268,6 +273,7 @@ extern void XdmcpRegisterAuthentication ( struct sockaddr_in; extern void XdmcpRegisterBroadcastAddress (struct sockaddr_in *addr); +#endif #ifdef HASXDMAUTH extern void XdmAuthenticationInit (char *cookie, int cookie_length); diff --git a/xorg-server/os/osinit.c b/xorg-server/os/osinit.c index 74e2457f2..e8fcd4540 100644 --- a/xorg-server/os/osinit.c +++ b/xorg-server/os/osinit.c @@ -54,6 +54,15 @@ SOFTWARE. #include "os.h" #include "osdep.h" #include +#include +#include +#ifdef HAVE_DLFCN_H +# include +#endif +#ifdef HAVE_BACKTRACE +#include +#endif + #include "dixstruct.h" @@ -88,6 +97,66 @@ int limitStackSpace = -1; int limitNoFile = -1; #endif +static OsSigWrapperPtr OsSigWrapper = NULL; + +OsSigWrapperPtr +OsRegisterSigWrapper(OsSigWrapperPtr newSigWrapper) +{ + OsSigWrapperPtr oldSigWrapper = OsSigWrapper; + + OsSigWrapper = newSigWrapper; + + return oldSigWrapper; +} + +/* + * OsSigHandler -- + * Catch unexpected signals and exit or continue cleanly. + */ +static void +#ifdef SA_SIGINFO +OsSigHandler(int signo, siginfo_t *sip, void *unused) +#else +OsSigHandler(int signo) +#endif +{ +#ifdef RTLD_DI_SETSIGNAL + const char *dlerr = dlerror(); + + if (dlerr) { + LogMessage(X_ERROR, "Dynamic loader error: %s\n", dlerr); + } +#endif /* RTLD_DI_SETSIGNAL */ + + if (OsSigWrapper != NULL) { + if (OsSigWrapper(signo) == 0) { + /* ddx handled signal and wants us to continue */ + return; + } + } + + /* log, cleanup, and abort */ + xorg_backtrace(); + +#ifdef SA_SIGINFO + if (sip->si_code == SI_USER) { + ErrorF("Recieved signal %d sent by process %ld, uid %ld\n", + signo, (long) sip->si_pid, (long) sip->si_uid); + } else { + switch (signo) { + case SIGSEGV: + case SIGBUS: + case SIGILL: + case SIGFPE: + ErrorF("%s at address %p\n", strsignal(signo), sip->si_addr); + } + } +#endif + + FatalError("Caught signal %d (%s). Server aborting\n", + signo, strsignal(signo)); +} + void OsInit(void) { @@ -96,11 +165,57 @@ OsInit(void) static char* devnull = "/dev/null"; char fname[PATH_MAX]; -#ifdef macII - set42sig(); + if (!been_here) { + struct sigaction act, oact; + int i; + int siglist[] = { SIGSEGV, SIGQUIT, SIGILL, SIGFPE, SIGBUS, +#ifdef SIGSYS + SIGSYS, +#endif +#ifdef SIGXCPU + SIGXCPU, +#endif +#ifdef SIGXFSZ + SIGXFSZ, +#endif +#ifdef SIGEMT + SIGEMT, +#endif + 0 /* must be last */ }; + sigemptyset(&act.sa_mask); +#ifdef SA_SIGINFO + act.sa_sigaction = OsSigHandler; + act.sa_flags = SA_SIGINFO; +#else + act.sa_handler = OsSigHandler; + act.sa_flags = 0; +#endif + for (i = 0; siglist[i] != 0; i++) { + if (sigaction(siglist[i], &act, &oact)) { + ErrorF("failed to install signal handler for signal %d: %s\n", + siglist[i], strerror(errno)); + } + } +#ifdef HAVE_BACKTRACE + /* + * initialize the backtracer, since the ctor calls dlopen(), which + * calls malloc(), which isn't signal-safe. + */ + do { + void *array; + backtrace(&array, 1); + } while (0); +#endif + +#ifdef RTLD_DI_SETSIGNAL + /* Tell runtime linker to send a signal we can catch instead of SIGKILL + * for failures to load libraries/modules at runtime so we can clean up + * after ourselves. + */ + int failure_signal = SIGQUIT; + dlinfo(RTLD_SELF, RTLD_DI_SETSIGNAL, &failure_signal); #endif - if (!been_here) { #if !defined(__SCO__) && !defined(__CYGWIN__) && !defined(__UNIXWARE__) fclose(stdin); fclose(stdout); diff --git a/xorg-server/os/rpcauth.c b/xorg-server/os/rpcauth.c index 1a27c5882..5ddbe210b 100644 --- a/xorg-server/os/rpcauth.c +++ b/xorg-server/os/rpcauth.c @@ -66,7 +66,7 @@ authdes_ezdecode(char *inmsg, int len) XDR xdr; SVCXPRT xprt; - temp_inmsg = (char *) xalloc(len); + temp_inmsg = xalloc(len); memmove(temp_inmsg, inmsg, len); memset((char *)&msg, 0, sizeof(msg)); @@ -79,7 +79,7 @@ authdes_ezdecode(char *inmsg, int len) why = AUTH_FAILED; xdrmem_create(&xdr, temp_inmsg, len, XDR_DECODE); - if ((r.rq_clntcred = (caddr_t) xalloc(MAX_AUTH_BYTES)) == NULL) + if ((r.rq_clntcred = xalloc(MAX_AUTH_BYTES)) == NULL) goto bad1; r.rq_xprt = &xprt; diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index b1009494b..3718b170c 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -56,6 +56,11 @@ OR PERFORMANCE OF THIS SOFTWARE. #ifdef __CYGWIN__ #include #include +/* + Sigh... We really need a prototype for this to know it is stdcall, + but #include-ing here is not a good idea... +*/ +__stdcall unsigned long GetTickCount(void); #endif #if defined(WIN32) && !defined(__CYGWIN__) @@ -113,85 +118,82 @@ OR PERFORMANCE OF THIS SOFTWARE. #include "dixstruct.h" -#ifdef XKB -#include -#endif +#include "xkbsrv.h" #ifdef RENDER #include "picture.h" #endif -_X_EXPORT Bool noTestExtensions; +Bool noTestExtensions; #ifdef COMPOSITE -_X_EXPORT Bool noCompositeExtension = FALSE; +Bool noCompositeExtension = FALSE; #endif #ifdef DAMAGE -_X_EXPORT Bool noDamageExtension = FALSE; +Bool noDamageExtension = FALSE; #endif #ifdef DBE -_X_EXPORT Bool noDbeExtension = FALSE; +Bool noDbeExtension = FALSE; #endif #ifdef DPMSExtension -_X_EXPORT Bool noDPMSExtension = FALSE; +Bool noDPMSExtension = FALSE; #endif #ifdef GLXEXT -_X_EXPORT Bool noGlxExtension = FALSE; -_X_EXPORT Bool noGlxVisualInit = FALSE; +Bool noGlxExtension = FALSE; +Bool noGlxVisualInit = FALSE; #endif #ifdef SCREENSAVER -_X_EXPORT Bool noScreenSaverExtension = FALSE; +Bool noScreenSaverExtension = FALSE; #endif #ifdef MITSHM -_X_EXPORT Bool noMITShmExtension = FALSE; +Bool noMITShmExtension = FALSE; #endif #ifdef MULTIBUFFER -_X_EXPORT Bool noMultibufferExtension = FALSE; +Bool noMultibufferExtension = FALSE; #endif #ifdef RANDR -_X_EXPORT Bool noRRExtension = FALSE; +Bool noRRExtension = FALSE; #endif #ifdef RENDER -_X_EXPORT Bool noRenderExtension = FALSE; +Bool noRenderExtension = FALSE; #endif #ifdef XCSECURITY -_X_EXPORT Bool noSecurityExtension = FALSE; +Bool noSecurityExtension = FALSE; #endif #ifdef RES -_X_EXPORT Bool noResExtension = FALSE; +Bool noResExtension = FALSE; #endif #ifdef XF86BIGFONT -_X_EXPORT Bool noXFree86BigfontExtension = FALSE; +Bool noXFree86BigfontExtension = FALSE; #endif #ifdef XFreeXDGA -_X_EXPORT Bool noXFree86DGAExtension = FALSE; +Bool noXFree86DGAExtension = FALSE; #endif #ifdef XF86DRI -_X_EXPORT Bool noXFree86DRIExtension = FALSE; +Bool noXFree86DRIExtension = FALSE; #endif #ifdef XF86VIDMODE -_X_EXPORT Bool noXFree86VidModeExtension = FALSE; +Bool noXFree86VidModeExtension = FALSE; #endif #ifdef XFIXES -_X_EXPORT Bool noXFixesExtension = FALSE; +Bool noXFixesExtension = FALSE; #endif -/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */ #ifdef PANORAMIX /* Xinerama is disabled by default unless enabled via +xinerama */ -_X_EXPORT Bool noPanoramiXExtension = TRUE; +Bool noPanoramiXExtension = TRUE; #endif #ifdef XSELINUX -_X_EXPORT Bool noSELinuxExtension = FALSE; -_X_EXPORT int selinuxEnforcingState = SELINUX_MODE_DEFAULT; +Bool noSELinuxExtension = FALSE; +int selinuxEnforcingState = SELINUX_MODE_DEFAULT; #endif #ifdef XV -_X_EXPORT Bool noXvExtension = FALSE; +Bool noXvExtension = FALSE; #endif #ifdef DRI2 -_X_EXPORT Bool noDRI2Extension = FALSE; +Bool noDRI2Extension = FALSE; #endif -_X_EXPORT Bool noGEExtension = FALSE; +Bool noGEExtension = FALSE; #define X_INCLUDE_NETDB_H #include @@ -213,9 +215,7 @@ int auditTrailLevel = 1; static char *dev_tty_from_init = NULL; /* since we need to parse it anyway */ OsSigHandlerPtr -OsSignal(sig, handler) - int sig; - OsSigHandlerPtr handler; +OsSignal(int sig, OsSigHandlerPtr handler) { struct sigaction act, oact; @@ -400,8 +400,7 @@ UnlockServer(void) /* Force connections to close on SIGHUP from init */ -/*ARGSUSED*/ -SIGVAL +void AutoResetServer (int sig) { int olderrno = errno; @@ -413,8 +412,7 @@ AutoResetServer (int sig) /* Force connections to close and then exit on SIGTERM, SIGINT */ -/*ARGSUSED*/ -_X_EXPORT SIGVAL +void GiveUp(int sig) { int olderrno = errno; @@ -424,14 +422,14 @@ GiveUp(int sig) errno = olderrno; } -#if defined WIN32 && defined __MINGW32__ -_X_EXPORT CARD32 +#if (defined WIN32 && defined __MINGW32__) || defined(__CYGWIN__) +CARD32 GetTimeInMillis (void) { return GetTickCount (); } #else -_X_EXPORT CARD32 +CARD32 GetTimeInMillis(void) { struct timeval tv; @@ -447,7 +445,7 @@ GetTimeInMillis(void) } #endif -_X_EXPORT void +void AdjustWaitForDelay (pointer waitTime, unsigned long newdelay) { static struct timeval delay_val; @@ -484,10 +482,10 @@ void UseMsg(void) ErrorF("-c turns off key-click\n"); ErrorF("c # key-click volume (0-100)\n"); ErrorF("-cc int default color visual class\n"); + ErrorF("-nocursor disable the cursor\n"); ErrorF("-core generate core dump on fatal error\n"); ErrorF("-dpi int screen resolution in dots per inch\n"); #ifdef DPMSExtension - ErrorF("dpms enables VESA DPMS monitor control\n"); ErrorF("-dpms disables VESA DPMS monitor control\n"); #endif ErrorF("-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs\n"); @@ -535,7 +533,6 @@ void UseMsg(void) ErrorF("-v screen-saver without video blanking\n"); ErrorF("-wm WhenMapped default backing-store\n"); ErrorF("-wr create root window with white background\n"); - ErrorF("-x string loads named extension at init time \n"); ErrorF("-maxbigreqsize set maximal bigrequest size \n"); #ifdef PANORAMIX ErrorF("+xinerama Enable XINERAMA extension\n"); @@ -548,9 +545,7 @@ void UseMsg(void) #ifdef XDMCP XdmcpUseMsg(); #endif -#ifdef XKB XkbUseMsg(); -#endif ddxUseMsg(); } @@ -658,15 +653,19 @@ ProcessCommandLine(int argc, char *argv[]) } else if ( strcmp( argv[i], "-core") == 0) { - CoreDump = TRUE; #if !defined(WIN32) || !defined(__MINGW32__) struct rlimit core_limit; getrlimit (RLIMIT_CORE, &core_limit); core_limit.rlim_cur = core_limit.rlim_max; setrlimit (RLIMIT_CORE, &core_limit); #endif + CoreDump = TRUE; } - else if ( strcmp( argv[i], "-dpi") == 0) + else if ( strcmp( argv[i], "-nocursor") == 0) + { + EnableCursor = FALSE; + } + else if ( strcmp( argv[i], "-dpi") == 0) { if(++i < argc) monitorResolution = atoi(argv[i]); @@ -675,7 +674,7 @@ ProcessCommandLine(int argc, char *argv[]) } #ifdef DPMSExtension else if ( strcmp( argv[i], "dpms") == 0) - DPMSEnabledSwitch = TRUE; + /* ignored for compatibility */ ; else if ( strcmp( argv[i], "-dpms") == 0) DPMSDisabledSwitch = TRUE; #endif @@ -719,13 +718,11 @@ ProcessCommandLine(int argc, char *argv[]) UseMsg(); exit(0); } -#ifdef XKB else if ( (skip=XkbProcessArguments(argc,argv,i))!=0 ) { if (skip>0) i+= skip-1; else UseMsg(); } -#endif #ifdef RLIMIT_DATA else if ( strcmp( argv[i], "-ld") == 0) { @@ -888,14 +885,6 @@ ProcessCommandLine(int argc, char *argv[]) PanoramiXExtensionDisabledHack = TRUE; } #endif - else if ( strcmp( argv[i], "-x") == 0) - { - if(++i >= argc) - UseMsg(); - /* For U**x, which doesn't support dynamic loading, there's nothing - * to do when we see a -x. Either the extension is linked in or - * it isn't */ - } else if ( strcmp( argv[i], "-I") == 0) { /* ignore all remaining arguments */ @@ -1049,7 +1038,7 @@ set_font_authorizations(char **authorizations, int *authlen, pointer client) #ifndef INTERNAL_MALLOC -_X_EXPORT void * +void * Xalloc(unsigned long amount) { void *ptr; @@ -1068,7 +1057,7 @@ Xalloc(unsigned long amount) * "no failure" realloc *****************/ -_X_EXPORT void * +void * XNFalloc(unsigned long amount) { void *ptr; @@ -1087,7 +1076,7 @@ XNFalloc(unsigned long amount) * Xcalloc *****************/ -_X_EXPORT void * +void * Xcalloc(unsigned long amount) { void *ret; @@ -1102,7 +1091,7 @@ Xcalloc(unsigned long amount) * XNFcalloc *****************/ -_X_EXPORT void * +void * XNFcalloc(unsigned long amount) { void *ret; @@ -1119,7 +1108,7 @@ XNFcalloc(unsigned long amount) * Xrealloc *****************/ -_X_EXPORT void * +void * Xrealloc(pointer ptr, unsigned long amount) { if ((long)amount <= 0) @@ -1142,7 +1131,7 @@ Xrealloc(pointer ptr, unsigned long amount) * "no failure" realloc *****************/ -_X_EXPORT void * +void * XNFrealloc(pointer ptr, unsigned long amount) { if ((ptr = Xrealloc(ptr, amount)) == NULL) @@ -1158,7 +1147,7 @@ XNFrealloc(pointer ptr, unsigned long amount) * calls free *****************/ -_X_EXPORT void +void Xfree(pointer ptr) { if (ptr) @@ -1182,7 +1171,7 @@ Xstrdup(const char *s) } -_X_EXPORT char * +char * XNFstrdup(const char *s) { char *sd; @@ -1408,7 +1397,7 @@ Popen(char *command, char *type) if ((*type != 'r' && *type != 'w') || type[1]) return NULL; - if ((cur = (struct pid *)xalloc(sizeof(struct pid))) == NULL) + if ((cur = xalloc(sizeof(struct pid))) == NULL) return NULL; if (pipe(pdes) < 0) { @@ -1494,7 +1483,7 @@ Fopen(char *file, char *type) if ((*type != 'r' && *type != 'w') || type[1]) return NULL; - if ((cur = (struct pid *)xalloc(sizeof(struct pid))) == NULL) + if ((cur = xalloc(sizeof(struct pid))) == NULL) return NULL; if (pipe(pdes) < 0) { @@ -1613,7 +1602,7 @@ Pclose(pointer iop) return pid == -1 ? -1 : pstat; } -int +int Fclose(pointer iop) { #ifdef HAS_SAVED_IDS_AND_SETEUID diff --git a/xorg-server/os/xdmauth.c b/xorg-server/os/xdmauth.c index 8cbcd581f..e19e4f93d 100644 --- a/xorg-server/os/xdmauth.c +++ b/xorg-server/os/xdmauth.c @@ -259,7 +259,7 @@ XdmAuthorizationValidate (unsigned char *plain, int length, *reason = "Bad XDM authorization key length"; return NULL; } - client = (XdmClientAuthPtr) xalloc (sizeof (XdmClientAuthRec)); + client = xalloc (sizeof (XdmClientAuthRec)); if (!client) return NULL; XdmClientAuthDecode (plain, client); @@ -363,7 +363,7 @@ XdmAddCookie (unsigned short data_length, char *data, XID id) /* the first octet of the key must be zero */ if (key_bits[0] != '\0') return 0; - new = (XdmAuthorizationPtr) xalloc (sizeof (XdmAuthorizationRec)); + new = xalloc (sizeof (XdmAuthorizationRec)); if (!new) return 0; new->next = xdmAuth; @@ -385,7 +385,7 @@ XdmCheckCookie (unsigned short cookie_length, char *cookie, /* Auth packets must be a multiple of 8 bytes long */ if (cookie_length & 7) return (XID) -1; - plain = (unsigned char *) xalloc (cookie_length); + plain = xalloc (cookie_length); if (!plain) return (XID) -1; for (auth = xdmAuth; auth; auth=auth->next) { @@ -430,7 +430,7 @@ XdmToID (unsigned short cookie_length, char *cookie) XdmClientAuthPtr client; unsigned char *plain; - plain = (unsigned char *) xalloc (cookie_length); + plain = xalloc (cookie_length); if (!plain) return (XID) -1; for (auth = xdmAuth; auth; auth=auth->next) { diff --git a/xorg-server/os/xdmcp.c b/xorg-server/os/xdmcp.c index 746f5985c..c1d650d46 100644 --- a/xorg-server/os/xdmcp.c +++ b/xorg-server/os/xdmcp.c @@ -391,8 +391,7 @@ XdmcpRegisterAuthentication ( AuthenticationNames.length + 1) && XdmcpReallocARRAYofARRAY8 (&AuthenticationDatas, AuthenticationDatas.length + 1) && - (newFuncs = (AuthenticationFuncsPtr) xalloc ( - (AuthenticationNames.length + 1) * sizeof (AuthenticationFuncsRec))))) + (newFuncs = xalloc ((AuthenticationNames.length + 1) * sizeof (AuthenticationFuncsRec))))) { XdmcpDisposeARRAY8 (&AuthenticationName); XdmcpDisposeARRAY8 (&AuthenticationData); @@ -534,7 +533,7 @@ XdmcpRegisterAuthorization (char *name, int namelen) ARRAY8 authName; int i; - authName.data = (CARD8 *) xalloc (namelen * sizeof (CARD8)); + authName.data = xalloc (namelen * sizeof (CARD8)); if (!authName.data) return; if (!XdmcpReallocARRAYofARRAY8 (&AuthorizationNames, AuthorizationNames.length +1)) @@ -1592,9 +1591,7 @@ get_fromaddr_by_name( #if defined(IPv6) && defined(AF_INET6) static int -get_mcast_options(argc, argv, i) - int argc, i; - char **argv; +get_mcast_options(int argc, char **argv, int i) { char *address = XDM_DEFAULT_MCAST_ADDR6; int hopcount = 1; diff --git a/xorg-server/randr/Makefile.in b/xorg-server/randr/Makefile.in index 97313124a..b23cad6b1 100644 --- a/xorg-server/randr/Makefile.in +++ b/xorg-server/randr/Makefile.in @@ -40,8 +40,11 @@ subdir = randr DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -51,7 +54,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -110,6 +114,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -130,9 +135,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -161,7 +169,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -170,9 +180,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -211,12 +225,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -236,7 +251,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -246,6 +260,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -259,11 +274,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -299,6 +313,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -323,7 +338,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -346,6 +360,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -377,7 +392,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c index 5bcb3597a..1c1d0c4f2 100644 --- a/xorg-server/randr/randr.c +++ b/xorg-server/randr/randr.c @@ -25,8 +25,6 @@ * Keith Packard, Intel Corporation */ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -288,7 +286,8 @@ RRFreeClient (pointer data, XID id) pRREvent = (RREventPtr) data; pWin = pRREvent->window; - pHead = (RREventPtr *) LookupIDByType(pWin->drawable.id, RREventType); + dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id, + RREventType, serverClient, DixDestroyAccess); if (pHead) { pPrev = 0; for (pCur = *pHead; pCur && pCur != pRREvent; pCur=pCur->next) @@ -366,7 +365,8 @@ TellChanged (WindowPtr pWin, pointer value) rrScrPriv(pScreen); int i; - pHead = (RREventPtr *) LookupIDByType (pWin->drawable.id, RREventType); + dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id, + RREventType, serverClient, DixReadAccess); if (!pHead) return WT_WALKCHILDREN; diff --git a/xorg-server/randr/randrstr.h b/xorg-server/randr/randrstr.h index 9c9b7c074..af1437404 100644 --- a/xorg-server/randr/randrstr.h +++ b/xorg-server/randr/randrstr.h @@ -65,10 +65,10 @@ typedef XID RRMode; typedef XID RROutput; typedef XID RRCrtc; -extern int RREventBase, RRErrorBase; +extern _X_EXPORT int RREventBase, RRErrorBase; -extern int (*ProcRandrVector[RRNumberRequests])(ClientPtr); -extern int (*SProcRandrVector[RRNumberRequests])(ClientPtr); +extern _X_EXPORT int (*ProcRandrVector[RRNumberRequests])(ClientPtr); +extern _X_EXPORT int (*SProcRandrVector[RRNumberRequests])(ClientPtr); /* * Modeline for a monitor. Name follows directly after this struct @@ -173,6 +173,9 @@ typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen, typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc); +typedef Bool (*RRCrtcGetGammaProcPtr) (ScreenPtr pScreen, + RRCrtcPtr crtc); + typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr pScreen, RROutputPtr output, Atom property, @@ -245,6 +248,7 @@ typedef struct _rrScrPriv { RRScreenSetSizeProcPtr rrScreenSetSize; RRCrtcSetProcPtr rrCrtcSet; RRCrtcSetGammaProcPtr rrCrtcSetGamma; + RRCrtcGetGammaProcPtr rrCrtcGetGamma; RROutputSetPropertyProcPtr rrOutputSetProperty; RROutputValidateModeProcPtr rrOutputValidateMode; RRModeDestroyProcPtr rrModeDestroy; @@ -297,7 +301,7 @@ typedef struct _rrScrPriv { #endif } rrScrPrivRec, *rrScrPrivPtr; -extern DevPrivateKey rrPrivKey; +extern _X_EXPORT DevPrivateKey rrPrivKey; #define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey)) #define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr) @@ -332,32 +336,46 @@ typedef struct _RRClient { /* RRTimesRec times[0]; */ } RRClientRec, *RRClientPtr; -extern RESTYPE RRClientType, RREventType; /* resource types for event masks */ -extern DevPrivateKey RRClientPrivateKey; -extern RESTYPE RRCrtcType, RRModeType, RROutputType; - -#define LookupOutput(client,id,a) ((RROutputPtr) \ - (SecurityLookupIDByType (client, id, \ - RROutputType, a))) -#define LookupCrtc(client,id,a) ((RRCrtcPtr) \ - (SecurityLookupIDByType (client, id, \ - RRCrtcType, a))) -#define LookupMode(client,id,a) ((RRModePtr) \ - (SecurityLookupIDByType (client, id, \ - RRModeType, a))) +extern _X_EXPORT RESTYPE RRClientType, RREventType; /* resource types for event masks */ +extern _X_EXPORT DevPrivateKey RRClientPrivateKey; +extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType; + +#define VERIFY_RR_OUTPUT(id, ptr, a)\ + {\ + int rc = dixLookupResourceByType((pointer *)&(ptr), id,\ + RROutputType, client, a);\ + if (rc != Success)\ + return (rc == BadValue) ? RRErrorBase + BadRROutput : rc;\ + } + +#define VERIFY_RR_CRTC(id, ptr, a)\ + {\ + int rc = dixLookupResourceByType((pointer *)&(ptr), id,\ + RRCrtcType, client, a);\ + if (rc != Success)\ + return (rc == BadValue) ? RRErrorBase + BadRRCrtc : rc;\ + } + +#define VERIFY_RR_MODE(id, ptr, a)\ + {\ + int rc = dixLookupResourceByType((pointer *)&(ptr), id,\ + RRModeType, client, a);\ + if (rc != Success)\ + return (rc == BadValue) ? RRErrorBase + BadRRMode : rc;\ + } #define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey)) #define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient) /* Initialize the extension */ -void +extern _X_EXPORT void RRExtensionInit (void); #ifdef RANDR_12_INTERFACE /* * Set the range of sizes for the screen */ -void +extern _X_EXPORT void RRScreenSetSizeRange (ScreenPtr pScreen, CARD16 minWidth, CARD16 minHeight, @@ -371,13 +389,13 @@ RRScreenSetSizeRange (ScreenPtr pScreen, * The driver is responsible for calling this whenever it has changed * the size of the screen */ -void +extern _X_EXPORT void RRScreenSizeNotify (ScreenPtr pScreen); /* * Request that the screen be resized */ -Bool +extern _X_EXPORT Bool RRScreenSizeSet (ScreenPtr pScreen, CARD16 width, CARD16 height, @@ -387,47 +405,44 @@ RRScreenSizeSet (ScreenPtr pScreen, /* * Send ConfigureNotify event to root window when 'something' happens */ -void +extern _X_EXPORT void RRSendConfigNotify (ScreenPtr pScreen); /* * screen dispatch */ -int +extern _X_EXPORT int ProcRRGetScreenSizeRange (ClientPtr client); -int +extern _X_EXPORT int ProcRRSetScreenSize (ClientPtr client); -int +extern _X_EXPORT int ProcRRGetScreenResources (ClientPtr client); -int +extern _X_EXPORT int ProcRRGetScreenResourcesCurrent (ClientPtr client); -int +extern _X_EXPORT int ProcRRSetScreenConfig (ClientPtr client); -int +extern _X_EXPORT int ProcRRGetScreenInfo (ClientPtr client); /* * Deliver a ScreenNotify event */ -void +extern _X_EXPORT void RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen); /* mirandr.c */ -Bool +extern _X_EXPORT Bool miRandRInit (ScreenPtr pScreen); -Bool +extern _X_EXPORT Bool miRRGetInfo (ScreenPtr pScreen, Rotation *rotations); -Bool -miRRGetScreenInfo (ScreenPtr pScreen); - -Bool +extern _X_EXPORT Bool miRRCrtcSet (ScreenPtr pScreen, RRCrtcPtr crtc, RRModePtr mode, @@ -437,23 +452,23 @@ miRRCrtcSet (ScreenPtr pScreen, int numOutput, RROutputPtr *outputs); -Bool +extern _X_EXPORT Bool miRROutputSetProperty (ScreenPtr pScreen, RROutputPtr output, Atom property, RRPropertyValuePtr value); -Bool +extern _X_EXPORT Bool miRROutputGetProperty (ScreenPtr pScreen, RROutputPtr output, Atom property); -Bool +extern _X_EXPORT Bool miRROutputValidateMode (ScreenPtr pScreen, RROutputPtr output, RRModePtr mode); -void +extern _X_EXPORT void miRRModeDestroy (ScreenPtr pScreen, RRModePtr mode); @@ -461,26 +476,26 @@ miRRModeDestroy (ScreenPtr pScreen, /* * Send all pending events */ -void +extern _X_EXPORT void RRTellChanged (ScreenPtr pScreen); /* * Poll the driver for changed information */ -Bool +extern _X_EXPORT Bool RRGetInfo (ScreenPtr pScreen, Bool force_query); -Bool RRInit (void); +extern _X_EXPORT Bool RRInit (void); -Bool RRScreenInit(ScreenPtr pScreen); +extern _X_EXPORT Bool RRScreenInit(ScreenPtr pScreen); -RROutputPtr +extern _X_EXPORT RROutputPtr RRFirstOutput (ScreenPtr pScreen); -Rotation +extern _X_EXPORT Rotation RRGetRotation (ScreenPtr pScreen); -CARD16 +extern _X_EXPORT CARD16 RRVerticalRefresh (xRRModeInfo *mode); #ifdef RANDR_10_INTERFACE @@ -493,14 +508,15 @@ RRVerticalRefresh (xRRModeInfo *mode); * Then, register the specific size with the screen */ -RRScreenSizePtr +extern _X_EXPORT RRScreenSizePtr RRRegisterSize (ScreenPtr pScreen, short width, short height, short mmWidth, short mmHeight); -Bool RRRegisterRate (ScreenPtr pScreen, +extern _X_EXPORT Bool +RRRegisterRate (ScreenPtr pScreen, RRScreenSizePtr pSize, int rate); @@ -508,23 +524,17 @@ Bool RRRegisterRate (ScreenPtr pScreen, * Finally, set the current configuration of the screen */ -void +extern _X_EXPORT void RRSetCurrentConfig (ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); -Bool RRScreenInit (ScreenPtr pScreen); +extern _X_EXPORT Bool RRScreenInit (ScreenPtr pScreen); -Rotation +extern _X_EXPORT Rotation RRGetRotation (ScreenPtr pScreen); -int -RRSetScreenConfig (ScreenPtr pScreen, - Rotation rotation, - int rate, - RRScreenSizePtr pSize); - #endif /* rrcrtc.c */ @@ -533,32 +543,32 @@ RRSetScreenConfig (ScreenPtr pScreen, * Notify the CRTC of some change; layoutChanged indicates that * some position or size element changed */ -void +extern _X_EXPORT void RRCrtcChanged (RRCrtcPtr crtc, Bool layoutChanged); /* * Create a CRTC */ -RRCrtcPtr +extern _X_EXPORT RRCrtcPtr RRCrtcCreate (ScreenPtr pScreen, void *devPrivate); /* * Set the allowed rotations on a CRTC */ -void +extern _X_EXPORT void RRCrtcSetRotations (RRCrtcPtr crtc, Rotation rotations); /* * Set whether transforms are allowed on a CRTC */ -void +extern _X_EXPORT void RRCrtcSetTransformSupport (RRCrtcPtr crtc, Bool transforms); /* * Notify the extension that the Crtc has been reconfigured, * the driver calls this whenever it has updated the mode */ -Bool +extern _X_EXPORT Bool RRCrtcNotify (RRCrtcPtr crtc, RRModePtr mode, int x, @@ -568,13 +578,13 @@ RRCrtcNotify (RRCrtcPtr crtc, int numOutputs, RROutputPtr *outputs); -void +extern _X_EXPORT void RRDeliverCrtcEvent (ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc); /* * Request that the Crtc be reconfigured */ -Bool +extern _X_EXPORT Bool RRCrtcSet (RRCrtcPtr crtc, RRModePtr mode, int x, @@ -587,26 +597,34 @@ RRCrtcSet (RRCrtcPtr crtc, * Request that the Crtc gamma be changed */ -Bool +extern _X_EXPORT Bool RRCrtcGammaSet (RRCrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue); +/* + * Request current gamma back from the DDX (if possible). + * This includes gamma size. + */ + +extern _X_EXPORT Bool +RRCrtcGammaGet(RRCrtcPtr crtc); + /* * Notify the extension that the Crtc gamma has been changed * The driver calls this whenever it has changed the gamma values * in the RRCrtcRec */ -Bool +extern _X_EXPORT Bool RRCrtcGammaNotify (RRCrtcPtr crtc); /* * Set the size of the gamma table at server startup time */ -Bool +extern _X_EXPORT Bool RRCrtcGammaSetSize (RRCrtcPtr crtc, int size); @@ -615,7 +633,7 @@ RRCrtcGammaSetSize (RRCrtcPtr crtc, * taking into account the current mode and rotation */ -void +extern _X_EXPORT void RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height); /* @@ -625,7 +643,7 @@ RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height); * * Return TRUE if the resulting transform is not a simple translation. */ -Bool +extern _X_EXPORT Bool RRTransformCompute (int x, int y, int width, @@ -640,19 +658,19 @@ RRTransformCompute (int x, /* * Return crtc transform */ -RRTransformPtr +extern _X_EXPORT RRTransformPtr RRCrtcGetTransform (RRCrtcPtr crtc); /* * Check whether the pending and current transforms are the same */ -Bool +extern _X_EXPORT Bool RRCrtcPendingTransform (RRCrtcPtr crtc); /* * Destroy a Crtc at shutdown */ -void +extern _X_EXPORT void RRCrtcDestroy (RRCrtcPtr crtc); @@ -660,7 +678,7 @@ RRCrtcDestroy (RRCrtcPtr crtc); * Set the pending CRTC transformation */ -int +extern _X_EXPORT int RRCrtcTransformSet (RRCrtcPtr crtc, PictTransformPtr transform, struct pict_f_transform *f_transform, @@ -673,32 +691,32 @@ RRCrtcTransformSet (RRCrtcPtr crtc, /* * Initialize crtc type */ -Bool +extern _X_EXPORT Bool RRCrtcInit (void); /* * Crtc dispatch */ -int +extern _X_EXPORT int ProcRRGetCrtcInfo (ClientPtr client); -int +extern _X_EXPORT int ProcRRSetCrtcConfig (ClientPtr client); -int +extern _X_EXPORT int ProcRRGetCrtcGammaSize (ClientPtr client); -int +extern _X_EXPORT int ProcRRGetCrtcGamma (ClientPtr client); -int +extern _X_EXPORT int ProcRRSetCrtcGamma (ClientPtr client); -int +extern _X_EXPORT int ProcRRSetCrtcTransform (ClientPtr client); -int +extern _X_EXPORT int ProcRRGetCrtcTransform (ClientPtr client); int @@ -708,7 +726,7 @@ int ProcRRSetPanning (ClientPtr client); /* rrdispatch.c */ -Bool +extern _X_EXPORT Bool RRClientKnowsRates (ClientPtr pClient); /* rrmode.c */ @@ -716,42 +734,39 @@ RRClientKnowsRates (ClientPtr pClient); * Find, and if necessary, create a mode */ -RRModePtr +extern _X_EXPORT RRModePtr RRModeGet (xRRModeInfo *modeInfo, const char *name); -void -RRModePruneUnused (ScreenPtr pScreen); - /* * Destroy a mode. */ -void +extern _X_EXPORT void RRModeDestroy (RRModePtr mode); /* * Return a list of modes that are valid for some output in pScreen */ -RRModePtr * +extern _X_EXPORT RRModePtr * RRModesForScreen (ScreenPtr pScreen, int *num_ret); /* * Initialize mode type */ -Bool +extern _X_EXPORT Bool RRModeInit (void); -int +extern _X_EXPORT int ProcRRCreateMode (ClientPtr client); -int +extern _X_EXPORT int ProcRRDestroyMode (ClientPtr client); -int +extern _X_EXPORT int ProcRRAddOutputMode (ClientPtr client); -int +extern _X_EXPORT int ProcRRDeleteOutputMode (ClientPtr client); /* rroutput.c */ @@ -762,14 +777,14 @@ ProcRRDeleteOutputMode (ClientPtr client); * has changed, or whether the change was strictly internal * (which crtc is in use) */ -void +extern _X_EXPORT void RROutputChanged (RROutputPtr output, Bool configChanged); /* * Create an output */ -RROutputPtr +extern _X_EXPORT RROutputPtr RROutputCreate (ScreenPtr pScreen, const char *name, int nameLength, @@ -778,118 +793,120 @@ RROutputCreate (ScreenPtr pScreen, /* * Notify extension that output parameters have been changed */ -Bool +extern _X_EXPORT Bool RROutputSetClones (RROutputPtr output, RROutputPtr *clones, int numClones); -Bool +extern _X_EXPORT Bool RROutputSetModes (RROutputPtr output, RRModePtr *modes, int numModes, int numPreferred); -int +extern _X_EXPORT int RROutputAddUserMode (RROutputPtr output, RRModePtr mode); -int +extern _X_EXPORT int RROutputDeleteUserMode (RROutputPtr output, RRModePtr mode); -Bool +extern _X_EXPORT Bool RROutputSetCrtcs (RROutputPtr output, RRCrtcPtr *crtcs, int numCrtcs); -Bool +extern _X_EXPORT Bool RROutputSetConnection (RROutputPtr output, CARD8 connection); -Bool +extern _X_EXPORT Bool RROutputSetSubpixelOrder (RROutputPtr output, int subpixelOrder); -Bool +extern _X_EXPORT Bool RROutputSetPhysicalSize (RROutputPtr output, int mmWidth, int mmHeight); -void +extern _X_EXPORT void RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output); -void +extern _X_EXPORT void RROutputDestroy (RROutputPtr output); -int +extern _X_EXPORT int ProcRRGetOutputInfo (ClientPtr client); -extern int +extern _X_EXPORT int ProcRRSetOutputPrimary (ClientPtr client); -extern int +extern _X_EXPORT int ProcRRGetOutputPrimary (ClientPtr client); /* * Initialize output type */ -Bool +extern _X_EXPORT Bool RROutputInit (void); /* rrpointer.c */ -void +extern _X_EXPORT void RRPointerMoved (ScreenPtr pScreen, int x, int y); -void +extern _X_EXPORT void RRPointerScreenConfigured (ScreenPtr pScreen); /* rrproperty.c */ -void +extern _X_EXPORT void RRDeleteAllOutputProperties (RROutputPtr output); -RRPropertyValuePtr +extern _X_EXPORT RRPropertyValuePtr RRGetOutputProperty (RROutputPtr output, Atom property, Bool pending); -RRPropertyPtr +extern _X_EXPORT RRPropertyPtr RRQueryOutputProperty (RROutputPtr output, Atom property); -void +extern _X_EXPORT void RRDeleteOutputProperty (RROutputPtr output, Atom property); -Bool +extern _X_EXPORT Bool RRPostPendingProperties (RROutputPtr output); -int +extern _X_EXPORT int RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type, int format, int mode, unsigned long len, pointer value, Bool sendevent, Bool pending); -int +extern _X_EXPORT int RRConfigureOutputProperty (RROutputPtr output, Atom property, Bool pending, Bool range, Bool immutable, int num_values, INT32 *values); -int +extern _X_EXPORT int ProcRRChangeOutputProperty (ClientPtr client); -int +extern _X_EXPORT int ProcRRGetOutputProperty (ClientPtr client); -int +extern _X_EXPORT int ProcRRListOutputProperties (ClientPtr client); -int +extern _X_EXPORT int ProcRRQueryOutputProperty (ClientPtr client); -int +extern _X_EXPORT int ProcRRConfigureOutputProperty (ClientPtr client); -int +extern _X_EXPORT int ProcRRDeleteOutputProperty (ClientPtr client); /* rrxinerama.c */ -void +#ifdef XINERAMA +extern _X_EXPORT void RRXineramaExtensionInit(void); +#endif #endif /* _RANDRSTR_H_ */ diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c index 8a5738fc5..0e14b36dd 100644 --- a/xorg-server/randr/rrcrtc.c +++ b/xorg-server/randr/rrcrtc.c @@ -479,6 +479,29 @@ RRCrtcGammaSet (RRCrtcPtr crtc, return ret; } +/* + * Request current gamma back from the DDX (if possible). + * This includes gamma size. + */ +Bool +RRCrtcGammaGet(RRCrtcPtr crtc) +{ + Bool ret = TRUE; +#if RANDR_12_INTERFACE + ScreenPtr pScreen = crtc->pScreen; +#endif + +#if RANDR_12_INTERFACE + if (pScreen) + { + rrScrPriv(pScreen); + if (pScrPriv->rrCrtcGetGamma) + ret = (*pScrPriv->rrCrtcGetGamma) (pScreen, crtc); + } +#endif + return ret; +} + /* * Notify the extension that the Crtc gamma has been changed * The driver calls this whenever it has changed the gamma values @@ -635,10 +658,7 @@ ProcRRGetCrtcInfo (ClientPtr client) BoxRec panned_area; REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq); - crtc = LookupCrtc(client, stuff->crtc, DixReadAccess); - - if (!crtc) - return RRErrorBase + BadRRCrtc; + VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); /* All crtcs must be associated with screens before client * requests are processed @@ -752,17 +772,13 @@ ProcRRSetCrtcConfig (ClientPtr client) TimeStamp configTime; TimeStamp time; Rotation rotation; - int i, j; + int rc, i, j; REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq); - numOutputs = (stuff->length - (SIZEOF (xRRSetCrtcConfigReq) >> 2)); + numOutputs = (stuff->length - bytes_to_int32(SIZEOF (xRRSetCrtcConfigReq))); - crtc = LookupIDByType (stuff->crtc, RRCrtcType); - if (!crtc) - { - client->errorValue = stuff->crtc; - return RRErrorBase + BadRRCrtc; - } + VERIFY_RR_CRTC(stuff->crtc, crtc, DixSetAttrAccess); + if (stuff->mode == None) { mode = NULL; @@ -771,12 +787,7 @@ ProcRRSetCrtcConfig (ClientPtr client) } else { - mode = LookupIDByType (stuff->mode, RRModeType); - if (!mode) - { - client->errorValue = stuff->mode; - return RRErrorBase + BadRRMode; - } + VERIFY_RR_MODE(stuff->mode, mode, DixSetAttrAccess); if (numOutputs == 0) return BadMatch; } @@ -792,13 +803,13 @@ ProcRRSetCrtcConfig (ClientPtr client) outputIds = (RROutput *) (stuff + 1); for (i = 0; i < numOutputs; i++) { - outputs[i] = (RROutputPtr) LookupIDByType (outputIds[i], RROutputType); - if (!outputs[i]) + rc = dixLookupResourceByType((pointer *)(outputs + i), outputIds[i], + RROutputType, client, DixSetAttrAccess); + if (rc != Success) { - client->errorValue = outputIds[i]; if (outputs) xfree (outputs); - return RRErrorBase + BadRROutput; + return (rc == BadValue) ? RRErrorBase + BadRROutput : rc; } /* validate crtc for this output */ for (j = 0; j < outputs[i]->numCrtcs; j++) @@ -1005,10 +1016,7 @@ ProcRRGetPanning (ClientPtr client) int n; REQUEST_SIZE_MATCH(xRRGetPanningReq); - crtc = LookupCrtc(client, stuff->crtc, DixReadAccess); - - if (!crtc) - return RRErrorBase + BadRRCrtc; + VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); /* All crtcs must be associated with screens before client * requests are processed @@ -1078,11 +1086,7 @@ ProcRRSetPanning (ClientPtr client) int n; REQUEST_SIZE_MATCH(xRRSetPanningReq); - crtc = LookupCrtc(client, stuff->crtc, DixReadAccess); - - if (!crtc) - return RRErrorBase + BadRRCrtc; - + VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); /* All crtcs must be associated with screens before client * requests are processed @@ -1155,10 +1159,12 @@ ProcRRGetCrtcGammaSize (ClientPtr client) int n; REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq); - crtc = LookupCrtc (client, stuff->crtc, DixReadAccess); - if (!crtc) - return RRErrorBase + BadRRCrtc; - + VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); + + /* Gamma retrieval failed, any better error? */ + if (!RRCrtcGammaGet(crtc)) + return RRErrorBase + BadRRCrtc; + reply.type = X_Reply; reply.sequenceNumber = client->sequence; reply.length = 0; @@ -1183,10 +1189,12 @@ ProcRRGetCrtcGamma (ClientPtr client) char *extra = NULL; REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq); - crtc = LookupCrtc (client, stuff->crtc, DixReadAccess); - if (!crtc) - return RRErrorBase + BadRRCrtc; - + VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); + + /* Gamma retrieval failed, any better error? */ + if (!RRCrtcGammaGet(crtc)) + return RRErrorBase + BadRRCrtc; + len = crtc->gammaSize * 3 * 2; if (crtc->gammaSize) { @@ -1197,7 +1205,7 @@ ProcRRGetCrtcGamma (ClientPtr client) reply.type = X_Reply; reply.sequenceNumber = client->sequence; - reply.length = (len + 3) >> 2; + reply.length = bytes_to_int32(len); reply.size = crtc->gammaSize; if (client->swapped) { swaps (&reply.sequenceNumber, n); @@ -1224,11 +1232,9 @@ ProcRRSetCrtcGamma (ClientPtr client) CARD16 *red, *green, *blue; REQUEST_AT_LEAST_SIZE(xRRSetCrtcGammaReq); - crtc = LookupCrtc (client, stuff->crtc, DixWriteAccess); - if (!crtc) - return RRErrorBase + BadRRCrtc; + VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); - len = client->req_len - (sizeof (xRRSetCrtcGammaReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof (xRRSetCrtcGammaReq)); if (len < (stuff->size * 3 + 1) >> 1) return BadLength; @@ -1259,9 +1265,7 @@ ProcRRSetCrtcTransform (ClientPtr client) int nparams; REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq); - crtc = LookupCrtc (client, stuff->crtc, DixWriteAccess); - if (!crtc) - return RRErrorBase + BadRRCrtc; + VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); PictTransform_from_xRenderTransform (&transform, &stuff->transform); pixman_f_transform_from_pixman_transform (&f_transform, &transform); @@ -1270,7 +1274,7 @@ ProcRRSetCrtcTransform (ClientPtr client) filter = (char *) (stuff + 1); nbytes = stuff->nbytesFilter; - params = (xFixed *) (filter + ((nbytes + 3) & ~3)); + params = (xFixed *) (filter + pad_to_int32(nbytes)); nparams = ((xFixed *) stuff + client->req_len) - params; if (nparams < 0) return BadLength; @@ -1291,7 +1295,7 @@ transform_filter_length (RRTransformPtr transform) return 0; nbytes = strlen (transform->filter->name); nparams = transform->nparams; - return ((nbytes + 3) & ~3) + (nparams * sizeof (xFixed)); + return pad_to_int32(nbytes) + (nparams * sizeof (xFixed)); } static int @@ -1330,7 +1334,7 @@ transform_encode (ClientPtr client, xRenderTransform *wire, PictTransform *pict) { xRenderTransform_from_PictTransform (wire, pict); if (client->swapped) - SwapLongs ((CARD32 *) wire, sizeof (xRenderTransform) >> 2); + SwapLongs ((CARD32 *) wire, bytes_to_int32(sizeof(xRenderTransform))); } int @@ -1344,9 +1348,7 @@ ProcRRGetCrtcTransform (ClientPtr client) char *extra; REQUEST_SIZE_MATCH (xRRGetCrtcTransformReq); - crtc = LookupCrtc (client, stuff->crtc, DixWriteAccess); - if (!crtc) - return RRErrorBase + BadRRCrtc; + VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); pending = &crtc->client_pending_transform; current = &crtc->client_current_transform; @@ -1361,7 +1363,7 @@ ProcRRGetCrtcTransform (ClientPtr client) extra = (char *) (reply + 1); reply->type = X_Reply; reply->sequenceNumber = client->sequence; - reply->length = (CrtcTransformExtra + nextra) >> 2; + reply->length = bytes_to_int32(CrtcTransformExtra + nextra); reply->hasTransforms = crtc->transforms; diff --git a/xorg-server/randr/rrdispatch.c b/xorg-server/randr/rrdispatch.c index 0925875bf..bec5b08af 100644 --- a/xorg-server/randr/rrdispatch.c +++ b/xorg-server/randr/rrdispatch.c @@ -79,9 +79,10 @@ ProcRRSelectInput (ClientPtr client) rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); if (rc != Success) return rc; - pHead = (RREventPtr *)SecurityLookupIDByType(client, - pWin->drawable.id, RREventType, - DixWriteAccess); + rc = dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id, + RREventType, client, DixWriteAccess); + if (rc != Success && rc != BadValue) + return rc; if (stuff->enable & (RRScreenChangeNotifyMask| RRCrtcChangeNotifyMask| diff --git a/xorg-server/randr/rrmode.c b/xorg-server/randr/rrmode.c index 2fa440385..9642ddae3 100644 --- a/xorg-server/randr/rrmode.c +++ b/xorg-server/randr/rrmode.c @@ -288,7 +288,7 @@ ProcRRCreateMode (ClientPtr client) RRModePtr mode; REQUEST_AT_LEAST_SIZE (xRRCreateModeReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -297,10 +297,10 @@ ProcRRCreateMode (ClientPtr client) modeInfo = &stuff->modeInfo; name = (char *) (stuff + 1); - units_after = (stuff->length - (sizeof (xRRCreateModeReq) >> 2)); + units_after = (stuff->length - bytes_to_int32(sizeof (xRRCreateModeReq))); /* check to make sure requested name fits within the data provided */ - if ((int) (modeInfo->nameLength + 3) >> 2 > units_after) + if (bytes_to_int32(modeInfo->nameLength) > units_after) return BadLength; mode = RRModeCreateUser (pScreen, modeInfo, name, &error); @@ -332,12 +332,8 @@ ProcRRDestroyMode (ClientPtr client) RRModePtr mode; REQUEST_SIZE_MATCH(xRRDestroyModeReq); - mode = LookupIDByType (stuff->mode, RRModeType); - if (!mode) - { - client->errorValue = stuff->mode; - return RRErrorBase + BadRRMode; - } + VERIFY_RR_MODE(stuff->mode, mode, DixDestroyAccess); + if (!mode->userScreen) return BadMatch; if (mode->refcnt > 1) @@ -354,20 +350,8 @@ ProcRRAddOutputMode (ClientPtr client) RROutputPtr output; REQUEST_SIZE_MATCH(xRRAddOutputModeReq); - output = LookupOutput(client, stuff->output, DixReadAccess); - - if (!output) - { - client->errorValue = stuff->output; - return RRErrorBase + BadRROutput; - } - - mode = LookupIDByType (stuff->mode, RRModeType); - if (!mode) - { - client->errorValue = stuff->mode; - return RRErrorBase + BadRRMode; - } + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); + VERIFY_RR_MODE(stuff->mode, mode, DixUseAccess); return RROutputAddUserMode (output, mode); } @@ -380,20 +364,8 @@ ProcRRDeleteOutputMode (ClientPtr client) RROutputPtr output; REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq); - output = LookupOutput(client, stuff->output, DixReadAccess); - - if (!output) - { - client->errorValue = stuff->output; - return RRErrorBase + BadRROutput; - } - - mode = LookupIDByType (stuff->mode, RRModeType); - if (!mode) - { - client->errorValue = stuff->mode; - return RRErrorBase + BadRRMode; - } + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); + VERIFY_RR_MODE(stuff->mode, mode, DixUseAccess); return RROutputDeleteUserMode (output, mode); } diff --git a/xorg-server/randr/rroutput.c b/xorg-server/randr/rroutput.c index 939c14dd9..2eff8c183 100644 --- a/xorg-server/randr/rroutput.c +++ b/xorg-server/randr/rroutput.c @@ -448,20 +448,14 @@ ProcRRGetOutputInfo (ClientPtr client) int i, n; REQUEST_SIZE_MATCH(xRRGetOutputInfoReq); - output = LookupOutput(client, stuff->output, DixReadAccess); - - if (!output) - { - client->errorValue = stuff->output; - return RRErrorBase + BadRROutput; - } + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); pScreen = output->pScreen; pScrPriv = rrGetScrPriv(pScreen); rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = OutputInfoExtra >> 2; + rep.length = bytes_to_int32(OutputInfoExtra); rep.timestamp = pScrPriv->lastSetTime.milliseconds; rep.crtc = output->crtc ? output->crtc->id : None; rep.mmWidth = output->mmWidth; @@ -474,14 +468,14 @@ ProcRRGetOutputInfo (ClientPtr client) rep.nClones = output->numClones; rep.nameLength = output->nameLength; - extraLen = ((output->numCrtcs + + extraLen = ((output->numCrtcs + output->numModes + output->numUserModes + output->numClones + - ((rep.nameLength + 3) >> 2)) << 2); + bytes_to_int32(rep.nameLength)) << 2); if (extraLen) { - rep.length += extraLen >> 2; + rep.length += bytes_to_int32(extraLen); extra = xalloc (extraLen); if (!extra) return BadAlloc; @@ -538,7 +532,7 @@ ProcRRGetOutputInfo (ClientPtr client) return client->noClientException; } -void +static void RRSetPrimaryOutput(ScreenPtr pScreen, rrScrPrivPtr pScrPriv, RROutputPtr output) { @@ -569,24 +563,16 @@ ProcRRSetOutputPrimary(ClientPtr client) RROutputPtr output = NULL; WindowPtr pWin; rrScrPrivPtr pScrPriv; + int rc; REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq); - pWin = SecurityLookupIDByType(client, stuff->window, RT_WINDOW, - DixReadAccess); - - if (!pWin) { - client->errorValue = stuff->window; - return BadWindow; - } + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; if (stuff->output) { - output = LookupOutput(client, stuff->output, DixReadAccess); - - if (!output) { - client->errorValue = stuff->output; - return RRErrorBase + BadRROutput; - } + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); if (output->pScreen != pWin->drawable.pScreen) { client->errorValue = stuff->window; @@ -608,16 +594,13 @@ ProcRRGetOutputPrimary(ClientPtr client) rrScrPrivPtr pScrPriv; xRRGetOutputPrimaryReply rep; RROutputPtr primary = NULL; + int rc; REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq); - pWin = SecurityLookupIDByType(client, stuff->window, RT_WINDOW, - DixReadAccess); - - if (!pWin) { - client->errorValue = stuff->window; - return BadWindow; - } + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; pScrPriv = rrGetScrPriv(pWin->drawable.pScreen); if (pScrPriv) diff --git a/xorg-server/randr/rrproperty.c b/xorg-server/randr/rrproperty.c index 12923a2c7..6187b855f 100644 --- a/xorg-server/randr/rrproperty.c +++ b/xorg-server/randr/rrproperty.c @@ -31,7 +31,8 @@ DeliverPropertyEvent(WindowPtr pWin, void *value) RREventPtr *pHead, pRREvent; ClientPtr client; - pHead = LookupIDByType(pWin->drawable.id, RREventType); + dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id, + RREventType, serverClient, DixReadAccess); if (!pHead) return WT_WALKCHILDREN; @@ -419,10 +420,7 @@ ProcRRListOutputProperties (ClientPtr client) REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq); - output = LookupOutput (client, stuff->output, DixReadAccess); - - if (!output) - return RRErrorBase + BadRROutput; + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); for (prop = output->properties; prop; prop = prop->next) numProps++; @@ -431,7 +429,7 @@ ProcRRListOutputProperties (ClientPtr client) return(BadAlloc); rep.type = X_Reply; - rep.length = (numProps * sizeof(Atom)) >> 2; + rep.length = bytes_to_int32(numProps * sizeof(Atom)); rep.sequenceNumber = client->sequence; rep.nAtoms = numProps; if (client->swapped) @@ -466,10 +464,7 @@ ProcRRQueryOutputProperty (ClientPtr client) REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq); - output = LookupOutput (client, stuff->output, DixReadAccess); - - if (!output) - return RRErrorBase + BadRROutput; + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); prop = RRQueryOutputProperty (output, stuff->property); if (!prop) @@ -513,12 +508,9 @@ ProcRRConfigureOutputProperty (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRRConfigureOutputPropertyReq); - output = LookupOutput (client, stuff->output, DixReadAccess); - - if (!output) - return RRErrorBase + BadRROutput; + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); - num_valid = stuff->length - (sizeof (xRRConfigureOutputPropertyReq) >> 2); + num_valid = stuff->length - bytes_to_int32(sizeof (xRRConfigureOutputPropertyReq)); return RRConfigureOutputProperty (output, stuff->property, stuff->pending, stuff->range, FALSE, num_valid, @@ -552,15 +544,13 @@ ProcRRChangeOutputProperty (ClientPtr client) return BadValue; } len = stuff->nUnits; - if (len > ((0xffffffff - sizeof(xChangePropertyReq)) >> 2)) + if (len > bytes_to_int32((0xffffffff - sizeof(xChangePropertyReq)))) return BadLength; sizeInBytes = format>>3; totalSize = len * sizeInBytes; REQUEST_FIXED_SIZE(xRRChangeOutputPropertyReq, totalSize); - output = LookupOutput (client, stuff->output, DixWriteAccess); - if (!output) - return RRErrorBase + BadRROutput; + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); if (!ValidAtom(stuff->property)) { @@ -590,9 +580,7 @@ ProcRRDeleteOutputProperty (ClientPtr client) REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq); UpdateCurrentTime(); - output = LookupOutput (client, stuff->output, DixWriteAccess); - if (!output) - return RRErrorBase + BadRROutput; + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); if (!ValidAtom(stuff->property)) { @@ -619,11 +607,8 @@ ProcRRGetOutputProperty (ClientPtr client) REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq); if (stuff->delete) UpdateCurrentTime(); - output = LookupOutput (client, stuff->output, - stuff->delete ? DixWriteAccess : - DixReadAccess); - if (!output) - return RRErrorBase + BadRROutput; + VERIFY_RR_OUTPUT(stuff->output, output, + stuff->delete ? DixWriteAccess : DixReadAccess); if (!ValidAtom(stuff->property)) { @@ -723,7 +708,7 @@ ProcRRGetOutputProperty (ClientPtr client) } reply.bytesAfter = n - (ind + len); reply.format = prop_value->format; - reply.length = (len + 3) >> 2; + reply.length = bytes_to_int32(len); if (prop_value->format) reply.nItems = len / (prop_value->format / 8); else diff --git a/xorg-server/randr/rrscreen.c b/xorg-server/randr/rrscreen.c index e7eb75cc2..630ff5742 100644 --- a/xorg-server/randr/rrscreen.c +++ b/xorg-server/randr/rrscreen.c @@ -199,7 +199,7 @@ RRScreenSizeSet (ScreenPtr pScreen, /* * Retrieve valid screen size range */ -int +int ProcRRGetScreenSizeRange (ClientPtr client) { REQUEST(xRRGetScreenSizeRangeReq); @@ -210,7 +210,7 @@ ProcRRGetScreenSizeRange (ClientPtr client) int rc; REQUEST_SIZE_MATCH(xRRGetScreenInfoReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -261,7 +261,7 @@ ProcRRSetScreenSize (ClientPtr client) int i, rc; REQUEST_SIZE_MATCH(xRRSetScreenSizeReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -331,7 +331,7 @@ rrGetScreenResources(ClientPtr client, Bool query) CARD8 *names; REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -381,8 +381,8 @@ rrGetScreenResources(ClientPtr client, Bool query) rep.length = (pScrPriv->numCrtcs + pScrPriv->numOutputs + - num_modes * (SIZEOF(xRRModeInfo) >> 2) + - ((rep.nbytesNames + 3) >> 2)); + num_modes * bytes_to_int32(SIZEOF(xRRModeInfo)) + + bytes_to_int32(rep.nbytesNames)); extraLen = rep.length << 2; if (extraLen) @@ -455,7 +455,7 @@ rrGetScreenResources(ClientPtr client, Bool query) names += mode->mode.nameLength; } xfree (modes); - assert (((((char *) names - (char *) extra) + 3) >> 2) == rep.length); + assert (bytes_to_int32((char *) names - (char *) extra) == rep.length); } if (client->swapped) { @@ -606,7 +606,7 @@ ProcRRGetScreenInfo (ClientPtr client) RROutputPtr output; REQUEST_SIZE_MATCH(xRRGetScreenInfoReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -726,7 +726,7 @@ ProcRRGetScreenInfo (ClientPtr client) if (data8 - (CARD8 *) extra != extraLen) FatalError ("RRGetScreenInfo bad extra len %ld != %ld\n", (unsigned long)(data8 - (CARD8 *) extra), extraLen); - rep.length = (extraLen + 3) >> 2; + rep.length = bytes_to_int32(extraLen); } if (client->swapped) { swaps(&rep.sequenceNumber, n); diff --git a/xorg-server/randr/rrsdispatch.c b/xorg-server/randr/rrsdispatch.c index 9fbf8f0f5..e16090a41 100644 --- a/xorg-server/randr/rrsdispatch.c +++ b/xorg-server/randr/rrsdispatch.c @@ -375,10 +375,10 @@ SProcRRSetCrtcTransform (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq); swaps(&stuff->length, n); swapl(&stuff->crtc, n); - SwapLongs((CARD32 *)&stuff->transform, (sizeof(xRenderTransform)) >> 2); + SwapLongs((CARD32 *)&stuff->transform, bytes_to_int32(sizeof(xRenderTransform))); swaps(&stuff->nbytesFilter, n); filter = (char *)(stuff + 1); - params = (CARD32 *) (filter + ((stuff->nbytesFilter + 3) & ~3)); + params = (CARD32 *) (filter + pad_to_int32(stuff->nbytesFilter)); nparams = ((CARD32 *) stuff + client->req_len) - params; if (nparams < 0) return BadLength; @@ -453,7 +453,7 @@ static int SProcRRGetOutputPrimary (ClientPtr client) { int n; - REQUEST(xRRSetOutputPrimaryReq); + REQUEST(xRRGetOutputPrimaryReq); REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq); swaps(&stuff->length, n); diff --git a/xorg-server/randr/rrtransform.h b/xorg-server/randr/rrtransform.h index 92d3ee7be..561762dfe 100644 --- a/xorg-server/randr/rrtransform.h +++ b/xorg-server/randr/rrtransform.h @@ -39,16 +39,16 @@ struct _rrTransform { int height; }; -void +extern _X_EXPORT void RRTransformInit (RRTransformPtr transform); -void +extern _X_EXPORT void RRTransformFini (RRTransformPtr transform); -Bool +extern _X_EXPORT Bool RRTransformEqual (RRTransformPtr a, RRTransformPtr b); -Bool +extern _X_EXPORT Bool RRTransformSetFilter (RRTransformPtr dst, PictFilterPtr filter, xFixed *params, @@ -56,10 +56,10 @@ RRTransformSetFilter (RRTransformPtr dst, int width, int height); -Bool +extern _X_EXPORT Bool RRTransformCopy (RRTransformPtr dst, RRTransformPtr src); -Bool +extern _X_EXPORT Bool RRTransformCompute (int x, int y, int width, diff --git a/xorg-server/randr/rrxinerama.c b/xorg-server/randr/rrxinerama.c index 36135c6c1..97be7c1e6 100644 --- a/xorg-server/randr/rrxinerama.c +++ b/xorg-server/randr/rrxinerama.c @@ -245,7 +245,8 @@ ProcRRXineramaIsActive(ClientPtr client) xXineramaIsActiveReply rep; REQUEST_SIZE_MATCH(xXineramaIsActiveReq); - + + memset(&rep, 0, sizeof(xXineramaIsActiveReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -312,7 +313,7 @@ ProcRRXineramaQueryScreens(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.number = RRXineramaScreenCount (pScreen); - rep.length = rep.number * sz_XineramaScreenInfo >> 2; + rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo); if(client->swapped) { register int n; swaps(&rep.sequenceNumber, n); diff --git a/xorg-server/record/Makefile.in b/xorg-server/record/Makefile.in index 8d4b8dc44..59bdd5f99 100644 --- a/xorg-server/record/Makefile.in +++ b/xorg-server/record/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = record DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -75,6 +79,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -95,9 +100,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -126,7 +134,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -135,9 +145,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,12 +190,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -201,7 +216,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -211,6 +225,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -224,11 +239,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -264,6 +278,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -288,7 +303,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -311,6 +325,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -342,7 +357,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/record/record.c b/xorg-server/record/record.c index 46218981b..84a96188a 100644 --- a/xorg-server/record/record.c +++ b/xorg-server/record/record.c @@ -32,15 +32,13 @@ and Jim Haggerty of Metheus. */ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif #include "dixstruct.h" #include "extnsionst.h" -#define _XRECORD_SERVER_ -#include +#include #include "set.h" #include "swaprep.h" #include "inputstr.h" @@ -128,11 +126,10 @@ static int numEnabledRCAPs; * returns an error. */ #define VERIFY_CONTEXT(_pContext, _contextid, _client) { \ - (_pContext) = (RecordContextPtr)LookupIDByType((_contextid), RTContext); \ - if (!(_pContext)) { \ - (_client)->errorValue = (_contextid); \ - return RecordErrorBase + XRecordBadContext; \ - } \ + int rc = dixLookupResourceByType((pointer *)&(_pContext), _contextid, \ + RTContext, _client, DixUseAccess); \ + if (rc != Success) \ + return (rc == BadValue) ? RecordErrorBase + XRecordBadContext : rc; \ } static int RecordDeleteContext( @@ -374,7 +371,8 @@ RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient, replylen = pRep->length; if (recordingClientSwapped) swapl(&replylen, n); - replylen += numElemHeaders + (datalen >> 2) + (futurelen >> 2); + replylen += numElemHeaders + bytes_to_int32(datalen) + + bytes_to_int32(futurelen); if (recordingClientSwapped) swapl(&replylen, n); pRep->length = replylen; } /* end if not continued reply */ @@ -482,7 +480,7 @@ RecordABigRequest(RecordContextPtr pContext, ClientPtr client, xReq *stuff) (pointer)stuff, SIZEOF(xReq), bytesLeft); /* reinsert the extended length field that was squished out */ - bigLength = client->req_len + (sizeof(bigLength) >> 2); + bigLength = client->req_len + bytes_to_int32(sizeof(bigLength)); if (client->swapped) swapl(&bigLength, n); RecordAProtocolElement(pContext, client, XRecordFromClient, @@ -615,7 +613,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) if (pContext->continuedReply) { RecordAProtocolElement(pContext, client, XRecordFromServer, - pri->replyData, pri->dataLenBytes, /* continuation */ -1); + (pointer)pri->replyData, pri->dataLenBytes, /* continuation */ -1); if (!pri->bytesRemaining) pContext->continuedReply = 0; } @@ -625,7 +623,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) if (majorop <= 127) { /* core reply */ RecordAProtocolElement(pContext, client, XRecordFromServer, - pri->replyData, pri->dataLenBytes, pri->bytesRemaining); + (pointer)pri->replyData, pri->dataLenBytes, pri->bytesRemaining); if (pri->bytesRemaining) pContext->continuedReply = 1; } @@ -646,7 +644,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) minorop)) { RecordAProtocolElement(pContext, client, - XRecordFromServer, pri->replyData, + XRecordFromServer, (pointer)pri->replyData, pri->dataLenBytes, pri->bytesRemaining); if (pri->bytesRemaining) pContext->continuedReply = 1; @@ -1168,10 +1166,12 @@ RecordDeleteClientFromContext(RecordContextPtr pContext, XID clientspec) * Side Effects: none. */ static int -RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec) +RecordSanityCheckClientSpecifiers(ClientPtr client, XID *clientspecs, int nspecs, XID errorspec) { int i; int clientIndex; + int rc; + pointer value; for (i = 0; i < nspecs; i++) { @@ -1187,8 +1187,10 @@ RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec) { if (clientspecs[i] == clients[clientIndex]->clientAsMask) continue; - if (!LookupIDByClass(clientspecs[i], RC_ANY)) - return BadMatch; + rc = dixLookupResourceByClass(&value, clientspecs[i], RC_ANY, + client, DixGetAttrAccess); + if (rc != Success) + return rc; } else return BadMatch; @@ -1344,8 +1346,8 @@ RecordSanityCheckRegisterClients(RecordContextPtr pContext, ClientPtr client, xR recordingClient = pContext->pRecordingClient ? pContext->pRecordingClient->clientAsMask : 0; - err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1], stuff->nClients, - recordingClient); + err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1], + stuff->nClients, recordingClient); if (err != Success) return err; pRange = (xRecordRange *)(((XID *)&stuff[1]) + stuff->nClients); @@ -1960,7 +1962,7 @@ ProcRecordUnregisterClients(ClientPtr client) 4 * stuff->nClients) return BadLength; VERIFY_CONTEXT(pContext, stuff->context, client); - err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1], + err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1], stuff->nClients, 0); if (err != Success) return err; @@ -2277,8 +2279,8 @@ ProcRecordGetContext(ClientPtr client) { rep.nClients += pRCAP->numClients; rep.length += pRCAP->numClients * - ( (sizeof(xRecordClientInfo) >> 2) + - pri->nRanges * (sizeof(xRecordRange) >> 2)); + ( bytes_to_int32(sizeof(xRecordClientInfo)) + + pri->nRanges * bytes_to_int32(sizeof(xRecordRange))); } /* write the reply header */ @@ -2577,13 +2579,13 @@ SwapCreateRegister(xRecordRegisterClientsReq *stuff) swapl(&stuff->nClients, n); swapl(&stuff->nRanges, n); pClientID = (XID *)&stuff[1]; - if (stuff->nClients > stuff->length - (sz_xRecordRegisterClientsReq >> 2)) + if (stuff->nClients > stuff->length - bytes_to_int32(sz_xRecordRegisterClientsReq)) return BadLength; for (i = 0; i < stuff->nClients; i++, pClientID++) { swapl(pClientID, n); } - if (stuff->nRanges > stuff->length - (sz_xRecordRegisterClientsReq >> 2) + if (stuff->nRanges > stuff->length - bytes_to_int32(sz_xRecordRegisterClientsReq) - stuff->nClients) return BadLength; RecordSwapRanges((xRecordRange *)pClientID, stuff->nRanges); @@ -2738,8 +2740,8 @@ RecordConnectionSetupInfo(RecordContextPtr pContext, NewClientInfoRec *pci) char *pConnSetup = (char *)xalloc(prefixsize + restsize); if (!pConnSetup) return; - SwapConnSetupPrefix(pci->prefix, pConnSetup); - SwapConnSetupInfo(pci->setup, pConnSetup + prefixsize); + SwapConnSetupPrefix(pci->prefix, (xConnSetupPrefix*)pConnSetup); + SwapConnSetupInfo((char*)pci->setup, (char*)(pConnSetup + prefixsize)); RecordAProtocolElement(pContext, pci->client, XRecordClientStarted, (pointer)pConnSetup, prefixsize + restsize, 0); xfree(pConnSetup); @@ -2862,6 +2864,13 @@ RecordCloseDown(ExtensionEntry *extEntry) void RecordExtensionInit(void) { + /* FIXME Record is currently broken. Dont initialize it so that clients + * that require it can bail out correctly rather than waiting for stuff + * that'll never happen */ + ErrorF("record: RECORD extension enabled at configure time.\n"); + ErrorF("record: This extension is known to be broken, disabling extension now..\n"); + ErrorF("record: http://bugs.freedesktop.org/show_bug.cgi?id=20500\n"); +#if 0 ExtensionEntry *extentry; RTContext = CreateNewResourceType(RecordDeleteContext); @@ -2884,5 +2893,6 @@ RecordExtensionInit(void) } RecordErrorBase = extentry->errorBase; +#endif } /* RecordExtensionInit */ diff --git a/xorg-server/render/Makefile.in b/xorg-server/render/Makefile.in index 59e271678..1a1c1eeca 100644 --- a/xorg-server/render/Makefile.in +++ b/xorg-server/render/Makefile.in @@ -39,8 +39,11 @@ subdir = render DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -104,6 +108,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -124,9 +129,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -155,7 +163,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -164,9 +174,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -205,12 +219,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -230,7 +245,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -240,6 +254,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -253,11 +268,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -293,6 +307,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -317,7 +332,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -340,6 +354,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -371,7 +386,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/xorg-server/render/animcur.c b/xorg-server/render/animcur.c index d80094d98..276e5e4af 100644 --- a/xorg-server/render/animcur.c +++ b/xorg-server/render/animcur.c @@ -104,17 +104,6 @@ static DevPrivateKey AnimCurScreenPrivateKey = &AnimCurScreenPrivateKeyIndex; #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) #define Unwrap(as,s,elt) ((s)->elt = (as)->elt) -static Bool -AnimCurDisplayCursor (DeviceIntPtr pDev, - ScreenPtr pScreen, - CursorPtr pCursor); - -static Bool -AnimCurSetCursorPosition (DeviceIntPtr pDev, - ScreenPtr pScreen, - int x, - int y, - Bool generateEvent); static Bool AnimCurCloseScreen (int index, ScreenPtr pScreen) @@ -157,7 +146,7 @@ AnimCurCursorLimits (DeviceIntPtr pDev, } else { - (*pScreen->CursorLimits) (inputInfo.pointer, pScreen, pCursor, + (*pScreen->CursorLimits) (pDev, pScreen, pCursor, pHotBox, pTopLeftBox); } Wrap (as, pScreen, CursorLimits, AnimCurCursorLimits); diff --git a/xorg-server/render/filter.c b/xorg-server/render/filter.c index 21eedca31..89cc0646a 100644 --- a/xorg-server/render/filter.c +++ b/xorg-server/render/filter.c @@ -123,7 +123,7 @@ PictureFreeFilterIds (void) filterNames = 0; } -_X_EXPORT int +int PictureAddFilter (ScreenPtr pScreen, char *filter, PictFilterValidateParamsProcPtr ValidateParams, @@ -159,7 +159,7 @@ PictureAddFilter (ScreenPtr pScreen, return id; } -_X_EXPORT Bool +Bool PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias) { PictureScreenPtr ps = GetPictureScreen(pScreen); diff --git a/xorg-server/render/glyph.c b/xorg-server/render/glyph.c index 87b332e2a..7c044aada 100644 --- a/xorg-server/render/glyph.c +++ b/xorg-server/render/glyph.c @@ -614,7 +614,7 @@ GlyphExtents (int nlist, #define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) -_X_EXPORT void +void CompositeGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -645,7 +645,7 @@ miUnrealizeGlyph (ScreenPtr pScreen, { } -_X_EXPORT void +void miGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, diff --git a/xorg-server/render/glyphstr.h b/xorg-server/render/glyphstr.h index 67b21fe63..6c1a837e0 100644 --- a/xorg-server/render/glyphstr.h +++ b/xorg-server/render/glyphstr.h @@ -91,58 +91,58 @@ typedef struct _GlyphList { PictFormatPtr format; } GlyphListRec, *GlyphListPtr; -GlyphHashSetPtr +extern _X_EXPORT GlyphHashSetPtr FindGlyphHashSet (CARD32 filled); -void +extern _X_EXPORT void GlyphUninit (ScreenPtr pScreen); -GlyphHashSetPtr +extern _X_EXPORT GlyphHashSetPtr FindGlyphHashSet (CARD32 filled); -GlyphRefPtr +extern _X_EXPORT GlyphRefPtr FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, unsigned char sha1[20]); -GlyphPtr +extern _X_EXPORT GlyphPtr FindGlyphByHash (unsigned char sha1[20], int format); -int +extern _X_EXPORT int HashGlyph (xGlyphInfo *gi, CARD8 *bits, unsigned long size, unsigned char sha1[20]); -void +extern _X_EXPORT void FreeGlyph (GlyphPtr glyph, int format); -void +extern _X_EXPORT void AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id); -Bool +extern _X_EXPORT Bool DeleteGlyph (GlyphSetPtr glyphSet, Glyph id); -GlyphPtr +extern _X_EXPORT GlyphPtr FindGlyph (GlyphSetPtr glyphSet, Glyph id); -GlyphPtr +extern _X_EXPORT GlyphPtr AllocateGlyph (xGlyphInfo *gi, int format); -Bool +extern _X_EXPORT Bool AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet); -Bool +extern _X_EXPORT Bool ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global); -Bool +extern _X_EXPORT Bool ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change); -GlyphSetPtr +extern _X_EXPORT GlyphSetPtr AllocateGlyphSet (int fdepth, PictFormatPtr format); -int +extern _X_EXPORT int FreeGlyphSet (pointer value, XID gid); diff --git a/xorg-server/render/matrix.c b/xorg-server/render/matrix.c index 3b55eb989..eccb90270 100644 --- a/xorg-server/render/matrix.c +++ b/xorg-server/render/matrix.c @@ -39,7 +39,7 @@ #include "servermd.h" #include "picturestr.h" -_X_EXPORT void +void PictTransform_from_xRenderTransform (PictTransformPtr pict, xRenderTransform *render) { @@ -56,7 +56,7 @@ PictTransform_from_xRenderTransform (PictTransformPtr pict, pict->matrix[2][2] = render->matrix33; } -_X_EXPORT void +void xRenderTransform_from_PictTransform (xRenderTransform *render, PictTransformPtr pict) { @@ -73,14 +73,14 @@ xRenderTransform_from_PictTransform (xRenderTransform *render, render->matrix33 = pict->matrix[2][2]; } -_X_EXPORT Bool +Bool PictureTransformPoint (PictTransformPtr transform, PictVectorPtr vector) { return pixman_transform_point(transform, vector); } -_X_EXPORT Bool +Bool PictureTransformPoint3d (PictTransformPtr transform, PictVectorPtr vector) { diff --git a/xorg-server/render/mipict.c b/xorg-server/render/mipict.c index 2fadd8c36..71f3de718 100644 --- a/xorg-server/render/mipict.c +++ b/xorg-server/render/mipict.c @@ -313,32 +313,24 @@ miClipPictureSrc (RegionPtr pRegion, int dx, int dy) { - /* XXX what to do with clipping from transformed pictures? */ - if (pPicture->transform || !pPicture->pDrawable) - return TRUE; - if (pPicture->repeat) + if (pPicture->clientClipType != CT_NONE) { - if (pPicture->clientClipType != CT_NONE) - { - pixman_region_translate ( pRegion, - dx - pPicture->clipOrigin.x, - dy - pPicture->clipOrigin.y); - if (!REGION_INTERSECT (pScreen, pRegion, pRegion, - (RegionPtr) pPicture->pCompositeClip)) // clientClip)) - return FALSE; - pixman_region_translate ( pRegion, - - (dx - pPicture->clipOrigin.x), - - (dy - pPicture->clipOrigin.y)); - } - return TRUE; - } - else - { - return miClipPictureReg (pRegion, - pPicture->pCompositeClip, - dx, - dy); + Bool result; + + pixman_region_translate ( pPicture->clientClip, + pPicture->clipOrigin.x - dx, + pPicture->clipOrigin.y - dy); + + result = REGION_INTERSECT (pScreen, pRegion, pRegion, pPicture->clientClip); + + pixman_region_translate ( pPicture->clientClip, + - (pPicture->clipOrigin.x - dx), + - (pPicture->clipOrigin.y - dy)); + + if (!result) + return FALSE; } + return TRUE; } void @@ -358,8 +350,6 @@ miCompositeSourceValidate (PicturePtr pPicture, if (pScreen->SourceValidate) { - x -= pPicture->pDrawable->x; - y -= pPicture->pDrawable->y; if (pPicture->transform) { xPoint points[4]; @@ -394,6 +384,8 @@ miCompositeSourceValidate (PicturePtr pPicture, width = xmax - xmin; height = ymax - ymin; } + x += pPicture->pDrawable->x; + y += pPicture->pDrawable->y; (*pScreen->SourceValidate) (pDrawable, x, y, width, height); } } @@ -403,7 +395,7 @@ miCompositeSourceValidate (PicturePtr pPicture, * an allocation failure, but rendering ignores those anyways. */ -_X_EXPORT Bool +Bool miComputeCompositeRegion (RegionPtr pRegion, PicturePtr pSrc, PicturePtr pMask, @@ -459,8 +451,8 @@ miComputeCompositeRegion (RegionPtr pRegion, if (pSrc->alphaMap) { if (!miClipPictureSrc (pRegion, pSrc->alphaMap, - xDst - (xSrc + pSrc->alphaOrigin.x), - yDst - (ySrc + pSrc->alphaOrigin.y))) + xDst - (xSrc - pSrc->alphaOrigin.x), + yDst - (ySrc - pSrc->alphaOrigin.y))) { pixman_region_fini (pRegion); return FALSE; @@ -477,8 +469,8 @@ miComputeCompositeRegion (RegionPtr pRegion, if (pMask->alphaMap) { if (!miClipPictureSrc (pRegion, pMask->alphaMap, - xDst - (xMask + pMask->alphaOrigin.x), - yDst - (yMask + pMask->alphaOrigin.y))) + xDst - (xMask - pMask->alphaOrigin.x), + yDst - (yMask - pMask->alphaOrigin.y))) { pixman_region_fini (pRegion); return FALSE; @@ -612,7 +604,7 @@ miRenderPixelToColor (PictFormatPtr format, } } -_X_EXPORT Bool +Bool miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { PictureScreenPtr ps; diff --git a/xorg-server/render/mipict.h b/xorg-server/render/mipict.h index 60baf7f66..eb6b6645d 100644 --- a/xorg-server/render/mipict.h +++ b/xorg-server/render/mipict.h @@ -47,54 +47,46 @@ typedef struct _miIndexed { #define miIndexToEntY24(mif,rgb24) ((mif)->ent[CvtR8G8B8toY15(rgb24)]) -int +extern _X_EXPORT int miCreatePicture (PicturePtr pPicture); -void +extern _X_EXPORT void miDestroyPicture (PicturePtr pPicture); -void +extern _X_EXPORT void miDestroyPictureClip (PicturePtr pPicture); -int +extern _X_EXPORT int miChangePictureClip (PicturePtr pPicture, int type, pointer value, int n); -void +extern _X_EXPORT void miChangePicture (PicturePtr pPicture, Mask mask); -void +extern _X_EXPORT void miValidatePicture (PicturePtr pPicture, Mask mask); -int +extern _X_EXPORT int miChangePictureTransform (PicturePtr pPicture, PictTransform *transform); -int +extern _X_EXPORT int miChangePictureFilter (PicturePtr pPicture, int filter, xFixed *params, int nparams); -Bool -miClipPicture (RegionPtr pRegion, - PicturePtr pPicture, - INT16 xReg, - INT16 yReg, - INT16 xPict, - INT16 yPict); - -void +extern _X_EXPORT void miCompositeSourceValidate (PicturePtr pPicture, INT16 x, INT16 y, CARD16 width, CARD16 height); -Bool +extern _X_EXPORT Bool miComputeCompositeRegion (RegionPtr pRegion, PicturePtr pSrc, PicturePtr pMask, @@ -108,18 +100,18 @@ miComputeCompositeRegion (RegionPtr pRegion, CARD16 width, CARD16 height); -Bool +extern _X_EXPORT Bool miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); -Bool +extern _X_EXPORT Bool miRealizeGlyph (ScreenPtr pScreen, GlyphPtr glyph); -void +extern _X_EXPORT void miUnrealizeGlyph (ScreenPtr pScreen, GlyphPtr glyph); -void +extern _X_EXPORT void miGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -130,30 +122,30 @@ miGlyphs (CARD8 op, GlyphListPtr list, GlyphPtr *glyphs); -void +extern _X_EXPORT void miRenderColorToPixel (PictFormatPtr pPict, xRenderColor *color, CARD32 *pixel); -void +extern _X_EXPORT void miRenderPixelToColor (PictFormatPtr pPict, CARD32 pixel, xRenderColor *color); -Bool +extern _X_EXPORT Bool miIsSolidAlpha (PicturePtr pSrc); -void +extern _X_EXPORT void miCompositeRects (CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect, xRectangle *rects); -void +extern _X_EXPORT void miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box); -void +extern _X_EXPORT void miTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -163,19 +155,13 @@ miTrapezoids (CARD8 op, int ntrap, xTrapezoid *traps); -void +extern _X_EXPORT void miPointFixedBounds (int npoint, xPointFixed *points, BoxPtr bounds); -void +extern _X_EXPORT void miTriangleBounds (int ntri, xTriangle *tris, BoxPtr bounds); -void -miRasterizeTriangle (PicturePtr pMask, - xTriangle *tri, - int x_off, - int y_off); - -void +extern _X_EXPORT void miTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -185,7 +171,7 @@ miTriangles (CARD8 op, int ntri, xTriangle *tris); -void +extern _X_EXPORT void miTriStrip (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -195,7 +181,7 @@ miTriStrip (CARD8 op, int npoint, xPointFixed *points); -void +extern _X_EXPORT void miTriFan (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -205,22 +191,22 @@ miTriFan (CARD8 op, int npoint, xPointFixed *points); -PicturePtr +extern _X_EXPORT PicturePtr miCreateAlphaPicture (ScreenPtr pScreen, PicturePtr pDst, PictFormatPtr pPictFormat, CARD16 width, CARD16 height); -Bool +extern _X_EXPORT Bool miInitIndexed (ScreenPtr pScreen, PictFormatPtr pFormat); -void +extern _X_EXPORT void miCloseIndexed (ScreenPtr pScreen, PictFormatPtr pFormat); -void +extern _X_EXPORT void miUpdateIndexed (ScreenPtr pScreen, PictFormatPtr pFormat, int ndef, diff --git a/xorg-server/render/mirect.c b/xorg-server/render/mirect.c index 38f4faf67..b54fe6fe6 100644 --- a/xorg-server/render/mirect.c +++ b/xorg-server/render/mirect.c @@ -94,7 +94,7 @@ miColorRects (PicturePtr pDst, FreeScratchGC (pGC); } -_X_EXPORT void +void miCompositeRects (CARD8 op, PicturePtr pDst, xRenderColor *color, diff --git a/xorg-server/render/picture.c b/xorg-server/render/picture.c index 956738734..a3670778e 100644 --- a/xorg-server/render/picture.c +++ b/xorg-server/render/picture.c @@ -44,7 +44,7 @@ #include "registry.h" static int PictureScreenPrivateKeyIndex; -_X_EXPORT DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKeyIndex; +DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKeyIndex; static int PictureWindowPrivateKeyIndex; DevPrivateKey PictureWindowPrivateKey = &PictureWindowPrivateKeyIndex; static int PictureGeneration; @@ -200,6 +200,12 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) formats[nformats].format = PICT_x8r8g8b8; formats[nformats].depth = 32; nformats++; + formats[nformats].format = PICT_b8g8r8a8; + formats[nformats].depth = 32; + nformats++; + formats[nformats].format = PICT_b8g8r8x8; + formats[nformats].depth = 32; + nformats++; /* now look through the depths and visuals adding other formats */ for (v = 0; v < pScreen->numVisuals; v++) @@ -233,6 +239,12 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) { type = PICT_TYPE_ABGR; } + else if (pVisual->offsetRed == pVisual->offsetGreen - r && + pVisual->offsetGreen == pVisual->offsetBlue - g && + pVisual->offsetBlue == bpp - b) + { + type = PICT_TYPE_BGRA; + } if (type != PICT_TYPE_OTHER) { format = PICT_FORMAT(bpp, type, 0, r, g, b); @@ -310,6 +322,19 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) PICT_x8r8g8b8, pDepth->depth); nformats = addFormat (formats, nformats, PICT_x8b8g8r8, pDepth->depth); + nformats = addFormat (formats, nformats, + PICT_b8g8r8x8, pDepth->depth); + } + if (pDepth->depth >= 30) + { + nformats = addFormat (formats, nformats, + PICT_a2r10g10b10, pDepth->depth); + nformats = addFormat (formats, nformats, + PICT_x2r10g10b10, pDepth->depth); + nformats = addFormat (formats, nformats, + PICT_a2b10g10r10, pDepth->depth); + nformats = addFormat (formats, nformats, + PICT_x2b10g10r10, pDepth->depth); } break; } @@ -366,6 +391,24 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) pFormats[f].direct.red = 0; break; + case PICT_TYPE_BGRA: + pFormats[f].type = PictTypeDirect; + + pFormats[f].direct.blueMask = Mask(PICT_FORMAT_B(format)); + pFormats[f].direct.blue = (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format)); + + pFormats[f].direct.greenMask = Mask(PICT_FORMAT_G(format)); + pFormats[f].direct.green = (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format) - + PICT_FORMAT_G(format)); + + pFormats[f].direct.redMask = Mask(PICT_FORMAT_R(format)); + pFormats[f].direct.red = (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format) - + PICT_FORMAT_G(format) - PICT_FORMAT_R(format)); + + pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format)); + pFormats[f].direct.alpha = 0; + break; + case PICT_TYPE_A: pFormats[f].type = PictTypeDirect; @@ -410,8 +453,9 @@ PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format) return TRUE; if (format->index.vid == pScreen->rootVisual) { - format->index.pColormap = - (ColormapPtr) LookupIDByType(pScreen->defColormap, RT_COLORMAP); + dixLookupResourceByType((pointer *)&format->index.pColormap, + pScreen->defColormap, RT_COLORMAP, + serverClient, DixGetAttrAccess); } else { VisualPtr pVisual = PictureFindVisual(pScreen, format->index.vid); if (CreateColormap(FakeClientID (0), pScreen, pVisual, @@ -456,7 +500,7 @@ PictureFinishInit (void) return TRUE; } -_X_EXPORT Bool +Bool PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); @@ -468,7 +512,7 @@ PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel) } -_X_EXPORT int +int PictureGetSubpixelOrder (ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); @@ -568,7 +612,7 @@ PictureParseCmapPolicy (const char *name) return PictureCmapPolicyInvalid; } -_X_EXPORT Bool +Bool PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { PictureScreenPtr ps; @@ -621,8 +665,10 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) type = PICT_TYPE_A; else if (formats[n].direct.red > formats[n].direct.blue) type = PICT_TYPE_ARGB; - else + else if (formats[n].direct.red == 0) type = PICT_TYPE_ABGR; + else + type = PICT_TYPE_BGRA; a = Ones (formats[n].direct.alphaMask); r = Ones (formats[n].direct.redMask); g = Ones (formats[n].direct.greenMask); diff --git a/xorg-server/render/picture.h b/xorg-server/render/picture.h index 045b29944..8bd38b98e 100644 --- a/xorg-server/render/picture.h +++ b/xorg-server/render/picture.h @@ -25,6 +25,8 @@ #ifndef _PICTURE_H_ #define _PICTURE_H_ +#include "privates.h" + #include typedef struct _DirectFormat *DirectFormatPtr; @@ -60,15 +62,23 @@ typedef struct _Picture *PicturePtr; #define PICT_TYPE_ABGR PIXMAN_TYPE_ABGR #define PICT_TYPE_COLOR PIXMAN_TYPE_COLOR #define PICT_TYPE_GRAY PIXMAN_TYPE_GRAY +#define PICT_TYPE_BGRA PIXMAN_TYPE_BGRA #define PICT_FORMAT_COLOR(f) PIXMAN_FORMAT_COLOR(f) /* 32bpp formats */ typedef enum _PictFormatShort { + PICT_a2r10g10b10 = PIXMAN_a2r10g10b10, + PICT_x2r10g10b10 = PIXMAN_x2r10g10b10, + PICT_a2b10g10r10 = PIXMAN_a2b10g10r10, + PICT_x2b10g10r10 = PIXMAN_x2b10g10r10, + PICT_a8r8g8b8 = PIXMAN_a8r8g8b8, PICT_x8r8g8b8 = PIXMAN_x8r8g8b8, PICT_a8b8g8r8 = PIXMAN_a8b8g8r8, PICT_x8b8g8r8 = PIXMAN_x8b8g8r8, + PICT_b8g8r8a8 = PIXMAN_b8g8r8a8, + PICT_b8g8r8x8 = PIXMAN_b8g8r8x8, /* 24bpp formats */ PICT_r8g8b8 = PIXMAN_r8g8b8, @@ -159,12 +169,12 @@ typedef enum _PictFormatShort { #define PictureCmapPolicyColor 3 #define PictureCmapPolicyAll 4 -extern int PictureCmapPolicy; +extern _X_EXPORT int PictureCmapPolicy; -int PictureParseCmapPolicy (const char *name); +extern _X_EXPORT int PictureParseCmapPolicy (const char *name); -extern int RenderErrBase; -extern DevPrivateKey RenderClientPrivateKey; +extern _X_EXPORT int RenderErrBase; +extern _X_EXPORT DevPrivateKey RenderClientPrivateKey; /* Fixed point updates from Carl Worth, USC, Information Sciences Institute */ diff --git a/xorg-server/render/picturestr.h b/xorg-server/render/picturestr.h index 4d788fcfb..6a8d76d99 100644 --- a/xorg-server/render/picturestr.h +++ b/xorg-server/render/picturestr.h @@ -396,11 +396,11 @@ typedef struct _PictureScreen { } PictureScreenRec, *PictureScreenPtr; -extern DevPrivateKey PictureScreenPrivateKey; -extern DevPrivateKey PictureWindowPrivateKey; -extern RESTYPE PictureType; -extern RESTYPE PictFormatType; -extern RESTYPE GlyphSetType; +extern _X_EXPORT DevPrivateKey PictureScreenPrivateKey; +extern _X_EXPORT DevPrivateKey PictureWindowPrivateKey; +extern _X_EXPORT RESTYPE PictureType; +extern _X_EXPORT RESTYPE PictFormatType; +extern _X_EXPORT RESTYPE GlyphSetType; #define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey)) #define GetPictureScreenIfSet(s) GetPictureScreen(s) @@ -409,11 +409,10 @@ extern RESTYPE GlyphSetType; #define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p) #define VERIFY_PICTURE(pPicture, pid, client, mode, err) {\ - pPicture = SecurityLookupIDByType(client, pid, PictureType, mode);\ - if (!pPicture) { \ - client->errorValue = pid; \ - return err; \ - } \ + int rc = dixLookupResourceByType((pointer)&(pPicture), pid,\ + PictureType, client, mode);\ + if (rc != Success)\ + return (rc == BadValue) ? err : rc;\ } #define VERIFY_ALPHA(pPicture, pid, client, mode, err) {\ @@ -424,76 +423,76 @@ extern RESTYPE GlyphSetType; } \ } \ -Bool +extern _X_EXPORT Bool PictureDestroyWindow (WindowPtr pWindow); -Bool +extern _X_EXPORT Bool PictureCloseScreen (int Index, ScreenPtr pScreen); -void +extern _X_EXPORT void PictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef); -Bool +extern _X_EXPORT Bool PictureInitIndexedFormat (ScreenPtr pScreen, PictFormatPtr format); -Bool +extern _X_EXPORT Bool PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel); -int +extern _X_EXPORT int PictureGetSubpixelOrder (ScreenPtr pScreen); -PictFormatPtr +extern _X_EXPORT PictFormatPtr PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp); -PictFormatPtr +extern _X_EXPORT PictFormatPtr PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual); -PictFormatPtr +extern _X_EXPORT PictFormatPtr PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 format); -Bool +extern _X_EXPORT Bool PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); -int +extern _X_EXPORT int PictureGetFilterId (char *filter, int len, Bool makeit); -char * +extern _X_EXPORT char * PictureGetFilterName (int id); -int +extern _X_EXPORT int PictureAddFilter (ScreenPtr pScreen, char *filter, PictFilterValidateParamsProcPtr ValidateParams, int width, int height); -Bool +extern _X_EXPORT Bool PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias); -Bool +extern _X_EXPORT Bool PictureSetDefaultFilters (ScreenPtr pScreen); -void +extern _X_EXPORT void PictureResetFilters (ScreenPtr pScreen); -PictFilterPtr +extern _X_EXPORT PictFilterPtr PictureFindFilter (ScreenPtr pScreen, char *name, int len); -int +extern _X_EXPORT int SetPicturePictFilter (PicturePtr pPicture, PictFilterPtr pFilter, xFixed *params, int nparams); -int +extern _X_EXPORT int SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int nparams); -Bool +extern _X_EXPORT Bool PictureFinishInit (void); -void +extern _X_EXPORT void SetPictureToDefaults (PicturePtr pPicture); -PicturePtr +extern _X_EXPORT PicturePtr CreatePicture (Picture pid, DrawablePtr pDrawable, PictFormatPtr pFormat, @@ -502,47 +501,47 @@ CreatePicture (Picture pid, ClientPtr client, int *error); -int +extern _X_EXPORT int ChangePicture (PicturePtr pPicture, Mask vmask, XID *vlist, DevUnion *ulist, ClientPtr client); -int +extern _X_EXPORT int SetPictureClipRects (PicturePtr pPicture, int xOrigin, int yOrigin, int nRect, xRectangle *rects); -int +extern _X_EXPORT int SetPictureClipRegion (PicturePtr pPicture, int xOrigin, int yOrigin, RegionPtr pRegion); -int +extern _X_EXPORT int SetPictureTransform (PicturePtr pPicture, PictTransform *transform); -void +extern _X_EXPORT void CopyPicture (PicturePtr pSrc, Mask mask, PicturePtr pDst); -void +extern _X_EXPORT void ValidatePicture(PicturePtr pPicture); -int +extern _X_EXPORT int FreePicture (pointer pPicture, XID pid); -int +extern _X_EXPORT int FreePictFormat (pointer pPictFormat, XID pid); -void +extern _X_EXPORT void CompositePicture (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -556,7 +555,7 @@ CompositePicture (CARD8 op, CARD16 width, CARD16 height); -void +extern _X_EXPORT void CompositeGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -567,14 +566,14 @@ CompositeGlyphs (CARD8 op, GlyphListPtr lists, GlyphPtr *glyphs); -void +extern _X_EXPORT void CompositeRects (CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect, xRectangle *rects); -void +extern _X_EXPORT void CompositeTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -584,7 +583,7 @@ CompositeTrapezoids (CARD8 op, int ntrap, xTrapezoid *traps); -void +extern _X_EXPORT void CompositeTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -594,7 +593,7 @@ CompositeTriangles (CARD8 op, int ntriangles, xTriangle *triangles); -void +extern _X_EXPORT void CompositeTriStrip (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -604,7 +603,7 @@ CompositeTriStrip (CARD8 op, int npoints, xPointFixed *points); -void +extern _X_EXPORT void CompositeTriFan (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -614,12 +613,12 @@ CompositeTriFan (CARD8 op, int npoints, xPointFixed *points); -CARD32 +extern _X_EXPORT CARD32 PictureGradientColor (PictGradientStopPtr stop1, PictGradientStopPtr stop2, CARD32 x); -void RenderExtensionInit (void); +extern _X_EXPORT void RenderExtensionInit (void); Bool AnimCurInit (ScreenPtr pScreen); @@ -627,23 +626,19 @@ AnimCurInit (ScreenPtr pScreen); int AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor, ClientPtr client, XID cid); -void +extern _X_EXPORT void AddTraps (PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntraps, xTrap *traps); -pixman_image_t * -PixmanImageFromPicture (PicturePtr pPict, - Bool hasClip); - -PicturePtr +extern _X_EXPORT PicturePtr CreateSolidPicture (Picture pid, xRenderColor *color, int *error); -PicturePtr +extern _X_EXPORT PicturePtr CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2, @@ -652,7 +647,7 @@ CreateLinearGradientPicture (Picture pid, xRenderColor *colors, int *error); -PicturePtr +extern _X_EXPORT PicturePtr CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer, @@ -663,7 +658,7 @@ CreateRadialGradientPicture (Picture pid, xRenderColor *colors, int *error); -PicturePtr +extern _X_EXPORT PicturePtr CreateConicalGradientPicture (Picture pid, xPointFixed *center, xFixed angle, @@ -673,27 +668,27 @@ CreateConicalGradientPicture (Picture pid, int *error); #ifdef PANORAMIX -void PanoramiXRenderInit (void); -void PanoramiXRenderReset (void); +extern _X_EXPORT void PanoramiXRenderInit (void); +extern _X_EXPORT void PanoramiXRenderReset (void); #endif /* * matrix.c */ -void +extern _X_EXPORT void PictTransform_from_xRenderTransform (PictTransformPtr pict, xRenderTransform *render); -void +extern _X_EXPORT void xRenderTransform_from_PictTransform (xRenderTransform *render, PictTransformPtr pict); -Bool +extern _X_EXPORT Bool PictureTransformPoint (PictTransformPtr transform, PictVectorPtr vector); -Bool +extern _X_EXPORT Bool PictureTransformPoint3d (PictTransformPtr transform, PictVectorPtr vector); diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c index e3d76d2c1..995ebd956 100644 --- a/xorg-server/render/render.c +++ b/xorg-server/render/render.c @@ -22,8 +22,6 @@ * Author: Keith Packard, SuSE, Inc. */ -#define NEED_REPLIES -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -268,6 +266,7 @@ ProcRenderQueryVersion (ClientPtr client) pRenderClient->minor_version = stuff->minorVersion; REQUEST_SIZE_MATCH(xRenderQueryVersionReq); + memset(&rep, 0, sizeof(xRenderQueryVersionReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -365,12 +364,12 @@ ProcRenderQueryPictFormats (ClientPtr client) ndepth * sizeof (xPictDepth) + nvisual * sizeof (xPictVisual) + numSubpixel * sizeof (CARD32)); - reply = (xRenderQueryPictFormatsReply *) xalloc (rlength); + reply = (xRenderQueryPictFormatsReply *) xcalloc (1, rlength); if (!reply) return BadAlloc; reply->type = X_Reply; reply->sequenceNumber = client->sequence; - reply->length = (rlength - sizeof(xGenericReply)) >> 2; + reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); reply->numFormats = nformat; reply->numScreens = numScreens; reply->numDepths = ndepth; @@ -510,7 +509,7 @@ static int ProcRenderQueryPictIndexValues (ClientPtr client) { PictFormatPtr pFormat; - int num; + int rc, num; int rlength; int i, n; REQUEST(xRenderQueryPictIndexValuesReq); @@ -519,16 +518,11 @@ ProcRenderQueryPictIndexValues (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq); - pFormat = (PictFormatPtr) SecurityLookupIDByType (client, - stuff->format, - PictFormatType, - DixReadAccess); + rc = dixLookupResourceByType((pointer *)&pFormat, stuff->format, + PictFormatType, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; - if (!pFormat) - { - client->errorValue = stuff->format; - return RenderErrBase + BadPictFormat; - } if (pFormat->type != PictTypeIndexed) { client->errorValue = stuff->format; @@ -543,7 +537,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client) reply->type = X_Reply; reply->sequenceNumber = client->sequence; - reply->length = (rlength - sizeof(xGenericReply)) >> 2; + reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); reply->numIndexValues = num; values = (xIndexValue *) (reply + 1); @@ -593,18 +587,14 @@ ProcRenderCreatePicture (ClientPtr client) if (rc != Success) return rc; - pFormat = (PictFormatPtr) SecurityLookupIDByType (client, - stuff->format, - PictFormatType, - DixReadAccess); - if (!pFormat) - { - client->errorValue = stuff->format; - return RenderErrBase + BadPictFormat; - } + rc = dixLookupResourceByType((pointer *)&pFormat, stuff->format, + PictFormatType, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + if (pFormat->depth != pDrawable->depth) return BadMatch; - len = client->req_len - (sizeof(xRenderCreatePictureReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xRenderCreatePictureReq)); if (Ones(stuff->mask) != len) return BadLength; @@ -633,7 +623,7 @@ ProcRenderChangePicture (ClientPtr client) VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, RenderErrBase + BadPicture); - len = client->req_len - (sizeof(xRenderChangePictureReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xRenderChangePictureReq)); if (Ones(stuff->mask) != len) return BadLength; @@ -691,6 +681,8 @@ PictOpValid (CARD8 op) return TRUE; if (PictOpConjointMinimum <= op && op <= PictOpConjointMaximum) return TRUE; + if (PictOpBlendMinimum <= op && op <= PictOpBlendMaximum) + return TRUE; return FALSE; } @@ -741,7 +733,7 @@ ProcRenderScale (ClientPtr client) static int ProcRenderTrapezoids (ClientPtr client) { - int ntraps; + int rc, ntraps; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrapezoidsReq); @@ -762,15 +754,10 @@ ProcRenderTrapezoids (ClientPtr client) return BadMatch; if (stuff->maskFormat) { - pFormat = (PictFormatPtr) SecurityLookupIDByType (client, - stuff->maskFormat, - PictFormatType, - DixReadAccess); - if (!pFormat) - { - client->errorValue = stuff->maskFormat; - return RenderErrBase + BadPictFormat; - } + rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, + PictFormatType, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; } else pFormat = 0; @@ -788,7 +775,7 @@ ProcRenderTrapezoids (ClientPtr client) static int ProcRenderTriangles (ClientPtr client) { - int ntris; + int rc, ntris; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); @@ -809,15 +796,10 @@ ProcRenderTriangles (ClientPtr client) return BadMatch; if (stuff->maskFormat) { - pFormat = (PictFormatPtr) SecurityLookupIDByType (client, - stuff->maskFormat, - PictFormatType, - DixReadAccess); - if (!pFormat) - { - client->errorValue = stuff->maskFormat; - return RenderErrBase + BadPictFormat; - } + rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, + PictFormatType, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; } else pFormat = 0; @@ -835,7 +817,7 @@ ProcRenderTriangles (ClientPtr client) static int ProcRenderTriStrip (ClientPtr client) { - int npoints; + int rc, npoints; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); @@ -856,15 +838,10 @@ ProcRenderTriStrip (ClientPtr client) return BadMatch; if (stuff->maskFormat) { - pFormat = (PictFormatPtr) SecurityLookupIDByType (client, - stuff->maskFormat, - PictFormatType, - DixReadAccess); - if (!pFormat) - { - client->errorValue = stuff->maskFormat; - return RenderErrBase + BadPictFormat; - } + rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, + PictFormatType, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; } else pFormat = 0; @@ -882,7 +859,7 @@ ProcRenderTriStrip (ClientPtr client) static int ProcRenderTriFan (ClientPtr client) { - int npoints; + int rc, npoints; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); @@ -903,15 +880,10 @@ ProcRenderTriFan (ClientPtr client) return BadMatch; if (stuff->maskFormat) { - pFormat = (PictFormatPtr) SecurityLookupIDByType (client, - stuff->maskFormat, - PictFormatType, - DixReadAccess); - if (!pFormat) - { - client->errorValue = stuff->maskFormat; - return RenderErrBase + BadPictFormat; - } + rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, + PictFormatType, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; } else pFormat = 0; @@ -955,15 +927,11 @@ ProcRenderCreateGlyphSet (ClientPtr client) REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq); LEGAL_NEW_RESOURCE(stuff->gsid, client); - format = (PictFormatPtr) SecurityLookupIDByType (client, - stuff->format, - PictFormatType, - DixReadAccess); - if (!format) - { - client->errorValue = stuff->format; - return RenderErrBase + BadPictFormat; - } + rc = dixLookupResourceByType((pointer *)&format, stuff->format, + PictFormatType, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + switch (format->depth) { case 1: f = GlyphFormat1; @@ -1269,7 +1237,7 @@ ProcRenderFreeGlyphs (ClientPtr client) client->errorValue = stuff->glyphset; return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; } - nglyph = ((client->req_len << 2) - sizeof (xRenderFreeGlyphsReq)) >> 2; + nglyph = bytes_to_int32((client->req_len << 2) - sizeof (xRenderFreeGlyphsReq)); gids = (CARD32 *) (stuff + 1); while (nglyph-- > 0) { @@ -1301,7 +1269,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) int nlist; int space; int size; - int n; + int rc, n; REQUEST(xRenderCompositeGlyphsReq); @@ -1328,28 +1296,18 @@ ProcRenderCompositeGlyphs (ClientPtr client) return BadMatch; if (stuff->maskFormat) { - pFormat = (PictFormatPtr) SecurityLookupIDByType (client, - stuff->maskFormat, - PictFormatType, - DixReadAccess); - if (!pFormat) - { - client->errorValue = stuff->maskFormat; - return RenderErrBase + BadPictFormat; - } + rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, + PictFormatType, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; } else pFormat = 0; - glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, - stuff->glyphset, - GlyphSetType, - DixUseAccess); - if (!glyphSet) - { - client->errorValue = stuff->glyphset; - return RenderErrBase + BadGlyphSet; - } + rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, + GlyphSetType, client, DixUseAccess); + if (rc != Success) + return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; buffer = (CARD8 *) (stuff + 1); end = (CARD8 *) stuff + (client->req_len << 2); @@ -1403,18 +1361,16 @@ ProcRenderCompositeGlyphs (ClientPtr client) if (buffer + sizeof (GlyphSet) < end) { memcpy(&gs, buffer, sizeof(GlyphSet)); - glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, - gs, - GlyphSetType, - DixUseAccess); - if (!glyphSet) + rc = dixLookupResourceByType((pointer *)&glyphSet, gs, + GlyphSetType, client, + DixUseAccess); + if (rc != Success) { - client->errorValue = gs; if (glyphsBase != glyphsLocal) xfree (glyphsBase); if (listsBase != listsLocal) xfree (listsBase); - return RenderErrBase + BadGlyphSet; + return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; } } buffer += 4; @@ -1507,7 +1463,7 @@ ProcRenderFillRectangles (ClientPtr client) } static void -SetBit (unsigned char *line, int x, int bit) +RenderSetBit (unsigned char *line, int x, int bit) { unsigned char mask; @@ -1678,8 +1634,8 @@ ProcRenderCreateCursor (ClientPtr client) { CARD32 a = ((p >> 24)); - SetBit (mskline, x, a != 0); - SetBit (srcline, x, a != 0 && p == twocolor[0]); + RenderSetBit (mskline, x, a != 0); + RenderSetBit (srcline, x, a != 0 && p == twocolor[0]); } else { @@ -1687,9 +1643,9 @@ ProcRenderCreateCursor (ClientPtr client) CARD32 i = ((CvtR8G8B8toY15(p) >> 7) * DITHER_SIZE + 127) / 255; CARD32 d = orderedDither[y&(DITHER_DIM-1)][x&(DITHER_DIM-1)]; /* Set mask from dithered alpha value */ - SetBit(mskline, x, a > d); + RenderSetBit(mskline, x, a > d); /* Set src from dithered intensity value */ - SetBit(srcline, x, a > d && i <= d); + RenderSetBit(srcline, x, a > d && i <= d); } } srcline += stride; @@ -1781,7 +1737,7 @@ ProcRenderQueryFilters (ClientPtr client) nbytesName += 1 + strlen (ps->filterAliases[i].alias); nnames = ps->nfilters + ps->nfilterAliases; } - len = ((nnames + 1) >> 1) + ((nbytesName + 3) >> 2); + len = ((nnames + 1) >> 1) + bytes_to_int32(nbytesName); total_bytes = sizeof (xRenderQueryFiltersReply) + (len << 2); reply = (xRenderQueryFiltersReply *) xalloc (total_bytes); if (!reply) @@ -1873,7 +1829,7 @@ ProcRenderSetPictureFilter (ClientPtr client) VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, RenderErrBase + BadPicture); name = (char *) (stuff + 1); - params = (xFixed *) (name + ((stuff->nbytes + 3) & ~3)); + params = (xFixed *) (name + pad_to_int32(stuff->nbytes)); nparams = ((xFixed *) stuff + client->req_len) - params; result = SetPictureFilter (pPicture, name, stuff->nbytes, params, nparams); return result; @@ -1895,7 +1851,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) LEGAL_NEW_RESOURCE(stuff->cid, client); if (client->req_len & 1) return BadLength; - ncursor = (client->req_len - (SIZEOF(xRenderCreateAnimCursorReq) >> 2)) >> 1; + ncursor = (client->req_len - (bytes_to_int32(sizeof(xRenderCreateAnimCursorReq)))) >> 1; cursors = xalloc (ncursor * (sizeof (CursorPtr) + sizeof (CARD32))); if (!cursors) return BadAlloc; @@ -1903,13 +1859,12 @@ ProcRenderCreateAnimCursor (ClientPtr client) elt = (xAnimCursorElt *) (stuff + 1); for (i = 0; i < ncursor; i++) { - cursors[i] = (CursorPtr)SecurityLookupIDByType(client, elt->cursor, - RT_CURSOR, DixReadAccess); - if (!cursors[i]) + ret = dixLookupResourceByType((pointer *)(cursors + i), elt->cursor, + RT_CURSOR, client, DixReadAccess); + if (ret != Success) { xfree (cursors); - client->errorValue = elt->cursor; - return BadCursor; + return (ret == BadValue) ? BadCursor : ret; } deltas[i] = elt->delay; elt++; @@ -2690,11 +2645,10 @@ SProcRenderDispatch (ClientPtr client) #include "panoramiXsrv.h" #define VERIFY_XIN_PICTURE(pPicture, pid, client, mode, err) {\ - pPicture = SecurityLookupIDByType(client, pid, XRT_PICTURE, mode);\ - if (!pPicture) { \ - client->errorValue = pid; \ - return err; \ - } \ + int rc = dixLookupResourceByType((pointer *)&(pPicture), pid,\ + XRT_PICTURE, client, mode);\ + if (rc != Success)\ + return (rc == BadValue) ? err : rc;\ } #define VERIFY_XIN_ALPHA(pPicture, pid, client, mode, err) {\ @@ -2714,12 +2668,13 @@ PanoramiXRenderCreatePicture (ClientPtr client) { REQUEST(xRenderCreatePictureReq); PanoramiXRes *refDraw, *newPict; - int result = Success, j; + int result, j; REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); - if(!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) - return BadDrawable; + result = dixLookupResourceByClass((pointer *)&refDraw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; diff --git a/xorg-server/render/renderedge.c b/xorg-server/render/renderedge.c index d0ee30716..8771fe164 100644 --- a/xorg-server/render/renderedge.c +++ b/xorg-server/render/renderedge.c @@ -31,7 +31,7 @@ * grid row */ -_X_EXPORT xFixed +xFixed RenderSampleCeilY (xFixed y, int n) { return pixman_sample_ceil_y (y, n); @@ -43,7 +43,7 @@ RenderSampleCeilY (xFixed y, int n) * Compute the largest value no greater than y which is on a * grid row */ -_X_EXPORT xFixed +xFixed RenderSampleFloorY (xFixed y, int n) { return pixman_sample_floor_y (y, n); @@ -52,7 +52,7 @@ RenderSampleFloorY (xFixed y, int n) /* * Step an edge by any amount (including negative values) */ -_X_EXPORT void +void RenderEdgeStep (RenderEdge *e, int n) { pixman_edge_step (e, n); @@ -62,7 +62,7 @@ RenderEdgeStep (RenderEdge *e, int n) * Initialize one edge structure given the line endpoints and a * starting y value */ -_X_EXPORT void +void RenderEdgeInit (RenderEdge *e, int n, xFixed y_start, @@ -78,7 +78,7 @@ RenderEdgeInit (RenderEdge *e, * Initialize one edge structure given a line, starting y value * and a pixel offset for the line */ -_X_EXPORT void +void RenderLineFixedEdgeInit (RenderEdge *e, int n, xFixed y, diff --git a/xorg-server/render/renderedge.h b/xorg-server/render/renderedge.h index 644d9d9e5..6585aeb90 100644 --- a/xorg-server/render/renderedge.h +++ b/xorg-server/render/renderedge.h @@ -76,16 +76,16 @@ typedef pixman_edge_t RenderEdge; } \ } -xFixed +extern _X_EXPORT xFixed RenderSampleCeilY (xFixed y, int bpp); -xFixed +extern _X_EXPORT xFixed RenderSampleFloorY (xFixed y, int bpp); -void +extern _X_EXPORT void RenderEdgeStep (RenderEdge *e, int n); -void +extern _X_EXPORT void RenderEdgeInit (RenderEdge *e, int bpp, xFixed y_start, @@ -94,7 +94,7 @@ RenderEdgeInit (RenderEdge *e, xFixed x_bot, xFixed y_bot); -void +extern _X_EXPORT void RenderLineFixedEdgeInit (RenderEdge *e, int bpp, xFixed y, diff --git a/xorg-server/shave-libtool.in b/xorg-server/shave-libtool.in new file mode 100644 index 000000000..1f3a720c1 --- /dev/null +++ b/xorg-server/shave-libtool.in @@ -0,0 +1,69 @@ +#!/bin/sh + +# we need sed +SED=@SED@ +if test -z "$SED" ; then +SED=sed +fi + +lt_unmangle () +{ + last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'` +} + +# the real libtool to use +LIBTOOL="$1" +shift + +# if 1, don't print anything, the underlaying wrapper will do it +pass_though=0 + +# scan the arguments, keep the right ones for libtool, and discover the mode +preserved_args= +while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --mode=*) + mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'` + preserved_args="$preserved_args $opt" + ;; + -o) + lt_output="$1" + preserved_args="$preserved_args $opt" + ;; + *) + preserved_args="$preserved_args $opt" + ;; + esac +done + +case "$mode" in +compile) + # shave will be called and print the actual CC/CXX/LINK line + preserved_args="$preserved_args --shave-mode=$mode" + pass_though=1 + ;; +link) + preserved_args="$preserved_args --shave-mode=$mode" + Q=" LINK " + ;; +*) + # let's u + # echo "*** libtool: Unimplemented mode: $mode, fill a bug report" + ;; +esac + +lt_unmangle "$lt_output" +output=$last_result + +if test -z $V; then + if test $pass_though -eq 0; then + echo "$Q$output" + fi + $LIBTOOL --silent $preserved_args +else + echo $LIBTOOL $preserved_args + $LIBTOOL $preserved_args +fi diff --git a/xorg-server/shave.in b/xorg-server/shave.in new file mode 100644 index 000000000..809d606af --- /dev/null +++ b/xorg-server/shave.in @@ -0,0 +1,86 @@ +#!/bin/sh + +# we need sed +SED=@SED@ +if test -z "$SED" ; then +SED=sed +fi + +lt_unmangle () +{ + last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'` +} + +# the tool to wrap (cc, cxx, ar, ranlib, ..) +tool="$1" +shift + +# the reel tool (to call) +REEL_TOOL="$1" +shift + +pass_through=0 +preserved_args= +while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --shave-mode=*) + mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'` + ;; + -o) + lt_output="$1" + preserved_args="$preserved_args $opt" + ;; + # hack for configure. configure calls $CC -print-prog-name=ld to get + # the linker. Without this bit here, the output can't be parsed and + # configure thinks there's no valid linker installed. + -print-prog-name=*) + mode="find-ld" + preserved_args="$preserved_args $opt" + ;; + *) + preserved_args="$preserved_args $opt" + ;; + esac +done + +# mode=link is handled in the libtool wrapper +case "$mode,$tool" in +link,*) + pass_through=1 + ;; +find-ld,*) + pass_through=1 + ;; +*,cxx) + Q=" CXX " + ;; +*,cc) + Q=" CC " + ;; +*,fc) + Q=" FC " + ;; +*,f77) + Q=" F77 " + ;; +*,*) + # should not happen + Q=" CC " + ;; +esac + +lt_unmangle "$lt_output" +output=$last_result + +if test -z $V; then + if test $pass_through -eq 0; then + echo "$Q$output" + fi + $REEL_TOOL $preserved_args +else + echo $REEL_TOOL $preserved_args + $REEL_TOOL $preserved_args +fi diff --git a/xorg-server/test/Makefile.am b/xorg-server/test/Makefile.am new file mode 100644 index 000000000..d8d89852b --- /dev/null +++ b/xorg-server/test/Makefile.am @@ -0,0 +1,38 @@ +if UNITTESTS +SUBDIRS= . xi2 +check_PROGRAMS = xkb input xtest +check_LTLIBRARIES = libxservertest.la + +TESTS=$(check_PROGRAMS) + +AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@ +INCLUDES = @XORG_INCS@ +TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS) + +xkb_LDADD=$(TEST_LDADD) +input_LDADD=$(TEST_LDADD) +xtest_LDADD=$(TEST_LDADD) + +libxservertest_la_LIBADD = \ + $(XSERVER_LIBS) \ + $(top_builddir)/hw/xfree86/loader/libloader.la \ + $(top_builddir)/hw/xfree86/os-support/libxorgos.la \ + $(top_builddir)/hw/xfree86/common/libcommon.la \ + $(top_builddir)/hw/xfree86/parser/libxf86config_internal.la \ + $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \ + $(top_builddir)/hw/xfree86/modes/libxf86modes.la \ + $(top_builddir)/hw/xfree86/ramdac/libramdac.la \ + $(top_builddir)/hw/xfree86/ddc/libddc.la \ + $(top_builddir)/hw/xfree86/i2c/libi2c.la \ + $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \ + $(top_builddir)/hw/xfree86/libxorg.la \ + $(top_builddir)/mi/libmi.la \ + $(top_builddir)/os/libos.la \ + @XORG_LIBS@ + +CLEANFILES=libxservertest.c + +libxservertest.c: + touch $@ + +endif diff --git a/xorg-server/test/Makefile.in b/xorg-server/test/Makefile.in new file mode 100644 index 000000000..02ec9b518 --- /dev/null +++ b/xorg-server/test/Makefile.in @@ -0,0 +1,979 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@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@ +@UNITTESTS_TRUE@check_PROGRAMS = xkb$(EXEEXT) input$(EXEEXT) \ +@UNITTESTS_TRUE@ xtest$(EXEEXT) +subdir = test +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__DEPENDENCIES_1 = +@UNITTESTS_TRUE@libxservertest_la_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/loader/libloader.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/common/libcommon.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config_internal.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/ddc/libddc.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/i2c/libi2c.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/libxorg.la \ +@UNITTESTS_TRUE@ $(top_builddir)/mi/libmi.la \ +@UNITTESTS_TRUE@ $(top_builddir)/os/libos.la +libxservertest_la_SOURCES = libxservertest.c +libxservertest_la_OBJECTS = libxservertest.lo +@UNITTESTS_TRUE@am_libxservertest_la_rpath = +input_SOURCES = input.c +input_OBJECTS = input.$(OBJEXT) +@UNITTESTS_TRUE@am__DEPENDENCIES_2 = libxservertest.la \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) +@UNITTESTS_TRUE@input_DEPENDENCIES = $(am__DEPENDENCIES_2) +xkb_SOURCES = xkb.c +xkb_OBJECTS = xkb.$(OBJEXT) +@UNITTESTS_TRUE@xkb_DEPENDENCIES = $(am__DEPENDENCIES_2) +xtest_SOURCES = xtest.c +xtest_OBJECTS = xtest.$(OBJEXT) +@UNITTESTS_TRUE@xtest_DEPENDENCIES = $(am__DEPENDENCIES_2) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = libxservertest.c input.c xkb.c xtest.c +DIST_SOURCES = libxservertest.c input.c xkb.c xtest.c +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DIST_SUBDIRS = . xi2 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +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@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +Q = @Q@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +SED = @SED@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +V = @V@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +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@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +distcleancheck_listfiles = @distcleancheck_listfiles@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +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@ +logdir = @logdir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@UNITTESTS_TRUE@SUBDIRS = . xi2 +@UNITTESTS_TRUE@check_LTLIBRARIES = libxservertest.la +@UNITTESTS_TRUE@TESTS = $(check_PROGRAMS) +@UNITTESTS_TRUE@AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@ +@UNITTESTS_TRUE@INCLUDES = @XORG_INCS@ +@UNITTESTS_TRUE@TEST_LDADD = libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS) +@UNITTESTS_TRUE@xkb_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@input_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@xtest_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@libxservertest_la_LIBADD = \ +@UNITTESTS_TRUE@ $(XSERVER_LIBS) \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/loader/libloader.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/common/libcommon.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config_internal.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/ddc/libddc.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/i2c/libi2c.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \ +@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/libxorg.la \ +@UNITTESTS_TRUE@ $(top_builddir)/mi/libmi.la \ +@UNITTESTS_TRUE@ $(top_builddir)/os/libos.la \ +@UNITTESTS_TRUE@ @XORG_LIBS@ + +@UNITTESTS_TRUE@CLEANFILES = libxservertest.c +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign test/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkLTLIBRARIES: + -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) + @list='$(check_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libxservertest.la: $(libxservertest_la_OBJECTS) $(libxservertest_la_DEPENDENCIES) + $(LINK) $(am_libxservertest_la_rpath) $(libxservertest_la_OBJECTS) $(libxservertest_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +input$(EXEEXT): $(input_OBJECTS) $(input_DEPENDENCIES) + @rm -f input$(EXEEXT) + $(LINK) $(input_OBJECTS) $(input_LDADD) $(LIBS) +xkb$(EXEEXT): $(xkb_OBJECTS) $(xkb_DEPENDENCIES) + @rm -f xkb$(EXEEXT) + $(LINK) $(xkb_OBJECTS) $(xkb_LDADD) $(LIBS) +xtest$(EXEEXT): $(xtest_OBJECTS) $(xtest_DEPENDENCIES) + @rm -f xtest$(EXEEXT) + $(LINK) $(xtest_OBJECTS) $(xtest_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxservertest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtest.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + 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; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @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 "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +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) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive + +clean-am: clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ + clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ + ctags-recursive install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-TESTS check-am clean \ + clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ + clean-libtool ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir 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-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +@UNITTESTS_TRUE@libxservertest.c: +@UNITTESTS_TRUE@ touch $@ + +# 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/xorg-server/test/README b/xorg-server/test/README new file mode 100644 index 000000000..5759a72fd --- /dev/null +++ b/xorg-server/test/README @@ -0,0 +1,36 @@ + X server test suite + +This suite contains a set of tests to verify the behaviour of functions used +internally to the server. This test suite is based on glib's testing +framework [1]. + += How it works = +Through some automake abuse, we link the test programs with the same static +libraries as the Xorg binary. The test suites can then call various functions +and verify their behaviour - without the need to start the server or connect +clients. + +This testing only works for functions that do not rely on a particular state +of the X server. Unless the test suite replicates the expected state, which +may be difficult. + += How to run the tests = +Run "make check" the test directory. This will compile the tests and execute +them in the order specified in the TESTS variable in test/Makefile.am. + +Each set of tests related to a subsystem are available as a binary that can be +executed directly. For example, run "xkb" to perform some xkb-related tests. + +== Adding a new test == +When adding a new test, ensure that you add a short description of what the +test does and what the expected outcome is. If the test reproduces a +particular bug, using g_test_bug(). + +== Misc == + +The programs "gtester" and "gtester-report" may be used to generate XML/HTML +log files of tests succeeded and failed. + +--------- + +[1] http://library.gnome.org/devel/glib/stable/glib-Testing.html diff --git a/xorg-server/test/input.c b/xorg-server/test/input.c new file mode 100644 index 000000000..71e1504f1 --- /dev/null +++ b/xorg-server/test/input.c @@ -0,0 +1,732 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "misc.h" +#include "resource.h" +#include +#include +#include +#include "windowstr.h" +#include "inputstr.h" +#include "eventconvert.h" +#include "exevents.h" +#include "dixgrabs.h" +#include "eventstr.h" +#include + +/** + * Init a device with axes. + * Verify values set on the device. + * + * Result: All axes set to default values (usually 0). + */ +static void dix_init_valuators(void) +{ + DeviceIntRec dev; + ValuatorClassPtr val; + const int num_axes = 2; + int i; + Atom atoms[MAX_VALUATORS] = { 0 }; + + + memset(&dev, 0, sizeof(DeviceIntRec)); + dev.type = MASTER_POINTER; /* claim it's a master to stop ptracccel */ + + g_assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE); + g_assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute)); + + val = dev.valuator; + g_assert(val); + g_assert(val->numAxes == num_axes); + g_assert(val->numMotionEvents == 0); + g_assert(val->mode == Absolute); + g_assert(val->axisVal); + + for (i = 0; i < num_axes; i++) + { + g_assert(val->axisVal[i] == 0); + g_assert(val->axes->min_value == NO_AXIS_LIMITS); + g_assert(val->axes->max_value == NO_AXIS_LIMITS); + } + + g_assert(dev.last.numValuators == num_axes); +} + +/* just check the known success cases, and that error cases set the client's + * error value correctly. */ +static void dix_check_grab_values(void) +{ + ClientRec client; + GrabParameters param; + int rc; + + memset(&client, 0, sizeof(client)); + + param.grabtype = GRABTYPE_CORE; + param.this_device_mode = GrabModeSync; + param.other_devices_mode = GrabModeSync; + param.modifiers = AnyModifier; + param.ownerEvents = FALSE; + + rc = CheckGrabValues(&client, ¶m); + g_assert(rc == Success); + + param.this_device_mode = GrabModeAsync; + rc = CheckGrabValues(&client, ¶m); + g_assert(rc == Success); + + param.this_device_mode = GrabModeAsync + 1; + rc = CheckGrabValues(&client, ¶m); + g_assert(rc == BadValue); + g_assert(client.errorValue == param.this_device_mode); + g_assert(client.errorValue == GrabModeAsync + 1); + + param.this_device_mode = GrabModeSync; + param.other_devices_mode = GrabModeAsync; + rc = CheckGrabValues(&client, ¶m); + g_assert(rc == Success); + + param.other_devices_mode = GrabModeAsync + 1; + rc = CheckGrabValues(&client, ¶m); + g_assert(rc == BadValue); + g_assert(client.errorValue == param.other_devices_mode); + g_assert(client.errorValue == GrabModeAsync + 1); + + param.other_devices_mode = GrabModeSync; + + param.modifiers = 1 << 13; + rc = CheckGrabValues(&client, ¶m); + g_assert(rc == BadValue); + g_assert(client.errorValue == param.modifiers); + g_assert(client.errorValue == (1 << 13)); + + + param.modifiers = AnyModifier; + param.ownerEvents = TRUE; + rc = CheckGrabValues(&client, ¶m); + g_assert(rc == Success); + + param.ownerEvents = 3; + rc = CheckGrabValues(&client, ¶m); + g_assert(rc == BadValue); + g_assert(client.errorValue == param.ownerEvents); + g_assert(client.errorValue == 3); +} + + +/** + * Convert various internal events to the matching core event and verify the + * parameters. + */ +static void dix_event_to_core(int type) +{ + DeviceEvent ev; + xEvent core; + int time; + int x, y; + int rc; + int state; + int detail; + + /* EventToCore memsets the event to 0 */ +#define test_event() \ + g_assert(rc == Success); \ + g_assert(core.u.u.type == type); \ + g_assert(core.u.u.detail == detail); \ + g_assert(core.u.keyButtonPointer.time == time); \ + g_assert(core.u.keyButtonPointer.rootX == x); \ + g_assert(core.u.keyButtonPointer.rootY == y); \ + g_assert(core.u.keyButtonPointer.state == state); \ + g_assert(core.u.keyButtonPointer.eventX == 0); \ + g_assert(core.u.keyButtonPointer.eventY == 0); \ + g_assert(core.u.keyButtonPointer.root == 0); \ + g_assert(core.u.keyButtonPointer.event == 0); \ + g_assert(core.u.keyButtonPointer.child == 0); \ + g_assert(core.u.keyButtonPointer.sameScreen == FALSE); + + x = 0; + y = 0; + time = 12345; + state = 0; + detail = 0; + + ev.header = 0xFF; + ev.length = sizeof(DeviceEvent); + ev.time = time; + ev.root_y = x; + ev.root_x = y; + ev.corestate = state; + ev.detail.key = detail; + + ev.type = type; + ev.detail.key = 0; + rc = EventToCore((InternalEvent*)&ev, &core); + test_event(); + + x = 1; + y = 2; + ev.root_x = x; + ev.root_y = y; + rc = EventToCore((InternalEvent*)&ev, &core); + test_event(); + + x = 0x7FFF; + y = 0x7FFF; + ev.root_x = x; + ev.root_y = y; + rc = EventToCore((InternalEvent*)&ev, &core); + test_event(); + + x = 0x8000; /* too high */ + y = 0x8000; /* too high */ + ev.root_x = x; + ev.root_y = y; + rc = EventToCore((InternalEvent*)&ev, &core); + g_assert(core.u.keyButtonPointer.rootX != x); + g_assert(core.u.keyButtonPointer.rootY != y); + + x = 0x7FFF; + y = 0x7FFF; + ev.root_x = x; + ev.root_y = y; + time = 0; + ev.time = time; + rc = EventToCore((InternalEvent*)&ev, &core); + test_event(); + + detail = 1; + ev.detail.key = detail; + rc = EventToCore((InternalEvent*)&ev, &core); + test_event(); + + detail = 0xFF; /* highest value */ + ev.detail.key = detail; + rc = EventToCore((InternalEvent*)&ev, &core); + test_event(); + + detail = 0xFFF; /* too big */ + ev.detail.key = detail; + rc = EventToCore((InternalEvent*)&ev, &core); + g_assert(rc == BadMatch); + + detail = 0xFF; /* too big */ + ev.detail.key = detail; + state = 0xFFFF; /* highest value */ + ev.corestate = state; + rc = EventToCore((InternalEvent*)&ev, &core); + test_event(); + + state = 0x10000; /* too big */ + ev.corestate = state; + rc = EventToCore((InternalEvent*)&ev, &core); + g_assert(core.u.keyButtonPointer.state != state); + g_assert(core.u.keyButtonPointer.state == (state & 0xFFFF)); + +#undef test_event +} + +static void dix_event_to_core_conversion(void) +{ + DeviceEvent ev; + xEvent core; + int rc; + + ev.header = 0xFF; + ev.length = sizeof(DeviceEvent); + + ev.type = 0; + rc = EventToCore((InternalEvent*)&ev, &core); + g_assert(rc == BadImplementation); + + ev.type = 1; + rc = EventToCore((InternalEvent*)&ev, &core); + g_assert(rc == BadImplementation); + + ev.type = ET_ProximityOut + 1; + rc = EventToCore((InternalEvent*)&ev, &core); + g_assert(rc == BadImplementation); + + ev.type = ET_ProximityIn; + rc = EventToCore((InternalEvent*)&ev, &core); + g_assert(rc == BadMatch); + + ev.type = ET_ProximityOut; + rc = EventToCore((InternalEvent*)&ev, &core); + g_assert(rc == BadMatch); + + dix_event_to_core(ET_KeyPress); + dix_event_to_core(ET_KeyRelease); + dix_event_to_core(ET_ButtonPress); + dix_event_to_core(ET_ButtonRelease); + dix_event_to_core(ET_Motion); +} + +static void xi2_struct_sizes(void) +{ +#define compare(req) \ + g_assert(sizeof(req) == sz_##req); + + compare(xXIQueryVersionReq); + compare(xXIWarpPointerReq); + compare(xXIChangeCursorReq); + compare(xXIChangeHierarchyReq); + compare(xXISetClientPointerReq); + compare(xXIGetClientPointerReq); + compare(xXISelectEventsReq); + compare(xXIQueryVersionReq); + compare(xXIQueryDeviceReq); + compare(xXISetFocusReq); + compare(xXIGetFocusReq); + compare(xXIGrabDeviceReq); + compare(xXIUngrabDeviceReq); + compare(xXIAllowEventsReq); + compare(xXIPassiveGrabDeviceReq); + compare(xXIPassiveUngrabDeviceReq); + compare(xXIListPropertiesReq); + compare(xXIChangePropertyReq); + compare(xXIDeletePropertyReq); + compare(xXIGetPropertyReq); + compare(xXIGetSelectedEventsReq); +#undef compare +} + + +static void dix_grab_matching(void) +{ + DeviceIntRec xi_all_devices, xi_all_master_devices, dev1, dev2; + GrabRec a, b; + BOOL rc; + + memset(&a, 0, sizeof(a)); + memset(&b, 0, sizeof(b)); + + /* different grabtypes must fail */ + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_XI2; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI2; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_CORE; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + /* XI2 grabs for different devices must fail, regardless of ignoreDevice + * XI2 grabs for master devices must fail against a slave */ + memset(&xi_all_devices, 0, sizeof(DeviceIntRec)); + memset(&xi_all_master_devices, 0, sizeof(DeviceIntRec)); + memset(&dev1, 0, sizeof(DeviceIntRec)); + memset(&dev2, 0, sizeof(DeviceIntRec)); + + xi_all_devices.id = XIAllDevices; + xi_all_master_devices.id = XIAllMasterDevices; + dev1.id = 10; + dev1.type = SLAVE; + dev2.id = 11; + dev2.type = SLAVE; + + inputInfo.all_devices = &xi_all_devices; + inputInfo.all_master_devices = &xi_all_master_devices; + a.grabtype = GRABTYPE_XI2; + b.grabtype = GRABTYPE_XI2; + a.device = &dev1; + b.device = &dev2; + + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + + a.device = &dev2; + b.device = &dev1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&a, &b, TRUE); + g_assert(rc == FALSE); + + a.device = inputInfo.all_master_devices; + b.device = &dev1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&a, &b, TRUE); + g_assert(rc == FALSE); + + a.device = &dev1; + b.device = inputInfo.all_master_devices; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&a, &b, TRUE); + g_assert(rc == FALSE); + + /* ignoreDevice FALSE must fail for different devices for CORE and XI */ + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + a.device = &dev1; + b.device = &dev2; + a.modifierDevice = &dev1; + b.modifierDevice = &dev1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + a.device = &dev1; + b.device = &dev2; + a.modifierDevice = &dev1; + b.modifierDevice = &dev1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + + /* ignoreDevice FALSE must fail for different modifier devices for CORE + * and XI */ + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + a.device = &dev1; + b.device = &dev1; + a.modifierDevice = &dev1; + b.modifierDevice = &dev2; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + a.device = &dev1; + b.device = &dev1; + a.modifierDevice = &dev1; + b.modifierDevice = &dev2; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + + /* different event type must fail */ + a.grabtype = GRABTYPE_XI2; + b.grabtype = GRABTYPE_XI2; + a.device = &dev1; + b.device = &dev1; + a.modifierDevice = &dev1; + b.modifierDevice = &dev1; + a.type = XI_KeyPress; + b.type = XI_KeyRelease; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&a, &b, TRUE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + a.device = &dev1; + b.device = &dev1; + a.modifierDevice = &dev1; + b.modifierDevice = &dev1; + a.type = XI_KeyPress; + b.type = XI_KeyRelease; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&a, &b, TRUE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + a.device = &dev1; + b.device = &dev1; + a.modifierDevice = &dev1; + b.modifierDevice = &dev1; + a.type = XI_KeyPress; + b.type = XI_KeyRelease; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&a, &b, TRUE); + g_assert(rc == FALSE); + + /* different modifiers must fail */ + a.grabtype = GRABTYPE_XI2; + b.grabtype = GRABTYPE_XI2; + a.device = &dev1; + b.device = &dev1; + a.modifierDevice = &dev1; + b.modifierDevice = &dev1; + a.type = XI_KeyPress; + b.type = XI_KeyPress; + a.modifiersDetail.exact = 1; + b.modifiersDetail.exact = 2; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + /* AnyModifier must fail for XI2 */ + a.grabtype = GRABTYPE_XI2; + b.grabtype = GRABTYPE_XI2; + a.modifiersDetail.exact = AnyModifier; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + /* XIAnyModifier must fail for CORE and XI */ + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + a.modifiersDetail.exact = XIAnyModifier; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + a.modifiersDetail.exact = XIAnyModifier; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + /* different detail must fail */ + a.grabtype = GRABTYPE_XI2; + b.grabtype = GRABTYPE_XI2; + a.detail.exact = 1; + b.detail.exact = 2; + a.modifiersDetail.exact = 1; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + /* detail of AnyModifier must fail */ + a.grabtype = GRABTYPE_XI2; + b.grabtype = GRABTYPE_XI2; + a.detail.exact = AnyModifier; + b.detail.exact = 1; + a.modifiersDetail.exact = 1; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + /* detail of XIAnyModifier must fail */ + a.grabtype = GRABTYPE_XI2; + b.grabtype = GRABTYPE_XI2; + a.detail.exact = XIAnyModifier; + b.detail.exact = 1; + a.modifiersDetail.exact = 1; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == FALSE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == FALSE); + + /* XIAnyModifier or AnyModifer must succeed */ + a.grabtype = GRABTYPE_XI2; + b.grabtype = GRABTYPE_XI2; + a.detail.exact = 1; + b.detail.exact = 1; + a.modifiersDetail.exact = XIAnyModifier; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == TRUE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == TRUE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + a.detail.exact = 1; + b.detail.exact = 1; + a.modifiersDetail.exact = AnyModifier; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == TRUE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == TRUE); + + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + a.detail.exact = 1; + b.detail.exact = 1; + a.modifiersDetail.exact = AnyModifier; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == TRUE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == TRUE); + + /* AnyKey or XIAnyKeycode must succeed */ + a.grabtype = GRABTYPE_XI2; + b.grabtype = GRABTYPE_XI2; + a.detail.exact = XIAnyKeycode; + b.detail.exact = 1; + a.modifiersDetail.exact = 1; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == TRUE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == TRUE); + + a.grabtype = GRABTYPE_CORE; + b.grabtype = GRABTYPE_CORE; + a.detail.exact = AnyKey; + b.detail.exact = 1; + a.modifiersDetail.exact = 1; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == TRUE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == TRUE); + + a.grabtype = GRABTYPE_XI; + b.grabtype = GRABTYPE_XI; + a.detail.exact = AnyKey; + b.detail.exact = 1; + a.modifiersDetail.exact = 1; + b.modifiersDetail.exact = 1; + rc = GrabMatchesSecond(&a, &b, FALSE); + g_assert(rc == TRUE); + rc = GrabMatchesSecond(&b, &a, FALSE); + g_assert(rc == TRUE); +} + +static void include_byte_padding_macros(void) +{ + int i; + g_test_message("Testing bits_to_bytes()"); + + /* the macros don't provide overflow protection */ + for (i = 0; i < INT_MAX - 7; i++) + { + int expected_bytes; + expected_bytes = (i + 7)/8; + + g_assert(bits_to_bytes(i) >= i/8); + g_assert((bits_to_bytes(i) * 8) - i <= 7); + } + + g_test_message("Testing bytes_to_int32()"); + for (i = 0; i < INT_MAX - 3; i++) + { + int expected_4byte; + expected_4byte = (i + 3)/4; + + g_assert(bytes_to_int32(i) <= i); + g_assert((bytes_to_int32(i) * 4) - i <= 3); + } + + g_test_message("Testing pad_to_int32"); + + for (i = 0; i < INT_MAX - 3; i++) + { + int expected_bytes; + expected_bytes = ((i + 3)/4) * 4; + + g_assert(pad_to_int32(i) >= i); + g_assert(pad_to_int32(i) - i <= 3); + } + +} + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + g_test_add_func("/dix/input/init-valuators", dix_init_valuators); + g_test_add_func("/dix/input/event-core-conversion", dix_event_to_core_conversion); + g_test_add_func("/dix/input/check-grab-values", dix_check_grab_values); + g_test_add_func("/dix/input/xi2-struct-sizes", xi2_struct_sizes); + g_test_add_func("/dix/input/grab_matching", dix_grab_matching); + g_test_add_func("/include/byte_padding_macros", include_byte_padding_macros); + + return g_test_run(); +} diff --git a/xorg-server/test/libxservertest.c b/xorg-server/test/libxservertest.c new file mode 100644 index 000000000..e69de29bb diff --git a/xorg-server/test/xi2/Makefile.am b/xorg-server/test/xi2/Makefile.am new file mode 100644 index 000000000..b8362ca8b --- /dev/null +++ b/xorg-server/test/xi2/Makefile.am @@ -0,0 +1,47 @@ +if UNITTESTS +check_PROGRAMS = \ + protocol-xiqueryversion \ + protocol-xiquerydevice \ + protocol-xiselectevents \ + protocol-xigetselectedevents \ + protocol-xisetclientpointer \ + protocol-xigetclientpointer \ + protocol-xiquerypointer \ + protocol-xiwarppointer \ + protocol-eventconvert + +TESTS=$(check_PROGRAMS) + +AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@ +INCLUDES = @XORG_INCS@ +TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS) +COMMON_SOURCES=protocol-common.h protocol-common.c + +protocol_xiqueryversion_LDADD=$(TEST_LDADD) +protocol_xiquerydevice_LDADD=$(TEST_LDADD) +protocol_xiselectevents_LDADD=$(TEST_LDADD) +protocol_xigetselectedevents_LDADD=$(TEST_LDADD) +protocol_xisetclientpointer_LDADD=$(TEST_LDADD) +protocol_xigetclientpointer_LDADD=$(TEST_LDADD) +protocol_xiquerypointer_LDADD=$(TEST_LDADD) +protocol_xiwarppointer_LDADD=$(TEST_LDADD) +protocol_eventconvert_LDADD=$(TEST_LDADD) + +protocol_xiqueryversion_CFLAGS=$(AM_CFLAGS) -Wl,-wrap,WriteToClient +protocol_xiquerydevice_CFLAGS=$(AM_CFLAGS) -Wl,-wrap,WriteToClient +protocol_xiselectevents_CFLAGS=$(AM_CFLAGS) -Wl,-wrap,dixLookupWindow -Wl,-wrap,XISetEventMask +protocol_xigetselectedevents_CFLAGS=$(AM_CFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow -Wl,-wrap,AddResource +protocol_xisetclientpointer_CFLAGS=$(AM_CFLAGS) -Wl,-wrap,dixLookupClient +protocol_xigetclientpointer_CFLAGS=$(AM_CFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupClient +protocol_xiquerypointer_CFLAGS=$(AM_CFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow +protocol_xiwarppointer_CFLAGS=$(AM_CFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow + +protocol_xiqueryversion_SOURCES=$(COMMON_SOURCES) protocol-xiqueryversion.c +protocol_xiquerydevice_SOURCES=$(COMMON_SOURCES) protocol-xiquerydevice.c +protocol_xiselectevents_SOURCES=$(COMMON_SOURCES) protocol-xiselectevents.c +protocol_xigetselectedevents_SOURCES=$(COMMON_SOURCES) protocol-xigetselectedevents.c +protocol_xisetclientpointer_SOURCES=$(COMMON_SOURCES) protocol-xisetclientpointer.c +protocol_xigetclientpointer_SOURCES=$(COMMON_SOURCES) protocol-xigetclientpointer.c +protocol_xiquerypointer_SOURCES=$(COMMON_SOURCES) protocol-xiquerypointer.c +protocol_xiwarppointer_SOURCES=$(COMMON_SOURCES) protocol-xiwarppointer.c +endif diff --git a/xorg-server/test/xi2/Makefile.in b/xorg-server/test/xi2/Makefile.in new file mode 100644 index 000000000..9f38e361d --- /dev/null +++ b/xorg-server/test/xi2/Makefile.in @@ -0,0 +1,1174 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@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@ +@UNITTESTS_TRUE@check_PROGRAMS = protocol-xiqueryversion$(EXEEXT) \ +@UNITTESTS_TRUE@ protocol-xiquerydevice$(EXEEXT) \ +@UNITTESTS_TRUE@ protocol-xiselectevents$(EXEEXT) \ +@UNITTESTS_TRUE@ protocol-xigetselectedevents$(EXEEXT) \ +@UNITTESTS_TRUE@ protocol-xisetclientpointer$(EXEEXT) \ +@UNITTESTS_TRUE@ protocol-xigetclientpointer$(EXEEXT) \ +@UNITTESTS_TRUE@ protocol-xiquerypointer$(EXEEXT) \ +@UNITTESTS_TRUE@ protocol-xiwarppointer$(EXEEXT) \ +@UNITTESTS_TRUE@ protocol-eventconvert$(EXEEXT) +subdir = test/xi2 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +protocol_eventconvert_SOURCES = protocol-eventconvert.c +protocol_eventconvert_OBJECTS = protocol-eventconvert.$(OBJEXT) +am__DEPENDENCIES_1 = +@UNITTESTS_TRUE@am__DEPENDENCIES_2 = ../libxservertest.la \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) +@UNITTESTS_TRUE@protocol_eventconvert_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_2) +am__protocol_xigetclientpointer_SOURCES_DIST = protocol-common.h \ + protocol-common.c protocol-xigetclientpointer.c +@UNITTESTS_TRUE@am__objects_1 = protocol_xigetclientpointer-protocol-common.$(OBJEXT) +@UNITTESTS_TRUE@am_protocol_xigetclientpointer_OBJECTS = \ +@UNITTESTS_TRUE@ $(am__objects_1) \ +@UNITTESTS_TRUE@ protocol_xigetclientpointer-protocol-xigetclientpointer.$(OBJEXT) +protocol_xigetclientpointer_OBJECTS = \ + $(am_protocol_xigetclientpointer_OBJECTS) +@UNITTESTS_TRUE@protocol_xigetclientpointer_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_2) +protocol_xigetclientpointer_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(protocol_xigetclientpointer_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__protocol_xigetselectedevents_SOURCES_DIST = protocol-common.h \ + protocol-common.c protocol-xigetselectedevents.c +@UNITTESTS_TRUE@am__objects_2 = protocol_xigetselectedevents-protocol-common.$(OBJEXT) +@UNITTESTS_TRUE@am_protocol_xigetselectedevents_OBJECTS = \ +@UNITTESTS_TRUE@ $(am__objects_2) \ +@UNITTESTS_TRUE@ protocol_xigetselectedevents-protocol-xigetselectedevents.$(OBJEXT) +protocol_xigetselectedevents_OBJECTS = \ + $(am_protocol_xigetselectedevents_OBJECTS) +@UNITTESTS_TRUE@protocol_xigetselectedevents_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_2) +protocol_xigetselectedevents_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(protocol_xigetselectedevents_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__protocol_xiquerydevice_SOURCES_DIST = protocol-common.h \ + protocol-common.c protocol-xiquerydevice.c +@UNITTESTS_TRUE@am__objects_3 = protocol_xiquerydevice-protocol-common.$(OBJEXT) +@UNITTESTS_TRUE@am_protocol_xiquerydevice_OBJECTS = $(am__objects_3) \ +@UNITTESTS_TRUE@ protocol_xiquerydevice-protocol-xiquerydevice.$(OBJEXT) +protocol_xiquerydevice_OBJECTS = $(am_protocol_xiquerydevice_OBJECTS) +@UNITTESTS_TRUE@protocol_xiquerydevice_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_2) +protocol_xiquerydevice_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(protocol_xiquerydevice_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__protocol_xiquerypointer_SOURCES_DIST = protocol-common.h \ + protocol-common.c protocol-xiquerypointer.c +@UNITTESTS_TRUE@am__objects_4 = protocol_xiquerypointer-protocol-common.$(OBJEXT) +@UNITTESTS_TRUE@am_protocol_xiquerypointer_OBJECTS = $(am__objects_4) \ +@UNITTESTS_TRUE@ protocol_xiquerypointer-protocol-xiquerypointer.$(OBJEXT) +protocol_xiquerypointer_OBJECTS = \ + $(am_protocol_xiquerypointer_OBJECTS) +@UNITTESTS_TRUE@protocol_xiquerypointer_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_2) +protocol_xiquerypointer_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(protocol_xiquerypointer_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__protocol_xiqueryversion_SOURCES_DIST = protocol-common.h \ + protocol-common.c protocol-xiqueryversion.c +@UNITTESTS_TRUE@am__objects_5 = protocol_xiqueryversion-protocol-common.$(OBJEXT) +@UNITTESTS_TRUE@am_protocol_xiqueryversion_OBJECTS = $(am__objects_5) \ +@UNITTESTS_TRUE@ protocol_xiqueryversion-protocol-xiqueryversion.$(OBJEXT) +protocol_xiqueryversion_OBJECTS = \ + $(am_protocol_xiqueryversion_OBJECTS) +@UNITTESTS_TRUE@protocol_xiqueryversion_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_2) +protocol_xiqueryversion_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(protocol_xiqueryversion_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__protocol_xiselectevents_SOURCES_DIST = protocol-common.h \ + protocol-common.c protocol-xiselectevents.c +@UNITTESTS_TRUE@am__objects_6 = protocol_xiselectevents-protocol-common.$(OBJEXT) +@UNITTESTS_TRUE@am_protocol_xiselectevents_OBJECTS = $(am__objects_6) \ +@UNITTESTS_TRUE@ protocol_xiselectevents-protocol-xiselectevents.$(OBJEXT) +protocol_xiselectevents_OBJECTS = \ + $(am_protocol_xiselectevents_OBJECTS) +@UNITTESTS_TRUE@protocol_xiselectevents_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_2) +protocol_xiselectevents_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(protocol_xiselectevents_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__protocol_xisetclientpointer_SOURCES_DIST = protocol-common.h \ + protocol-common.c protocol-xisetclientpointer.c +@UNITTESTS_TRUE@am__objects_7 = protocol_xisetclientpointer-protocol-common.$(OBJEXT) +@UNITTESTS_TRUE@am_protocol_xisetclientpointer_OBJECTS = \ +@UNITTESTS_TRUE@ $(am__objects_7) \ +@UNITTESTS_TRUE@ protocol_xisetclientpointer-protocol-xisetclientpointer.$(OBJEXT) +protocol_xisetclientpointer_OBJECTS = \ + $(am_protocol_xisetclientpointer_OBJECTS) +@UNITTESTS_TRUE@protocol_xisetclientpointer_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_2) +protocol_xisetclientpointer_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(protocol_xisetclientpointer_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__protocol_xiwarppointer_SOURCES_DIST = protocol-common.h \ + protocol-common.c protocol-xiwarppointer.c +@UNITTESTS_TRUE@am__objects_8 = protocol_xiwarppointer-protocol-common.$(OBJEXT) +@UNITTESTS_TRUE@am_protocol_xiwarppointer_OBJECTS = $(am__objects_8) \ +@UNITTESTS_TRUE@ protocol_xiwarppointer-protocol-xiwarppointer.$(OBJEXT) +protocol_xiwarppointer_OBJECTS = $(am_protocol_xiwarppointer_OBJECTS) +@UNITTESTS_TRUE@protocol_xiwarppointer_DEPENDENCIES = \ +@UNITTESTS_TRUE@ $(am__DEPENDENCIES_2) +protocol_xiwarppointer_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(protocol_xiwarppointer_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = protocol-eventconvert.c \ + $(protocol_xigetclientpointer_SOURCES) \ + $(protocol_xigetselectedevents_SOURCES) \ + $(protocol_xiquerydevice_SOURCES) \ + $(protocol_xiquerypointer_SOURCES) \ + $(protocol_xiqueryversion_SOURCES) \ + $(protocol_xiselectevents_SOURCES) \ + $(protocol_xisetclientpointer_SOURCES) \ + $(protocol_xiwarppointer_SOURCES) +DIST_SOURCES = protocol-eventconvert.c \ + $(am__protocol_xigetclientpointer_SOURCES_DIST) \ + $(am__protocol_xigetselectedevents_SOURCES_DIST) \ + $(am__protocol_xiquerydevice_SOURCES_DIST) \ + $(am__protocol_xiquerypointer_SOURCES_DIST) \ + $(am__protocol_xiqueryversion_SOURCES_DIST) \ + $(am__protocol_xiselectevents_SOURCES_DIST) \ + $(am__protocol_xisetclientpointer_SOURCES_DIST) \ + $(am__protocol_xiwarppointer_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +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@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +Q = @Q@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +SED = @SED@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +V = @V@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +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@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +distcleancheck_listfiles = @distcleancheck_listfiles@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +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@ +logdir = @logdir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@UNITTESTS_TRUE@TESTS = $(check_PROGRAMS) +@UNITTESTS_TRUE@AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@ +@UNITTESTS_TRUE@INCLUDES = @XORG_INCS@ +@UNITTESTS_TRUE@TEST_LDADD = ../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS) +@UNITTESTS_TRUE@COMMON_SOURCES = protocol-common.h protocol-common.c +@UNITTESTS_TRUE@protocol_xiqueryversion_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@protocol_xiquerydevice_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@protocol_xiselectevents_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@protocol_xigetselectedevents_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@protocol_xisetclientpointer_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@protocol_xigetclientpointer_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@protocol_xiquerypointer_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@protocol_xiwarppointer_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@protocol_eventconvert_LDADD = $(TEST_LDADD) +@UNITTESTS_TRUE@protocol_xiqueryversion_CFLAGS = $(AM_CFLAGS) -Wl,-wrap,WriteToClient +@UNITTESTS_TRUE@protocol_xiquerydevice_CFLAGS = $(AM_CFLAGS) -Wl,-wrap,WriteToClient +@UNITTESTS_TRUE@protocol_xiselectevents_CFLAGS = $(AM_CFLAGS) -Wl,-wrap,dixLookupWindow -Wl,-wrap,XISetEventMask +@UNITTESTS_TRUE@protocol_xigetselectedevents_CFLAGS = $(AM_CFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow -Wl,-wrap,AddResource +@UNITTESTS_TRUE@protocol_xisetclientpointer_CFLAGS = $(AM_CFLAGS) -Wl,-wrap,dixLookupClient +@UNITTESTS_TRUE@protocol_xigetclientpointer_CFLAGS = $(AM_CFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupClient +@UNITTESTS_TRUE@protocol_xiquerypointer_CFLAGS = $(AM_CFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow +@UNITTESTS_TRUE@protocol_xiwarppointer_CFLAGS = $(AM_CFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow +@UNITTESTS_TRUE@protocol_xiqueryversion_SOURCES = $(COMMON_SOURCES) protocol-xiqueryversion.c +@UNITTESTS_TRUE@protocol_xiquerydevice_SOURCES = $(COMMON_SOURCES) protocol-xiquerydevice.c +@UNITTESTS_TRUE@protocol_xiselectevents_SOURCES = $(COMMON_SOURCES) protocol-xiselectevents.c +@UNITTESTS_TRUE@protocol_xigetselectedevents_SOURCES = $(COMMON_SOURCES) protocol-xigetselectedevents.c +@UNITTESTS_TRUE@protocol_xisetclientpointer_SOURCES = $(COMMON_SOURCES) protocol-xisetclientpointer.c +@UNITTESTS_TRUE@protocol_xigetclientpointer_SOURCES = $(COMMON_SOURCES) protocol-xigetclientpointer.c +@UNITTESTS_TRUE@protocol_xiquerypointer_SOURCES = $(COMMON_SOURCES) protocol-xiquerypointer.c +@UNITTESTS_TRUE@protocol_xiwarppointer_SOURCES = $(COMMON_SOURCES) protocol-xiwarppointer.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/xi2/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign test/xi2/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +protocol-eventconvert$(EXEEXT): $(protocol_eventconvert_OBJECTS) $(protocol_eventconvert_DEPENDENCIES) + @rm -f protocol-eventconvert$(EXEEXT) + $(LINK) $(protocol_eventconvert_OBJECTS) $(protocol_eventconvert_LDADD) $(LIBS) +protocol-xigetclientpointer$(EXEEXT): $(protocol_xigetclientpointer_OBJECTS) $(protocol_xigetclientpointer_DEPENDENCIES) + @rm -f protocol-xigetclientpointer$(EXEEXT) + $(protocol_xigetclientpointer_LINK) $(protocol_xigetclientpointer_OBJECTS) $(protocol_xigetclientpointer_LDADD) $(LIBS) +protocol-xigetselectedevents$(EXEEXT): $(protocol_xigetselectedevents_OBJECTS) $(protocol_xigetselectedevents_DEPENDENCIES) + @rm -f protocol-xigetselectedevents$(EXEEXT) + $(protocol_xigetselectedevents_LINK) $(protocol_xigetselectedevents_OBJECTS) $(protocol_xigetselectedevents_LDADD) $(LIBS) +protocol-xiquerydevice$(EXEEXT): $(protocol_xiquerydevice_OBJECTS) $(protocol_xiquerydevice_DEPENDENCIES) + @rm -f protocol-xiquerydevice$(EXEEXT) + $(protocol_xiquerydevice_LINK) $(protocol_xiquerydevice_OBJECTS) $(protocol_xiquerydevice_LDADD) $(LIBS) +protocol-xiquerypointer$(EXEEXT): $(protocol_xiquerypointer_OBJECTS) $(protocol_xiquerypointer_DEPENDENCIES) + @rm -f protocol-xiquerypointer$(EXEEXT) + $(protocol_xiquerypointer_LINK) $(protocol_xiquerypointer_OBJECTS) $(protocol_xiquerypointer_LDADD) $(LIBS) +protocol-xiqueryversion$(EXEEXT): $(protocol_xiqueryversion_OBJECTS) $(protocol_xiqueryversion_DEPENDENCIES) + @rm -f protocol-xiqueryversion$(EXEEXT) + $(protocol_xiqueryversion_LINK) $(protocol_xiqueryversion_OBJECTS) $(protocol_xiqueryversion_LDADD) $(LIBS) +protocol-xiselectevents$(EXEEXT): $(protocol_xiselectevents_OBJECTS) $(protocol_xiselectevents_DEPENDENCIES) + @rm -f protocol-xiselectevents$(EXEEXT) + $(protocol_xiselectevents_LINK) $(protocol_xiselectevents_OBJECTS) $(protocol_xiselectevents_LDADD) $(LIBS) +protocol-xisetclientpointer$(EXEEXT): $(protocol_xisetclientpointer_OBJECTS) $(protocol_xisetclientpointer_DEPENDENCIES) + @rm -f protocol-xisetclientpointer$(EXEEXT) + $(protocol_xisetclientpointer_LINK) $(protocol_xisetclientpointer_OBJECTS) $(protocol_xisetclientpointer_LDADD) $(LIBS) +protocol-xiwarppointer$(EXEEXT): $(protocol_xiwarppointer_OBJECTS) $(protocol_xiwarppointer_DEPENDENCIES) + @rm -f protocol-xiwarppointer$(EXEEXT) + $(protocol_xiwarppointer_LINK) $(protocol_xiwarppointer_OBJECTS) $(protocol_xiwarppointer_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-eventconvert.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xigetclientpointer-protocol-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xigetclientpointer-protocol-xigetclientpointer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xigetselectedevents-protocol-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xigetselectedevents-protocol-xigetselectedevents.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiquerydevice-protocol-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiquerydevice-protocol-xiquerydevice.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiquerypointer-protocol-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiquerypointer-protocol-xiquerypointer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiqueryversion-protocol-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiqueryversion-protocol-xiqueryversion.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiselectevents-protocol-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiselectevents-protocol-xiselectevents.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xisetclientpointer-protocol-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xisetclientpointer-protocol-xisetclientpointer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiwarppointer-protocol-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_xiwarppointer-protocol-xiwarppointer.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +protocol_xigetclientpointer-protocol-common.o: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetclientpointer_CFLAGS) $(CFLAGS) -MT protocol_xigetclientpointer-protocol-common.o -MD -MP -MF $(DEPDIR)/protocol_xigetclientpointer-protocol-common.Tpo -c -o protocol_xigetclientpointer-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xigetclientpointer-protocol-common.Tpo $(DEPDIR)/protocol_xigetclientpointer-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xigetclientpointer-protocol-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetclientpointer_CFLAGS) $(CFLAGS) -c -o protocol_xigetclientpointer-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c + +protocol_xigetclientpointer-protocol-common.obj: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetclientpointer_CFLAGS) $(CFLAGS) -MT protocol_xigetclientpointer-protocol-common.obj -MD -MP -MF $(DEPDIR)/protocol_xigetclientpointer-protocol-common.Tpo -c -o protocol_xigetclientpointer-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xigetclientpointer-protocol-common.Tpo $(DEPDIR)/protocol_xigetclientpointer-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xigetclientpointer-protocol-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetclientpointer_CFLAGS) $(CFLAGS) -c -o protocol_xigetclientpointer-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` + +protocol_xigetclientpointer-protocol-xigetclientpointer.o: protocol-xigetclientpointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetclientpointer_CFLAGS) $(CFLAGS) -MT protocol_xigetclientpointer-protocol-xigetclientpointer.o -MD -MP -MF $(DEPDIR)/protocol_xigetclientpointer-protocol-xigetclientpointer.Tpo -c -o protocol_xigetclientpointer-protocol-xigetclientpointer.o `test -f 'protocol-xigetclientpointer.c' || echo '$(srcdir)/'`protocol-xigetclientpointer.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xigetclientpointer-protocol-xigetclientpointer.Tpo $(DEPDIR)/protocol_xigetclientpointer-protocol-xigetclientpointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xigetclientpointer.c' object='protocol_xigetclientpointer-protocol-xigetclientpointer.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetclientpointer_CFLAGS) $(CFLAGS) -c -o protocol_xigetclientpointer-protocol-xigetclientpointer.o `test -f 'protocol-xigetclientpointer.c' || echo '$(srcdir)/'`protocol-xigetclientpointer.c + +protocol_xigetclientpointer-protocol-xigetclientpointer.obj: protocol-xigetclientpointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetclientpointer_CFLAGS) $(CFLAGS) -MT protocol_xigetclientpointer-protocol-xigetclientpointer.obj -MD -MP -MF $(DEPDIR)/protocol_xigetclientpointer-protocol-xigetclientpointer.Tpo -c -o protocol_xigetclientpointer-protocol-xigetclientpointer.obj `if test -f 'protocol-xigetclientpointer.c'; then $(CYGPATH_W) 'protocol-xigetclientpointer.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xigetclientpointer.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xigetclientpointer-protocol-xigetclientpointer.Tpo $(DEPDIR)/protocol_xigetclientpointer-protocol-xigetclientpointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xigetclientpointer.c' object='protocol_xigetclientpointer-protocol-xigetclientpointer.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetclientpointer_CFLAGS) $(CFLAGS) -c -o protocol_xigetclientpointer-protocol-xigetclientpointer.obj `if test -f 'protocol-xigetclientpointer.c'; then $(CYGPATH_W) 'protocol-xigetclientpointer.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xigetclientpointer.c'; fi` + +protocol_xigetselectedevents-protocol-common.o: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetselectedevents_CFLAGS) $(CFLAGS) -MT protocol_xigetselectedevents-protocol-common.o -MD -MP -MF $(DEPDIR)/protocol_xigetselectedevents-protocol-common.Tpo -c -o protocol_xigetselectedevents-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xigetselectedevents-protocol-common.Tpo $(DEPDIR)/protocol_xigetselectedevents-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xigetselectedevents-protocol-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetselectedevents_CFLAGS) $(CFLAGS) -c -o protocol_xigetselectedevents-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c + +protocol_xigetselectedevents-protocol-common.obj: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetselectedevents_CFLAGS) $(CFLAGS) -MT protocol_xigetselectedevents-protocol-common.obj -MD -MP -MF $(DEPDIR)/protocol_xigetselectedevents-protocol-common.Tpo -c -o protocol_xigetselectedevents-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xigetselectedevents-protocol-common.Tpo $(DEPDIR)/protocol_xigetselectedevents-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xigetselectedevents-protocol-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetselectedevents_CFLAGS) $(CFLAGS) -c -o protocol_xigetselectedevents-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` + +protocol_xigetselectedevents-protocol-xigetselectedevents.o: protocol-xigetselectedevents.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetselectedevents_CFLAGS) $(CFLAGS) -MT protocol_xigetselectedevents-protocol-xigetselectedevents.o -MD -MP -MF $(DEPDIR)/protocol_xigetselectedevents-protocol-xigetselectedevents.Tpo -c -o protocol_xigetselectedevents-protocol-xigetselectedevents.o `test -f 'protocol-xigetselectedevents.c' || echo '$(srcdir)/'`protocol-xigetselectedevents.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xigetselectedevents-protocol-xigetselectedevents.Tpo $(DEPDIR)/protocol_xigetselectedevents-protocol-xigetselectedevents.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xigetselectedevents.c' object='protocol_xigetselectedevents-protocol-xigetselectedevents.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetselectedevents_CFLAGS) $(CFLAGS) -c -o protocol_xigetselectedevents-protocol-xigetselectedevents.o `test -f 'protocol-xigetselectedevents.c' || echo '$(srcdir)/'`protocol-xigetselectedevents.c + +protocol_xigetselectedevents-protocol-xigetselectedevents.obj: protocol-xigetselectedevents.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetselectedevents_CFLAGS) $(CFLAGS) -MT protocol_xigetselectedevents-protocol-xigetselectedevents.obj -MD -MP -MF $(DEPDIR)/protocol_xigetselectedevents-protocol-xigetselectedevents.Tpo -c -o protocol_xigetselectedevents-protocol-xigetselectedevents.obj `if test -f 'protocol-xigetselectedevents.c'; then $(CYGPATH_W) 'protocol-xigetselectedevents.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xigetselectedevents.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xigetselectedevents-protocol-xigetselectedevents.Tpo $(DEPDIR)/protocol_xigetselectedevents-protocol-xigetselectedevents.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xigetselectedevents.c' object='protocol_xigetselectedevents-protocol-xigetselectedevents.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xigetselectedevents_CFLAGS) $(CFLAGS) -c -o protocol_xigetselectedevents-protocol-xigetselectedevents.obj `if test -f 'protocol-xigetselectedevents.c'; then $(CYGPATH_W) 'protocol-xigetselectedevents.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xigetselectedevents.c'; fi` + +protocol_xiquerydevice-protocol-common.o: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerydevice_CFLAGS) $(CFLAGS) -MT protocol_xiquerydevice-protocol-common.o -MD -MP -MF $(DEPDIR)/protocol_xiquerydevice-protocol-common.Tpo -c -o protocol_xiquerydevice-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiquerydevice-protocol-common.Tpo $(DEPDIR)/protocol_xiquerydevice-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiquerydevice-protocol-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerydevice_CFLAGS) $(CFLAGS) -c -o protocol_xiquerydevice-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c + +protocol_xiquerydevice-protocol-common.obj: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerydevice_CFLAGS) $(CFLAGS) -MT protocol_xiquerydevice-protocol-common.obj -MD -MP -MF $(DEPDIR)/protocol_xiquerydevice-protocol-common.Tpo -c -o protocol_xiquerydevice-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiquerydevice-protocol-common.Tpo $(DEPDIR)/protocol_xiquerydevice-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiquerydevice-protocol-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerydevice_CFLAGS) $(CFLAGS) -c -o protocol_xiquerydevice-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` + +protocol_xiquerydevice-protocol-xiquerydevice.o: protocol-xiquerydevice.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerydevice_CFLAGS) $(CFLAGS) -MT protocol_xiquerydevice-protocol-xiquerydevice.o -MD -MP -MF $(DEPDIR)/protocol_xiquerydevice-protocol-xiquerydevice.Tpo -c -o protocol_xiquerydevice-protocol-xiquerydevice.o `test -f 'protocol-xiquerydevice.c' || echo '$(srcdir)/'`protocol-xiquerydevice.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiquerydevice-protocol-xiquerydevice.Tpo $(DEPDIR)/protocol_xiquerydevice-protocol-xiquerydevice.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiquerydevice.c' object='protocol_xiquerydevice-protocol-xiquerydevice.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerydevice_CFLAGS) $(CFLAGS) -c -o protocol_xiquerydevice-protocol-xiquerydevice.o `test -f 'protocol-xiquerydevice.c' || echo '$(srcdir)/'`protocol-xiquerydevice.c + +protocol_xiquerydevice-protocol-xiquerydevice.obj: protocol-xiquerydevice.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerydevice_CFLAGS) $(CFLAGS) -MT protocol_xiquerydevice-protocol-xiquerydevice.obj -MD -MP -MF $(DEPDIR)/protocol_xiquerydevice-protocol-xiquerydevice.Tpo -c -o protocol_xiquerydevice-protocol-xiquerydevice.obj `if test -f 'protocol-xiquerydevice.c'; then $(CYGPATH_W) 'protocol-xiquerydevice.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiquerydevice.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiquerydevice-protocol-xiquerydevice.Tpo $(DEPDIR)/protocol_xiquerydevice-protocol-xiquerydevice.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiquerydevice.c' object='protocol_xiquerydevice-protocol-xiquerydevice.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerydevice_CFLAGS) $(CFLAGS) -c -o protocol_xiquerydevice-protocol-xiquerydevice.obj `if test -f 'protocol-xiquerydevice.c'; then $(CYGPATH_W) 'protocol-xiquerydevice.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiquerydevice.c'; fi` + +protocol_xiquerypointer-protocol-common.o: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerypointer_CFLAGS) $(CFLAGS) -MT protocol_xiquerypointer-protocol-common.o -MD -MP -MF $(DEPDIR)/protocol_xiquerypointer-protocol-common.Tpo -c -o protocol_xiquerypointer-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiquerypointer-protocol-common.Tpo $(DEPDIR)/protocol_xiquerypointer-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiquerypointer-protocol-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerypointer_CFLAGS) $(CFLAGS) -c -o protocol_xiquerypointer-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c + +protocol_xiquerypointer-protocol-common.obj: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerypointer_CFLAGS) $(CFLAGS) -MT protocol_xiquerypointer-protocol-common.obj -MD -MP -MF $(DEPDIR)/protocol_xiquerypointer-protocol-common.Tpo -c -o protocol_xiquerypointer-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiquerypointer-protocol-common.Tpo $(DEPDIR)/protocol_xiquerypointer-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiquerypointer-protocol-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerypointer_CFLAGS) $(CFLAGS) -c -o protocol_xiquerypointer-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` + +protocol_xiquerypointer-protocol-xiquerypointer.o: protocol-xiquerypointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerypointer_CFLAGS) $(CFLAGS) -MT protocol_xiquerypointer-protocol-xiquerypointer.o -MD -MP -MF $(DEPDIR)/protocol_xiquerypointer-protocol-xiquerypointer.Tpo -c -o protocol_xiquerypointer-protocol-xiquerypointer.o `test -f 'protocol-xiquerypointer.c' || echo '$(srcdir)/'`protocol-xiquerypointer.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiquerypointer-protocol-xiquerypointer.Tpo $(DEPDIR)/protocol_xiquerypointer-protocol-xiquerypointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiquerypointer.c' object='protocol_xiquerypointer-protocol-xiquerypointer.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerypointer_CFLAGS) $(CFLAGS) -c -o protocol_xiquerypointer-protocol-xiquerypointer.o `test -f 'protocol-xiquerypointer.c' || echo '$(srcdir)/'`protocol-xiquerypointer.c + +protocol_xiquerypointer-protocol-xiquerypointer.obj: protocol-xiquerypointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerypointer_CFLAGS) $(CFLAGS) -MT protocol_xiquerypointer-protocol-xiquerypointer.obj -MD -MP -MF $(DEPDIR)/protocol_xiquerypointer-protocol-xiquerypointer.Tpo -c -o protocol_xiquerypointer-protocol-xiquerypointer.obj `if test -f 'protocol-xiquerypointer.c'; then $(CYGPATH_W) 'protocol-xiquerypointer.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiquerypointer.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiquerypointer-protocol-xiquerypointer.Tpo $(DEPDIR)/protocol_xiquerypointer-protocol-xiquerypointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiquerypointer.c' object='protocol_xiquerypointer-protocol-xiquerypointer.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiquerypointer_CFLAGS) $(CFLAGS) -c -o protocol_xiquerypointer-protocol-xiquerypointer.obj `if test -f 'protocol-xiquerypointer.c'; then $(CYGPATH_W) 'protocol-xiquerypointer.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiquerypointer.c'; fi` + +protocol_xiqueryversion-protocol-common.o: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiqueryversion_CFLAGS) $(CFLAGS) -MT protocol_xiqueryversion-protocol-common.o -MD -MP -MF $(DEPDIR)/protocol_xiqueryversion-protocol-common.Tpo -c -o protocol_xiqueryversion-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiqueryversion-protocol-common.Tpo $(DEPDIR)/protocol_xiqueryversion-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiqueryversion-protocol-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiqueryversion_CFLAGS) $(CFLAGS) -c -o protocol_xiqueryversion-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c + +protocol_xiqueryversion-protocol-common.obj: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiqueryversion_CFLAGS) $(CFLAGS) -MT protocol_xiqueryversion-protocol-common.obj -MD -MP -MF $(DEPDIR)/protocol_xiqueryversion-protocol-common.Tpo -c -o protocol_xiqueryversion-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiqueryversion-protocol-common.Tpo $(DEPDIR)/protocol_xiqueryversion-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiqueryversion-protocol-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiqueryversion_CFLAGS) $(CFLAGS) -c -o protocol_xiqueryversion-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` + +protocol_xiqueryversion-protocol-xiqueryversion.o: protocol-xiqueryversion.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiqueryversion_CFLAGS) $(CFLAGS) -MT protocol_xiqueryversion-protocol-xiqueryversion.o -MD -MP -MF $(DEPDIR)/protocol_xiqueryversion-protocol-xiqueryversion.Tpo -c -o protocol_xiqueryversion-protocol-xiqueryversion.o `test -f 'protocol-xiqueryversion.c' || echo '$(srcdir)/'`protocol-xiqueryversion.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiqueryversion-protocol-xiqueryversion.Tpo $(DEPDIR)/protocol_xiqueryversion-protocol-xiqueryversion.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiqueryversion.c' object='protocol_xiqueryversion-protocol-xiqueryversion.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiqueryversion_CFLAGS) $(CFLAGS) -c -o protocol_xiqueryversion-protocol-xiqueryversion.o `test -f 'protocol-xiqueryversion.c' || echo '$(srcdir)/'`protocol-xiqueryversion.c + +protocol_xiqueryversion-protocol-xiqueryversion.obj: protocol-xiqueryversion.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiqueryversion_CFLAGS) $(CFLAGS) -MT protocol_xiqueryversion-protocol-xiqueryversion.obj -MD -MP -MF $(DEPDIR)/protocol_xiqueryversion-protocol-xiqueryversion.Tpo -c -o protocol_xiqueryversion-protocol-xiqueryversion.obj `if test -f 'protocol-xiqueryversion.c'; then $(CYGPATH_W) 'protocol-xiqueryversion.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiqueryversion.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiqueryversion-protocol-xiqueryversion.Tpo $(DEPDIR)/protocol_xiqueryversion-protocol-xiqueryversion.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiqueryversion.c' object='protocol_xiqueryversion-protocol-xiqueryversion.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiqueryversion_CFLAGS) $(CFLAGS) -c -o protocol_xiqueryversion-protocol-xiqueryversion.obj `if test -f 'protocol-xiqueryversion.c'; then $(CYGPATH_W) 'protocol-xiqueryversion.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiqueryversion.c'; fi` + +protocol_xiselectevents-protocol-common.o: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiselectevents_CFLAGS) $(CFLAGS) -MT protocol_xiselectevents-protocol-common.o -MD -MP -MF $(DEPDIR)/protocol_xiselectevents-protocol-common.Tpo -c -o protocol_xiselectevents-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiselectevents-protocol-common.Tpo $(DEPDIR)/protocol_xiselectevents-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiselectevents-protocol-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiselectevents_CFLAGS) $(CFLAGS) -c -o protocol_xiselectevents-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c + +protocol_xiselectevents-protocol-common.obj: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiselectevents_CFLAGS) $(CFLAGS) -MT protocol_xiselectevents-protocol-common.obj -MD -MP -MF $(DEPDIR)/protocol_xiselectevents-protocol-common.Tpo -c -o protocol_xiselectevents-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiselectevents-protocol-common.Tpo $(DEPDIR)/protocol_xiselectevents-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiselectevents-protocol-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiselectevents_CFLAGS) $(CFLAGS) -c -o protocol_xiselectevents-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` + +protocol_xiselectevents-protocol-xiselectevents.o: protocol-xiselectevents.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiselectevents_CFLAGS) $(CFLAGS) -MT protocol_xiselectevents-protocol-xiselectevents.o -MD -MP -MF $(DEPDIR)/protocol_xiselectevents-protocol-xiselectevents.Tpo -c -o protocol_xiselectevents-protocol-xiselectevents.o `test -f 'protocol-xiselectevents.c' || echo '$(srcdir)/'`protocol-xiselectevents.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiselectevents-protocol-xiselectevents.Tpo $(DEPDIR)/protocol_xiselectevents-protocol-xiselectevents.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiselectevents.c' object='protocol_xiselectevents-protocol-xiselectevents.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiselectevents_CFLAGS) $(CFLAGS) -c -o protocol_xiselectevents-protocol-xiselectevents.o `test -f 'protocol-xiselectevents.c' || echo '$(srcdir)/'`protocol-xiselectevents.c + +protocol_xiselectevents-protocol-xiselectevents.obj: protocol-xiselectevents.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiselectevents_CFLAGS) $(CFLAGS) -MT protocol_xiselectevents-protocol-xiselectevents.obj -MD -MP -MF $(DEPDIR)/protocol_xiselectevents-protocol-xiselectevents.Tpo -c -o protocol_xiselectevents-protocol-xiselectevents.obj `if test -f 'protocol-xiselectevents.c'; then $(CYGPATH_W) 'protocol-xiselectevents.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiselectevents.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiselectevents-protocol-xiselectevents.Tpo $(DEPDIR)/protocol_xiselectevents-protocol-xiselectevents.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiselectevents.c' object='protocol_xiselectevents-protocol-xiselectevents.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiselectevents_CFLAGS) $(CFLAGS) -c -o protocol_xiselectevents-protocol-xiselectevents.obj `if test -f 'protocol-xiselectevents.c'; then $(CYGPATH_W) 'protocol-xiselectevents.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiselectevents.c'; fi` + +protocol_xisetclientpointer-protocol-common.o: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xisetclientpointer_CFLAGS) $(CFLAGS) -MT protocol_xisetclientpointer-protocol-common.o -MD -MP -MF $(DEPDIR)/protocol_xisetclientpointer-protocol-common.Tpo -c -o protocol_xisetclientpointer-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xisetclientpointer-protocol-common.Tpo $(DEPDIR)/protocol_xisetclientpointer-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xisetclientpointer-protocol-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xisetclientpointer_CFLAGS) $(CFLAGS) -c -o protocol_xisetclientpointer-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c + +protocol_xisetclientpointer-protocol-common.obj: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xisetclientpointer_CFLAGS) $(CFLAGS) -MT protocol_xisetclientpointer-protocol-common.obj -MD -MP -MF $(DEPDIR)/protocol_xisetclientpointer-protocol-common.Tpo -c -o protocol_xisetclientpointer-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xisetclientpointer-protocol-common.Tpo $(DEPDIR)/protocol_xisetclientpointer-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xisetclientpointer-protocol-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xisetclientpointer_CFLAGS) $(CFLAGS) -c -o protocol_xisetclientpointer-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` + +protocol_xisetclientpointer-protocol-xisetclientpointer.o: protocol-xisetclientpointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xisetclientpointer_CFLAGS) $(CFLAGS) -MT protocol_xisetclientpointer-protocol-xisetclientpointer.o -MD -MP -MF $(DEPDIR)/protocol_xisetclientpointer-protocol-xisetclientpointer.Tpo -c -o protocol_xisetclientpointer-protocol-xisetclientpointer.o `test -f 'protocol-xisetclientpointer.c' || echo '$(srcdir)/'`protocol-xisetclientpointer.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xisetclientpointer-protocol-xisetclientpointer.Tpo $(DEPDIR)/protocol_xisetclientpointer-protocol-xisetclientpointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xisetclientpointer.c' object='protocol_xisetclientpointer-protocol-xisetclientpointer.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xisetclientpointer_CFLAGS) $(CFLAGS) -c -o protocol_xisetclientpointer-protocol-xisetclientpointer.o `test -f 'protocol-xisetclientpointer.c' || echo '$(srcdir)/'`protocol-xisetclientpointer.c + +protocol_xisetclientpointer-protocol-xisetclientpointer.obj: protocol-xisetclientpointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xisetclientpointer_CFLAGS) $(CFLAGS) -MT protocol_xisetclientpointer-protocol-xisetclientpointer.obj -MD -MP -MF $(DEPDIR)/protocol_xisetclientpointer-protocol-xisetclientpointer.Tpo -c -o protocol_xisetclientpointer-protocol-xisetclientpointer.obj `if test -f 'protocol-xisetclientpointer.c'; then $(CYGPATH_W) 'protocol-xisetclientpointer.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xisetclientpointer.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xisetclientpointer-protocol-xisetclientpointer.Tpo $(DEPDIR)/protocol_xisetclientpointer-protocol-xisetclientpointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xisetclientpointer.c' object='protocol_xisetclientpointer-protocol-xisetclientpointer.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xisetclientpointer_CFLAGS) $(CFLAGS) -c -o protocol_xisetclientpointer-protocol-xisetclientpointer.obj `if test -f 'protocol-xisetclientpointer.c'; then $(CYGPATH_W) 'protocol-xisetclientpointer.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xisetclientpointer.c'; fi` + +protocol_xiwarppointer-protocol-common.o: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiwarppointer_CFLAGS) $(CFLAGS) -MT protocol_xiwarppointer-protocol-common.o -MD -MP -MF $(DEPDIR)/protocol_xiwarppointer-protocol-common.Tpo -c -o protocol_xiwarppointer-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiwarppointer-protocol-common.Tpo $(DEPDIR)/protocol_xiwarppointer-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiwarppointer-protocol-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiwarppointer_CFLAGS) $(CFLAGS) -c -o protocol_xiwarppointer-protocol-common.o `test -f 'protocol-common.c' || echo '$(srcdir)/'`protocol-common.c + +protocol_xiwarppointer-protocol-common.obj: protocol-common.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiwarppointer_CFLAGS) $(CFLAGS) -MT protocol_xiwarppointer-protocol-common.obj -MD -MP -MF $(DEPDIR)/protocol_xiwarppointer-protocol-common.Tpo -c -o protocol_xiwarppointer-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiwarppointer-protocol-common.Tpo $(DEPDIR)/protocol_xiwarppointer-protocol-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-common.c' object='protocol_xiwarppointer-protocol-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiwarppointer_CFLAGS) $(CFLAGS) -c -o protocol_xiwarppointer-protocol-common.obj `if test -f 'protocol-common.c'; then $(CYGPATH_W) 'protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/protocol-common.c'; fi` + +protocol_xiwarppointer-protocol-xiwarppointer.o: protocol-xiwarppointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiwarppointer_CFLAGS) $(CFLAGS) -MT protocol_xiwarppointer-protocol-xiwarppointer.o -MD -MP -MF $(DEPDIR)/protocol_xiwarppointer-protocol-xiwarppointer.Tpo -c -o protocol_xiwarppointer-protocol-xiwarppointer.o `test -f 'protocol-xiwarppointer.c' || echo '$(srcdir)/'`protocol-xiwarppointer.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiwarppointer-protocol-xiwarppointer.Tpo $(DEPDIR)/protocol_xiwarppointer-protocol-xiwarppointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiwarppointer.c' object='protocol_xiwarppointer-protocol-xiwarppointer.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiwarppointer_CFLAGS) $(CFLAGS) -c -o protocol_xiwarppointer-protocol-xiwarppointer.o `test -f 'protocol-xiwarppointer.c' || echo '$(srcdir)/'`protocol-xiwarppointer.c + +protocol_xiwarppointer-protocol-xiwarppointer.obj: protocol-xiwarppointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiwarppointer_CFLAGS) $(CFLAGS) -MT protocol_xiwarppointer-protocol-xiwarppointer.obj -MD -MP -MF $(DEPDIR)/protocol_xiwarppointer-protocol-xiwarppointer.Tpo -c -o protocol_xiwarppointer-protocol-xiwarppointer.obj `if test -f 'protocol-xiwarppointer.c'; then $(CYGPATH_W) 'protocol-xiwarppointer.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiwarppointer.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/protocol_xiwarppointer-protocol-xiwarppointer.Tpo $(DEPDIR)/protocol_xiwarppointer-protocol-xiwarppointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol-xiwarppointer.c' object='protocol_xiwarppointer-protocol-xiwarppointer.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protocol_xiwarppointer_CFLAGS) $(CFLAGS) -c -o protocol_xiwarppointer-protocol-xiwarppointer.obj `if test -f 'protocol-xiwarppointer.c'; then $(CYGPATH_W) 'protocol-xiwarppointer.c'; else $(CYGPATH_W) '$(srcdir)/protocol-xiwarppointer.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @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 "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +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: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir 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-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +# 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/xorg-server/test/xi2/protocol-common.c b/xorg-server/test/xi2/protocol-common.c new file mode 100644 index 000000000..2d0bc3699 --- /dev/null +++ b/xorg-server/test/xi2/protocol-common.c @@ -0,0 +1,169 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "extinit.h" /* for XInputExtensionInit */ +#include + +#include "protocol-common.h" + +struct devices devices; +ScreenRec screen; +WindowRec root; +WindowRec window; + +void *userdata; + +extern int CorePointerProc(DeviceIntPtr pDev, int what); +extern int CoreKeyboardProc(DeviceIntPtr pDev, int what); + +static void fake_init_sprite(DeviceIntPtr dev) +{ + SpritePtr sprite; + sprite = dev->spriteInfo->sprite; + + sprite->spriteTraceSize = 10; + sprite->spriteTrace = xcalloc(sprite->spriteTraceSize, sizeof(WindowPtr)); + sprite->spriteTraceGood = 1; + sprite->spriteTrace[0] = &root; + sprite->hot.x = SPRITE_X; + sprite->hot.y = SPRITE_Y; + sprite->hotPhys.x = sprite->hot.x; + sprite->hotPhys.y = sprite->hot.y; + sprite->win = &window; + sprite->hotPhys.pScreen = &screen; + sprite->physLimits.x1 = 0; + sprite->physLimits.y1 = 0; + sprite->physLimits.x2 = screen.width; + sprite->physLimits.y2 = screen.height; +} + +/** + * Create and init 2 master devices (VCP + VCK) and two slave devices, one + * default mouse, one default keyboard. + */ +struct devices init_devices(void) +{ + ClientRec client; + struct devices devices; + + client = init_client(0, NULL); + + AllocDevicePair(&client, "Virtual core", &devices.vcp, &devices.vck, + CorePointerProc, CoreKeyboardProc, TRUE); + inputInfo.pointer = devices.vcp; + inputInfo.keyboard = devices.vck; + ActivateDevice(devices.vcp, FALSE); + ActivateDevice(devices.vck, FALSE); + EnableDevice(devices.vcp, FALSE); + EnableDevice(devices.vck, FALSE); + + AllocDevicePair(&client, "", &devices.mouse, &devices.kbd, + CorePointerProc, CoreKeyboardProc, FALSE); + ActivateDevice(devices.mouse, FALSE); + ActivateDevice(devices.kbd, FALSE); + EnableDevice(devices.mouse, FALSE); + EnableDevice(devices.kbd, FALSE); + + devices.num_devices = 4; + devices.num_master_devices = 2; + + fake_init_sprite(devices.mouse); + fake_init_sprite(devices.vcp); + + return devices; +} + + +/* Create minimal client, with the given buffer and len as request buffer */ +ClientRec init_client(int len, void *data) +{ + ClientRec client = { 0 }; + + /* we store the privates now and reassign it after the memset. this way + * we can share them across multiple test runs and don't have to worry + * about freeing them after each test run. */ + PrivateRec *privates = client.devPrivates; + + client.index = CLIENT_INDEX; + client.clientAsMask = CLIENT_MASK; + client.sequence = CLIENT_SEQUENCE; + client.req_len = len; + + client.requestBuffer = data; + client.devPrivates = privates; + return client; +} + +void init_window(WindowPtr window, WindowPtr parent, int id) +{ + memset(window, 0, sizeof(window)); + + window->drawable.id = id; + if (parent) + { + window->drawable.x = 30; + window->drawable.y = 50; + window->drawable.width = 100; + window->drawable.height = 200; + } + window->parent = parent; + window->optional = xcalloc(1, sizeof(WindowOptRec)); + g_assert(window->optional); +} + +/* Needed for the screen setup, otherwise we crash during sprite initialization */ +static Bool device_cursor_init(DeviceIntPtr dev, ScreenPtr screen) { return TRUE; } +static Bool set_cursor_pos(DeviceIntPtr dev, ScreenPtr screen, int x, int y, Bool event) { return TRUE; }; +void init_simple(void) +{ + screenInfo.arraySize = MAXSCREENS; + screenInfo.numScreens = 1; + screenInfo.screens[0] = &screen; + + screen.myNum = 0; + screen.id = 100; + screen.width = 640; + screen.height = 480; + screen.DeviceCursorInitialize = device_cursor_init; + screen.SetCursorPosition = set_cursor_pos; + + dixResetPrivates(); + XInputExtensionInit(); + init_window(&root, NULL, ROOT_WINDOW_ID); + init_window(&window, &root, CLIENT_WINDOW_ID); + + devices = init_devices(); +} + +void __wrap_WriteToClient(ClientPtr client, int len, void *data) +{ + g_assert(reply_handler != NULL); + + (*reply_handler)(client, len, data, userdata); +} + diff --git a/xorg-server/test/xi2/protocol-common.h b/xorg-server/test/xi2/protocol-common.h new file mode 100644 index 000000000..afa08780c --- /dev/null +++ b/xorg-server/test/xi2/protocol-common.h @@ -0,0 +1,153 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "scrnintstr.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "exevents.h" + +#ifndef PROTOCOL_COMMON_H +#define PROTOCOL_COMMON_H + +extern int BadDevice; + +/* Check default values in a reply */ +#define reply_check_defaults(rep, len, type) \ + { \ + g_assert((len) >= sz_x##type##Reply); \ + g_assert((rep)->repType == X_Reply); \ + g_assert((rep)->RepType == X_##type); \ + g_assert((rep)->sequenceNumber == CLIENT_SEQUENCE); \ + g_assert((rep)->length >= (sz_x##type##Reply - 32)/4); \ + } + +/* initialise default values for request */ +#define request_init(req, type) \ + { \ + (req)->reqType = 128; /* doesn't matter */ \ + (req)->ReqType = X_##type; \ + (req)->length = (sz_x##type##Req >> 2); \ + } + + +/* Various defines used in the tests. Some tests may use different values + * than these defaults */ +/* default client index */ +#define CLIENT_INDEX 1 +/* default client mask for resources and windows */ +#define CLIENT_MASK ((CLIENT_INDEX) << CLIENTOFFSET) +/* default client sequence number for replies */ +#define CLIENT_SEQUENCE 0x100 +/* default root window id */ +#define ROOT_WINDOW_ID 0x10 +/* default client window id */ +#define CLIENT_WINDOW_ID 0x100001 +/* invalid window ID. use for BadWindow checks. */ +#define INVALID_WINDOW_ID 0x111111 +/* initial fake sprite position */ +#define SPRITE_X 100 +#define SPRITE_Y 200 + + +/* Various structs used throughout the tests */ + + +/* The default devices struct, contains one pointer + keyboard and the + * matching master devices. Initialize with init_devices() if needed. */ +struct devices { + DeviceIntPtr vcp; + DeviceIntPtr vck; + DeviceIntPtr mouse; + DeviceIntPtr kbd; + + int num_devices; + int num_master_devices; +} devices; + +/** + * The set of default devices available in all tests if necessary. + */ +extern struct devices devices; + +/** + * test-specific userdata, passed into the reply handler. + */ +extern void *userdata; +/** + * The reply handler called from WriteToClient. Set this handler if you need + * to check the reply values. + */ +void (*reply_handler)(ClientPtr client, int len, char *data, void *userdata); + +/** + * The default screen used for the windows. Initialized by init_simple(). + */ +extern ScreenRec screen; +/** + * Semi-initialized root window. initialized by init(). + */ +extern WindowRec root; +/** + * Semi-initialized top-level window. initialized by init(). + */ +extern WindowRec window; + +/* various simple functions for quick setup */ +/** + * Initialize the above struct with default devices and return the struct. + * Usually not needed if you call ::init_simple. + */ +struct devices init_devices(void); +/** + * Init a mostly zeroed out client with default values for index and mask. + */ +ClientRec init_client(int request_len, void *request_data); +/** + * Init a mostly zeroed out window with the given window ID. + * Usually not needed if you call ::init_simple which sets up root and + * window. + */ +void init_window(WindowPtr window, WindowPtr parent, int id); +/** + * Create a very simple setup that provides the minimum values for most + * tests, including a screen, the root and client window and the default + * device setup. + */ +void init_simple(void); + +/* Declarations for various overrides in the test files. */ +void __wrap_WriteToClient(ClientPtr client, int len, void *data); +int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask); +int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access); +int __real_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access); +Bool __wrap_AddResource(XID id, RESTYPE type, pointer value); +int __wrap_dixLookupClient(ClientPtr *c, XID id, ClientPtr client, Mask access); +int __real_dixLookupClient(ClientPtr *c, XID id, ClientPtr client, Mask access); + + +#endif /* PROTOCOL_COMMON_H */ + diff --git a/xorg-server/test/xi2/protocol-eventconvert.c b/xorg-server/test/xi2/protocol-eventconvert.c new file mode 100644 index 000000000..f723f7436 --- /dev/null +++ b/xorg-server/test/xi2/protocol-eventconvert.c @@ -0,0 +1,904 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include + +#include "inputstr.h" +#include "eventstr.h" +#include "eventconvert.h" +#include "exevents.h" +#include + + +static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out, + BOOL swap) +{ + int i; + unsigned char *ptr; + FP3232 *value, *raw_value; + int nvals = 0; + int bits_set; + int len; + + if (swap) + { + char n; + + swaps(&out->sequenceNumber, n); + swapl(&out->length, n); + swaps(&out->evtype, n); + swaps(&out->deviceid, n); + swapl(&out->time, n); + swapl(&out->detail, n); + swaps(&out->valuators_len, n); + } + + + g_assert(out->type == GenericEvent); + g_assert(out->extension == 0); /* IReqCode defaults to 0 */ + g_assert(out->evtype == GetXI2Type((InternalEvent*)in)); + g_assert(out->time == in->time); + g_assert(out->detail == in->detail.button); + g_assert(out->deviceid == in->deviceid); + g_assert(out->valuators_len >= bytes_to_int32(bits_to_bytes(sizeof(in->valuators.mask)))); + g_assert(out->flags == 0); /* FIXME: we don't set the flags yet */ + + ptr = (unsigned char*)&out[1]; + bits_set = 0; + + for (i = 0; out->valuators_len && i < sizeof(in->valuators.mask) * 8; i++) + { + g_assert (XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i)); + if (XIMaskIsSet(in->valuators.mask, i)) + bits_set++; + } + + /* length is len of valuator mask (in 4-byte units) + the number of bits + * set. Each bit set represents 2 8-byte values, hence the + * 'bits_set * 4' */ + len = out->valuators_len + bits_set * 4; + g_assert(out->length == len); + + nvals = 0; + + for (i = 0; out->valuators_len && i < MAX_VALUATORS; i++) + { + g_assert (XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i)); + if (XIMaskIsSet(in->valuators.mask, i)) + { + FP3232 vi, vo; + value = (FP3232*)(((unsigned char*)&out[1]) + out->valuators_len * 4); + value += nvals; + + vi.integral = in->valuators.data[i]; + vi.frac = in->valuators.data_frac[i]; + + vo.integral = value->integral; + vo.frac = value->frac; + if (swap) + { + char n; + swapl(&vo.integral, n); + swapl(&vo.frac, n); + } + + g_assert(vi.integral == vo.integral); + g_assert(vi.frac == vo.frac); + + raw_value = value + bits_set; + + vi.integral = in->valuators.data_raw[i]; + vi.frac = in->valuators.data_raw_frac[i]; + + vo.integral = raw_value->integral; + vo.frac = raw_value->frac; + if (swap) + { + char n; + swapl(&vo.integral, n); + swapl(&vo.frac, n); + } + + g_assert(vi.integral == vo.integral); + g_assert(vi.frac == vo.frac); + + nvals++; + } + } +} + +static void test_XIRawEvent(RawDeviceEvent *in) +{ + xXIRawEvent *out, *swapped; + int rc; + + rc = EventToXI2((InternalEvent*)in, (xEvent**)&out); + g_assert(rc == Success); + + test_values_XIRawEvent(in, out, FALSE); + + swapped = xcalloc(1, sizeof(xEvent) + out->length * 4); + XI2EventSwap((xGenericEvent*)out, (xGenericEvent*)swapped); + test_values_XIRawEvent(in, swapped, TRUE); + + xfree(out); + xfree(swapped); +} + +static void test_convert_XIFocusEvent(void) +{ + xEvent *out; + DeviceEvent in; + int rc; + + in.header = ET_Internal; + in.type = ET_Enter; + rc = EventToXI2((InternalEvent*)&in, &out); + g_assert(rc == Success); + g_assert(out == NULL); + + in.header = ET_Internal; + in.type = ET_FocusIn; + rc = EventToXI2((InternalEvent*)&in, &out); + g_assert(rc == Success); + g_assert(out == NULL); + + in.header = ET_Internal; + in.type = ET_FocusOut; + rc = EventToXI2((InternalEvent*)&in, &out); + g_assert(rc == BadImplementation); + + in.header = ET_Internal; + in.type = ET_Leave; + rc = EventToXI2((InternalEvent*)&in, &out); + g_assert(rc == BadImplementation); +} + + +static void test_convert_XIRawEvent(void) +{ + RawDeviceEvent in; + int i; + + memset(&in, 0, sizeof(in)); + + g_test_message("Testing all event types"); + in.header = ET_Internal; + in.type = ET_RawMotion; + test_XIRawEvent(&in); + + in.header = ET_Internal; + in.type = ET_RawKeyPress; + test_XIRawEvent(&in); + + in.header = ET_Internal; + in.type = ET_RawKeyRelease; + test_XIRawEvent(&in); + + in.header = ET_Internal; + in.type = ET_RawButtonPress; + test_XIRawEvent(&in); + + in.header = ET_Internal; + in.type = ET_RawButtonRelease; + test_XIRawEvent(&in); + + g_test_message("Testing details and other fields"); + in.detail.button = 1L; + test_XIRawEvent(&in); + in.detail.button = 1L << 8; + test_XIRawEvent(&in); + in.detail.button = 1L << 16; + test_XIRawEvent(&in); + in.detail.button = 1L << 24; + test_XIRawEvent(&in); + in.detail.button = ~0L; + test_XIRawEvent(&in); + + in.detail.button = 0; + + in.time = 1L; + test_XIRawEvent(&in); + in.time = 1L << 8; + test_XIRawEvent(&in); + in.time = 1L << 16; + test_XIRawEvent(&in); + in.time = 1L << 24; + test_XIRawEvent(&in); + in.time = ~0L; + test_XIRawEvent(&in); + + in.deviceid = 1; + test_XIRawEvent(&in); + in.deviceid = 1 << 8; + test_XIRawEvent(&in); + in.deviceid = ~0 & 0xFF; + test_XIRawEvent(&in); + + g_test_message("Testing valuator masks"); + for (i = 0; i < sizeof(in.valuators.mask) * 8; i++) + { + XISetMask(in.valuators.mask, i); + test_XIRawEvent(&in); + XIClearMask(in.valuators.mask, i); + } + + for (i = 0; i < sizeof(in.valuators.mask) * 8; i++) + { + XISetMask(in.valuators.mask, i); + + in.valuators.data[i] = i; + in.valuators.data_raw[i] = i + 10; + in.valuators.data_frac[i] = i + 20; + in.valuators.data_raw_frac[i] = i + 30; + test_XIRawEvent(&in); + XIClearMask(in.valuators.mask, i); + } + + for (i = 0; i < sizeof(in.valuators.mask) * 8; i++) + { + XISetMask(in.valuators.mask, i); + test_XIRawEvent(&in); + } +} + +static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent *out, + BOOL swap) +{ + int buttons, valuators; + int i; + unsigned char *ptr; + FP3232 *values; + + if (swap) { + char n; + + swaps(&out->sequenceNumber, n); + swapl(&out->length, n); + swaps(&out->evtype, n); + swaps(&out->deviceid, n); + swaps(&out->sourceid, n); + swapl(&out->time, n); + swapl(&out->detail, n); + swapl(&out->root, n); + swapl(&out->event, n); + swapl(&out->child, n); + swapl(&out->root_x, n); + swapl(&out->root_y, n); + swapl(&out->event_x, n); + swapl(&out->event_y, n); + swaps(&out->buttons_len, n); + swaps(&out->valuators_len, n); + swapl(&out->mods.base_mods, n); + swapl(&out->mods.latched_mods, n); + swapl(&out->mods.locked_mods, n); + swapl(&out->mods.effective_mods, n); + } + + g_assert(out->extension == 0); /* IReqCode defaults to 0 */ + g_assert(out->evtype == GetXI2Type((InternalEvent*)in)); + g_assert(out->time == in->time); + g_assert(out->detail == in->detail.button); + g_assert(out->length >= 12); + + g_assert(out->deviceid == in->deviceid); + g_assert(out->sourceid == in->sourceid); + + g_assert(out->flags == 0); /* FIXME: we don't set the flags yet */ + + g_assert(out->root == in->root); + g_assert(out->event == None); /* set in FixUpEventFromWindow */ + g_assert(out->child == None); /* set in FixUpEventFromWindow */ + + g_assert(out->mods.base_mods == in->mods.base); + g_assert(out->mods.latched_mods == in->mods.latched); + g_assert(out->mods.locked_mods == in->mods.locked); + g_assert(out->mods.effective_mods == in->mods.effective); + + g_assert(out->group.base_group == in->group.base); + g_assert(out->group.latched_group == in->group.latched); + g_assert(out->group.locked_group == in->group.locked); + g_assert(out->group.effective_group == in->group.effective); + + g_assert(out->event_x == 0); /* set in FixUpEventFromWindow */ + g_assert(out->event_y == 0); /* set in FixUpEventFromWindow */ + + g_assert(out->root_x == FP1616(in->root_x, in->root_x_frac)); + g_assert(out->root_y == FP1616(in->root_y, in->root_y_frac)); + + buttons = 0; + for (i = 0; i < bits_to_bytes(sizeof(in->buttons)); i++) + { + if (XIMaskIsSet(in->buttons, i)) + { + g_assert(out->buttons_len >= bytes_to_int32(bits_to_bytes(i))); + buttons++; + } + } + + ptr = (unsigned char*)&out[1]; + for (i = 0; i < sizeof(in->buttons) * 8; i++) + g_assert(XIMaskIsSet(in->buttons, i) == XIMaskIsSet(ptr, i)); + + + valuators = 0; + for (i = 0; i < sizeof(in->valuators.mask) * 8; i++) + if (XIMaskIsSet(in->valuators.mask, i)) + valuators++; + + g_assert(out->valuators_len >= bytes_to_int32(bits_to_bytes(valuators))); + + ptr += out->buttons_len * 4; + values = (FP3232*)(ptr + out->valuators_len * 4); + for (i = 0; i < sizeof(in->valuators.mask) * 8 || + i < (out->valuators_len * 4) * 8; i++) + { + if (i > sizeof(in->valuators.mask) * 8) + g_assert(!XIMaskIsSet(ptr, i)); + else if (i > out->valuators_len * 4 * 8) + g_assert(!XIMaskIsSet(in->valuators.mask, i)); + else { + g_assert(XIMaskIsSet(in->valuators.mask, i) == + XIMaskIsSet(ptr, i)); + + if (XIMaskIsSet(ptr, i)) + { + FP3232 vi, vo; + + vi.integral = in->valuators.data[i]; + vi.frac = in->valuators.data_frac[i]; + + vo = *values; + + if (swap) + { + char n; + swapl(&vo.integral, n); + swapl(&vo.frac, n); + } + + + g_assert(vi.integral == vo.integral); + g_assert(vi.frac == vo.frac); + values++; + } + } + } +} + +static void test_XIDeviceEvent(DeviceEvent *in) +{ + xXIDeviceEvent *out, *swapped; + int rc; + + rc = EventToXI2((InternalEvent*)in, (xEvent**)&out); + g_assert(rc == Success); + + test_values_XIDeviceEvent(in, out, FALSE); + + swapped = xcalloc(1, sizeof(xEvent) + out->length * 4); + XI2EventSwap((xGenericEvent*)out, (xGenericEvent*)swapped); + test_values_XIDeviceEvent(in, swapped, TRUE); + + xfree(out); + xfree(swapped); +} + +static void test_convert_XIDeviceEvent(void) +{ + DeviceEvent in; + int i; + + memset(&in, 0, sizeof(in)); + + g_test_message("Testing simple field values"); + in.header = ET_Internal; + in.type = ET_Motion; + in.length = sizeof(DeviceEvent); + in.time = 0; + in.deviceid = 1; + in.sourceid = 2; + in.root = 3; + in.root_x = 4; + in.root_x_frac = 5; + in.root_y = 6; + in.root_y_frac = 7; + in.detail.button = 8; + in.mods.base = 9; + in.mods.latched = 10; + in.mods.locked = 11; + in.mods.effective = 11; + in.group.base = 12; + in.group.latched = 13; + in.group.locked = 14; + in.group.effective = 15; + + test_XIDeviceEvent(&in); + + g_test_message("Testing field ranges"); + /* 32 bit */ + in.detail.button = 1L; + test_XIDeviceEvent(&in); + in.detail.button = 1L << 8; + test_XIDeviceEvent(&in); + in.detail.button = 1L << 16; + test_XIDeviceEvent(&in); + in.detail.button = 1L << 24; + test_XIDeviceEvent(&in); + in.detail.button = ~0L; + test_XIDeviceEvent(&in); + + /* 32 bit */ + in.time = 1L; + test_XIDeviceEvent(&in); + in.time = 1L << 8; + test_XIDeviceEvent(&in); + in.time = 1L << 16; + test_XIDeviceEvent(&in); + in.time = 1L << 24; + test_XIDeviceEvent(&in); + in.time = ~0L; + test_XIDeviceEvent(&in); + + /* 16 bit */ + in.deviceid = 1; + test_XIDeviceEvent(&in); + in.deviceid = 1 << 8; + test_XIDeviceEvent(&in); + in.deviceid = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + /* 16 bit */ + in.sourceid = 1; + test_XIDeviceEvent(&in); + in.deviceid = 1 << 8; + test_XIDeviceEvent(&in); + in.deviceid = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + /* 32 bit */ + in.root = 1L; + test_XIDeviceEvent(&in); + in.root = 1L << 8; + test_XIDeviceEvent(&in); + in.root = 1L << 16; + test_XIDeviceEvent(&in); + in.root = 1L << 24; + test_XIDeviceEvent(&in); + in.root = ~0L; + test_XIDeviceEvent(&in); + + /* 16 bit */ + in.root_x = 1; + test_XIDeviceEvent(&in); + in.root_x = 1 << 8; + test_XIDeviceEvent(&in); + in.root_x = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + in.root_x_frac = 1; + test_XIDeviceEvent(&in); + in.root_x_frac = 1 << 8; + test_XIDeviceEvent(&in); + in.root_x_frac = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + in.root_y = 1; + test_XIDeviceEvent(&in); + in.root_y = 1 << 8; + test_XIDeviceEvent(&in); + in.root_y = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + in.root_y_frac = 1; + test_XIDeviceEvent(&in); + in.root_y_frac = 1 << 8; + test_XIDeviceEvent(&in); + in.root_y_frac = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + /* 32 bit */ + in.mods.base = 1L; + test_XIDeviceEvent(&in); + in.mods.base = 1L << 8; + test_XIDeviceEvent(&in); + in.mods.base = 1L << 16; + test_XIDeviceEvent(&in); + in.mods.base = 1L << 24; + test_XIDeviceEvent(&in); + in.mods.base = ~0L; + test_XIDeviceEvent(&in); + + in.mods.latched = 1L; + test_XIDeviceEvent(&in); + in.mods.latched = 1L << 8; + test_XIDeviceEvent(&in); + in.mods.latched = 1L << 16; + test_XIDeviceEvent(&in); + in.mods.latched = 1L << 24; + test_XIDeviceEvent(&in); + in.mods.latched = ~0L; + test_XIDeviceEvent(&in); + + in.mods.locked = 1L; + test_XIDeviceEvent(&in); + in.mods.locked = 1L << 8; + test_XIDeviceEvent(&in); + in.mods.locked = 1L << 16; + test_XIDeviceEvent(&in); + in.mods.locked = 1L << 24; + test_XIDeviceEvent(&in); + in.mods.locked = ~0L; + test_XIDeviceEvent(&in); + + in.mods.effective = 1L; + test_XIDeviceEvent(&in); + in.mods.effective = 1L << 8; + test_XIDeviceEvent(&in); + in.mods.effective = 1L << 16; + test_XIDeviceEvent(&in); + in.mods.effective = 1L << 24; + test_XIDeviceEvent(&in); + in.mods.effective = ~0L; + test_XIDeviceEvent(&in); + + /* 8 bit */ + in.group.base = 1; + test_XIDeviceEvent(&in); + in.group.base = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + in.group.latched = 1; + test_XIDeviceEvent(&in); + in.group.latched = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + in.group.locked = 1; + test_XIDeviceEvent(&in); + in.group.locked = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + in.mods.effective = 1; + test_XIDeviceEvent(&in); + in.mods.effective = ~0 & 0xFF; + test_XIDeviceEvent(&in); + + g_test_message("Testing button masks"); + for (i = 0; i < sizeof(in.buttons) * 8; i++) + { + XISetMask(in.buttons, i); + test_XIDeviceEvent(&in); + XIClearMask(in.buttons, i); + } + + for (i = 0; i < sizeof(in.buttons) * 8; i++) + { + XISetMask(in.buttons, i); + test_XIDeviceEvent(&in); + } + + g_test_message("Testing valuator masks"); + for (i = 0; i < sizeof(in.valuators.mask) * 8; i++) + { + XISetMask(in.valuators.mask, i); + test_XIDeviceEvent(&in); + XIClearMask(in.valuators.mask, i); + } + + for (i = 0; i < sizeof(in.valuators.mask) * 8; i++) + { + XISetMask(in.valuators.mask, i); + + in.valuators.data[i] = i; + in.valuators.data_frac[i] = i + 20; + test_XIDeviceEvent(&in); + XIClearMask(in.valuators.mask, i); + } + + for (i = 0; i < sizeof(in.valuators.mask) * 8; i++) + { + XISetMask(in.valuators.mask, i); + test_XIDeviceEvent(&in); + } +} + +static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in, + xXIDeviceChangedEvent *out, + BOOL swap) +{ + int i, j; + unsigned char *ptr; + + if (swap) + { + char n; + + swaps(&out->sequenceNumber, n); + swapl(&out->length, n); + swaps(&out->evtype, n); + swaps(&out->deviceid, n); + swaps(&out->sourceid, n); + swapl(&out->time, n); + swaps(&out->num_classes, n); + } + + g_assert(out->type == GenericEvent); + g_assert(out->extension == 0); /* IReqCode defaults to 0 */ + g_assert(out->evtype == GetXI2Type((InternalEvent*)in)); + g_assert(out->time == in->time); + g_assert(out->deviceid == in->deviceid); + g_assert(out->sourceid == in->sourceid); + + ptr = (unsigned char*)&out[1]; + for (i = 0; i < out->num_classes; i++) + { + xXIAnyInfo* any = (xXIAnyInfo*)ptr; + + if (swap) + { + char n; + swaps(&any->length, n); + swaps(&any->type, n); + swaps(&any->sourceid, n); + } + + switch(any->type) + { + case XIButtonClass: + { + xXIButtonInfo *b = (xXIButtonInfo*)any; + Atom *names; + + if (swap) + { + char n; + swaps(&b->num_buttons, n); + } + + g_assert(b->length == + bytes_to_int32(sizeof(xXIButtonInfo)) + + bytes_to_int32(bits_to_bytes(b->num_buttons)) + + b->num_buttons); + g_assert(b->num_buttons == in->buttons.num_buttons); + + names = (Atom*)((char*)&b[1] + + pad_to_int32(bits_to_bytes(b->num_buttons))); + for (j = 0; j < b->num_buttons; j++) + { + if (swap) + { + char n; + swapl(&names[j], n); + } + g_assert(names[j] == in->buttons.names[j]); + } + } + break; + case XIKeyClass: + { + xXIKeyInfo *k = (xXIKeyInfo*)any; + uint32_t *kc; + + if (swap) + { + char n; + swaps(&k->num_keycodes, n); + } + + g_assert(k->length == + bytes_to_int32(sizeof(xXIKeyInfo)) + + k->num_keycodes); + g_assert(k->num_keycodes == in->keys.max_keycode - + in->keys.min_keycode + 1); + + kc = (uint32_t*)&k[1]; + for (j = 0; j < k->num_keycodes; j++) + { + if (swap) + { + char n; + swapl(&kc[j], n); + } + g_assert(kc[j] >= in->keys.min_keycode); + g_assert(kc[j] <= in->keys.max_keycode); + } + } + break; + case XIValuatorClass: + { + xXIValuatorInfo *v = (xXIValuatorInfo*)any; + g_assert(v->length == + bytes_to_int32(sizeof(xXIValuatorInfo))); + + } + break; + } + + ptr += any->length * 4; + } + +} + +static void test_XIDeviceChangedEvent(DeviceChangedEvent *in) +{ + xXIDeviceChangedEvent *out, *swapped; + int rc; + + rc = EventToXI2((InternalEvent*)in, (xEvent**)&out); + g_assert(rc == Success); + + test_values_XIDeviceChangedEvent(in, out, FALSE); + + swapped = xcalloc(1, sizeof(xEvent) + out->length * 4); + XI2EventSwap((xGenericEvent*)out, (xGenericEvent*)swapped); + test_values_XIDeviceChangedEvent(in, swapped, TRUE); + + xfree(out); + xfree(swapped); +} + +static void test_convert_XIDeviceChangedEvent(void) +{ + DeviceChangedEvent in; + int i; + + g_test_message("Testing simple field values"); + memset(&in, 0, sizeof(in)); + in.header = ET_Internal; + in.type = ET_DeviceChanged; + in.length = sizeof(DeviceChangedEvent); + in.time = 0; + in.deviceid = 1; + in.sourceid = 2; + in.masterid = 3; + in.num_valuators = 4; + in.flags = DEVCHANGE_SLAVE_SWITCH | DEVCHANGE_POINTER_EVENT | DEVCHANGE_KEYBOARD_EVENT; + + for (i = 0; i < MAX_BUTTONS; i++) + in.buttons.names[i] = i + 10; + + in.keys.min_keycode = 8; + in.keys.max_keycode = 255; + + test_XIDeviceChangedEvent(&in); + + in.time = 1L; + test_XIDeviceChangedEvent(&in); + in.time = 1L << 8; + test_XIDeviceChangedEvent(&in); + in.time = 1L << 16; + test_XIDeviceChangedEvent(&in); + in.time = 1L << 24; + test_XIDeviceChangedEvent(&in); + in.time = ~0L; + test_XIDeviceChangedEvent(&in); + + in.deviceid = 1L; + test_XIDeviceChangedEvent(&in); + in.deviceid = 1L << 8; + test_XIDeviceChangedEvent(&in); + in.deviceid = ~0 & 0xFFFF; + test_XIDeviceChangedEvent(&in); + + in.sourceid = 1L; + test_XIDeviceChangedEvent(&in); + in.sourceid = 1L << 8; + test_XIDeviceChangedEvent(&in); + in.sourceid = ~0 & 0xFFFF; + test_XIDeviceChangedEvent(&in); + + in.masterid = 1L; + test_XIDeviceChangedEvent(&in); + in.masterid = 1L << 8; + test_XIDeviceChangedEvent(&in); + in.masterid = ~0 & 0xFFFF; + test_XIDeviceChangedEvent(&in); + + in.buttons.num_buttons = 0; + test_XIDeviceChangedEvent(&in); + + in.buttons.num_buttons = 1; + test_XIDeviceChangedEvent(&in); + + in.buttons.num_buttons = MAX_BUTTONS; + test_XIDeviceChangedEvent(&in); + + in.keys.min_keycode = 0; + in.keys.max_keycode = 0; + test_XIDeviceChangedEvent(&in); + + in.keys.max_keycode = 1 << 8; + test_XIDeviceChangedEvent(&in); + + in.keys.max_keycode = 0xFFFD; /* highest range, above that the length + field gives up */ + test_XIDeviceChangedEvent(&in); + + in.keys.min_keycode = 1 << 8; + in.keys.max_keycode = 1 << 8; + test_XIDeviceChangedEvent(&in); + + in.keys.min_keycode = 1 << 8; + in.keys.max_keycode = 0; + test_XIDeviceChangedEvent(&in); + + in.num_valuators = 0; + test_XIDeviceChangedEvent(&in); + + in.num_valuators = 1; + test_XIDeviceChangedEvent(&in); + + in.num_valuators = MAX_VALUATORS; + test_XIDeviceChangedEvent(&in); + + for (i = 0; i < MAX_VALUATORS; i++) + { + in.valuators[i].min = 0; + in.valuators[i].max = 0; + test_XIDeviceChangedEvent(&in); + + in.valuators[i].max = 1 << 8; + test_XIDeviceChangedEvent(&in); + in.valuators[i].max = 1 << 16; + test_XIDeviceChangedEvent(&in); + in.valuators[i].max = 1 << 24; + test_XIDeviceChangedEvent(&in); + in.valuators[i].max = abs(~0); + test_XIDeviceChangedEvent(&in); + + in.valuators[i].resolution = 1 << 8; + test_XIDeviceChangedEvent(&in); + in.valuators[i].resolution = 1 << 16; + test_XIDeviceChangedEvent(&in); + in.valuators[i].resolution = 1 << 24; + test_XIDeviceChangedEvent(&in); + in.valuators[i].resolution = abs(~0); + test_XIDeviceChangedEvent(&in); + + in.valuators[i].name = i; + test_XIDeviceChangedEvent(&in); + + in.valuators[i].mode = Relative; + test_XIDeviceChangedEvent(&in); + + in.valuators[i].mode = Absolute; + test_XIDeviceChangedEvent(&in); + } +} + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + g_test_add_func("/xi2/eventconvert/XIRawEvent", test_convert_XIRawEvent); + g_test_add_func("/xi2/eventconvert/XIFocusEvent", test_convert_XIFocusEvent); + g_test_add_func("/xi2/eventconvert/XIDeviceEvent", test_convert_XIDeviceEvent); + g_test_add_func("/xi2/eventconvert/XIDeviceChangedEvent", test_convert_XIDeviceChangedEvent); + + return g_test_run(); +} diff --git a/xorg-server/test/xi2/protocol-xigetclientpointer.c b/xorg-server/test/xi2/protocol-xigetclientpointer.c new file mode 100644 index 000000000..6b4d04957 --- /dev/null +++ b/xorg-server/test/xi2/protocol-xigetclientpointer.c @@ -0,0 +1,167 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +/* + * Protocol testing for XIGetClientPointer request. + */ +#include +#include +#include +#include +#include "inputstr.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "xigetclientpointer.h" +#include "exevents.h" + +#include "protocol-common.h" +#include + +struct { + int cp_is_set; + DeviceIntPtr dev; + int win; +} test_data; + +static ClientRec client_window; +static ClientRec client_request; + +int __wrap_dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) +{ + if (rid == ROOT_WINDOW_ID) + return BadWindow; + + if (rid == CLIENT_WINDOW_ID) + { + *pClient = &client_window; + return Success; + } + + return __real_dixLookupClient(pClient, rid, client, access); +} + + +static void reply_XIGetClientPointer(ClientPtr client, int len, char *data, void *userdata) +{ + xXIGetClientPointerReply *rep = (xXIGetClientPointerReply*)data; + + if (client->swapped) + { + char n; + swapl(&rep->length, n); + swaps(&rep->sequenceNumber, n); + swaps(&rep->deviceid, n); + } + + reply_check_defaults(rep, len, XIGetClientPointer); + + g_assert(rep->set == test_data.cp_is_set); + if (rep->set) + g_assert(rep->deviceid == test_data.dev->id); +} + +static void request_XIGetClientPointer(ClientPtr client, xXIGetClientPointerReq* req, int error) +{ + char n; + int rc; + + test_data.win = req->win; + + rc = ProcXIGetClientPointer(&client_request); + g_assert(rc == error); + + if (rc == BadWindow) + g_assert(client_request.errorValue == req->win); + + client_request.swapped = TRUE; + swapl(&req->win, n); + swaps(&req->length, n); + rc = SProcXIGetClientPointer(&client_request); + g_assert(rc == error); + + if (rc == BadWindow) + g_assert(client_request.errorValue == req->win); + +} + +static void test_XIGetClientPointer(void) +{ + xXIGetClientPointerReq request; + + request_init(&request, XIGetClientPointer); + + request.win = CLIENT_WINDOW_ID; + + + reply_handler = reply_XIGetClientPointer; + + client_request = init_client(request.length, &request); + + g_test_message("Testing invalid window"); + request.win = INVALID_WINDOW_ID; + request_XIGetClientPointer(&client_request, &request, BadWindow); + + test_data.cp_is_set = FALSE; + + g_test_message("Testing window None, unset ClientPointer."); + request.win = None; + request_XIGetClientPointer(&client_request, &request, Success); + + g_test_message("Testing valid window, unset ClientPointer."); + request.win = CLIENT_WINDOW_ID; + request_XIGetClientPointer(&client_request, &request, Success); + + g_test_message("Testing valid window, set ClientPointer."); + client_window.clientPtr = devices.vcp; + test_data.dev = devices.vcp; + test_data.cp_is_set = TRUE; + request.win = CLIENT_WINDOW_ID; + request_XIGetClientPointer(&client_request, &request, Success); + + client_window.clientPtr = NULL; + + g_test_message("Testing window None, set ClientPointer."); + client_request.clientPtr = devices.vcp; + test_data.dev = devices.vcp; + test_data.cp_is_set = TRUE; + request.win = None; + request_XIGetClientPointer(&client_request, &request, Success); +} + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + init_simple(); + client_window = init_client(0, NULL); + + + g_test_add_func("/xi2/protocol/XIGetClientPointer", test_XIGetClientPointer); + + return g_test_run(); +} diff --git a/xorg-server/test/xi2/protocol-xigetselectedevents.c b/xorg-server/test/xi2/protocol-xigetselectedevents.c new file mode 100644 index 000000000..97aae159f --- /dev/null +++ b/xorg-server/test/xi2/protocol-xigetselectedevents.c @@ -0,0 +1,241 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +/* + * Protocol testing for XIGetSelectedEvents request. + * + * Tests include: + * BadWindow on wrong window. + * Zero-length masks if no masks are set. + * Valid masks for valid devices. + * Masks set on non-existent devices are not returned. + * + * Note that this test is not connected to the XISelectEvents request. + */ +#include +#include +#include +#include +#include "inputstr.h" +#include "windowstr.h" +#include "extinit.h" /* for XInputExtensionInit */ +#include "scrnintstr.h" +#include "xiselectev.h" +#include "exevents.h" + +#include "protocol-common.h" +#include + +static void reply_XIGetSelectedEvents(ClientPtr client, int len, char *data, void *userdata); +static void reply_XIGetSelectedEvents_data(ClientPtr client, int len, char *data, void *userdata); + + +struct { + int num_masks_expected; + unsigned char mask[MAXDEVICES][XI2LASTEVENT]; /* intentionally bigger */ + int mask_len; +} test_data; + +/* dixLookupWindow requires a lot of setup not necessary for this test. + * Simple wrapper that returns either one of the fake root window or the + * fake client window. If the requested ID is neither of those wanted, + * return whatever the real dixLookupWindow does. + */ +int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access) +{ + if (id == root.drawable.id) + { + *win = &root; + return Success; + } else if (id == window.drawable.id) + { + *win = &window; + return Success; + } + + return __real_dixLookupWindow(win, id, client, access); +} + +/* AddResource is called from XISetSEventMask, we don't need this */ +Bool __wrap_AddResource(XID id, RESTYPE type, pointer value) +{ + return TRUE; +} + +static void reply_XIGetSelectedEvents(ClientPtr client, int len, char *data, void *userdata) +{ + xXIGetSelectedEventsReply *rep = (xXIGetSelectedEventsReply*)data; + + if (client->swapped) + { + char n; + swapl(&rep->length, n); + swaps(&rep->sequenceNumber, n); + swaps(&rep->num_masks, n); + } + + reply_check_defaults(rep, len, XIGetSelectedEvents); + + g_assert(rep->num_masks == test_data.num_masks_expected); + + reply_handler = reply_XIGetSelectedEvents_data; +} + +static void reply_XIGetSelectedEvents_data(ClientPtr client, int len, char *data, void *userdata) +{ + int i; + xXIEventMask *mask; + unsigned char *bitmask; + + mask = (xXIEventMask*)data; + for (i = 0; i < test_data.num_masks_expected; i++) + { + if (client->swapped) + { + char n; + swaps(&mask->deviceid, n); + swaps(&mask->mask_len, n); + } + + g_assert(mask->deviceid < 6); + g_assert(mask->mask_len <= (((XI2LASTEVENT + 8)/8) + 3)/4) ; + + bitmask = (unsigned char*)&mask[1]; + g_assert(memcmp(bitmask, + test_data.mask[mask->deviceid], + mask->mask_len * 4) == 0); + + mask = (xXIEventMask*)((char*)mask + mask->mask_len * 4 + sizeof(xXIEventMask)); + } + + +} + +static void request_XIGetSelectedEvents(xXIGetSelectedEventsReq* req, int error) +{ + char n; + int rc; + ClientRec client; + client = init_client(req->length, req); + + reply_handler = reply_XIGetSelectedEvents; + + rc = ProcXIGetSelectedEvents(&client); + g_assert(rc == error); + + reply_handler = reply_XIGetSelectedEvents; + client.swapped = TRUE; + swapl(&req->win, n); + swaps(&req->length, n); + rc = SProcXIGetSelectedEvents(&client); + g_assert(rc == error); +} + +static void test_XIGetSelectedEvents(void) +{ + int i, j; + xXIGetSelectedEventsReq request; + ClientRec client = init_client(0, NULL); + unsigned char *mask; + DeviceIntRec dev; + + request_init(&request, XIGetSelectedEvents); + + g_test_message("Testing for BadWindow on invalid window."); + request.win = None; + request_XIGetSelectedEvents(&request, BadWindow); + + g_test_message("Testing for zero-length (unset) masks."); + /* No masks set yet */ + test_data.num_masks_expected = 0; + request.win = ROOT_WINDOW_ID; + request_XIGetSelectedEvents(&request, Success); + + request.win = CLIENT_WINDOW_ID; + request_XIGetSelectedEvents(&request, Success); + + memset(test_data.mask, 0, + sizeof(test_data.mask)); + + g_test_message("Testing for valid masks"); + memset(&dev, 0, sizeof(dev)); /* dev->id is enough for XISetEventMask */ + request.win = ROOT_WINDOW_ID; + + /* devices 6 - MAXDEVICES don't exist, they mustn't be included in the + * reply even if a mask is set */ + for (j = 0; j < MAXDEVICES; j++) + { + test_data.num_masks_expected = min(j + 1, devices.num_devices + 2); + dev.id = j; + mask = test_data.mask[j]; + /* bits one-by-one */ + for (i = 0; i < XI2LASTEVENT; i++) + { + SetBit(mask, i); + XISetEventMask(&dev, &root, &client, (i + 8)/8, mask); + request_XIGetSelectedEvents(&request, Success); + ClearBit(mask, i); + } + + /* all valid mask bits */ + for (i = 0; i < XI2LASTEVENT; i++) + { + SetBit(mask, i); + XISetEventMask(&dev, &root, &client, (i + 8)/8, mask); + request_XIGetSelectedEvents(&request, Success); + } + } + + g_test_message("Testing removing all masks"); + /* Unset all masks one-by-one */ + for (j = MAXDEVICES - 1; j >= 0; j--) + { + if (j < devices.num_devices + 2) + test_data.num_masks_expected--; + + mask = test_data.mask[j]; + memset(mask, 0, XI2LASTEVENT); + + dev.id = j; + XISetEventMask(&dev, &root, &client, 0, NULL); + + request_XIGetSelectedEvents(&request, Success); + } +} + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + init_simple(); + + g_test_add_func("/xi2/protocol/XIGetSelectedEvents", test_XIGetSelectedEvents); + + return g_test_run(); +} + diff --git a/xorg-server/test/xi2/protocol-xiquerydevice.c b/xorg-server/test/xi2/protocol-xiquerydevice.c new file mode 100644 index 000000000..508fc4dfb --- /dev/null +++ b/xorg-server/test/xi2/protocol-xiquerydevice.c @@ -0,0 +1,316 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include "inputstr.h" +#include "extinit.h" +#include "scrnintstr.h" +#include "xkbsrv.h" + +#include "xiquerydevice.h" + +#include "protocol-common.h" +#include +/* + * Protocol testing for XIQueryDevice request and reply. + * + * Test approach: + * Wrap WriteToClient to intercept server's reply. ProcXIQueryDevice returns + * data in two batches, once for the request, once for the trailing data + * with the device information. + * Repeatedly test with varying deviceids and check against data in reply. + */ + +struct test_data { + int which_device; + int num_devices_in_reply; +}; + +static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *userdata); +static void reply_XIQueryDevice(ClientPtr client, int len, char* data, void *userdata); + +/* reply handling for the first bytes that constitute the reply */ +static void reply_XIQueryDevice(ClientPtr client, int len, char* data, void *userdata) +{ + xXIQueryDeviceReply *rep = (xXIQueryDeviceReply*)data; + struct test_data *querydata = (struct test_data*)userdata; + + if (client->swapped) + { + char n; + swapl(&rep->length, n); + swaps(&rep->sequenceNumber, n); + swaps(&rep->num_devices, n); + } + + reply_check_defaults(rep, len, XIQueryDevice); + + if (querydata->which_device == XIAllDevices) + g_assert(rep->num_devices == devices.num_devices); + else if (querydata->which_device == XIAllMasterDevices) + g_assert(rep->num_devices == devices.num_master_devices); + else + g_assert(rep->num_devices == 1); + + querydata->num_devices_in_reply = rep->num_devices; + reply_handler = reply_XIQueryDevice_data; +} + +/* reply handling for the trailing bytes that constitute the device info */ +static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *userdata) +{ + char n; + int i, j; + struct test_data *querydata = (struct test_data*)userdata; + + DeviceIntPtr dev; + xXIDeviceInfo *info = (xXIDeviceInfo*)data; + xXIAnyInfo *any; + + for (i = 0; i < querydata->num_devices_in_reply; i++) + { + if (client->swapped) + { + swaps(&info->deviceid, n); + swaps(&info->attachment, n); + swaps(&info->use, n); + swaps(&info->num_classes, n); + swaps(&info->name_len, n); + } + + if (querydata->which_device > XIAllMasterDevices) + g_assert(info->deviceid == querydata->which_device); + + g_assert(info->deviceid >= 2); /* 0 and 1 is reserved */ + + + switch(info->deviceid) + { + case 2: /* VCP */ + dev = devices.vcp; + g_assert(info->use == XIMasterPointer); + g_assert(info->attachment == devices.vck->id); + g_assert(info->num_classes == 3); /* 2 axes + button */ + break; + case 3: /* VCK */ + dev = devices.vck; + g_assert(info->use == XIMasterKeyboard); + g_assert(info->attachment == devices.vcp->id); + g_assert(info->num_classes == 1); + break; + case 4: /* mouse */ + dev = devices.mouse; + g_assert(info->use == XISlavePointer); + g_assert(info->attachment == devices.vcp->id); + g_assert(info->num_classes == 3); /* 2 axes + button */ + break; + case 5: /* keyboard */ + dev = devices.kbd; + g_assert(info->use == XISlaveKeyboard); + g_assert(info->attachment == devices.vck->id); + g_assert(info->num_classes == 1); + break; + + default: + /* We shouldn't get here */ + g_assert(0); + break; + } + g_assert(info->enabled == dev->enabled); + g_assert(info->name_len == strlen(dev->name)); + g_assert(strncmp((char*)&info[1], dev->name, info->name_len) == 0); + + any = (xXIAnyInfo*)((char*)&info[1] + ((info->name_len + 3)/4) * 4); + for (j = 0; j < info->num_classes; j++) + { + if (client->swapped) + { + swaps(&any->type, n); + swaps(&any->length, n); + swaps(&any->sourceid, n); + } + + switch(info->deviceid) + { + case 3: /* VCK and kbd have the same properties */ + case 5: + { + int k; + xXIKeyInfo *ki = (xXIKeyInfo*)any; + XkbDescPtr xkb = devices.vck->key->xkbInfo->desc; + uint32_t *kc; + + if (client->swapped) + swaps(&ki->num_keycodes, n); + + g_assert(any->type == XIKeyClass); + g_assert(ki->num_keycodes == (xkb->max_key_code - xkb->min_key_code + 1)); + g_assert(any->length == (2 + ki->num_keycodes)); + + kc = (uint32_t*)&ki[1]; + for (k = 0; k < ki->num_keycodes; k++, kc++) + { + if (client->swapped) + swapl(kc, n); + + g_assert(*kc >= xkb->min_key_code); + g_assert(*kc <= xkb->max_key_code); + } + break; + } + case 2: /* VCP and mouse have the same properties */ + case 4: + { + g_assert(any->type == XIButtonClass || + any->type == XIValuatorClass); + + if (any->type == XIButtonClass) + { + int len; + xXIButtonInfo *bi = (xXIButtonInfo*)any; + + if (client->swapped) + swaps(&bi->num_buttons, n); + + g_assert(bi->num_buttons == devices.vcp->button->numButtons); + + len = 2 + bi->num_buttons + bytes_to_int32(bits_to_bytes(bi->num_buttons)); + g_assert(bi->length == len); + } else if (any->type == XIValuatorClass) + { + xXIValuatorInfo *vi = (xXIValuatorInfo*)any; + + if (client->swapped) + { + swaps(&vi->number, n); + swapl(&vi->label, n); + swapl(&vi->min.integral, n); + swapl(&vi->min.frac, n); + swapl(&vi->max.integral, n); + swapl(&vi->max.frac, n); + swapl(&vi->resolution, n); + } + + g_assert(vi->length == 11); + g_assert(vi->number == 0 || + vi->number == 1); + g_assert(vi->mode == XIModeRelative); + /* device was set up as relative, so standard + * values here. */ + g_assert(vi->min.integral == -1); + g_assert(vi->min.frac == 0); + g_assert(vi->max.integral == -1); + g_assert(vi->max.frac == 0); + g_assert(vi->resolution == 0); + } + } + break; + } + any = (xXIAnyInfo*)(((char*)any) + any->length * 4); + } + + info = (xXIDeviceInfo*)any; + } +} + +static void request_XIQueryDevice(struct test_data *querydata, + int deviceid, int error) +{ + int rc; + char n; + ClientRec client; + xXIQueryDeviceReq request; + + request_init(&request, XIQueryDevice); + client = init_client(request.length, &request); + reply_handler = reply_XIQueryDevice; + + querydata->which_device = deviceid; + + request.deviceid = deviceid; + rc = ProcXIQueryDevice(&client); + g_assert(rc == error); + + if (rc != Success) + g_assert(client.errorValue == deviceid); + + reply_handler = reply_XIQueryDevice; + + client.swapped = TRUE; + swaps(&request.length, n); + swaps(&request.deviceid, n); + rc = SProcXIQueryDevice(&client); + g_assert(rc == error); + + if (rc != Success) + g_assert(client.errorValue == deviceid); +} + +static void test_XIQueryDevice(void) +{ + int i; + xXIQueryDeviceReq request; + struct test_data data; + + reply_handler = reply_XIQueryDevice; + userdata = &data; + request_init(&request, XIQueryDevice); + + g_test_message("Testing XIAllDevices."); + request_XIQueryDevice(&data, XIAllDevices, Success); + g_test_message("Testing XIAllMasterDevices."); + request_XIQueryDevice(&data, XIAllMasterDevices, Success); + + g_test_message("Testing existing device ids."); + for (i = 2; i < 6; i++) + request_XIQueryDevice(&data, i, Success); + + g_test_message("Testing non-existing device ids."); + for (i = 6; i <= 0xFFFF; i++) + request_XIQueryDevice(&data, i, BadDevice); + + + reply_handler = NULL; + +} + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + init_simple(); + + g_test_add_func("/dix/xi2protocol/XIQueryDevice", test_XIQueryDevice); + + return g_test_run(); +} + diff --git a/xorg-server/test/xi2/protocol-xiquerypointer.c b/xorg-server/test/xi2/protocol-xiquerypointer.c new file mode 100644 index 000000000..810c61575 --- /dev/null +++ b/xorg-server/test/xi2/protocol-xiquerypointer.c @@ -0,0 +1,220 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +/* + * Protocol testing for XIQueryPointer request. + */ +#include +#include +#include +#include +#include "inputstr.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "xiquerypointer.h" +#include "exevents.h" + +#include "protocol-common.h" +#include + +static ClientRec client_request; +static void reply_XIQueryPointer_data(ClientPtr client, int len, + char *data, void *userdata); + +static struct { + DeviceIntPtr dev; + WindowPtr win; +} test_data; + + +/* dixLookupWindow requires a lot of setup not necessary for this test. + * Simple wrapper that returns either one of the fake root window or the + * fake client window. If the requested ID is neither of those wanted, + * return whatever the real dixLookupWindow does. + */ +int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access) +{ + if (id == root.drawable.id) + { + *win = &root; + return Success; + } else if (id == window.drawable.id) + { + *win = &window; + return Success; + } + + return __real_dixLookupWindow(win, id, client, access); +} + +static void reply_XIQueryPointer(ClientPtr client, int len, char *data, + void *userdata) +{ + xXIQueryPointerReply *rep = (xXIQueryPointerReply*)data; + SpritePtr sprite; + + if (!rep->repType) + return; + + if (client->swapped) + { + char n; + swapl(&rep->length, n); + swaps(&rep->sequenceNumber, n); + swapl(&rep->root, n); + swapl(&rep->child, n); + swapl(&rep->root_x, n); + swapl(&rep->root_y, n); + swapl(&rep->win_x, n); + swapl(&rep->win_y, n); + swaps(&rep->buttons_len, n); + } + + reply_check_defaults(rep, len, XIQueryPointer); + + g_assert(rep->root == root.drawable.id); + g_assert(rep->same_screen == xTrue); + + sprite = test_data.dev->spriteInfo->sprite; + g_assert((rep->root_x >> 16) == sprite->hot.x); + g_assert((rep->root_y >> 16) == sprite->hot.y); + + if (test_data.win == &root) + { + g_assert(rep->root_x == rep->win_x); + g_assert(rep->root_y == rep->win_y); + g_assert(rep->child == window.drawable.id); + } else + { + int x, y; + + x = sprite->hot.x - window.drawable.x; + y = sprite->hot.y - window.drawable.y; + + g_assert((rep->win_x >> 16) == x); + g_assert((rep->win_y >> 16) == y); + g_assert(rep->child == None); + } + + + g_assert(rep->same_screen == xTrue); + + reply_handler = reply_XIQueryPointer_data; +} + +static void reply_XIQueryPointer_data(ClientPtr client, int len, char *data, void *userdata) +{ + reply_handler = reply_XIQueryPointer; +} + +static void request_XIQueryPointer(ClientPtr client, xXIQueryPointerReq* req, int error) +{ + char n; + int rc; + + rc = ProcXIQueryPointer(&client_request); + g_assert(rc == error); + + if (rc == BadDevice) + g_assert(client_request.errorValue == req->deviceid); + + client_request.swapped = TRUE; + swaps(&req->deviceid, n); + swaps(&req->length, n); + rc = SProcXIQueryPointer(&client_request); + g_assert(rc == error); + + if (rc == BadDevice) + g_assert(client_request.errorValue == req->deviceid); +} + +static void test_XIQueryPointer(void) +{ + int i; + xXIQueryPointerReq request; + + memset(&request, 0, sizeof(request)); + + request_init(&request, XIQueryPointer); + + reply_handler = reply_XIQueryPointer; + + client_request = init_client(request.length, &request); + + request.deviceid = XIAllDevices; + request_XIQueryPointer(&client_request, &request, BadDevice); + + request.deviceid = XIAllMasterDevices; + request_XIQueryPointer(&client_request, &request, BadDevice); + + request.win = root.drawable.id; + test_data.win = &root; + + test_data.dev = devices.vcp; + request.deviceid = devices.vcp->id; + request_XIQueryPointer(&client_request, &request, Success); + request.deviceid = devices.vck->id; + request_XIQueryPointer(&client_request, &request, BadDevice); + request.deviceid = devices.mouse->id; + request_XIQueryPointer(&client_request, &request, BadDevice); + request.deviceid = devices.kbd->id; + request_XIQueryPointer(&client_request, &request, BadDevice); + + test_data.dev = devices.mouse; + devices.mouse->u.master = NULL; /* Float, kind-of */ + request.deviceid = devices.mouse->id; + request_XIQueryPointer(&client_request, &request, Success); + + for (i = devices.kbd->id + 1; i <= 0xFFFF; i++) + { + request.deviceid = i; + request_XIQueryPointer(&client_request, &request, BadDevice); + } + + request.win = window.drawable.id; + + test_data.dev = devices.vcp; + test_data.win = &window; + request.deviceid = devices.vcp->id; + request_XIQueryPointer(&client_request, &request, Success); + + test_data.dev = devices.mouse; + request.deviceid = devices.mouse->id; + request_XIQueryPointer(&client_request, &request, Success); +} + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + init_simple(); + + g_test_add_func("/xi2/protocol/XIQueryPointer", test_XIQueryPointer); + + return g_test_run(); +} diff --git a/xorg-server/test/xi2/protocol-xiqueryversion.c b/xorg-server/test/xi2/protocol-xiqueryversion.c new file mode 100644 index 000000000..46e62acbd --- /dev/null +++ b/xorg-server/test/xi2/protocol-xiqueryversion.c @@ -0,0 +1,186 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +/* + * Protocol testing for XIQueryVersion request and reply. + * + * Test approach: + * Wrap WriteToClient to intercept the server's reply. + * Repeatedly test a client/server version combination, compare version in + * reply with versions given. Version must be equal to either + * server version or client version, whichever is smaller. + * Client version less than 2 must return BadValue. + */ + +#include +#include +#include +#include +#include "inputstr.h" +#include "extinit.h" /* for XInputExtensionInit */ +#include "scrnintstr.h" +#include "xiqueryversion.h" + +#include "protocol-common.h" +#include + +extern XExtensionVersion XIVersion; + +struct test_data { + int major_client; + int minor_client; + int major_server; + int minor_server; +}; + +static void reply_XIQueryVersion(ClientPtr client, int len, char* data, void *userdata) +{ + xXIQueryVersionReply *rep = (xXIQueryVersionReply*)data; + struct test_data *versions = (struct test_data*)userdata; + unsigned int sver, cver, ver; + + if (client->swapped) + { + char n; + swapl(&rep->length, n); + swaps(&rep->sequenceNumber, n); + swaps(&rep->major_version, n); + swaps(&rep->minor_version, n); + } + + reply_check_defaults(rep, len, XIQueryVersion); + + g_assert(rep->length == 0); + + sver = versions->major_server * 1000 + versions->minor_server; + cver = versions->major_client * 1000 + versions->minor_client; + ver = rep->major_version * 1000 + rep->minor_version; + + g_assert(ver >= 2000); + g_assert((sver > cver) ? ver == cver : ver == sver); +} + +/** + * Run a single test with server version smaj.smin and client + * version cmaj.cmin. Verify that return code is equal to 'error'. + * + * Test is run normal, then for a swapped client. + */ +static void request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int error) +{ + char n; + int rc; + struct test_data versions; + xXIQueryVersionReq request; + ClientRec client; + + request_init(&request, XIQueryVersion); + client = init_client(request.length, &request); + userdata = (void*)&versions; + + /* Change the server to support smaj.smin */ + XIVersion.major_version = smaj; + XIVersion.minor_version = smin; + + /* remember versions we send and expect */ + versions.major_client = cmaj; + versions.minor_client = cmin; + versions.major_server = XIVersion.major_version; + versions.minor_server = XIVersion.minor_version; + + request.major_version = versions.major_client; + request.minor_version = versions.minor_client; + rc = ProcXIQueryVersion(&client); + g_assert(rc == error); + + client.swapped = TRUE; + + swaps(&request.length, n); + swaps(&request.major_version, n); + swaps(&request.minor_version, n); + + rc = SProcXIQueryVersion(&client); + g_assert(rc == error); +} + +/* Client version less than 2.0 must return BadValue, all other combinations + * Success */ +static void test_XIQueryVersion(void) +{ + reply_handler = reply_XIQueryVersion; + + g_test_message("Server version 2.0 - client versions [1..3].0"); + /* some simple tests to catch common errors quickly */ + request_XIQueryVersion(2, 0, 1, 0, BadValue); + request_XIQueryVersion(2, 0, 2, 0, Success); + request_XIQueryVersion(2, 0, 3, 0, Success); + + g_test_message("Server version 3.0 - client versions [1..3].0"); + request_XIQueryVersion(3, 0, 1, 0, BadValue); + request_XIQueryVersion(3, 0, 2, 0, Success); + request_XIQueryVersion(3, 0, 3, 0, Success); + + g_test_message("Server version 2.0 - client versions [1..3].[1..3]"); + request_XIQueryVersion(2, 0, 1, 1, BadValue); + request_XIQueryVersion(2, 0, 2, 2, Success); + request_XIQueryVersion(2, 0, 3, 3, Success); + + g_test_message("Server version 2.2 - client versions [1..3].0"); + request_XIQueryVersion(2, 2, 1, 0, BadValue); + request_XIQueryVersion(2, 2, 2, 0, Success); + request_XIQueryVersion(2, 2, 3, 0, Success); + +#if 0 + /* this one takes a while */ + unsigned int cmin, cmaj, smin, smaj; + + g_test_message("Testing all combinations."); + for (smaj = 2; smaj <= 0xFFFF; smaj++) + for (smin = 0; smin <= 0xFFFF; smin++) + for (cmin = 0; cmin <= 0xFFFF; cmin++) + for (cmaj = 0; cmaj <= 0xFFFF; cmaj++) + { + int error = (cmaj < 2) ? BadValue : Success; + request_XIQueryVersion(smaj, smin, cmaj, cmin, error); + } + +#endif + + reply_handler = NULL; +} + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + init_simple(); + + g_test_add_func("/xi2/protocol/XIQueryVersion", test_XIQueryVersion); + + return g_test_run(); +} diff --git a/xorg-server/test/xi2/protocol-xiselectevents.c b/xorg-server/test/xi2/protocol-xiselectevents.c new file mode 100644 index 000000000..f314462b5 --- /dev/null +++ b/xorg-server/test/xi2/protocol-xiselectevents.c @@ -0,0 +1,337 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +/* + * Protocol testing for XISelectEvents request. + * + * Test approach: + * + * Wrap XISetEventMask to intercept when the server tries to apply the event + * mask. Ensure that the mask passed in is equivalent to the one supplied by + * the client. Ensure that invalid devices and invalid masks return errors + * as appropriate. + * + * Tests included: + * BadValue for num_masks < 0 + * BadWindow for invalid windows + * BadDevice for non-existing devices + * BadImplemenation for devices >= 0xFF + * BadValue if HierarchyChanged bit is set for devices other than + * XIAllDevices + * BadValue for invalid mask bits + * Sucecss for excessive mask lengths + * + */ + +#include +#include +#include +#include +#include "inputstr.h" +#include "windowstr.h" +#include "extinit.h" /* for XInputExtensionInit */ +#include "scrnintstr.h" +#include "xiselectev.h" + +#include "protocol-common.h" +#include + +static unsigned char *data[4096 * 16]; /* the request data buffer */ + +int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask) +{ + return Success; +} + +/* dixLookupWindow requires a lot of setup not necessary for this test. + * Simple wrapper that returns either one of the fake root window or the + * fake client window. If the requested ID is neither of those wanted, + * return whatever the real dixLookupWindow does. + */ +int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access) +{ + if (id == root.drawable.id) + { + *win = &root; + return Success; + } else if (id == window.drawable.id) + { + *win = &window; + return Success; + } + + return __real_dixLookupWindow(win, id, client, access); +} + + +static void request_XISelectEvent(xXISelectEventsReq *req, int error) +{ + char n; + int i; + int rc; + ClientRec client; + xXIEventMask *mask, *next; + + req->length = (sz_xXISelectEventsReq/4); + mask = (xXIEventMask*)&req[1]; + for (i = 0; i < req->num_masks; i++) + { + req->length += sizeof(xXIEventMask)/4 + mask->mask_len; + mask = (xXIEventMask*)((char*)&mask[1] + mask->mask_len * 4); + } + + client = init_client(req->length, req); + + rc = ProcXISelectEvents(&client); + g_assert(rc == error); + + client.swapped = TRUE; + + mask = (xXIEventMask*)&req[1]; + for (i = 0; i < req->num_masks; i++) + { + next = (xXIEventMask*)((char*)&mask[1] + mask->mask_len * 4); + swaps(&mask->deviceid, n); + swaps(&mask->mask_len, n); + mask = next; + } + + swapl(&req->win, n); + swaps(&req->length, n); + swaps(&req->num_masks, n); + rc = SProcXISelectEvents(&client); + g_assert(rc == error); +} + +static void request_XISelectEvents_masks(xXISelectEventsReq *req) +{ + int i, j; + xXIEventMask *mask; + int nmasks = (XI_LASTEVENT + 7)/8; + unsigned char *bits; + + mask = (xXIEventMask*)&req[1]; + req->win = ROOT_WINDOW_ID; + + /* if a clients submits more than 100 masks, consider it insane and untested */ + for (i = 1; i <= 1000; i++) + { + req->num_masks = i; + mask->deviceid = XIAllDevices; + + /* Test 0: + * mask_len is 0 -> Success + */ + mask->mask_len = 0; + request_XISelectEvent(req, Success); + + /* Test 1: + * mask may be larger than needed for XI_LASTEVENT. + * Test setting each valid mask bit, while leaving unneeded bits 0. + * -> Success + */ + bits = (unsigned char*)&mask[1]; + mask->mask_len = (nmasks + 3)/4 * 10; + memset(bits, 0, mask->mask_len * 4); + for (j = 0; j <= XI_LASTEVENT; j++) + { + SetBit(bits, j); + request_XISelectEvent(req, Success); + ClearBit(bits, j); + } + + /* Test 2: + * mask may be larger than needed for XI_LASTEVENT. + * Test setting all valid mask bits, while leaving unneeded bits 0. + * -> Success + */ + bits = (unsigned char*)&mask[1]; + mask->mask_len = (nmasks + 3)/4 * 10; + memset(bits, 0, mask->mask_len * 4); + + for (j = 0; j <= XI_LASTEVENT; j++) + { + SetBit(bits, j); + request_XISelectEvent(req, Success); + } + + /* Test 3: + * mask is larger than needed for XI_LASTEVENT. If any unneeded bit + * is set -> BadValue + */ + bits = (unsigned char*)&mask[1]; + mask->mask_len = (nmasks + 3)/4 * 10; + memset(bits, 0, mask->mask_len * 4); + + for (j = XI_LASTEVENT + 1; j < mask->mask_len * 4; j++) + { + SetBit(bits, j); + request_XISelectEvent(req, BadValue); + ClearBit(bits, j); + } + + /* Test 4: + * Mask len is a sensible length, only valid bits are set -> Success + */ + bits = (unsigned char*)&mask[1]; + mask->mask_len = (nmasks + 3)/4; + memset(bits, 0, mask->mask_len * 4); + for (j = 0; j <= XI_LASTEVENT; j++) + { + SetBit(bits, j); + request_XISelectEvent(req, Success); + } + + /* Test 5: + * HierarchyChanged bit is BadValue for devices other than + * XIAllDevices + */ + bits = (unsigned char*)&mask[1]; + mask->mask_len = (nmasks + 3)/4; + memset(bits, 0, mask->mask_len * 4); + SetBit(bits, XI_HierarchyChanged); + mask->deviceid = XIAllDevices; + request_XISelectEvent(req, Success); + for (j = 1; j < devices.num_devices; j++) + { + mask->deviceid = j; + request_XISelectEvent(req, BadValue); + } + + /* Test 6: + * All bits set minus hierarchy changed bit -> Success + */ + bits = (unsigned char*)&mask[1]; + mask->mask_len = (nmasks + 3)/4; + memset(bits, 0, mask->mask_len * 4); + for (j = 0; j <= XI_LASTEVENT; j++) + SetBit(bits, j); + ClearBit(bits, XI_HierarchyChanged); + for (j = 1; j < 6; j++) + { + mask->deviceid = j; + request_XISelectEvent(req, Success); + } + + mask = (xXIEventMask*)((char*)mask + sizeof(xXIEventMask) + mask->mask_len * 4); + } +} + +static void test_XISelectEvents(void) +{ + int i; + xXIEventMask *mask; + xXISelectEventsReq *req; + req = (xXISelectEventsReq*)data; + + request_init(req, XISelectEvents); + + g_test_message("Testing for BadValue on zero-length masks"); + /* zero masks are BadValue, regardless of the window */ + req->num_masks = 0; + + req->win = None; + request_XISelectEvent(req, BadValue); + + req->win = ROOT_WINDOW_ID; + request_XISelectEvent(req, BadValue); + + req->win = CLIENT_WINDOW_ID; + request_XISelectEvent(req, BadValue); + + g_test_message("Testing for BadWindow."); + /* None window is BadWindow, regardless of the masks. + * We don't actually need to set the masks here, BadWindow must occur + * before checking the masks. + */ + req->win = None; + req->num_masks = 1; + request_XISelectEvent(req, BadWindow); + + req->num_masks = 2; + request_XISelectEvent(req, BadWindow); + + req->num_masks = 0xFF; + request_XISelectEvent(req, BadWindow); + + /* request size is 3, so 0xFFFC is the highest num_mask that doesn't + * overflow req->length */ + req->num_masks = 0xFFFC; + request_XISelectEvent(req, BadWindow); + + g_test_message("Triggering num_masks/length overflow"); + /* Integer overflow - req->length can't hold that much */ + req->num_masks = 0xFFFF; + request_XISelectEvent(req, BadLength); + + req->win = ROOT_WINDOW_ID; + req->num_masks = 1; + + g_test_message("Triggering bogus mask length error"); + mask = (xXIEventMask*)&req[1]; + mask->deviceid = 0; + mask->mask_len = 0xFFFF; + request_XISelectEvent(req, BadLength); + + /* testing various device ids */ + g_test_message("Testing existing device ids."); + for (i = 0; i < 6; i++) + { + mask = (xXIEventMask*)&req[1]; + mask->deviceid = i; + mask->mask_len = 1; + req->win = ROOT_WINDOW_ID; + req->num_masks = 1; + request_XISelectEvent(req, Success); + } + + g_test_message("Testing non-existing device ids."); + for (i = 6; i <= 0xFFFF; i++) + { + req->win = ROOT_WINDOW_ID; + req->num_masks = 1; + mask = (xXIEventMask*)&req[1]; + mask->deviceid = i; + mask->mask_len = 1; + request_XISelectEvent(req, BadDevice); + } + + request_XISelectEvents_masks(req); +} + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + init_simple(); + + g_test_add_func("/xi2/protocol/XISelectEvents", test_XISelectEvents); + + return g_test_run(); +} + diff --git a/xorg-server/test/xi2/protocol-xisetclientpointer.c b/xorg-server/test/xi2/protocol-xisetclientpointer.c new file mode 100644 index 000000000..2e638eea7 --- /dev/null +++ b/xorg-server/test/xi2/protocol-xisetclientpointer.c @@ -0,0 +1,149 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +/* + * Protocol testing for XISetClientPointer request. + * + * Tests include: + * BadDevice of all devices except master pointers. + * Success for a valid window. + * Success for window None. + * BadWindow for invalid windows. + */ +#include +#include +#include +#include +#include "inputstr.h" +#include "windowstr.h" +#include "extinit.h" /* for XInputExtensionInit */ +#include "scrnintstr.h" +#include "xisetclientpointer.h" +#include "exevents.h" + +#include "protocol-common.h" +#include + +static ClientRec client_window; +static ClientRec client_request; + +int __wrap_dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) +{ + if (rid == ROOT_WINDOW_ID) + return BadWindow; + + if (rid == CLIENT_WINDOW_ID) + { + *pClient = &client_window; + return Success; + } + + return __real_dixLookupClient(pClient, rid, client, access); +} + +static void request_XISetClientPointer(xXISetClientPointerReq* req, int error) +{ + char n; + int rc; + client_request = init_client(req->length, req); + + rc = ProcXISetClientPointer(&client_request); + g_assert(rc == error); + + if (rc == BadDevice) + g_assert(client_request.errorValue == req->deviceid); + + client_request.swapped = TRUE; + swapl(&req->win, n); + swaps(&req->length, n); + swaps(&req->deviceid, n); + rc = SProcXISetClientPointer(&client_request); + g_assert(rc == error); + + if (rc == BadDevice) + g_assert(client_request.errorValue == req->deviceid); + +} + +static void test_XISetClientPointer(void) +{ + int i; + xXISetClientPointerReq request; + + request_init(&request, XISetClientPointer); + + request.win = CLIENT_WINDOW_ID; + + g_test_message("Testing BadDevice error for XIAllDevices and XIMasterDevices."); + request.deviceid = XIAllDevices; + request_XISetClientPointer(&request, BadDevice); + + request.deviceid = XIAllMasterDevices; + request_XISetClientPointer(&request, BadDevice); + + g_test_message("Testing Success for VCP and VCK."); + request.deviceid = devices.vcp->id; /* 2 */ + request_XISetClientPointer(&request, Success); + g_assert(client_window.clientPtr->id == 2); + + request.deviceid = devices.vck->id; /* 3 */ + request_XISetClientPointer(&request, Success); + g_assert(client_window.clientPtr->id == 2); + + g_test_message("Testing BadDevice error for all other devices."); + for (i = 4; i <= 0xFFFF; i++) + { + request.deviceid = i; + request_XISetClientPointer(&request, BadDevice); + } + + g_test_message("Testing window None"); + request.win = None; + request.deviceid = devices.vcp->id; /* 2 */ + request_XISetClientPointer(&request, Success); + g_assert(client_request.clientPtr->id == 2); + + g_test_message("Testing invalid window"); + request.win = INVALID_WINDOW_ID; + request.deviceid = devices.vcp->id; + request_XISetClientPointer(&request, BadWindow); + +} + + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + init_simple(); + client_window = init_client(0, NULL); + + g_test_add_func("/xi2/protocol/XISetClientPointer", test_XISetClientPointer); + + return g_test_run(); +} diff --git a/xorg-server/test/xi2/protocol-xiwarppointer.c b/xorg-server/test/xi2/protocol-xiwarppointer.c new file mode 100644 index 000000000..4f8860ea0 --- /dev/null +++ b/xorg-server/test/xi2/protocol-xiwarppointer.c @@ -0,0 +1,216 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +/* + * Protocol testing for XIWarpPointer request. + */ +#include +#include +#include +#include +#include "inputstr.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "xiwarppointer.h" +#include "exevents.h" + +#include "protocol-common.h" +#include + +static int expected_x = SPRITE_X; +static int expected_y = SPRITE_Y; + +/* dixLookupWindow requires a lot of setup not necessary for this test. + * Simple wrapper that returns either one of the fake root window or the + * fake client window. If the requested ID is neither of those wanted, + * return whatever the real dixLookupWindow does. + */ +int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access) +{ + if (id == root.drawable.id) + { + *win = &root; + return Success; + } else if (id == window.drawable.id) + { + *win = &window; + return Success; + } + + return __real_dixLookupWindow(win, id, client, access); +} + +/** + * This function overrides the one in the screen rec. + */ +static Bool ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr screen, + int x, int y, Bool generateEvent) +{ + g_assert(x == expected_x); + g_assert(y == expected_y); + return TRUE; +} + + +static void request_XIWarpPointer(ClientPtr client, xXIWarpPointerReq* req, + int error) +{ + char n; + int rc; + + rc = ProcXIWarpPointer(client); + g_assert(rc == error); + + if (rc == BadDevice) + g_assert(client->errorValue == req->deviceid); + else if (rc == BadWindow) + g_assert(client->errorValue == req->dst_win || + client->errorValue == req->src_win); + + + client->swapped = TRUE; + + swapl(&req->src_win, n); + swapl(&req->dst_win, n); + swapl(&req->src_x, n); + swapl(&req->src_y, n); + swapl(&req->dst_x, n); + swapl(&req->dst_y, n); + swaps(&req->src_width, n); + swaps(&req->src_height, n); + swaps(&req->deviceid, n); + + rc = SProcXIWarpPointer(client); + g_assert(rc == error); + + if (rc == BadDevice) + g_assert(client->errorValue == req->deviceid); + else if (rc == BadWindow) + g_assert(client->errorValue == req->dst_win || + client->errorValue == req->src_win); + + client->swapped = FALSE; +} + +static void test_XIWarpPointer(void) +{ + int i; + ClientRec client_request; + xXIWarpPointerReq request; + + memset(&request, 0, sizeof(request)); + + request_init(&request, XIWarpPointer); + + client_request = init_client(request.length, &request); + + request.deviceid = XIAllDevices; + request_XIWarpPointer(&client_request, &request, BadDevice); + + request.deviceid = XIAllMasterDevices; + request_XIWarpPointer(&client_request, &request, BadDevice); + + request.src_win = root.drawable.id; + request.dst_win = root.drawable.id; + request.deviceid = devices.vcp->id; + request_XIWarpPointer(&client_request, &request, Success); + request.deviceid = devices.vck->id; + request_XIWarpPointer(&client_request, &request, BadDevice); + request.deviceid = devices.mouse->id; + request_XIWarpPointer(&client_request, &request, BadDevice); + request.deviceid = devices.kbd->id; + request_XIWarpPointer(&client_request, &request, BadDevice); + + devices.mouse->u.master = NULL; /* Float, kind-of */ + request.deviceid = devices.mouse->id; + request_XIWarpPointer(&client_request, &request, Success); + + for (i = devices.kbd->id + 1; i <= 0xFFFF; i++) + { + request.deviceid = i; + request_XIWarpPointer(&client_request, &request, BadDevice); + } + + request.src_win = window.drawable.id; + request.deviceid = devices.vcp->id; + request_XIWarpPointer(&client_request, &request, Success); + + request.deviceid = devices.mouse->id; + request_XIWarpPointer(&client_request, &request, Success); + + request.src_win = root.drawable.id; + request.dst_win = 0xFFFF; /* invalid window */ + request_XIWarpPointer(&client_request, &request, BadWindow); + + request.src_win = 0xFFFF; /* invalid window */ + request.dst_win = root.drawable.id; + request_XIWarpPointer(&client_request, &request, BadWindow); + + request.src_win = None; + request.dst_win = None; + + request.dst_y = 0; + expected_y = SPRITE_Y; + + request.dst_x = 1 << 16; + expected_x = SPRITE_X + 1; + request.deviceid = devices.vcp->id; + request_XIWarpPointer(&client_request, &request, Success); + + request.dst_x = -1 << 16; + expected_x = SPRITE_X - 1; + request.deviceid = devices.vcp->id; + request_XIWarpPointer(&client_request, &request, Success); + + request.dst_x = 0; + expected_x = SPRITE_X; + + request.dst_y = 1 << 16; + expected_y = SPRITE_Y + 1; + request.deviceid = devices.vcp->id; + request_XIWarpPointer(&client_request, &request, Success); + + request.dst_y = -1 << 16; + expected_y = SPRITE_Y - 1; + request.deviceid = devices.vcp->id; + request_XIWarpPointer(&client_request, &request, Success); + + /* FIXME: src_x/y checks */ +} + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + init_simple(); + screen.SetCursorPosition = ScreenSetCursorPosition; + + g_test_add_func("/xi2/protocol/XIWarpPointer", test_XIWarpPointer); + + return g_test_run(); +} diff --git a/xorg-server/test/xkb.c b/xorg-server/test/xkb.c new file mode 100644 index 000000000..6fbb26a01 --- /dev/null +++ b/xorg-server/test/xkb.c @@ -0,0 +1,173 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "misc.h" +#include "inputstr.h" +#include "opaque.h" +#include "property.h" +#define XKBSRV_NEED_FILE_FUNCS +#include +#include "../xkb/xkbgeom.h" +#include +#include "xkbfile.h" +#include "../xkb/xkb.h" + +#include + +/** + * Initialize an empty XkbRMLVOSet. + * Call XkbGetRulesDflts to obtain the default ruleset. + * Compare obtained ruleset with the built-in defaults. + * + * Result: RMLVO defaults are the same as obtained. + */ +static void xkb_get_rules_test(void) +{ + XkbRMLVOSet rmlvo = { NULL}; + XkbGetRulesDflts(&rmlvo); + + + g_assert(rmlvo.rules); + g_assert(rmlvo.model); + g_assert(rmlvo.layout); + g_assert(rmlvo.variant); + g_assert(rmlvo.options); + g_assert(strcmp(rmlvo.rules, XKB_DFLT_RULES) == 0); + g_assert(strcmp(rmlvo.model, XKB_DFLT_MODEL) == 0); + g_assert(strcmp(rmlvo.layout, XKB_DFLT_LAYOUT) == 0); + g_assert(strcmp(rmlvo.variant, XKB_DFLT_VARIANT) == 0); + g_assert(strcmp(rmlvo.options, XKB_DFLT_OPTIONS) == 0); +} + +/** + * Initialize an random XkbRMLVOSet. + * Call XkbGetRulesDflts to obtain the default ruleset. + * Compare obtained ruleset with the built-in defaults. + * Result: RMLVO defaults are the same as obtained. + */ +static void xkb_set_rules_test(void) +{ + XkbRMLVOSet rmlvo = { + .rules = "test-rules", + .model = "test-model", + .layout = "test-layout", + .variant = "test-variant", + .options = "test-options" + }; + XkbRMLVOSet rmlvo_new = { NULL }; + + XkbSetRulesDflts(&rmlvo); + XkbGetRulesDflts(&rmlvo_new); + + /* XkbGetRulesDflts strdups the values */ + g_assert(rmlvo.rules != rmlvo_new.rules); + g_assert(rmlvo.model != rmlvo_new.model); + g_assert(rmlvo.layout != rmlvo_new.layout); + g_assert(rmlvo.variant != rmlvo_new.variant); + g_assert(rmlvo.options != rmlvo_new.options); + + g_assert(strcmp(rmlvo.rules, rmlvo_new.rules) == 0); + g_assert(strcmp(rmlvo.model, rmlvo_new.model) == 0); + g_assert(strcmp(rmlvo.layout, rmlvo_new.layout) == 0); + g_assert(strcmp(rmlvo.variant, rmlvo_new.variant) == 0); + g_assert(strcmp(rmlvo.options, rmlvo_new.options) == 0); +} + + +/** + * Get the default RMLVO set. + * Set the default RMLVO set. + * Get the default RMLVO set. + * Repeat the last two steps. + * + * Result: RMLVO set obtained is the same as previously set. + */ +static void xkb_set_get_rules_test(void) +{ +/* This test failed before XkbGetRulesDftlts changed to strdup. + We test this twice because the first time using XkbGetRulesDflts we obtain + the built-in defaults. The unexpected free isn't triggered until the second + XkbSetRulesDefaults. + */ + XkbRMLVOSet rmlvo = { NULL }; + XkbRMLVOSet rmlvo_backup; + + XkbGetRulesDflts(&rmlvo); + + /* pass 1 */ + XkbSetRulesDflts(&rmlvo); + XkbGetRulesDflts(&rmlvo); + + /* Make a backup copy */ + rmlvo_backup.rules = strdup(rmlvo.rules); + rmlvo_backup.layout = strdup(rmlvo.layout); + rmlvo_backup.model = strdup(rmlvo.model); + rmlvo_backup.variant = strdup(rmlvo.variant); + rmlvo_backup.options = strdup(rmlvo.options); + + /* pass 2 */ + XkbSetRulesDflts(&rmlvo); + + /* This test is iffy, because strictly we may be comparing against already + * freed memory */ + g_assert(strcmp(rmlvo.rules, rmlvo_backup.rules) == 0); + g_assert(strcmp(rmlvo.model, rmlvo_backup.model) == 0); + g_assert(strcmp(rmlvo.layout, rmlvo_backup.layout) == 0); + g_assert(strcmp(rmlvo.variant, rmlvo_backup.variant) == 0); + g_assert(strcmp(rmlvo.options, rmlvo_backup.options) == 0); + + XkbGetRulesDflts(&rmlvo); + g_assert(strcmp(rmlvo.rules, rmlvo_backup.rules) == 0); + g_assert(strcmp(rmlvo.model, rmlvo_backup.model) == 0); + g_assert(strcmp(rmlvo.layout, rmlvo_backup.layout) == 0); + g_assert(strcmp(rmlvo.variant, rmlvo_backup.variant) == 0); + g_assert(strcmp(rmlvo.options, rmlvo_backup.options) == 0); +} + + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + g_test_add_func("/xkb/set-get-rules", xkb_set_get_rules_test); + g_test_add_func("/xkb/get-rules", xkb_get_rules_test); + g_test_add_func("/xkb/set-rules", xkb_set_rules_test); + + return g_test_run(); +} diff --git a/xorg-server/test/xtest.c b/xorg-server/test/xtest.c new file mode 100644 index 000000000..572f5d2df --- /dev/null +++ b/xorg-server/test/xtest.c @@ -0,0 +1,116 @@ +/** + * Copyright © 2009 Red Hat, Inc. + * + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif +#include +#include +#include "input.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "exevents.h" +#include "xserver-properties.h" + +#include + +/** + */ + +/* from Xext/xtest.c */ +extern DeviceIntPtr xtestpointer, xtestkeyboard; + +/* Needed for the screen setup, otherwise we crash during sprite initialization */ +static Bool device_cursor_init(DeviceIntPtr dev, ScreenPtr screen) { return TRUE; } + +static void xtest_init_devices(void) +{ + ScreenRec screen; + + /* random stuff that needs initialization */ + memset(&screen, 0, sizeof(screen)); + screenInfo.arraySize = MAXSCREENS; + screenInfo.numScreens = 1; + screenInfo.screens[0] = &screen; + screen.myNum = 0; + screen.id = 100; + screen.width = 640; + screen.height = 480; + screen.DeviceCursorInitialize = device_cursor_init; + dixResetPrivates(); + InitAtoms(); + + /* this also inits the xtest devices */ + InitCoreDevices(); + + g_assert(xtestpointer); + g_assert(xtestkeyboard); + g_assert(IsXTestDevice(xtestpointer, NULL)); + g_assert(IsXTestDevice(xtestkeyboard, NULL)); + g_assert(IsXTestDevice(xtestpointer, inputInfo.pointer)); + g_assert(IsXTestDevice(xtestkeyboard, inputInfo.keyboard)); + g_assert(GetXTestDevice(inputInfo.pointer) == xtestpointer); + g_assert(GetXTestDevice(inputInfo.keyboard) == xtestkeyboard); +} + +/** + * Each xtest devices has a property attached marking it. This property + * cannot be changed. + */ +static void xtest_properties(void) +{ + int rc; + char value = 1; + XIPropertyValuePtr prop; + Atom xtest_prop = XIGetKnownProperty(XI_PROP_XTEST_DEVICE); + + rc = XIGetDeviceProperty(xtestpointer, xtest_prop, &prop); + g_assert(rc == Success); + g_assert(prop); + + rc = XIGetDeviceProperty(xtestkeyboard, xtest_prop, &prop); + g_assert(rc == Success); + g_assert(prop != NULL); + + rc = XIChangeDeviceProperty(xtestpointer, xtest_prop, + XA_INTEGER, 8, PropModeReplace, 1, &value, FALSE); + g_assert(rc == BadAccess); + rc = XIChangeDeviceProperty(xtestkeyboard, xtest_prop, + XA_INTEGER, 8, PropModeReplace, 1, &value, FALSE); + g_assert(rc == BadAccess); +} + + + +int main(int argc, char** argv) +{ + g_test_init(&argc, &argv,NULL); + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + + g_test_add_func("/dix/xtest/init", xtest_init_devices); + g_test_add_func("/dix/xtest/properties", xtest_properties); + + return g_test_run(); +} + + diff --git a/xorg-server/xfixes/Makefile.am b/xorg-server/xfixes/Makefile.am index 2a95c065b..a8425e8ea 100644 --- a/xorg-server/xfixes/Makefile.am +++ b/xorg-server/xfixes/Makefile.am @@ -2,6 +2,10 @@ noinst_LTLIBRARIES = libxfixes.la AM_CFLAGS = $(DIX_CFLAGS) +if XORG +sdk_HEADERS = xfixes.h +endif + libxfixes_la_SOURCES = \ cursor.c \ region.c \ diff --git a/xorg-server/xfixes/Makefile.in b/xorg-server/xfixes/Makefile.in index 9d1c5f6d3..85a22a80a 100644 --- a/xorg-server/xfixes/Makefile.in +++ b/xorg-server/xfixes/Makefile.in @@ -15,6 +15,7 @@ @SET_MAKE@ + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -35,10 +36,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = xfixes -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -68,6 +74,30 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libxfixes_la_SOURCES) DIST_SOURCES = $(libxfixes_la_SOURCES) +am__sdk_HEADERS_DIST = xfixes.h +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 = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(sdkdir)" +HEADERS = $(sdk_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -76,6 +106,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -96,9 +127,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -127,7 +161,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -136,9 +172,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -177,12 +217,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -202,7 +243,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -212,6 +252,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -225,11 +266,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -265,6 +305,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -289,7 +330,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -312,6 +352,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -343,7 +384,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -351,6 +394,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libxfixes.la AM_CFLAGS = $(DIX_CFLAGS) +@XORG_TRUE@sdk_HEADERS = xfixes.h libxfixes_la_SOURCES = \ cursor.c \ region.c \ @@ -444,6 +488,26 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sdkdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sdkdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -529,8 +593,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -579,7 +646,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-sdkHEADERS install-dvi: install-dvi-am @@ -625,7 +692,7 @@ ps: ps-am ps-am: -uninstall-am: +uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip @@ -637,10 +704,11 @@ uninstall-am: 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-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c index 02ff1fd57..0c706600e 100644 --- a/xorg-server/xfixes/cursor.c +++ b/xorg-server/xfixes/cursor.c @@ -1,23 +1,30 @@ /* - * Copyright © 2006 Sun Microsystems + * Copyright © 2006 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, 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. + * 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. * - * 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. + * 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. * * Copyright © 2002 Keith Packard * @@ -56,7 +63,7 @@ static RESTYPE CursorClientType; static RESTYPE CursorHideCountType; static RESTYPE CursorWindowType; -static CursorPtr CursorCurrent; +static CursorPtr CursorCurrent[MAXDEVICES]; static CursorPtr pInvisibleCursor = NULL; static int CursorScreenPrivateKeyIndex; @@ -64,14 +71,19 @@ static DevPrivateKey CursorScreenPrivateKey = &CursorScreenPrivateKeyIndex; static void deleteCursorHideCountsForScreen (ScreenPtr pScreen); -#define VERIFY_CURSOR(pCursor, cursor, client, access) { \ - pCursor = (CursorPtr)SecurityLookupIDByType((client), (cursor), \ - RT_CURSOR, (access)); \ - if (!pCursor) { \ - (client)->errorValue = (cursor); \ - return BadCursor; \ - } \ -} +#define VERIFY_CURSOR(pCursor, cursor, client, access) \ + do { \ + int err; \ + err = dixLookupResourceByType((pointer *) &pCursor, cursor, \ + RT_CURSOR, client, access); \ + if (err == BadValue) { \ + client->errorValue = cursor; \ + return BadCursor; \ + } else if (err != Success) { \ + client->errorValue = cursor; \ + return err; \ + } \ + } while (0) /* * There is a global list of windows selecting for cursor events @@ -119,11 +131,13 @@ typedef struct _CursorScreen { #define GetCursorScreenIfSet(s) GetCursorScreen(s) #define SetCursorScreen(s,p) dixSetPrivate(&(s)->devPrivates, CursorScreenPrivateKey, p) #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) -#define Unwrap(as,s,elt) ((s)->elt = (as)->elt) +#define Unwrap(as,s,elt,backup) (((backup) = (s)->elt), (s)->elt = (as)->elt) /* The cursor doesn't show up until the first XDefineCursor() */ static Bool CursorVisible = FALSE; +Bool EnableCursor = TRUE; + static Bool CursorDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, @@ -131,15 +145,16 @@ CursorDisplayCursor (DeviceIntPtr pDev, { CursorScreenPtr cs = GetCursorScreen(pScreen); Bool ret; + DisplayCursorProcPtr backupProc; - Unwrap (cs, pScreen, DisplayCursor); + Unwrap (cs, pScreen, DisplayCursor, backupProc); /* * Have to check ConnectionInfo to distinguish client requests from * initial root window setup. Not a great way to do it, I admit. */ if (ConnectionInfo) - CursorVisible = TRUE; + CursorVisible = EnableCursor; if (cs->pCursorHideCounts != NULL || !CursorVisible) { ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pInvisibleCursor) && @@ -148,11 +163,11 @@ CursorDisplayCursor (DeviceIntPtr pDev, ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } - if (pCursor != CursorCurrent) + if (pCursor != CursorCurrent[pDev->id]) { CursorEventPtr e; - CursorCurrent = pCursor; + CursorCurrent[pDev->id] = pCursor; for (e = cursorEvents; e; e = e->next) { if ((e->eventMask & XFixesDisplayCursorNotifyMask) && @@ -170,7 +185,8 @@ CursorDisplayCursor (DeviceIntPtr pDev, } } } - Wrap (cs, pScreen, DisplayCursor, CursorDisplayCursor); + Wrap (cs, pScreen, DisplayCursor, backupProc); + return ret; } @@ -179,9 +195,11 @@ CursorCloseScreen (int index, ScreenPtr pScreen) { CursorScreenPtr cs = GetCursorScreen (pScreen); Bool ret; + CloseScreenProcPtr close_proc; + DisplayCursorProcPtr display_proc; - Unwrap (cs, pScreen, CloseScreen); - Unwrap (cs, pScreen, DisplayCursor); + Unwrap (cs, pScreen, CloseScreen, close_proc); + Unwrap (cs, pScreen, DisplayCursor, display_proc); deleteCursorHideCountsForScreen(pScreen); ret = (*pScreen->CloseScreen) (index, pScreen); xfree (cs); @@ -196,6 +214,8 @@ XFixesSelectCursorInput (ClientPtr pClient, CARD32 eventMask) { CursorEventPtr *prev, e; + pointer val; + int rc; for (prev = &cursorEvents; (e = *prev); prev = &e->next) { @@ -228,7 +248,10 @@ XFixesSelectCursorInput (ClientPtr pClient, * Add a resource hanging from the window to * catch window destroy */ - if (!LookupIDByType(pWindow->drawable.id, CursorWindowType)) + rc = dixLookupResourceByType( &val, pWindow->drawable.id, + CursorWindowType, serverClient, + DixGetAttrAccess); + if (rc != Success) if (!AddResource (pWindow->drawable.id, CursorWindowType, (pointer) pWindow)) { @@ -361,7 +384,7 @@ ProcXFixesGetCursorImage (ClientPtr client) int npixels, width, height, rc, x, y; REQUEST_SIZE_MATCH(xXFixesGetCursorImageReq); - pCursor = CursorCurrent; + pCursor = CursorCurrent[PickPointer(client)->id]; if (!pCursor) return BadCursor; rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, @@ -404,7 +427,7 @@ ProcXFixesGetCursorImage (ClientPtr client) swapl (&rep->cursorSerial, n); SwapLongs (image, npixels); } - (void) WriteToClient(client, sizeof (xXFixesGetCursorImageReply) + + WriteToClient(client, sizeof (xXFixesGetCursorImageReply) + (npixels << 2), (char *) rep); xfree (rep); return client->noClientException; @@ -457,7 +480,7 @@ ProcXFixesGetCursorName (ClientPtr client) CursorPtr pCursor; xXFixesGetCursorNameReply reply; REQUEST(xXFixesGetCursorNameReq); - char *str; + const char *str; int len; REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq); @@ -469,7 +492,7 @@ ProcXFixesGetCursorName (ClientPtr client) len = strlen (str); reply.type = X_Reply; - reply.length = (len + 3) >> 2; + reply.length = bytes_to_int32(len); reply.sequenceNumber = client->sequence; reply.atom = pCursor->name; reply.nbytes = len; @@ -482,7 +505,7 @@ ProcXFixesGetCursorName (ClientPtr client) swaps (&reply.nbytes, n); } WriteReplyToClient(client, sizeof(xXFixesGetCursorNameReply), &reply); - (void)WriteToClient(client, len, str); + WriteToClient(client, len, str); return(client->noClientException); } @@ -507,13 +530,13 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) CursorPtr pCursor; CARD32 *image; int npixels; - char *name; + const char *name; int nbytes, nbytesRound; int width, height; int rc, x, y; REQUEST_SIZE_MATCH(xXFixesGetCursorImageAndNameReq); - pCursor = CursorCurrent; + pCursor = CursorCurrent[PickPointer(client)->id]; if (!pCursor) return BadCursor; rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, @@ -526,7 +549,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) npixels = width * height; name = pCursor->name ? NameForAtom (pCursor->name) : ""; nbytes = strlen (name); - nbytesRound = (nbytes + 3) & ~3; + nbytesRound = pad_to_int32(nbytes); rep = xalloc (sizeof (xXFixesGetCursorImageAndNameReply) + npixels * sizeof (CARD32) + nbytesRound); if (!rep) @@ -534,7 +557,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) rep->type = X_Reply; rep->sequenceNumber = client->sequence; - rep->length = npixels + (nbytesRound >> 2); + rep->length = npixels + bytes_to_int32(nbytesRound); rep->width = width; rep->height = height; rep->x = x; @@ -564,7 +587,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) swaps (&rep->nbytes, n); SwapLongs (image, npixels); } - (void) WriteToClient(client, sizeof (xXFixesGetCursorImageAndNameReply) + + WriteToClient(client, sizeof (xXFixesGetCursorImageAndNameReply) + (npixels << 2) + nbytesRound, (char *) rep); xfree (rep); return client->noClientException; @@ -893,7 +916,12 @@ ProcXFixesHideCursor (ClientPtr client) ret = createCursorHideCount(client, pWin->drawable.pScreen); if (ret == Success) { - (void) CursorDisplayCursor(PickPointer(client), pWin->drawable.pScreen, CursorCurrent); + DeviceIntPtr dev; + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (IsMaster(dev) && IsPointerDevice(dev)) + CursorDisplayCursor(dev, pWin->drawable.pScreen, CursorCurrent[dev->id]); + } } return ret; @@ -985,9 +1013,14 @@ CursorFreeHideCount (pointer data, XID id) { CursorHideCountPtr pChc = (CursorHideCountPtr) data; ScreenPtr pScreen = pChc->pScreen; + DeviceIntPtr dev; deleteCursorHideCount(pChc, pChc->pScreen); - (void) CursorDisplayCursor(inputInfo.pointer, pScreen, CursorCurrent); + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (IsMaster(dev) && IsPointerDevice(dev)) + CursorDisplayCursor(dev, pScreen, CursorCurrent[dev->id]); + } return 1; } @@ -1013,12 +1046,11 @@ static CursorPtr createInvisibleCursor (void) { CursorPtr pCursor; - static unsigned int *psrcbits, *pmaskbits; + unsigned char *psrcbits, *pmaskbits; CursorMetricRec cm; - int rc; - psrcbits = (unsigned int *) xalloc(4); - pmaskbits = (unsigned int *) xalloc(4); + psrcbits = (unsigned char *) xalloc(4); + pmaskbits = (unsigned char *) xalloc(4); if (psrcbits == NULL || pmaskbits == NULL) { return NULL; } @@ -1030,9 +1062,7 @@ createInvisibleCursor (void) cm.xhot = 0; cm.yhot = 0; - rc = AllocARGBCursor( - (unsigned char *)psrcbits, - (unsigned char *)pmaskbits, + AllocARGBCursor(psrcbits, pmaskbits, NULL, &cm, 0, 0, 0, 0, 0, 0, @@ -1047,7 +1077,7 @@ XFixesCursorInit (void) int i; if (party_like_its_1989) - CursorVisible = TRUE; + CursorVisible = EnableCursor; for (i = 0; i < screenInfo.numScreens; i++) { diff --git a/xorg-server/xfixes/region.c b/xorg-server/xfixes/region.c index 2ab98fcef..966eda051 100644 --- a/xorg-server/xfixes/region.c +++ b/xorg-server/xfixes/region.c @@ -34,7 +34,7 @@ extern int RenderErrBase; #include #include -RESTYPE RegionResType; +RESTYPE RegionResType; static int RegionResFree (pointer data, XID id) diff --git a/xorg-server/xfixes/select.c b/xorg-server/xfixes/select.c index 12a165fd0..a5811bdc0 100644 --- a/xorg-server/xfixes/select.c +++ b/xorg-server/xfixes/select.c @@ -83,6 +83,7 @@ XFixesSelectionCallback (CallbackListPtr *callbacks, pointer data, pointer args) { xXFixesSelectionNotifyEvent ev; + memset(&ev, 0, sizeof(xXFixesSelectionNotifyEvent)); ev.type = XFixesEventBase + XFixesSelectionNotify; ev.subtype = subtype; ev.sequenceNumber = e->pClient->sequence; @@ -132,6 +133,7 @@ XFixesSelectSelectionInput (ClientPtr pClient, WindowPtr pWindow, CARD32 eventMask) { + pointer val; int rc; SelectionEventPtr *prev, e; @@ -172,7 +174,10 @@ XFixesSelectSelectionInput (ClientPtr pClient, * Add a resource hanging from the window to * catch window destroy */ - if (!LookupIDByType(pWindow->drawable.id, SelectionWindowType)) + rc = dixLookupResourceByType (&val, pWindow->drawable.id, + SelectionWindowType, serverClient, + DixGetAttrAccess); + if (rc != Success) if (!AddResource (pWindow->drawable.id, SelectionWindowType, (pointer) pWindow)) { diff --git a/xorg-server/xfixes/xfixes.c b/xorg-server/xfixes/xfixes.c index d1225c6f3..25c92ea93 100644 --- a/xorg-server/xfixes/xfixes.c +++ b/xorg-server/xfixes/xfixes.c @@ -1,23 +1,30 @@ /* - * Copyright © 2006 Sun Microsystems + * Copyright © 2006 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, 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. + * 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. * - * 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. + * 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. * * Copyright © 2002 Keith Packard * @@ -69,6 +76,7 @@ ProcXFixesQueryVersion(ClientPtr client) REQUEST(xXFixesQueryVersionReq); REQUEST_SIZE_MATCH(xXFixesQueryVersionReq); + memset(&rep, 0, sizeof(xXFixesQueryVersionReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; diff --git a/xorg-server/xfixes/xfixes.h b/xorg-server/xfixes/xfixes.h index 81dd83daf..69d162ffe 100644 --- a/xorg-server/xfixes/xfixes.h +++ b/xorg-server/xfixes/xfixes.h @@ -29,23 +29,29 @@ #include "resource.h" -extern RESTYPE RegionResType; -extern int XFixesErrorBase; - -#define VERIFY_REGION(pRegion, rid, client, mode) { \ - pRegion = SecurityLookupIDByType (client, rid, RegionResType, mode); \ - if (!pRegion) { \ - client->errorValue = rid; \ - return XFixesErrorBase + BadRegion; \ - } \ -} +extern _X_EXPORT RESTYPE RegionResType; +extern _X_EXPORT int XFixesErrorBase; + +#define VERIFY_REGION(pRegion, rid, client, mode) \ + do { \ + int err; \ + err = dixLookupResourceByType((pointer *) &pRegion, rid, \ + RegionResType, client, mode); \ + if (err == BadValue) { \ + client->errorValue = rid; \ + return XFixesErrorBase + BadRegion; \ + } else if (err != Success) { \ + client->errorValue = rid; \ + return err; \ + } \ + } while (0) #define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \ pRegion = 0; \ if (rid) VERIFY_REGION(pRegion, rid, client, mode); \ } -RegionPtr +extern _X_EXPORT RegionPtr XFixesRegionCopy (RegionPtr pRegion); diff --git a/xorg-server/xfixes/xfixesint.h b/xorg-server/xfixes/xfixesint.h index 33a3205ed..d7c53ee07 100644 --- a/xorg-server/xfixes/xfixesint.h +++ b/xorg-server/xfixes/xfixesint.h @@ -1,23 +1,30 @@ /* - * Copyright © 2006 Sun Microsystems + * Copyright © 2006 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, 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. + * 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. * - * 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. + * 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. * * Copyright © 2002 Keith Packard * @@ -47,7 +54,6 @@ #ifndef _XFIXESINT_H_ #define _XFIXESINT_H_ -#define NEED_EVENTS #include #include #include "misc.h" diff --git a/xorg-server/xkb/Makefile.am b/xorg-server/xkb/Makefile.am index 5967f42ff..b85ee8a41 100644 --- a/xorg-server/xkb/Makefile.am +++ b/xorg-server/xkb/Makefile.am @@ -7,8 +7,6 @@ DDX_SRCS = \ ddxBeep.c \ ddxCtrls.c \ ddxFakeMtn.c \ - ddxInit.c \ - ddxKeyClick.c \ ddxLEDs.c \ ddxLoad.c \ ddxList.c \ @@ -39,11 +37,7 @@ X11_SRCS = \ XKBGAlloc.c \ XKBMAlloc.c -# ends up unused... -# XI_SRCS = xkbPrOtherEv.c - -libxkb_la_SOURCES = $(DDX_SRCS) $(DIX_SRCS) $(XI_SRCS) $(XKBFILE_SRCS) \ - $(X11_SRCS) +libxkb_la_SOURCES = $(DDX_SRCS) $(DIX_SRCS) $(XKBFILE_SRCS) $(X11_SRCS) libxkbstubs_la_SOURCES = ddxVT.c ddxPrivate.c ddxKillSrv.c EXTRA_DIST = xkbDflts.h xkbgeom.h xkb.h diff --git a/xorg-server/xkb/Makefile.in b/xorg-server/xkb/Makefile.in index 53abf0be8..d2d77a3a4 100644 --- a/xorg-server/xkb/Makefile.in +++ b/xorg-server/xkb/Makefile.in @@ -39,8 +39,11 @@ subdir = xkb DIST_COMMON = $(dist_xkbcompiled_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,13 +53,14 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxkb_la_LIBADD = -am__objects_1 = ddxBeep.lo ddxCtrls.lo ddxFakeMtn.lo ddxInit.lo \ - ddxKeyClick.lo ddxLEDs.lo ddxLoad.lo ddxList.lo ddxDevBtn.lo +am__objects_1 = ddxBeep.lo ddxCtrls.lo ddxFakeMtn.lo ddxLEDs.lo \ + ddxLoad.lo ddxList.lo ddxDevBtn.lo am__objects_2 = xkb.lo xkbUtils.lo xkbEvents.lo xkbAccessX.lo \ xkbSwap.lo xkbLEDs.lo xkbInit.lo xkbActions.lo xkbPrKeyEv.lo am__objects_3 = maprules.lo xkmread.lo xkbtext.lo xkbfmisc.lo \ @@ -111,6 +115,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -131,9 +136,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -162,7 +170,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -171,9 +181,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -212,12 +226,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -237,7 +252,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -247,6 +261,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -260,11 +275,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -300,6 +314,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -324,7 +339,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -347,6 +361,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -378,7 +393,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -392,8 +409,6 @@ DDX_SRCS = \ ddxBeep.c \ ddxCtrls.c \ ddxFakeMtn.c \ - ddxInit.c \ - ddxKeyClick.c \ ddxLEDs.c \ ddxLoad.c \ ddxList.c \ @@ -425,12 +440,7 @@ X11_SRCS = \ XKBGAlloc.c \ XKBMAlloc.c - -# ends up unused... -# XI_SRCS = xkbPrOtherEv.c -libxkb_la_SOURCES = $(DDX_SRCS) $(DIX_SRCS) $(XI_SRCS) $(XKBFILE_SRCS) \ - $(X11_SRCS) - +libxkb_la_SOURCES = $(DDX_SRCS) $(DIX_SRCS) $(XKBFILE_SRCS) $(X11_SRCS) libxkbstubs_la_SOURCES = ddxVT.c ddxPrivate.c ddxKillSrv.c EXTRA_DIST = xkbDflts.h xkbgeom.h xkb.h xkbcompileddir = $(XKB_COMPILED_DIR) @@ -497,8 +507,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxCtrls.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxDevBtn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxFakeMtn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxInit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxKeyClick.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxKillSrv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxLEDs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxList.Plo@am__quote@ diff --git a/xorg-server/xkb/XKBAlloc.c b/xorg-server/xkb/XKBAlloc.c index 790aede92..7265d83f2 100644 --- a/xorg-server/xkb/XKBAlloc.c +++ b/xorg-server/xkb/XKBAlloc.c @@ -30,8 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#define NEED_EVENTS -#define NEED_REPLIES #include #include "misc.h" #include "inputstr.h" @@ -60,7 +58,7 @@ XkbSymInterpretRec *prev_interpret; compat->sym_interpret= _XkbTypedRealloc(compat->sym_interpret, nSI,XkbSymInterpretRec); if (compat->sym_interpret==NULL) { - _XkbFree(prev_interpret); + xfree(prev_interpret); compat->size_si= compat->num_si= 0; return BadAlloc; } @@ -76,7 +74,7 @@ XkbSymInterpretRec *prev_interpret; if (nSI>0) { compat->sym_interpret= _XkbTypedCalloc(nSI,XkbSymInterpretRec); if (!compat->sym_interpret) { - _XkbFree(compat); + xfree(compat); return BadAlloc; } } @@ -102,12 +100,12 @@ register XkbCompatMapPtr compat; bzero((char *)&compat->groups[0],XkbNumKbdGroups*sizeof(XkbModsRec)); if (which&XkbSymInterpMask) { if ((compat->sym_interpret)&&(compat->size_si>0)) - _XkbFree(compat->sym_interpret); + xfree(compat->sym_interpret); compat->size_si= compat->num_si= 0; compat->sym_interpret= NULL; } if (freeMap) { - _XkbFree(compat); + xfree(compat); xkb->compat= NULL; } return; @@ -163,7 +161,7 @@ XkbNamesPtr names; _XkbClearElems(names->key_aliases,names->num_key_aliases, nTotalAliases-1,XkbKeyAliasRec); } else { - _XkbFree(prev_aliases); + xfree(prev_aliases); } } if (names->key_aliases==NULL) { @@ -185,7 +183,7 @@ XkbNamesPtr names; _XkbClearElems(names->radio_groups,names->num_rg,nTotalRG-1, Atom); } else { - _XkbFree(prev_radio_groups); + xfree(prev_radio_groups); } } if (names->radio_groups==NULL) @@ -213,29 +211,29 @@ XkbNamesPtr names; type= map->types; for (i=0;inum_types;i++,type++) { if (type->level_names!=NULL) { - _XkbFree(type->level_names); + xfree(type->level_names); type->level_names= NULL; } } } } if ((which&XkbKeyNamesMask)&&(names->keys!=NULL)) { - _XkbFree(names->keys); + xfree(names->keys); names->keys= NULL; names->num_keys= 0; } if ((which&XkbKeyAliasesMask)&&(names->key_aliases)){ - _XkbFree(names->key_aliases); + xfree(names->key_aliases); names->key_aliases=NULL; names->num_key_aliases=0; } if ((which&XkbRGNamesMask)&&(names->radio_groups)) { - _XkbFree(names->radio_groups); + xfree(names->radio_groups); names->radio_groups= NULL; names->num_rg= 0; } if (freeMap) { - _XkbFree(names); + xfree(names); xkb->names= NULL; } return; @@ -263,7 +261,7 @@ static void XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap) { if (freeMap && (xkb!=NULL) && (xkb->ctrls!=NULL)) { - _XkbFree(xkb->ctrls); + xfree(xkb->ctrls); xkb->ctrls= NULL; } return; @@ -271,7 +269,7 @@ XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap) /***===================================================================***/ -Status +Status XkbAllocIndicatorMaps(XkbDescPtr xkb) { if (xkb==NULL) @@ -288,7 +286,7 @@ static void XkbFreeIndicatorMaps(XkbDescPtr xkb) { if ((xkb!=NULL)&&(xkb->indicators!=NULL)) { - _XkbFree(xkb->indicators); + xfree(xkb->indicators); xkb->indicators= NULL; } return; @@ -332,6 +330,6 @@ XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll) if (which&XkbControlsMask) XkbFreeControls(xkb,XkbAllControlsMask,True); if (freeAll) - _XkbFree(xkb); + xfree(xkb); return; } diff --git a/xorg-server/xkb/XKBGAlloc.c b/xorg-server/xkb/XKBGAlloc.c index c37f49a55..752b11a94 100644 --- a/xorg-server/xkb/XKBGAlloc.c +++ b/xorg-server/xkb/XKBGAlloc.c @@ -28,8 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#define NEED_EVENTS -#define NEED_REPLIES #include #include @@ -53,7 +51,7 @@ _XkbFreeGeomLeafElems( Bool freeAll, if ((freeAll)||(*elems==NULL)) { *num_inout= *sz_inout= 0; if (*elems!=NULL) { - _XkbFree(*elems); + xfree(*elems); *elems= NULL; } return; @@ -117,7 +115,7 @@ register char *ptr; if (freeAll) { (*num_inout)= (*sz_inout)= 0; if (*elems) { - _XkbFree(*elems); + xfree(*elems); *elems= NULL; } } @@ -140,11 +138,11 @@ _XkbClearProperty(char *prop_in) XkbPropertyPtr prop= (XkbPropertyPtr)prop_in; if (prop->name) { - _XkbFree(prop->name); + xfree(prop->name); prop->name= NULL; } if (prop->value) { - _XkbFree(prop->value); + xfree(prop->value); prop->value= NULL; } return; @@ -186,7 +184,7 @@ _XkbClearColor(char *color_in) XkbColorPtr color= (XkbColorPtr)color_in; if (color->spec) - _XkbFree(color->spec); + xfree(color->spec); return; } @@ -383,11 +381,11 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in; case XkbTextDoodad: { if (doodad->text.text!=NULL) { - _XkbFree(doodad->text.text); + xfree(doodad->text.text); doodad->text.text= NULL; } if (doodad->text.font!=NULL) { - _XkbFree(doodad->text.font); + xfree(doodad->text.font); doodad->text.font= NULL; } } @@ -395,7 +393,7 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in; case XkbLogoDoodad: { if (doodad->logo.logo_name!=NULL) { - _XkbFree(doodad->logo.logo_name); + xfree(doodad->logo.logo_name); doodad->logo.logo_name= NULL; } } @@ -415,7 +413,7 @@ register XkbDoodadPtr doodad; _XkbClearDoodad((char *)doodad); } if (freeAll) - _XkbFree(doodads); + xfree(doodads); } return; } @@ -444,10 +442,10 @@ XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap) XkbFreeGeomKeyAliases(geom,0,geom->num_key_aliases,True); if (freeMap) { if (geom->label_font!=NULL) { - _XkbFree(geom->label_font); + xfree(geom->label_font); geom->label_font= NULL; } - _XkbFree(geom); + xfree(geom); } return; } @@ -471,8 +469,8 @@ _XkbGeomAlloc( void ** old, *total= (*num)+num_new; if ((*old)!=NULL) - (*old)= _XkbRealloc((*old),(*total)*sz_elem); - else (*old)= _XkbCalloc((*total),sz_elem); + (*old)= xrealloc((*old),(*total)*sz_elem); + else (*old)= xcalloc((*total),sz_elem); if ((*old)==NULL) { *total= *num= 0; return BadAlloc; @@ -666,8 +664,8 @@ register XkbPropertyPtr prop; for (i=0,prop=geom->properties;inum_properties;i++,prop++) { if ((prop->name)&&(strcmp(name,prop->name)==0)) { if (prop->value) - _XkbFree(prop->value); - prop->value= (char *)_XkbAlloc(strlen(value)+1); + xfree(prop->value); + prop->value= xalloc(strlen(value)+1); if (prop->value) strcpy(prop->value,value); return prop; @@ -678,13 +676,13 @@ register XkbPropertyPtr prop; return NULL; } prop= &geom->properties[geom->num_properties]; - prop->name= (char *)_XkbAlloc(strlen(name)+1); + prop->name= xalloc(strlen(name)+1); if (!name) return NULL; strcpy(prop->name,name); - prop->value= (char *)_XkbAlloc(strlen(value)+1); + prop->value= xalloc(strlen(value)+1); if (!value) { - _XkbFree(prop->name); + xfree(prop->name); prop->name= NULL; return NULL; } @@ -740,7 +738,7 @@ register XkbColorPtr color; } color= &geom->colors[geom->num_colors]; color->pixel= pixel; - color->spec= (char *)_XkbAlloc(strlen(spec)+1); + color->spec= xalloc(strlen(spec)+1); if (!color->spec) return NULL; strcpy(color->spec,spec); @@ -854,7 +852,7 @@ XkbSectionPtr section; return NULL; if ((sz_doodads>0)&&(_XkbAllocDoodads(section,sz_doodads)!=Success)) { if (section->rows) { - _XkbFree(section->rows); + xfree(section->rows); section->rows= NULL; section->sz_rows= section->num_rows= 0; } diff --git a/xorg-server/xkb/XKBMAlloc.c b/xorg-server/xkb/XKBMAlloc.c index 178b5b89a..728c0297b 100644 --- a/xorg-server/xkb/XKBMAlloc.c +++ b/xorg-server/xkb/XKBMAlloc.c @@ -32,8 +32,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#define NEED_EVENTS -#define NEED_REPLIES #include #include "misc.h" #include "inputstr.h" @@ -81,7 +79,7 @@ XkbClientMapPtr map; map->types= _XkbTypedRealloc(map->types,nTotalTypes,XkbKeyTypeRec); if (map->types==NULL) { - _XkbFree(prev_types); + xfree(prev_types); map->num_types= map->size_types= 0; return BadAlloc; } @@ -174,7 +172,7 @@ XkbServerMapPtr map; need= map->num_acts+nNewActions; map->acts= _XkbTypedRealloc(map->acts,need,XkbAction); if (map->acts==NULL) { - _XkbFree(prev_acts); + xfree(prev_acts); map->num_acts= map->size_acts= 0; return BadAlloc; } @@ -224,15 +222,15 @@ XkbCopyKeyType(XkbKeyTypePtr from,XkbKeyTypePtr into) if ((!from)||(!into)) return BadMatch; if (into->map) { - _XkbFree(into->map); + xfree(into->map); into->map= NULL; } if (into->preserve) { - _XkbFree(into->preserve); + xfree(into->preserve); into->preserve= NULL; } if (into->level_names) { - _XkbFree(into->level_names); + xfree(into->level_names); into->level_names= NULL; } *into= *from; @@ -301,10 +299,10 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; type= &xkb->map->types[type_ndx]; if (map_count==0) { if (type->map!=NULL) - _XkbFree(type->map); + xfree(type->map); type->map= NULL; if (type->preserve!=NULL) - _XkbFree(type->preserve); + xfree(type->preserve); type->preserve= NULL; type->map_count= 0; } @@ -315,7 +313,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; type->map=_XkbTypedRealloc(type->map,map_count,XkbKTMapEntryRec); if (!type->map) { if (prev_map) - _XkbFree(prev_map); + xfree(prev_map); return BadAlloc; } if (want_preserve) { @@ -327,12 +325,12 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; } if (!type->preserve) { if (prev_preserve) - _XkbFree(prev_preserve); + xfree(prev_preserve); return BadAlloc; } } else if (type->preserve!=NULL) { - _XkbFree(type->preserve); + xfree(type->preserve); type->preserve= NULL; } type->map_count= map_count; @@ -344,7 +342,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; type->level_names=_XkbTypedRealloc(type->level_names,new_num_lvls,Atom); if (!type->level_names) { if (prev_level_names) - _XkbFree(prev_level_names); + xfree(prev_level_names); return BadAlloc; } } @@ -424,7 +422,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; } } type->num_levels= new_num_lvls; - _XkbFree(xkb->map->syms); + xfree(xkb->map->syms); xkb->map->syms= newSyms; xkb->map->num_syms= nSyms; return Success; @@ -520,7 +518,7 @@ KeySym *newSyms; xkb->map->key_sym_map[i].offset = nSyms; nSyms+= nKeySyms; } - _XkbFree(xkb->map->syms); + xfree(xkb->map->syms); xkb->map->syms = newSyms; xkb->map->num_syms = nSyms; return &xkb->map->syms[xkb->map->key_sym_map[key].offset]; @@ -642,7 +640,7 @@ int tmp; xkb->map->key_sym_map= _XkbTypedRealloc(xkb->map->key_sym_map, (maxKC+1),XkbSymMapRec); if (!xkb->map->key_sym_map) { - _XkbFree(prev_key_sym_map); + xfree(prev_key_sym_map); return BadAlloc; } bzero((char *)&xkb->map->key_sym_map[xkb->max_key_code], @@ -660,7 +658,7 @@ int tmp; xkb->map->modmap= _XkbTypedRealloc(xkb->map->modmap, (maxKC+1),unsigned char); if (!xkb->map->modmap) { - _XkbFree(prev_modmap); + xfree(prev_modmap); return BadAlloc; } bzero((char *)&xkb->map->modmap[xkb->max_key_code],tmp); @@ -679,7 +677,7 @@ int tmp; xkb->server->behaviors=_XkbTypedRealloc(xkb->server->behaviors, (maxKC+1),XkbBehavior); if (!xkb->server->behaviors) { - _XkbFree(prev_behaviors); + xfree(prev_behaviors); return BadAlloc; } bzero((char *)&xkb->server->behaviors[xkb->max_key_code], @@ -697,7 +695,7 @@ int tmp; xkb->server->key_acts= _XkbTypedRealloc(xkb->server->key_acts, (maxKC+1),unsigned short); if (!xkb->server->key_acts) { - _XkbFree(prev_key_acts); + xfree(prev_key_acts); return BadAlloc; } bzero((char *)&xkb->server->key_acts[xkb->max_key_code], @@ -715,7 +713,7 @@ int tmp; xkb->server->vmodmap= _XkbTypedRealloc(xkb->server->vmodmap, (maxKC+1),unsigned short); if (!xkb->server->vmodmap) { - _XkbFree(prev_vmodmap); + xfree(prev_vmodmap); return BadAlloc; } bzero((char *)&xkb->server->vmodmap[xkb->max_key_code], @@ -734,7 +732,7 @@ int tmp; xkb->names->keys= _XkbTypedRealloc(xkb->names->keys, (maxKC+1),XkbKeyNameRec); if (!xkb->names->keys) { - _XkbFree(prev_keys); + xfree(prev_keys); return BadAlloc; } bzero((char *)&xkb->names->keys[xkb->max_key_code], @@ -795,7 +793,7 @@ XkbAction *newActs; xkb->server->key_acts[i]= nActs; nActs+= nKeyActs; } - _XkbFree(xkb->server->acts); + xfree(xkb->server->acts); xkb->server->acts = newActs; xkb->server->num_acts= nActs; return &xkb->server->acts[xkb->server->key_acts[key]]; @@ -818,42 +816,42 @@ XkbClientMapPtr map; XkbKeyTypePtr type; for (i=0,type=map->types;inum_types;i++,type++) { if (type->map!=NULL) { - _XkbFree(type->map); + xfree(type->map); type->map= NULL; } if (type->preserve!=NULL) { - _XkbFree(type->preserve); + xfree(type->preserve); type->preserve= NULL; } type->map_count= 0; if (type->level_names!=NULL) { - _XkbFree(type->level_names); + xfree(type->level_names); type->level_names= NULL; } } } - _XkbFree(map->types); + xfree(map->types); map->num_types= map->size_types= 0; map->types= NULL; } } if (what&XkbKeySymsMask) { if (map->key_sym_map!=NULL) { - _XkbFree(map->key_sym_map); + xfree(map->key_sym_map); map->key_sym_map= NULL; } if (map->syms!=NULL) { - _XkbFree(map->syms); + xfree(map->syms); map->size_syms= map->num_syms= 0; map->syms= NULL; } } if ((what&XkbModifierMapMask)&&(map->modmap!=NULL)) { - _XkbFree(map->modmap); + xfree(map->modmap); map->modmap= NULL; } if (freeMap) { - _XkbFree(xkb->map); + xfree(xkb->map); xkb->map= NULL; } return; @@ -870,31 +868,31 @@ XkbServerMapPtr map; what= XkbAllServerInfoMask; map= xkb->server; if ((what&XkbExplicitComponentsMask)&&(map->explicit!=NULL)) { - _XkbFree(map->explicit); + xfree(map->explicit); map->explicit= NULL; } if (what&XkbKeyActionsMask) { if (map->key_acts!=NULL) { - _XkbFree(map->key_acts); + xfree(map->key_acts); map->key_acts= NULL; } if (map->acts!=NULL) { - _XkbFree(map->acts); + xfree(map->acts); map->num_acts= map->size_acts= 0; map->acts= NULL; } } if ((what&XkbKeyBehaviorsMask)&&(map->behaviors!=NULL)) { - _XkbFree(map->behaviors); + xfree(map->behaviors); map->behaviors= NULL; } if ((what&XkbVirtualModMapMask)&&(map->vmodmap!=NULL)) { - _XkbFree(map->vmodmap); + xfree(map->vmodmap); map->vmodmap= NULL; } if (freeMap) { - _XkbFree(xkb->server); + xfree(xkb->server); xkb->server= NULL; } return; diff --git a/xorg-server/xkb/XKBMisc.c b/xorg-server/xkb/XKBMisc.c index a9d8b17c0..867906046 100644 --- a/xorg-server/xkb/XKBMisc.c +++ b/xorg-server/xkb/XKBMisc.c @@ -32,8 +32,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#define NEED_EVENTS -#define NEED_REPLIES #include #include "misc.h" #include "inputstr.h" @@ -58,6 +56,7 @@ register int i; unsigned int empty; int nSyms[XkbNumKbdGroups]; int nGroups,tmp,groupsWidth; +BOOL replicated = FALSE; /* Section 12.2 of the protocol describes this process in more detail */ /* Step 1: find the # of symbols in the core mapping per group */ @@ -91,27 +90,70 @@ int nGroups,tmp,groupsWidth; for (i=2;i=map_width)&& - ((protected&(XkbExplicitKeyType3Mask|XkbExplicitKeyType4Mask))==0)) { + + /* Special case: if only the first group is explicit, and the symbols + * replicate across all groups, then we have a Section 12.4 replication */ + if ((protected & ~XkbExplicitKeyType1Mask) == 0) + { + int j, width = nSyms[XkbGroup1Index]; + + replicated = TRUE; + + /* Check ABAB in ABABCDECDEABCDE */ + if ((width > 0 && CORE_SYM(0) != CORE_SYM(2)) || + (width > 1 && CORE_SYM(1) != CORE_SYM(3))) + replicated = FALSE; + + /* Check CDECDE in ABABCDECDEABCDE */ + for (i = 2; i < width && replicated; i++) + { + if (CORE_SYM(2 + i) != CORE_SYM(i + width)) + replicated = FALSE; + } + + /* Check ABCDE in ABABCDECDEABCDE */ + for (j = 2; replicated && + j < XkbNumKbdGroups && + map_width >= width * (j + 1); j++) + { + for (i = 0; i < width && replicated; i++) + { + if (CORE_SYM(((i < 2) ? i : 2 + i)) != CORE_SYM(i + width * j)) + replicated = FALSE; + } + } + } + + if (replicated) + { + nSyms[XkbGroup2Index]= 0; nSyms[XkbGroup3Index]= 0; nSyms[XkbGroup4Index]= 0; - nGroups= 2; - } - else { - nGroups= 3; - for (i=0;i=map_width)&& + ((protected&(XkbExplicitKeyType3Mask|XkbExplicitKeyType4Mask))==0)) { + nSyms[XkbGroup3Index]= 0; + nSyms[XkbGroup4Index]= 0; + nGroups= 2; + } else + { + nGroups= 3; + for (i=0;ichanged|= changed; } if (interps!=ibuf) - _XkbFree(interps); + xfree(interps); return True; } diff --git a/xorg-server/xkb/ddxBeep.c b/xorg-server/xkb/ddxBeep.c index 74d868c0e..10a731724 100644 --- a/xorg-server/xkb/ddxBeep.c +++ b/xorg-server/xkb/ddxBeep.c @@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS 1 #include #include #include diff --git a/xorg-server/xkb/ddxCtrls.c b/xorg-server/xkb/ddxCtrls.c index be269c2af..04de608df 100644 --- a/xorg-server/xkb/ddxCtrls.c +++ b/xorg-server/xkb/ddxCtrls.c @@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS 1 #include #include #include diff --git a/xorg-server/xkb/ddxDevBtn.c b/xorg-server/xkb/ddxDevBtn.c index 44ee75f5d..94630d1c9 100644 --- a/xorg-server/xkb/ddxDevBtn.c +++ b/xorg-server/xkb/ddxDevBtn.c @@ -29,101 +29,49 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS 1 #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" +#include "eventstr.h" #include +#include "mi.h" #include #include -extern int DeviceValuator; - -static EventListPtr masterEvents = NULL; - void XkbDDXFakeDeviceButton(DeviceIntPtr dev,Bool press,int button) { -int * devVal; -INT32 * evVal; -xEvent events[2]; -deviceKeyButtonPointer *btn; -deviceValuator * val; -int x,y; -int nAxes, i, count; -DeviceIntPtr master = NULL; - - if (dev == inputInfo.pointer || !dev->public.on) - return; - - nAxes = (dev->valuator?dev->valuator->numAxes:0); - if (nAxes > 6) - nAxes = 6; - - GetSpritePosition(dev, &x,&y); - btn= (deviceKeyButtonPointer *) &events[0]; - val= (deviceValuator *) &events[1]; - if (press) btn->type= DeviceButtonPress; - else btn->type= DeviceButtonRelease; - btn->detail= button; - btn->time= GetTimeInMillis(); - btn->root_x= x; - btn->root_y= y; - btn->deviceid= dev->id; - count= 1; - if (nAxes>0) { - btn->deviceid|= 0x80; - val->type = DeviceValuator; - val->deviceid = dev->id; - val->first_valuator = 0; + EventListPtr events; + int nevents, i; + DeviceIntPtr ptr; - evVal= &val->valuator0; - devVal= dev->valuator->axisVal; - for (i=nAxes;i>0;i--) { - *evVal++ = *devVal++; - if (evVal > &val->valuator5) { - int tmp = val->first_valuator+6; - val->num_valuators = 6; - val++; - evVal= &val->valuator0; - val->first_valuator= tmp; - } - } - if ((nAxes % 6) != 0) { - val->num_valuators = (nAxes % 6); - } - count= 1+((nAxes+5)/6); - } - - /* XXX: This is obnoxious. ProcessOtherEvent updates the DIX device state, - * but may not do anything if the device state is invalid. This happens if - * we post a mouse event from a pure keyboard device. So we need to hack - * around that by getting the master, then posting the event for the - * pointer paired with the master. + /* If dev is a slave device, and the SD is attached, do nothing. If we'd + * post through the attached master pointer we'd get duplicate events. + * + * if dev is a master keyboard, post through the master pointer. * - * Note:the DeviceButtonEvent on the SD itself will do nothing in most - * cases, unless dev is both a keyboard and a mouse. + * if dev is a floating slave, post through the device itself. */ - if (!dev->isMaster && dev->u.master) { - if (!masterEvents) - { - masterEvents = InitEventList(1); - SetMinimumEventSize(masterEvents, 1, (1 + MAX_VALUATOR_EVENTS) * sizeof(xEvent)); - } - master = dev->u.master; - if (!IsPointerDevice(master)) - master = GetPairedDevice(dev->u.master); - CopyGetMasterEvent(master, dev, &events, masterEvents, count); - } + if (IsMaster(dev)) + ptr = GetMaster(dev, MASTER_POINTER); + else if (!dev->u.master) + ptr = dev; + else + return; + + events = InitEventList(GetMaximumEventsNum()); + nevents = GetPointerEvents(events, ptr, + press ? ButtonPress : ButtonRelease, button, + 0 /* flags */, 0 /* first */, + 0 /* num_val */, NULL); + - (*dev->public.processInputProc)((xEventPtr)btn, dev, count); + for (i = 0; i < nevents; i++) + mieqProcessDeviceEvent(ptr, (InternalEvent*)events[i].event, NULL); - if (master) { - (*master->public.processInputProc)(masterEvents->event, master, count); - } - return; + FreeEventList(events, GetMaximumEventsNum()); } diff --git a/xorg-server/xkb/ddxFakeMtn.c b/xorg-server/xkb/ddxFakeMtn.c index 3f010f9ce..f90d2099a 100644 --- a/xorg-server/xkb/ddxFakeMtn.c +++ b/xorg-server/xkb/ddxFakeMtn.c @@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS 1 #include #include #include diff --git a/xorg-server/xkb/ddxKillSrv.c b/xorg-server/xkb/ddxKillSrv.c index 3b5fd5353..106b39587 100644 --- a/xorg-server/xkb/ddxKillSrv.c +++ b/xorg-server/xkb/ddxKillSrv.c @@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS #include #include #include diff --git a/xorg-server/xkb/ddxLEDs.c b/xorg-server/xkb/ddxLEDs.c index b4c8086f5..246d58c31 100644 --- a/xorg-server/xkb/ddxLEDs.c +++ b/xorg-server/xkb/ddxLEDs.c @@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS 1 #include #include #include diff --git a/xorg-server/xkb/ddxList.c b/xorg-server/xkb/ddxList.c index ae3a7f7e0..3ff3d81b4 100644 --- a/xorg-server/xkb/ddxList.c +++ b/xorg-server/xkb/ddxList.c @@ -30,7 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#define NEED_EVENTS 1 #include #include #include @@ -62,7 +61,7 @@ extern int Win32System(const char *cmdline); /***====================================================================***/ static char *componentDirs[_XkbListNumComponents] = { - "keymap", "keycodes", "types", "compat", "symbols", "geometry" + "keycodes", "types", "compat", "symbols", "geometry" }; /***====================================================================***/ @@ -281,9 +280,7 @@ XkbDDXList(DeviceIntPtr dev,XkbSrvListInfoPtr list,ClientPtr client) { Status status; - status= XkbDDXListComponent(dev,_XkbListKeymaps,list,client); - if (status==Success) - status= XkbDDXListComponent(dev,_XkbListKeycodes,list,client); + status= XkbDDXListComponent(dev,_XkbListKeycodes,list,client); if (status==Success) status= XkbDDXListComponent(dev,_XkbListTypes,list,client); if (status==Success) diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c index 4d5dfb685..6954dd150 100644 --- a/xorg-server/xkb/ddxLoad.c +++ b/xorg-server/xkb/ddxLoad.c @@ -34,7 +34,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#define NEED_EVENTS 1 #include #include #include @@ -178,7 +177,7 @@ OutputDirectory( } } -static Bool +static Bool XkbDDXCompileKeymapByNames( XkbDescPtr xkb, XkbComponentNamesPtr names, unsigned want, @@ -205,7 +204,6 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, snprintf(keymap, sizeof(keymap), "server-%s", display); - XkbEnsureSafeMapName(keymap); OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir)); #ifdef WIN32 @@ -405,7 +403,7 @@ XkbRF_RulesPtr rules; return False; } - rules = XkbRF_Create(0, 0); + rules = XkbRF_Create(); if (!rules) { LogMessage(X_ERROR, "XKB: Couldn't create rules struct\n"); fclose(file); @@ -429,3 +427,36 @@ XkbRF_RulesPtr rules; return complete; } + +XkbDescPtr +XkbCompileKeymap(DeviceIntPtr dev, XkbRMLVOSet *rmlvo) +{ + XkbComponentNamesRec kccgst; + XkbRF_VarDefsRec mlvo; + XkbDescPtr xkb; + char name[PATH_MAX]; + + if (!dev || !rmlvo) { + LogMessage(X_ERROR, "XKB: No device or RMLVO specified\n"); + return NULL; + } + + mlvo.model = rmlvo->model; + mlvo.layout = rmlvo->layout; + mlvo.variant = rmlvo->variant; + mlvo.options = rmlvo->options; + + /* XDNFR already logs for us. */ + if (!XkbDDXNamesFromRules(dev, rmlvo->rules, &mlvo, &kccgst)) + return NULL; + + /* XDLKBN too, but it might return 0 as well as allocating. */ + if (!XkbDDXLoadKeymapByNames(dev, &kccgst, XkmAllIndicesMask, 0, &xkb, name, + PATH_MAX)) { + if (xkb) + XkbFreeKeyboard(xkb, 0, TRUE); + return NULL; + } + + return xkb; +} diff --git a/xorg-server/xkb/ddxPrivate.c b/xorg-server/xkb/ddxPrivate.c index f67e20c27..f1c85f6ea 100644 --- a/xorg-server/xkb/ddxPrivate.c +++ b/xorg-server/xkb/ddxPrivate.c @@ -3,7 +3,6 @@ #include #endif -#define NEED_EVENTS #include #include "windowstr.h" #include diff --git a/xorg-server/xkb/ddxVT.c b/xorg-server/xkb/ddxVT.c index 55c82a865..cbd453706 100644 --- a/xorg-server/xkb/ddxVT.c +++ b/xorg-server/xkb/ddxVT.c @@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS #include #include #include diff --git a/xorg-server/xkb/maprules.c b/xorg-server/xkb/maprules.c index b25d92901..168c5277f 100644 --- a/xorg-server/xkb/maprules.c +++ b/xorg-server/xkb/maprules.c @@ -36,7 +36,6 @@ #define XOS_USE_NO_LOCKING #include -#define NEED_EVENTS #include #include #include @@ -53,6 +52,8 @@ /***====================================================================***/ + + #define DFLT_LINE_SIZE 128 typedef struct { @@ -77,7 +78,7 @@ static void FreeInputLine(InputLine *line) { if (line->line!=line->buf) - _XkbFree(line->line); + xfree(line->line); line->line_num= 1; line->num_line= 0; line->sz_line= DFLT_LINE_SIZE; @@ -90,11 +91,11 @@ InputLineAddChar(InputLine *line,int ch) { if (line->num_line>=line->sz_line) { if (line->line==line->buf) { - line->line= (char *)_XkbAlloc(line->sz_line*2); + line->line= xalloc(line->sz_line*2); memcpy(line->line,line->buf,line->sz_line); } else { - line->line=(char *)_XkbRealloc((char *)line->line,line->sz_line*2); + line->line= xrealloc((char *)line->line,line->sz_line*2); } line->sz_line*= 2; } @@ -194,15 +195,14 @@ Bool endOfFile,spacePending,slashPending,inComment; #define TYPES 6 #define COMPAT 7 #define GEOMETRY 8 -#define KEYMAP 9 -#define MAX_WORDS 10 +#define MAX_WORDS 9 #define PART_MASK 0x000F #define COMPONENT_MASK 0x03F0 static char * cname[MAX_WORDS] = { "model", "layout", "variant", "option", - "keycodes", "symbols", "types", "compat", "geometry", "keymap" + "keycodes", "symbols", "types", "compat", "geometry" }; typedef struct _RemapSpec { @@ -337,13 +337,6 @@ Bool found; remap->num_remap= 0; return; } - if (((present&COMPONENT_MASK)&(1<num_remap= 0; - return; - } remap->number++; return; } @@ -460,7 +453,6 @@ Bool append = False; rule->types= _XkbDupString(tmp.name[TYPES]); rule->compat= _XkbDupString(tmp.name[COMPAT]); rule->geometry= _XkbDupString(tmp.name[GEOMETRY]); - rule->keymap= NULL; rule->layout_num = rule->variant_num = 0; for (i = 0; i < nread; i++) { @@ -561,9 +553,9 @@ MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) static void FreeMultiDefs(XkbRF_MultiDefsPtr defs) { - if (defs->options) _XkbFree(defs->options); - if (defs->layout[1]) _XkbFree(defs->layout[1]); - if (defs->variant[1]) _XkbFree(defs->variant[1]); + if (defs->options) xfree(defs->options); + if (defs->layout[1]) xfree(defs->layout[1]); + if (defs->variant[1]) xfree(defs->variant[1]); } static void @@ -777,7 +769,7 @@ int len, ndx; } str= index(&str[0],'%'); } - name= (char *)_XkbAlloc(len+1); + name= xalloc(len+1); str= orig; outstr= name; while (*str!='\0') { @@ -827,7 +819,7 @@ int len, ndx; } *outstr++= '\0'; if (orig!=name) - _XkbFree(orig); + xfree(orig); return name; } @@ -860,15 +852,13 @@ XkbRF_GetComponents( XkbRF_RulesPtr rules, names->compat= XkbRF_SubstituteVars(names->compat, &mdefs); if (names->geometry) names->geometry= XkbRF_SubstituteVars(names->geometry, &mdefs); - if (names->keymap) - names->keymap= XkbRF_SubstituteVars(names->keymap, &mdefs); FreeMultiDefs(&mdefs); return (names->keycodes && names->symbols && names->types && - names->compat && names->geometry ) || names->keymap; + names->compat && names->geometry); } -XkbRF_RulePtr +static XkbRF_RulePtr XkbRF_AddRule(XkbRF_RulesPtr rules) { if (rules->sz_rules<1) { @@ -890,7 +880,7 @@ XkbRF_AddRule(XkbRF_RulesPtr rules) return &rules->rules[rules->num_rules++]; } -XkbRF_GroupPtr +static XkbRF_GroupPtr XkbRF_AddGroup(XkbRF_RulesPtr rules) { if (rules->sz_groups<1) { @@ -979,274 +969,14 @@ Bool ok; /***====================================================================***/ -#define HEAD_NONE 0 -#define HEAD_MODEL 1 -#define HEAD_LAYOUT 2 -#define HEAD_VARIANT 3 -#define HEAD_OPTION 4 -#define HEAD_EXTRA 5 - -XkbRF_VarDescPtr -XkbRF_AddVarDesc(XkbRF_DescribeVarsPtr vars) -{ - if (vars->sz_desc<1) { - vars->sz_desc= 16; - vars->num_desc= 0; - vars->desc= _XkbTypedCalloc(vars->sz_desc,XkbRF_VarDescRec); - } - else if (vars->num_desc>=vars->sz_desc) { - vars->sz_desc*= 2; - vars->desc= _XkbTypedRealloc(vars->desc,vars->sz_desc,XkbRF_VarDescRec); - } - if (!vars->desc) { - vars->sz_desc= vars->num_desc= 0; - DebugF("Allocation failure in XkbRF_AddVarDesc\n"); - return NULL; - } - vars->desc[vars->num_desc].name= NULL; - vars->desc[vars->num_desc].desc= NULL; - return &vars->desc[vars->num_desc++]; -} - -XkbRF_VarDescPtr -XkbRF_AddVarDescCopy(XkbRF_DescribeVarsPtr vars,XkbRF_VarDescPtr from) -{ -XkbRF_VarDescPtr nd; - - if ((nd=XkbRF_AddVarDesc(vars))!=NULL) { - nd->name= _XkbDupString(from->name); - nd->desc= _XkbDupString(from->desc); - } - return nd; -} - -XkbRF_DescribeVarsPtr -XkbRF_AddVarToDescribe(XkbRF_RulesPtr rules,char *name) -{ - if (rules->sz_extra<1) { - rules->num_extra= 0; - rules->sz_extra= 1; - rules->extra_names= _XkbTypedCalloc(rules->sz_extra,char *); - rules->extra= _XkbTypedCalloc(rules->sz_extra, XkbRF_DescribeVarsRec); - } - else if (rules->num_extra>=rules->sz_extra) { - rules->sz_extra*= 2; - rules->extra_names= _XkbTypedRealloc(rules->extra_names,rules->sz_extra, - char *); - rules->extra=_XkbTypedRealloc(rules->extra, rules->sz_extra, - XkbRF_DescribeVarsRec); - } - if ((!rules->extra_names)||(!rules->extra)) { - DebugF("allocation error in extra parts\n"); - rules->sz_extra= rules->num_extra= 0; - rules->extra_names= NULL; - rules->extra= NULL; - return NULL; - } - rules->extra_names[rules->num_extra]= _XkbDupString(name); - bzero(&rules->extra[rules->num_extra],sizeof(XkbRF_DescribeVarsRec)); - return &rules->extra[rules->num_extra++]; -} - -Bool -XkbRF_LoadDescriptions(FILE *file,XkbRF_RulesPtr rules) -{ -InputLine line; -XkbRF_VarDescRec tmp; -char *tok; -int len,headingtype,extra_ndx = 0; - - bzero((char *)&tmp, sizeof(XkbRF_VarDescRec)); - headingtype = HEAD_NONE; - InitInputLine(&line); - for ( ; GetInputLine(file,&line,False); line.num_line= 0) { - if (line.line[0]=='!') { - tok = strtok(&(line.line[1]), " \t"); - if (strcasecmp(tok,"model") == 0) - headingtype = HEAD_MODEL; - else if (strcasecmp(tok,"layout") == 0) - headingtype = HEAD_LAYOUT; - else if (strcasecmp(tok,"variant") == 0) - headingtype = HEAD_VARIANT; - else if (strcasecmp(tok,"option") == 0) - headingtype = HEAD_OPTION; - else { - int i; - headingtype = HEAD_EXTRA; - extra_ndx= -1; - for (i=0;(inum_extra)&&(extra_ndx<0);i++) { - if (!strcasecmp(tok,rules->extra_names[i])) - extra_ndx= i; - } - if (extra_ndx<0) { - XkbRF_DescribeVarsPtr var; - DebugF("Extra heading \"%s\" encountered\n",tok); - var= XkbRF_AddVarToDescribe(rules,tok); - if (var) - extra_ndx= var-rules->extra; - else headingtype= HEAD_NONE; - } - } - continue; - } - - if (headingtype == HEAD_NONE) { - DebugF("Must have a heading before first line of data\n"); - DebugF("Illegal line of data ignored\n"); - continue; - } - - len = strlen(line.line); - if ((tmp.name= strtok(line.line, " \t")) == NULL) { - DebugF("Huh? No token on line\n"); - DebugF("Illegal line of data ignored\n"); - continue; - } - if (strlen(tmp.name) == len) { - DebugF("No description found\n"); - DebugF("Illegal line of data ignored\n"); - continue; - } - - tok = line.line + strlen(tmp.name) + 1; - while ((*tok!='\n')&&isspace(*tok)) - tok++; - if (*tok == '\0') { - DebugF("No description found\n"); - DebugF("Illegal line of data ignored\n"); - continue; - } - tmp.desc= tok; - switch (headingtype) { - case HEAD_MODEL: - XkbRF_AddVarDescCopy(&rules->models,&tmp); - break; - case HEAD_LAYOUT: - XkbRF_AddVarDescCopy(&rules->layouts,&tmp); - break; - case HEAD_VARIANT: - XkbRF_AddVarDescCopy(&rules->variants,&tmp); - break; - case HEAD_OPTION: - XkbRF_AddVarDescCopy(&rules->options,&tmp); - break; - case HEAD_EXTRA: - XkbRF_AddVarDescCopy(&rules->extra[extra_ndx],&tmp); - break; - } - } - FreeInputLine(&line); - if ((rules->models.num_desc==0) && (rules->layouts.num_desc==0) && - (rules->variants.num_desc==0) && (rules->options.num_desc==0) && - (rules->num_extra==0)) { - return False; - } - return True; -} - -Bool -XkbRF_LoadDescriptionsByName(char *base,char *locale,XkbRF_RulesPtr rules) -{ -FILE * file; -char buf[PATH_MAX]; -Bool ok; - - if ((!base)||(!rules)) - return False; - if (locale) { - if (strlen(base)+strlen(locale)+6 > PATH_MAX) - return False; - sprintf(buf,"%s-%s.lst", base, locale); - } - else { - if (strlen(base)+5 > PATH_MAX) - return False; - sprintf(buf,"%s.lst", base); - } - - file= fopen(buf, "r"); - if ((!file)&&(locale)) { /* fallback if locale was specified */ - sprintf(buf,"%s.lst", base); - - file= fopen(buf, "r"); - } - if (!file) - return False; - ok= XkbRF_LoadDescriptions(file,rules); - fclose(file); - return ok; -} - -/***====================================================================***/ - -XkbRF_RulesPtr -XkbRF_Load(char *base,char *locale,Bool wantDesc,Bool wantRules) -{ -XkbRF_RulesPtr rules; - - if ((!base)||((!wantDesc)&&(!wantRules))) - return NULL; - if ((rules=_XkbTypedCalloc(1,XkbRF_RulesRec))==NULL) - return NULL; - if (wantDesc&&(!XkbRF_LoadDescriptionsByName(base,locale,rules))) { - XkbRF_Free(rules,True); - return NULL; - } - if (wantRules&&(!XkbRF_LoadRulesByName(base,locale,rules))) { - XkbRF_Free(rules,True); - return NULL; - } - return rules; -} - XkbRF_RulesPtr -XkbRF_Create(int szRules,int szExtra) +XkbRF_Create(void) { -XkbRF_RulesPtr rules; - - if ((rules=_XkbTypedCalloc(1,XkbRF_RulesRec))==NULL) - return NULL; - if (szRules>0) { - rules->sz_rules= szRules; - rules->rules= _XkbTypedCalloc(rules->sz_rules,XkbRF_RuleRec); - if (!rules->rules) { - _XkbFree(rules); - return NULL; - } - } - if (szExtra>0) { - rules->sz_extra= szExtra; - rules->extra= _XkbTypedCalloc(rules->sz_extra,XkbRF_DescribeVarsRec); - if (!rules->extra) { - if (rules->rules) - _XkbFree(rules->rules); - _XkbFree(rules); - return NULL; - } - } - return rules; + return _XkbTypedCalloc(1, XkbRF_RulesRec); } /***====================================================================***/ -static void -XkbRF_ClearVarDescriptions(XkbRF_DescribeVarsPtr var) -{ -register int i; - - for (i=0;inum_desc;i++) { - if (var->desc[i].name) - _XkbFree(var->desc[i].name); - if (var->desc[i].desc) - _XkbFree(var->desc[i].desc); - var->desc[i].name= var->desc[i].desc= NULL; - } - if (var->desc) - _XkbFree(var->desc); - var->desc= NULL; - return; -} - void XkbRF_Free(XkbRF_RulesPtr rules,Bool freeRules) { @@ -1256,46 +986,34 @@ XkbRF_GroupPtr group; if (!rules) return; - XkbRF_ClearVarDescriptions(&rules->models); - XkbRF_ClearVarDescriptions(&rules->layouts); - XkbRF_ClearVarDescriptions(&rules->variants); - XkbRF_ClearVarDescriptions(&rules->options); - if (rules->extra) { - for (i = 0; i < rules->num_extra; i++) { - XkbRF_ClearVarDescriptions(&rules->extra[i]); - } - _XkbFree(rules->extra); - rules->num_extra= rules->sz_extra= 0; - rules->extra= NULL; - } if (rules->rules) { for (i=0,rule=rules->rules;inum_rules;i++,rule++) { - if (rule->model) _XkbFree(rule->model); - if (rule->layout) _XkbFree(rule->layout); - if (rule->variant) _XkbFree(rule->variant); - if (rule->option) _XkbFree(rule->option); - if (rule->keycodes) _XkbFree(rule->keycodes); - if (rule->symbols) _XkbFree(rule->symbols); - if (rule->types) _XkbFree(rule->types); - if (rule->compat) _XkbFree(rule->compat); - if (rule->geometry) _XkbFree(rule->geometry); + if (rule->model) xfree(rule->model); + if (rule->layout) xfree(rule->layout); + if (rule->variant) xfree(rule->variant); + if (rule->option) xfree(rule->option); + if (rule->keycodes) xfree(rule->keycodes); + if (rule->symbols) xfree(rule->symbols); + if (rule->types) xfree(rule->types); + if (rule->compat) xfree(rule->compat); + if (rule->geometry) xfree(rule->geometry); bzero((char *)rule,sizeof(XkbRF_RuleRec)); } - _XkbFree(rules->rules); + xfree(rules->rules); rules->num_rules= rules->sz_rules= 0; rules->rules= NULL; } if (rules->groups) { for (i=0, group=rules->groups;inum_groups;i++,group++) { - if (group->name) _XkbFree(group->name); - if (group->words) _XkbFree(group->words); + if (group->name) xfree(group->name); + if (group->words) xfree(group->words); } - _XkbFree(rules->groups); + xfree(rules->groups); rules->num_groups= 0; rules->groups= NULL; } if (freeRules) - _XkbFree(rules); + xfree(rules); return; } diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c index 4ff2d5fef..0b54a2ec9 100644 --- a/xorg-server/xkb/xkb.c +++ b/xorg-server/xkb/xkb.c @@ -30,8 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#define NEED_EVENTS -#define NEED_REPLIES #include #include "misc.h" #include "inputstr.h" @@ -42,12 +40,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xkb.h" #include +#include - int XkbEventBase; +int XkbEventBase; static int XkbErrorBase; - int XkbReqCode; - int XkbKeyboardErrorCode; -CARD32 xkbDebugFlags = 0; +int XkbReqCode; +int XkbKeyboardErrorCode; +CARD32 xkbDebugFlags = 0; static CARD32 xkbDebugCtrls = 0; static RESTYPE RT_XKBCLIENT; @@ -181,6 +180,7 @@ ProcXkbUseExtension(ClientPtr client) stuff->wantedMajor,stuff->wantedMinor, XkbMajorVersion,XkbMinorVersion); } + memset(&rep, 0, sizeof(xkbUseExtensionReply)); rep.type = X_Reply; rep.supported = supported; rep.length = 0; @@ -522,7 +522,7 @@ ProcXkbBell(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixBellAccess); if (rc == Success) @@ -561,7 +561,7 @@ ProcXkbGetState(ClientPtr client) rep.sequenceNumber= client->sequence; rep.length = 0; rep.deviceID = dev->id; - rep.mods = dev->key->state&0xff; + rep.mods = XkbStateFieldFromRec(xkb) & 0xff; rep.baseMods = xkb->base_mods; rep.lockedMods = xkb->locked_mods; rep.latchedMods = xkb->latched_mods; @@ -605,9 +605,8 @@ ProcXkbLatchLockState(ClientPtr client) status = Success; for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { - if ((dev == inputInfo.keyboard && tmpd->key && tmpd->coreEvents) || - tmpd == dev) { - if (!tmpd->key->xkbInfo) + if ((tmpd == dev) || (!IsMaster(tmpd) && tmpd->u.master == dev)) { + if (!tmpd->key || !tmpd->key->xkbInfo) continue; oldState = tmpd->key->xkbInfo->state; @@ -628,7 +627,6 @@ ProcXkbLatchLockState(ClientPtr client) return status; XkbComputeDerivedState(tmpd->key->xkbInfo); - tmpd->key->state = XkbStateFieldFromRec(newState); changed = XkbStateChangedFlags(&oldState, newState); if (changed) { @@ -670,8 +668,8 @@ ProcXkbGetControls(ClientPtr client) xkb = dev->key->xkbInfo->desc->ctrls; rep.type = X_Reply; - rep.length = (SIZEOF(xkbGetControlsReply)- - SIZEOF(xGenericReply)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xkbGetControlsReply)- + SIZEOF(xGenericReply)); rep.sequenceNumber = client->sequence; rep.deviceID = ((DeviceIntPtr)dev)->id; rep.numGroups = xkb->num_groups; @@ -746,10 +744,10 @@ ProcXkbSetControls(ClientPtr client) CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask); - for (tmpd = inputInfo.keyboard; tmpd; tmpd = tmpd->next) { - if ((dev == inputInfo.keyboard && tmpd->key && tmpd->coreEvents) || - tmpd == dev) { - + for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { + if (!tmpd->key || !tmpd->key->xkbInfo) + continue; + if ((tmpd == dev) || (!IsMaster(tmpd) && tmpd->u.master == dev)) { xkbi = tmpd->key->xkbInfo; ctrl = xkbi->desc->ctrls; new = *ctrl; @@ -1366,7 +1364,7 @@ unsigned i,len; char *desc,*start; len= (rep->length*4)-(SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply)); - start= desc= (char *)xalloc(len); + start= desc= xcalloc(1, len); if (!start) return BadAlloc; if ( rep->nTypes>0 ) @@ -2187,8 +2185,8 @@ unsigned first,last; if (maxRG>(int)xkbi->nRadioGroups) { int sz = maxRG*sizeof(XkbRadioGroupRec); if (xkbi->radioGroups) - xkbi->radioGroups=(XkbRadioGroupPtr)_XkbRealloc(xkbi->radioGroups,sz); - else xkbi->radioGroups= (XkbRadioGroupPtr)_XkbCalloc(1, sz); + xkbi->radioGroups= xrealloc(xkbi->radioGroups,sz); + else xkbi->radioGroups= xcalloc(1, sz); if (xkbi->radioGroups) { if (xkbi->nRadioGroups) bzero(&xkbi->radioGroups[xkbi->nRadioGroups], @@ -2522,7 +2520,6 @@ _XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char *values) if (!sentNKN) XkbSendNotification(dev,&change,&cause); - XkbUpdateCoreDescription(dev,False); return Success; allocFailure: return BadAlloc; @@ -2560,7 +2557,7 @@ ProcXkbSetMap(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -2583,7 +2580,7 @@ ProcXkbSetMap(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -2631,7 +2628,7 @@ int size; size= rep->length*4; if (size>0) { - data = (char *)xalloc(size); + data = xalloc(size); if (data) { register unsigned i,bit; xkbModsWireDesc * grp; @@ -2859,7 +2856,6 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev, &cause); if (check) XkbCheckSecondaryEffects(xkbi,check,&change,&cause); - XkbUpdateCoreDescription(dev,False); XkbSendNotification(dev,&change,&cause); } return Success; @@ -2891,7 +2887,7 @@ ProcXkbSetCompatMap(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -2914,7 +2910,7 @@ ProcXkbSetCompatMap(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -2999,7 +2995,7 @@ register unsigned bit; length = rep->length*4; if (length>0) { CARD8 *to; - to= map= (CARD8 *)xalloc(length); + to= map= xalloc(length); if (map) { xkbIndicatorMapWireDesc *wire = (xkbIndicatorMapWireDesc *)to; for (i=0,bit=1;inext) { - if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess); if (rc == Success) @@ -3437,7 +3433,7 @@ ProcXkbSetNamedIndicator(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && !other->isMaster && (other->u.master == dev) && + if ((other != dev) && !IsMaster(other) && (other->u.master == dev) && (other->kbdfeed || other->leds) && (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success)) { @@ -3461,7 +3457,7 @@ ProcXkbSetNamedIndicator(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && !other->isMaster && (other->u.master == dev) && + if ((other != dev) && !IsMaster(other) && (other->u.master == dev) && (other->kbdfeed || other->leds) && (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success)) { @@ -3635,7 +3631,7 @@ register int n; swapl(&rep->indicators,n); } - start = desc = (char *)xalloc(length); + start = desc = xalloc(length); if ( !start ) return BadAlloc; if (xkb->names) { @@ -3780,6 +3776,7 @@ ProcXkbGetNames(ClientPtr client) CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask); xkb = dev->key->xkbInfo->desc; + memset(&rep, 0, sizeof(xkbGetNamesReply)); rep.type= X_Reply; rep.sequenceNumber= client->sequence; rep.length = 0; @@ -3860,7 +3857,7 @@ register int i,bit; static Bool _XkbCheckTypeName(Atom name,int typeNdx) { -char * str; +const char * str; str= NameForAtom(name); if ((strcmp(str,"ONE_LEVEL")==0)||(strcmp(str,"TWO_LEVEL")==0)|| @@ -4120,7 +4117,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff) tmp+= stuff->nKeyAliases*2; } else if (names->key_aliases!=NULL) { - _XkbFree(names->key_aliases); + xfree(names->key_aliases); names->key_aliases= NULL; names->num_key_aliases= 0; } @@ -4139,7 +4136,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff) tmp+= stuff->nRadioGroups; } else if (names->radio_groups) { - _XkbFree(names->radio_groups); + xfree(names->radio_groups); names->radio_groups= NULL; names->num_rg= 0; } @@ -4251,7 +4248,7 @@ ProcXkbSetNames(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); @@ -4276,7 +4273,7 @@ ProcXkbSetNames(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); @@ -4739,7 +4736,7 @@ XkbSendGeometry( ClientPtr client, if (geom!=NULL) { len= rep->length*4; - start= desc= (char *)xalloc(len); + start= desc= xalloc(len); if (!start) return BadAlloc; desc= XkbWriteCountedString(desc,geom->label_font,client->swapped); @@ -4833,7 +4830,7 @@ CARD16 len,*plen; swaps(plen,n); } len= *plen; - str= (char *)_XkbAlloc(len+1); + str= xalloc(len+1); if (str) { memcpy(str,&wire[2],len); str[len]= '\0'; @@ -5327,7 +5324,7 @@ ProcXkbSetGeometry(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -5360,6 +5357,7 @@ ProcXkbPerClientFlags(ClientPtr client) CHK_MASK_MATCH(0x02,stuff->change,stuff->value); interest = XkbFindClientResource((DevicePtr)dev,client); + memset(&rep, 0, sizeof(xkbPerClientFlagsReply)); rep.type= X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -5447,7 +5445,7 @@ unsigned char *wire,*str,*tmp,*legal; wire= *pWire; len= (*(unsigned char *)wire++); if (len>0) { - str= (unsigned char *)_XkbCalloc(1, len+1); + str= xcalloc(1, len+1); if (str) { tmp= str; for (i=0;imaxNames; - list.pattern[_XkbListKeymaps]= GetComponentSpec(&str,False,&status); list.pattern[_XkbListKeycodes]= GetComponentSpec(&str,False,&status); list.pattern[_XkbListTypes]= GetComponentSpec(&str,False,&status); list.pattern[_XkbListCompat]= GetComponentSpec(&str,False,&status); @@ -5510,7 +5507,7 @@ ProcXkbListComponents(ClientPtr client) return BadLength; if ((status=XkbDDXList(dev,&list,client))!=Success) { if (list.pool) { - _XkbFree(list.pool); + xfree(list.pool); list.pool= NULL; } return status; @@ -5520,7 +5517,7 @@ ProcXkbListComponents(ClientPtr client) rep.deviceID = dev->id; rep.sequenceNumber = client->sequence; rep.length = XkbPaddedSize(list.nPool)/4; - rep.nKeymaps = list.nFound[_XkbListKeymaps]; + rep.nKeymaps = 0; rep.nKeycodes = list.nFound[_XkbListKeycodes]; rep.nTypes = list.nFound[_XkbListTypes]; rep.nCompatMaps = list.nFound[_XkbListCompat]; @@ -5544,7 +5541,7 @@ ProcXkbListComponents(ClientPtr client) WriteToClient(client,SIZEOF(xkbListComponentsReply),(char *)&rep); if (list.nPool && list.pool) { WriteToClient(client,XkbPaddedSize(list.nPool), (char *)list.pool); - _XkbFree(list.pool); + xfree(list.pool); list.pool= NULL; } return client->noClientException; @@ -5586,7 +5583,8 @@ ProcXkbGetKbdByName(ClientPtr client) xkb = dev->key->xkbInfo->desc; status= Success; str= (unsigned char *)&stuff[1]; - names.keymap= GetComponentSpec(&str,True,&status); + if (GetComponentSpec(&str,True,&status)) /* keymap, unsupported */ + return BadMatch; names.keycodes= GetComponentSpec(&str,True,&status); names.types= GetComponentSpec(&str,True,&status); names.compat= GetComponentSpec(&str,True,&status); @@ -5840,16 +5838,9 @@ ProcXkbGetKbdByName(ClientPtr client) xkb->ctrls->num_groups= nTG; for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { - if (tmpd == dev || - (dev->id == inputInfo.keyboard->id && tmpd->key && - tmpd->coreEvents)) { - - memcpy(tmpd->key->modifierMap, xkb->map->modmap, - xkb->max_key_code + 1); + if ((tmpd == dev) || (!IsMaster(tmpd) && tmpd->u.master == dev)) { if (tmpd != dev) - XkbCopyKeymap(dev->key->xkbInfo->desc, - tmpd->key->xkbInfo->desc, True); - XkbUpdateCoreDescription(tmpd, True); + XkbCopyDeviceKeymap(tmpd, dev); if (tmpd->kbdfeed && tmpd->kbdfeed->xkb_sli) { old_sli = tmpd->kbdfeed->xkb_sli; @@ -5865,8 +5856,6 @@ ProcXkbGetKbdByName(ClientPtr client) } } - /* this should be either a MN or an NKN, depending on whether or not - * the keycode range changed? */ nkn.deviceID= nkn.oldDeviceID= dev->id; nkn.minKeyCode= new->min_key_code; nkn.maxKeyCode= new->max_key_code; @@ -5878,17 +5867,26 @@ ProcXkbGetKbdByName(ClientPtr client) if (geom_changed) nkn.changed|= XkbNKN_GeometryMask; XkbSendNewKeyboardNotify(dev,&nkn); + + if (!IsMaster(dev) && dev->u.master) + { + DeviceIntPtr master = dev->u.master; + if (master->u.lastSlave == dev) + { + XkbCopyDeviceKeymap(dev->u.master, dev); + XkbSendNewKeyboardNotify(dev,&nkn); + } + } } if ((new!=NULL)&&(new!=xkb)) { XkbFreeKeyboard(new,XkbAllComponentsMask,True); new= NULL; } - if (names.keymap) { _XkbFree(names.keymap); names.keymap= NULL; } - if (names.keycodes) { _XkbFree(names.keycodes); names.keycodes= NULL; } - if (names.types) { _XkbFree(names.types); names.types= NULL; } - if (names.compat) { _XkbFree(names.compat); names.compat= NULL; } - if (names.symbols) { _XkbFree(names.symbols); names.symbols= NULL; } - if (names.geometry) { _XkbFree(names.geometry); names.geometry= NULL; } + if (names.keycodes) { xfree(names.keycodes); names.keycodes= NULL; } + if (names.types) { xfree(names.types); names.types= NULL; } + if (names.compat) { xfree(names.compat); names.compat= NULL; } + if (names.symbols) { xfree(names.symbols); names.symbols= NULL; } + if (names.geometry) { xfree(names.geometry); names.geometry= NULL; } return client->noClientException; } @@ -5974,10 +5972,8 @@ Bool classOk; } } if (nFBs>0) { - if (rep->supported&XkbXI_IndicatorsMask) { - rep->nDeviceLedFBs= nFBs; - rep->length+= (length/4); - } + rep->nDeviceLedFBs= nFBs; + rep->length+= (length/4); return Success; } if (classOk) client->errorValue= _XkbErrCode2(XkbErr_BadId,id); @@ -6101,7 +6097,7 @@ xkbGetDeviceInfoReply rep; int status,nDeviceLedFBs; unsigned length,nameLen; CARD16 ledClass,ledID; -unsigned wanted,supported; +unsigned wanted; char * str; REQUEST(xkbGetDeviceInfoReq); @@ -6134,7 +6130,7 @@ char * str; if (dev->button) rep.totalBtns= dev->button->numButtons; else rep.totalBtns= 0; - rep.devType= dev->type; + rep.devType= dev->xinput_type; rep.hasOwnState= (dev->key && dev->key->xkbInfo); rep.nDeviceLedFBs = 0; if (dev->kbdfeed) rep.dfltKbdFB= dev->kbdfeed->ctrl.id; @@ -6192,7 +6188,6 @@ char * str; return status; } length= rep.length*4; - supported= rep.supported; nDeviceLedFBs = rep.nDeviceLedFBs; if (client->swapped) { register int n; @@ -6206,7 +6201,7 @@ char * str; } WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep); - str= (char*) xalloc(nameLen); + str= xalloc(nameLen); if (!str) return BadAlloc; XkbWriteCountedString(str,dev->name,client->swapped); @@ -6232,19 +6227,6 @@ char * str; ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length); return BadLength; } - if (stuff->wanted&(~supported)) { - xkbExtensionDeviceNotify ed; - bzero((char *)&ed,SIZEOF(xkbExtensionDeviceNotify)); - ed.ledClass= ledClass; - ed.ledID= ledID; - ed.ledsDefined= 0; - ed.ledState= 0; - ed.firstBtn= ed.nBtns= 0; - ed.reason= XkbXI_UnsupportedFeatureMask; - ed.supported= supported; - ed.unsupported= stuff->wanted&(~supported); - XkbSendExtensionDeviceNotify(dev,client,&ed); - } return client->noClientException; } @@ -6530,7 +6512,7 @@ ProcXkbSetDeviceInfo(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if (((other != dev) && !other->isMaster && (other->u.master == dev)) && + if (((other != dev) && !IsMaster(other) && (other->u.master == dev)) && ((stuff->deviceSpec == XkbUseCoreKbd && other->key) || (stuff->deviceSpec == XkbUseCorePtr && other->button))) { @@ -6555,7 +6537,7 @@ ProcXkbSetDeviceInfo(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if (((other != dev) && !other->isMaster && (other->u.master == dev)) && + if (((other != dev) && !IsMaster(other) && (other->u.master == dev)) && ((stuff->deviceSpec == XkbUseCoreKbd && other->key) || (stuff->deviceSpec == XkbUseCorePtr && other->button))) { @@ -6617,8 +6599,6 @@ int rc; xkbDebugFlags = newFlags; xkbDebugCtrls = newCtrls; - XkbDisableLockActions= (xkbDebugCtrls&XkbDF_DisableLocks); - rep.type= X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; diff --git a/xorg-server/xkb/xkb.h b/xorg-server/xkb/xkb.h index bc6c6c954..a526356a9 100644 --- a/xorg-server/xkb/xkb.h +++ b/xorg-server/xkb/xkb.h @@ -29,12 +29,4 @@ extern int ProcXkbSetDeviceInfo(ClientPtr client); extern int ProcXkbSetDebuggingFlags(ClientPtr client); extern void XkbExtensionInit(void); - -extern Bool XkbFilterEvents(ClientPtr pClient, int nEvents, xEvent *xE); - -extern Bool XkbCopyKeymap( - XkbDescPtr src, - XkbDescPtr dst, - Bool sendNotifies); - #endif diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c index 2baa70d7a..47023c048 100644 --- a/xorg-server/xkb/xkbAccessX.c +++ b/xorg-server/xkb/xkbAccessX.c @@ -30,19 +30,20 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#define NEED_EVENTS 1 #include #include #include +#include "exglobals.h" +#include #include "inputstr.h" +#include "eventstr.h" #include #if !defined(WIN32) #include #endif -_X_EXPORT int XkbDfltRepeatDelay= 660; -_X_EXPORT int XkbDfltRepeatInterval= 40; -pointer XkbLastRepeatEvent= NULL; +int XkbDfltRepeatDelay= 660; +int XkbDfltRepeatInterval= 40; #define DFLT_TIMEOUT_CTRLS (XkbAX_KRGMask|XkbStickyKeysMask|XkbMouseKeysMask) #define DFLT_TIMEOUT_OPTS (XkbAX_IndicatorFBMask) @@ -118,27 +119,26 @@ XkbControlsPtr ctrls = xkbi->desc->ctrls; /************************************************************************/ static void AccessXKeyboardEvent(DeviceIntPtr keybd, - BYTE type, + int type, BYTE keyCode, Bool isRepeat) { -xEvent xE; - - xE.u.u.type = type; - xE.u.u.detail = keyCode; - xE.u.keyButtonPointer.time = GetTimeInMillis(); + DeviceEvent event; + memset(&event, 0, sizeof(DeviceEvent)); + event.header = ET_Internal; + event.type = type; + event.detail.key = keyCode; + event.time = GetTimeInMillis(); + event.length = sizeof(DeviceEvent); + event.key_repeat = isRepeat; + if (xkbDebugFlags&0x8) { - DebugF("[xkb] AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up")); + DebugF("[xkb] AXKE: Key %d %s\n", keyCode, + (event.type == ET_KeyPress ? "down" : "up")); } - if (_XkbIsPressEvent(type)) - XkbDDXKeyClick(keybd,keyCode,TRUE); - else if (isRepeat) - XkbLastRepeatEvent= (pointer)&xE; - XkbProcessKeyboardEvent(&xE,keybd,1L); - XkbLastRepeatEvent= NULL; + XkbProcessKeyboardEvent(&event, keybd); return; - } /* AccessXKeyboardEvent */ /************************************************************************/ @@ -305,14 +305,11 @@ AccessXRepeatKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg) { DeviceIntPtr dev = (DeviceIntPtr) arg; XkbSrvInfoPtr xkbi = dev->key->xkbInfo; -KeyCode key; if (xkbi->repeatKey == 0) return 0; - key = xkbi->repeatKey; - AccessXKeyboardEvent(dev, DeviceKeyRelease, key, True); - AccessXKeyboardEvent(dev, DeviceKeyPress, key, True); + AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey, True); return xkbi->desc->ctrls->repeat_interval; } @@ -347,7 +344,7 @@ XkbControlsPtr ctrls; XkbSendAccessXNotify(keybd,&ev); if (XkbAX_NeedFeedback(ctrls,XkbAX_SKAcceptFBMask)) XkbDDXAccessXBeep(keybd,_BEEP_SLOW_ACCEPT,XkbSlowKeysMask); - AccessXKeyboardEvent(keybd,DeviceKeyPress,xkbi->slowKey,False); + AccessXKeyboardEvent(keybd, ET_KeyPress,xkbi->slowKey,False); /* check for magic sequences */ if ((ctrls->enabled_ctrls&XkbAccessXKeysMask) && ((sym[0]==XK_Shift_R)||(sym[0]==XK_Shift_L))) @@ -443,14 +440,13 @@ XkbSrvLedInfoPtr sli; /* */ /************************************************************************/ Bool -AccessXFilterPressEvent( register xEvent * xE, - register DeviceIntPtr keybd, - int count) +AccessXFilterPressEvent( DeviceEvent* event, + DeviceIntPtr keybd) { XkbSrvInfoPtr xkbi = keybd->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; Bool ignoreKeyEvent = FALSE; -KeyCode key = xE->u.u.detail; +KeyCode key = event->detail.key; KeySym * sym = XkbKeySymsPtr(xkbi->desc,key); if (ctrls->enabled_ctrls&XkbAccessXKeysMask) { @@ -556,7 +552,7 @@ KeySym * sym = XkbKeySymsPtr(xkbi->desc,key); } if (!ignoreKeyEvent) - XkbProcessKeyboardEvent(xE,keybd,count); + XkbProcessKeyboardEvent(event, keybd); return ignoreKeyEvent; } /* AccessXFilterPressEvent */ @@ -573,13 +569,12 @@ KeySym * sym = XkbKeySymsPtr(xkbi->desc,key); /* */ /************************************************************************/ Bool -AccessXFilterReleaseEvent( register xEvent * xE, - register DeviceIntPtr keybd, - int count) +AccessXFilterReleaseEvent( DeviceEvent* event, + DeviceIntPtr keybd) { XkbSrvInfoPtr xkbi = keybd->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; -KeyCode key = xE->u.u.detail; +KeyCode key = event->detail.key; Bool ignoreKeyEvent = FALSE; /* Don't transmit the KeyRelease if BounceKeys is on and @@ -605,7 +600,7 @@ Bool ignoreKeyEvent = FALSE; ev.keycode= key; ev.slowKeysDelay= ctrls->slow_keys_delay; ev.debounceDelay= ctrls->debounce_delay; - if (BitIsOn(keybd->key->down,key) | (xkbi->mouseKey == key)) { + if (BitIsOn(keybd->key->down,key) || (xkbi->mouseKey == key)) { ev.detail= XkbAXN_SKRelease; beep_type= _BEEP_SLOW_RELEASE; } @@ -665,7 +660,7 @@ Bool ignoreKeyEvent = FALSE; } if (!ignoreKeyEvent) - XkbProcessKeyboardEvent(xE,keybd,count); + XkbProcessKeyboardEvent(event, keybd); return ignoreKeyEvent; } /* AccessXFilterReleaseEvent */ @@ -683,24 +678,31 @@ Bool ignoreKeyEvent = FALSE; extern int xkbDevicePrivateIndex; extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer); void -ProcessPointerEvent( register xEvent * xE, - register DeviceIntPtr mouse, - int count) +ProcessPointerEvent( InternalEvent *ev, + DeviceIntPtr mouse) { -DeviceIntPtr dev = GetPairedDevice(mouse); -XkbSrvInfoPtr xkbi = dev->key->xkbInfo; +DeviceIntPtr dev; +XkbSrvInfoPtr xkbi = NULL; unsigned changed = 0; ProcessInputProc backupproc; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); +DeviceEvent *event = (DeviceEvent*)ev; - xkbi->shiftKeyCount = 0; - xkbi->lastPtrEventTime= xE->u.keyButtonPointer.time; + dev = (IsMaster(mouse) || mouse->u.master) ? GetMaster(mouse, MASTER_KEYBOARD) : mouse; - if (xE->u.u.type==ButtonPress) { + if (dev && dev->key) + { + xkbi = dev->key->xkbInfo; + xkbi->shiftKeyCount = 0; + xkbi->lastPtrEventTime= event->time; + } + + if (event->type == ET_ButtonPress) { changed |= XkbPointerButtonMask; } - else if (xE->u.u.type==ButtonRelease) { - xkbi->lockedPtrButtons&= ~(1<<(xE->u.u.detail&0x7)); + else if (event->type == ET_ButtonRelease) { + if (xkbi) + xkbi->lockedPtrButtons&= ~(1 << (event->detail.key & 0x7)); changed |= XkbPointerButtonMask; } @@ -719,15 +721,19 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); * * see. it's still steaming. told you. (whot) */ + UNWRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc); - mouse->public.processInputProc(xE, mouse, count); + mouse->public.processInputProc(ev, mouse); COND_WRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc, xkbUnwrapProc); - xkbi->state.ptr_buttons = mouse->button->state; + if (!xkbi) + return; + + xkbi->state.ptr_buttons = (mouse->button) ? mouse->button->state : 0; /* clear any latched modifiers */ - if ( xkbi->state.latched_mods && (xE->u.u.type==ButtonRelease) ) { + if ( xkbi->state.latched_mods && (event->type == ET_ButtonRelease) ) { unsigned changed_leds; XkbStateRec oldState; XkbSrvLedInfoPtr sli; @@ -742,17 +748,16 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); changed_leds= XkbIndicatorsToUpdate(dev,changed,False); if (changed_leds) { XkbEventCauseRec cause; - XkbSetCauseKey(&cause,(xE->u.u.detail&0x7),xE->u.u.type); + XkbSetCauseKey(&cause,(event->detail.key & 0x7), event->type); XkbUpdateIndicators(dev,changed_leds,True,NULL,&cause); } } - dev->key->state= XkbStateFieldFromRec(&xkbi->state); } if (((xkbi->flags&_XkbStateNotifyInProgress)==0)&&(changed!=0)) { xkbStateNotify sn; - sn.keycode= xE->u.u.detail; - sn.eventType= xE->u.u.type; + sn.keycode= event->detail.key; + sn.eventType= event->type; sn.requestMajor = sn.requestMinor = 0; sn.changed= changed; XkbSendStateNotify(dev,&sn); diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c index aea479cd1..9c3184a83 100644 --- a/xorg-server/xkb/xkbActions.c +++ b/xorg-server/xkb/xkbActions.c @@ -30,13 +30,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#define NEED_EVENTS 1 #include #include #include #include "misc.h" #include "inputstr.h" #include "exevents.h" +#include "eventstr.h" #include #include "xkb.h" #include @@ -75,12 +75,6 @@ XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc) WRAP_PROCESS_INPUT_PROC(device, xkbPrivPtr, proc, xkbUnwrapProc); } -extern void ProcessOtherEvent( - xEvent * /* xE */, - DeviceIntPtr /* dev */, - int /* count */ -); - /***====================================================================***/ static XkbAction @@ -92,41 +86,6 @@ static XkbAction fake; fake.type = XkbSA_NoAction; return fake; } - if (XkbDisableLockActions) { - switch (act->type) { - case XkbSA_LockMods: - fake.mods.type = XkbSA_SetMods; - fake.mods.flags = 0; - fake.mods.mask = act->mods.mask; - return fake; - case XkbSA_LatchMods: - fake.mods.type = XkbSA_SetMods; - fake.mods.flags = 0; - fake.mods.mask = act->mods.mask; - return fake; - case XkbSA_ISOLock: - if (act->iso.flags&XkbSA_ISODfltIsGroup) { - fake.group.type = XkbSA_SetGroup; - fake.group.flags = act->iso.flags&XkbSA_GroupAbsolute; - XkbSASetGroup(&fake.group,XkbSAGroup(&act->iso)); - } - else { - fake.mods.type = XkbSA_SetMods; - fake.mods.flags = 0; - fake.mods.mask = act->iso.mask; - } - return fake; - case XkbSA_LockGroup: - case XkbSA_LatchGroup: - /* We want everything from the latch/lock action except the - * type should be changed to set. - */ - fake = *act; - fake.group.type = XkbSA_SetGroup; - return fake; - } - } - else if (xkb->ctrls->enabled_ctrls&XkbStickyKeysMask) { if (act->any.type==XkbSA_SetMods) { fake.mods.type = XkbSA_LatchMods; @@ -840,11 +799,10 @@ _XkbFilterRedirectKey( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { -unsigned realMods = 0; -xEvent ev; +DeviceEvent ev; int x,y; XkbStateRec old; -unsigned mods,mask,oldCoreState = 0,oldCorePrevState = 0; +unsigned mods,mask; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(xkbi->device); ProcessInputProc backupproc; @@ -855,10 +813,12 @@ ProcessInputProc backupproc; if ((filter->keycode!=0)&&(filter->keycode!=keycode)) return 1; - GetSpritePosition(inputInfo.pointer, &x,&y); - ev.u.keyButtonPointer.time = GetTimeInMillis(); - ev.u.keyButtonPointer.rootX = x; - ev.u.keyButtonPointer.rootY = y; + GetSpritePosition(xkbi->device, &x,&y); + ev.header = ET_Internal; + ev.length = sizeof(DeviceEvent); + ev.time = GetTimeInMillis(); + ev.root_x = x; + ev.root_y = y; if (filter->keycode==0) { /* initial press */ if ((pAction->redirect.new_keydesc->min_key_code)|| @@ -872,9 +832,8 @@ ProcessInputProc backupproc; filter->filter = _XkbFilterRedirectKey; filter->upAction = *pAction; - /* XXX: what about DeviceKeyPress */ - ev.u.u.type = KeyPress; - ev.u.u.detail = pAction->redirect.new_key; + ev.type = ET_KeyPress; + ev.detail.key = pAction->redirect.new_key; mask= XkbSARedirectVModsMask(&pAction->redirect); mods= XkbSARedirectVMods(&pAction->redirect); @@ -885,8 +844,6 @@ ProcessInputProc backupproc; if ( mask || mods ) { old= xkbi->state; - oldCoreState= xkbi->device->key->state; - oldCorePrevState= xkbi->device->key->prev_state; xkbi->state.base_mods&= ~mask; xkbi->state.base_mods|= (mods&mask); xkbi->state.latched_mods&= ~mask; @@ -894,29 +851,20 @@ ProcessInputProc backupproc; xkbi->state.locked_mods&= ~mask; xkbi->state.locked_mods|= (mods&mask); XkbComputeDerivedState(xkbi); - xkbi->device->key->state= xkbi->device->key->prev_state= - xkbi->state.mods; } - realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; - xkbi->device->key->modifierMap[ev.u.u.detail] = 0; UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); - xkbi->device->public.processInputProc(&ev,xkbi->device,1); + xkbi->device->public.processInputProc((InternalEvent*)&ev, xkbi->device); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, backupproc,xkbUnwrapProc); - xkbi->device->key->modifierMap[ev.u.u.detail] = realMods; - if ( mask || mods ) { - xkbi->device->key->state= oldCoreState; - xkbi->device->key->prev_state= oldCorePrevState; + if ( mask || mods ) xkbi->state= old; - } } else if (filter->keycode==keycode) { - /* XXX: what about DeviceKeyRelease */ - ev.u.u.type = KeyRelease; - ev.u.u.detail = filter->upAction.redirect.new_key; + ev.type = ET_KeyRelease; + ev.detail.key = filter->upAction.redirect.new_key; mask= XkbSARedirectVModsMask(&filter->upAction.redirect); mods= XkbSARedirectVMods(&filter->upAction.redirect); @@ -927,8 +875,6 @@ ProcessInputProc backupproc; if ( mask || mods ) { old= xkbi->state; - oldCoreState= xkbi->device->key->state; - oldCorePrevState= xkbi->device->key->prev_state; xkbi->state.base_mods&= ~mask; xkbi->state.base_mods|= (mods&mask); xkbi->state.latched_mods&= ~mask; @@ -936,23 +882,15 @@ ProcessInputProc backupproc; xkbi->state.locked_mods&= ~mask; xkbi->state.locked_mods|= (mods&mask); XkbComputeDerivedState(xkbi); - xkbi->device->key->state= xkbi->device->key->prev_state= - xkbi->state.mods; } - realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; - xkbi->device->key->modifierMap[ev.u.u.detail] = 0; UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); - xkbi->device->public.processInputProc(&ev,xkbi->device,1); + xkbi->device->public.processInputProc((InternalEvent*)&ev, xkbi->device); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, backupproc,xkbUnwrapProc); - xkbi->device->key->modifierMap[ev.u.u.detail] = realMods; - if ( mask || mods ) { - xkbi->device->key->state= oldCoreState; - xkbi->device->key->prev_state= oldCorePrevState; + if ( mask || mods ) xkbi->state= old; - } filter->keycode= 0; filter->active= 0; @@ -1027,7 +965,7 @@ int button; if (filter->keycode==0) { /* initial press */ _XkbLookupButtonDevice(&dev, pAction->devbtn.device, serverClient, DixUnknownAccess, &button); - if (!dev || !dev->public.on || dev == inputInfo.pointer) + if (!dev || !dev->public.on) return 1; button= pAction->devbtn.button; @@ -1068,7 +1006,7 @@ int button; filter->active= 0; _XkbLookupButtonDevice(&dev, filter->upAction.devbtn.device, serverClient, DixUnknownAccess, &button); - if (!dev || !dev->public.on || dev == inputInfo.pointer) + if (!dev || !dev->public.on) return 1; button= filter->upAction.btn.button; @@ -1131,15 +1069,13 @@ register int i,send; } void -XkbHandleActions(DeviceIntPtr dev,DeviceIntPtr kbd,xEvent *xE,int count) +XkbHandleActions(DeviceIntPtr dev, DeviceIntPtr kbd, DeviceEvent* event) { int key,bit,i; -CARD8 realMods = 0; XkbSrvInfoPtr xkbi; KeyClassPtr keyc; int changed,sendEvent; Bool genStateNotify; -XkbStateRec oldState; XkbAction act; XkbFilterPtr filter; Bool keyEvent; @@ -1150,11 +1086,11 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); keyc= kbd->key; xkbi= keyc->xkbInfo; - key= xE->u.u.detail; + key= event->detail.key; /* The state may change, so if we're not in the middle of sending a state * notify, prepare for it */ if ((xkbi->flags&_XkbStateNotifyInProgress)==0) { - oldState= xkbi->state; + xkbi->prev_state = xkbi->state; xkbi->flags|= _XkbStateNotifyInProgress; genStateNotify= True; } @@ -1164,10 +1100,8 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); xkbi->groupChange = 0; sendEvent = 1; - keyEvent= ((xE->u.u.type==KeyPress)||(xE->u.u.type==DeviceKeyPress)|| - (xE->u.u.type==KeyRelease)||(xE->u.u.type==DeviceKeyRelease)); - pressEvent= (xE->u.u.type==KeyPress)||(xE->u.u.type==DeviceKeyPress)|| - (xE->u.u.type==ButtonPress)||(xE->u.u.type==DeviceButtonPress); + keyEvent= ((event->type == ET_KeyPress) || (event->type == ET_KeyRelease)); + pressEvent= ((event->type == ET_KeyPress)|| (event->type == ET_ButtonPress)); if (pressEvent) { if (keyEvent) @@ -1272,34 +1206,27 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); if (sendEvent) { DeviceIntPtr tmpdev; - if (keyEvent) { - realMods = keyc->modifierMap[key]; - keyc->modifierMap[key] = 0; + if (keyEvent) tmpdev = dev; - } else + else tmpdev = GetPairedDevice(dev); UNWRAP_PROCESS_INPUT_PROC(tmpdev,xkbPrivPtr, backupproc); - dev->public.processInputProc(xE,tmpdev,count); + dev->public.processInputProc((InternalEvent*)event, tmpdev); COND_WRAP_PROCESS_INPUT_PROC(tmpdev, xkbPrivPtr, backupproc,xkbUnwrapProc); - if (keyEvent) - keyc->modifierMap[key] = realMods; } else if (keyEvent) { - FixKeyState(xE,dev); + FixKeyState(event, dev); } - xkbi->prev_state= oldState; XkbComputeDerivedState(xkbi); - keyc->prev_state= keyc->state; - keyc->state= XkbStateFieldFromRec(&xkbi->state); - changed = XkbStateChangedFlags(&oldState,&xkbi->state); + changed = XkbStateChangedFlags(&xkbi->prev_state,&xkbi->state); if (genStateNotify) { if (changed) { xkbStateNotify sn; sn.keycode= key; - sn.eventType= xE->u.u.type; + sn.eventType= event->type; sn.requestMajor = sn.requestMinor = 0; sn.changed= changed; XkbSendStateNotify(dev,&sn); @@ -1309,7 +1236,7 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); changed= XkbIndicatorsToUpdate(dev,changed,False); if (changed) { XkbEventCauseRec cause; - XkbSetCauseKey(&cause,key,xE->u.u.type); + XkbSetCauseKey(&cause, key, event->type); XkbUpdateIndicators(dev,changed,False,NULL,&cause); } return; diff --git a/xorg-server/xkb/xkbEvents.c b/xorg-server/xkb/xkbEvents.c index 4d3debba7..8fb49c1d8 100644 --- a/xorg-server/xkb/xkbEvents.c +++ b/xorg-server/xkb/xkbEvents.c @@ -29,13 +29,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#define NEED_EVENTS 1 #include #include #include #include #include #include "inputstr.h" +#include "exevents.h" +#include "exglobals.h" #include "windowstr.h" #include "exevents.h" #include @@ -43,58 +44,151 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ +/* + * This function sends out two kinds of notification: + * - Core mapping notify events sent to clients for whom kbd is the + * current core ('picked') keyboard _and_ have not explicitly + * selected for XKB mapping notify events; + * - Xi mapping events, sent unconditionally to all clients who have + * explicitly selected for them (including those who have explicitly + * selected for XKB mapping notify events!). + */ +static void +XkbSendLegacyMapNotify(DeviceIntPtr kbd, CARD16 xkb_event, CARD16 changed, + int first_key, int num_keys) +{ + int i; + int keymap_changed = 0; + int modmap_changed = 0; + xEvent core_mn; + deviceMappingNotify xi_mn; + CARD32 time = GetTimeInMillis(); + + if (xkb_event == XkbNewKeyboardNotify) { + if (changed & XkbNKN_KeycodesMask) { + keymap_changed = 1; + modmap_changed = 1; + } + } + else if (xkb_event == XkbMapNotify) { + if (changed & XkbKeySymsMask) + keymap_changed = 1; + if (changed & XkbModifierMapMask) + modmap_changed = 1; + } + if (!keymap_changed && !modmap_changed) + return; + + core_mn.u.u.type = MappingNotify; + xi_mn.type = DeviceMappingNotify; + xi_mn.deviceid = kbd->id; + xi_mn.time = time; + + /* 0 is serverClient. */ + for (i = 1; i < currentMaxClients; i++) { + if (!clients[i] || clients[i]->clientState != ClientStateRunning) + continue; + + /* Ignore clients which will have already received this. + * Inconsistent with themselves, but consistent with previous + * behaviour.*/ + if (xkb_event == XkbMapNotify && (clients[i]->mapNotifyMask & changed)) + continue; + if (xkb_event == XkbNewKeyboardNotify && + (clients[i]->xkbClientFlags & _XkbClientInitialized)) + continue; + + /* Don't send core events to clients who don't know about us. */ + if (!XIShouldNotify(clients[i], kbd)) + continue; + + core_mn.u.u.sequenceNumber = clients[i]->sequence; + if (keymap_changed) { + core_mn.u.mappingNotify.request = MappingKeyboard; + + /* Clip the keycode range to what the client knows about, so it + * doesn't freak out. */ + if (first_key >= clients[i]->minKC) + core_mn.u.mappingNotify.firstKeyCode = first_key; + else + core_mn.u.mappingNotify.firstKeyCode = clients[i]->minKC; + if (first_key + num_keys - 1 <= clients[i]->maxKC) + core_mn.u.mappingNotify.count = num_keys; + else + core_mn.u.mappingNotify.count = clients[i]->maxKC - + clients[i]->minKC + 1; + + WriteEventsToClient(clients[i], 1, &core_mn); + } + if (modmap_changed) { + core_mn.u.mappingNotify.request = MappingModifier; + core_mn.u.mappingNotify.firstKeyCode = 0; + core_mn.u.mappingNotify.count = 0; + WriteEventsToClient(clients[i], 1, &core_mn); + } + } + + /* Hmm, maybe we can accidentally generate Xi events for core devices + * here? Clients might be upset, but that seems better than the + * alternative of stale keymaps. -ds */ + if (keymap_changed) { + xi_mn.request = MappingKeyboard; + xi_mn.firstKeyCode = first_key; + xi_mn.count = num_keys; + SendEventToAllWindows(kbd, DeviceMappingNotifyMask, (xEvent *) &xi_mn, + 1); + } + if (modmap_changed) { + xi_mn.request = MappingModifier; + xi_mn.firstKeyCode = 0; + xi_mn.count = 0; + SendEventToAllWindows(kbd, DeviceMappingNotifyMask, (xEvent *) &xi_mn, + 1); + } +} + +/***====================================================================***/ + void XkbSendNewKeyboardNotify(DeviceIntPtr kbd,xkbNewKeyboardNotify *pNKN) -{ -register int i; -Time time; -CARD16 changed; +{ + int i; + Time time = GetTimeInMillis(); + CARD16 changed = pNKN->changed; pNKN->type = XkbEventCode + XkbEventBase; pNKN->xkbType = XkbNewKeyboardNotify; - pNKN->time = time = GetTimeInMillis(); - changed = pNKN->changed; for (i=1; iclientGone || - (clients[i]->requestVector==InitialVector)) { - continue; - } + if (!clients[i] || clients[i]->clientState != ClientStateRunning) + continue; + + if (!(clients[i]->newKeyboardNotifyMask & changed)) + continue; + + if (!XIShouldNotify(clients[i], kbd)) + continue; + + pNKN->sequenceNumber = clients[i]->sequence; + pNKN->time = time; + pNKN->changed = changed; + if (clients[i]->swapped) { + int n; + swaps(&pNKN->sequenceNumber,n); + swapl(&pNKN->time,n); + swaps(&pNKN->changed,n); + } + WriteToClient(clients[i], sizeof(xEvent), pNKN); - if (clients[i]->xkbClientFlags&_XkbClientInitialized) { - if (clients[i]->newKeyboardNotifyMask&changed) { - pNKN->sequenceNumber = clients[i]->sequence; - pNKN->time = time; - pNKN->changed = changed; - if ( clients[i]->swapped ) { - register int n; - swaps(&pNKN->sequenceNumber,n); - swapl(&pNKN->time,n); - swaps(&pNKN->changed,n); - } - WriteToClient(clients[i],sizeof(xEvent),(char *)pNKN); - if (changed&XkbNKN_KeycodesMask) { - clients[i]->minKC= pNKN->minKeyCode; - clients[i]->maxKC= pNKN->maxKeyCode; - } - } - } - else if (changed&XkbNKN_KeycodesMask) { - xEvent event; - event.u.u.type= MappingNotify; - event.u.mappingNotify.request= MappingKeyboard; - event.u.mappingNotify.firstKeyCode= clients[i]->minKC; - event.u.mappingNotify.count= clients[i]->maxKC-clients[i]->minKC+1; - event.u.u.sequenceNumber= clients[i]->sequence; - if (clients[i]->swapped) { - int n; - swaps(&event.u.u.sequenceNumber,n); - } - WriteToClient(clients[i],SIZEOF(xEvent), (char *)&event); - event.u.mappingNotify.request= MappingModifier; - WriteToClient(clients[i],SIZEOF(xEvent), (char *)&event); - } + if (changed & XkbNKN_KeycodesMask) { + clients[i]->minKC = pNKN->minKeyCode; + clients[i]->maxKC = pNKN->maxKeyCode; + } } + + XkbSendLegacyMapNotify(kbd, XkbNewKeyboardNotify, changed, pNKN->minKeyCode, + pNKN->maxKeyCode - pNKN->minKeyCode + 1); + return; } @@ -140,7 +234,8 @@ register CARD16 changed,bState; if ((!interest->client->clientGone) && (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags&_XkbClientInitialized) && - (interest->stateNotifyMask&changed)) { + (interest->stateNotifyMask&changed) && + XIShouldNotify(interest->client,kbd)) { pSN->sequenceNumber = interest->client->sequence; pSN->time = time; pSN->changed = changed; @@ -161,49 +256,50 @@ register CARD16 changed,bState; /***====================================================================***/ +/* + * This function sends out XKB mapping notify events to clients which + * have explicitly selected for them. Core and Xi events are handled by + * XkbSendLegacyMapNotify. */ void -XkbSendMapNotify(DeviceIntPtr kbd,xkbMapNotify *pMN) +XkbSendMapNotify(DeviceIntPtr kbd, xkbMapNotify *pMN) { -int i; -XkbSrvInfoPtr xkbi; -unsigned time = 0,initialized; -CARD16 changed; - - if (!kbd->key || !kbd->key->xkbInfo) - return; - - xkbi = kbd->key->xkbInfo; - initialized= 0; - - changed = pMN->changed; - pMN->minKeyCode= xkbi->desc->min_key_code; - pMN->maxKeyCode= xkbi->desc->max_key_code; - for (i=1; iclientGone && - (clients[i]->requestVector != InitialVector) && - (clients[i]->xkbClientFlags&_XkbClientInitialized) && - (clients[i]->mapNotifyMask&changed)) - { - if (!initialized) { - pMN->type = XkbEventCode + XkbEventBase; - pMN->xkbType = XkbMapNotify; - pMN->deviceID = kbd->id; - time = GetTimeInMillis(); - initialized= 1; - } - pMN->time= time; - pMN->sequenceNumber = clients[i]->sequence; - pMN->changed = changed; - if ( clients[i]->swapped ) { - register int n; - swaps(&pMN->sequenceNumber,n); - swapl(&pMN->time,n); - swaps(&pMN->changed,n); - } - WriteToClient(clients[i],sizeof(xEvent),(char *)pMN); - } + int i; + CARD32 time = GetTimeInMillis(); + CARD16 changed = pMN->changed; + XkbSrvInfoPtr xkbi = kbd->key->xkbInfo; + + pMN->minKeyCode = xkbi->desc->min_key_code; + pMN->maxKeyCode = xkbi->desc->max_key_code; + pMN->type = XkbEventCode + XkbEventBase; + pMN->xkbType = XkbMapNotify; + pMN->deviceID = kbd->id; + + /* 0 is serverClient. */ + for (i = 1; i < currentMaxClients; i++) { + if (!clients[i] || clients[i]->clientState != ClientStateRunning) + continue; + + if (!(clients[i]->mapNotifyMask & changed)) + continue; + + if (!XIShouldNotify(clients[i], kbd)) + continue; + + pMN->time = time; + pMN->sequenceNumber = clients[i]->sequence; + pMN->changed = changed; + + if (clients[i]->swapped) { + int n; + swaps(&pMN->sequenceNumber, n); + swapl(&pMN->time, n); + swaps(&pMN->changed, n); + } + WriteToClient(clients[i], sizeof(xEvent), pMN); } - return; + + XkbSendLegacyMapNotify(kbd, XkbMapNotify, changed, pMN->firstKeySym, + pMN->nKeySyms); } int @@ -307,7 +403,8 @@ Time time = 0; if ((!interest->client->clientGone) && (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags&_XkbClientInitialized) && - (interest->ctrlsNotifyMask&changedControls)) { + (interest->ctrlsNotifyMask&changedControls) && + XIShouldNotify(interest->client, kbd)) { if (!initialized) { pCN->type = XkbEventCode + XkbEventBase; pCN->xkbType = XkbControlsNotify; @@ -355,6 +452,7 @@ CARD32 state,changed; if ((!interest->client->clientGone) && (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags&_XkbClientInitialized) && + XIShouldNotify(interest->client, kbd) && (((xkbType==XkbIndicatorStateNotify)&& (interest->iStateNotifyMask&changed))|| ((xkbType==XkbIndicatorMapNotify)&& @@ -438,7 +536,8 @@ XID winID = 0; if ((!interest->client->clientGone) && (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags&_XkbClientInitialized) && - (interest->bellNotifyMask)) { + (interest->bellNotifyMask) && + XIShouldNotify(interest->client,kbd)) { if (!initialized) { time = GetTimeInMillis(); bn.type = XkbEventCode + XkbEventBase; @@ -492,7 +591,8 @@ CARD16 sk_delay,db_delay; if ((!interest->client->clientGone) && (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags&_XkbClientInitialized) && - (interest->accessXNotifyMask&(1<detail))) { + (interest->accessXNotifyMask&(1<detail)) && + XIShouldNotify(interest->client, kbd)) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbAccessXNotify; @@ -539,7 +639,8 @@ CARD32 changedIndicators; if ((!interest->client->clientGone) && (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags&_XkbClientInitialized) && - (interest->namesNotifyMask&pEv->changed)) { + (interest->namesNotifyMask&pEv->changed) && + XIShouldNotify(interest->client, kbd)) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbNamesNotify; @@ -584,7 +685,8 @@ CARD16 firstSI = 0, nSI = 0, nTotalSI = 0; if ((!interest->client->clientGone) && (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags&_XkbClientInitialized) && - (interest->compatNotifyMask)) { + (interest->compatNotifyMask) && + XIShouldNotify(interest->client, kbd)) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbCompatMapNotify; @@ -636,7 +738,8 @@ Time time = 0; if ((!interest->client->clientGone) && (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags&_XkbClientInitialized) && - (interest->actionMessageMask)) { + (interest->actionMessageMask) && + XIShouldNotify(interest->client, kbd)) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbActionMessage; @@ -668,7 +771,7 @@ int initialized; XkbInterestPtr interest; Time time = 0; CARD32 defined, state; -CARD16 reason, supported = 0; +CARD16 reason; interest = dev->xkb_interest; if (!interest) @@ -682,14 +785,14 @@ CARD16 reason, supported = 0; if ((!interest->client->clientGone) && (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags&_XkbClientInitialized) && - (interest->extDevNotifyMask&reason)) { + (interest->extDevNotifyMask&reason) && + XIShouldNotify(interest->client, dev)) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbExtensionDeviceNotify; pEv->deviceID = dev->id; pEv->sequenceNumber = interest->client->sequence; pEv->time = time = GetTimeInMillis(); - supported= pEv->supported; initialized= 1; } else { @@ -698,14 +801,7 @@ CARD16 reason, supported = 0; pEv->ledsDefined= defined; pEv->ledState= state; pEv->reason= reason; - pEv->supported= supported; - } - if (client!=interest->client) { - /* only report UnsupportedFeature to the client that */ - /* issued the failing request */ - pEv->reason&= ~XkbXI_UnsupportedFeatureMask; - if ((interest->extDevNotifyMask&reason)==0) - continue; + pEv->supported= XkbXI_AllFeaturesMask; } if ( interest->client->swapped ) { register int n; @@ -742,6 +838,7 @@ XkbSrvLedInfoPtr sli; } if (pChanges->map.changed) { xkbMapNotify mn; + memset(&mn, 0, sizeof(xkbMapNotify)); mn.changed= pChanges->map.changed; mn.firstType= pChanges->map.first_type; mn.nTypes= pChanges->map.num_types; @@ -763,6 +860,7 @@ XkbSrvLedInfoPtr sli; if ((pChanges->ctrls.changed_ctrls)|| (pChanges->ctrls.enabled_ctrls_changes)) { xkbControlsNotify cn; + memset(&cn, 0, sizeof(xkbControlsNotify)); cn.changedControls= pChanges->ctrls.changed_ctrls; cn.enabledControlChanges= pChanges->ctrls.enabled_ctrls_changes; cn.keycode= cause->kc; @@ -775,6 +873,7 @@ XkbSrvLedInfoPtr sli; xkbIndicatorNotify in; if (sli==NULL) sli= XkbFindSrvLedInfo(kbd,XkbDfltXIClass,XkbDfltXIId,0); + memset(&in, 0, sizeof(xkbIndicatorNotify)); in.state= sli->effectiveState; in.changed= pChanges->indicators.map_changes; XkbSendIndicatorNotify(kbd,XkbIndicatorMapNotify,&in); @@ -783,12 +882,14 @@ XkbSrvLedInfoPtr sli; xkbIndicatorNotify in; if (sli==NULL) sli= XkbFindSrvLedInfo(kbd,XkbDfltXIClass,XkbDfltXIId,0); + memset(&in, 0, sizeof(xkbIndicatorNotify)); in.state= sli->effectiveState; in.changed= pChanges->indicators.state_changes; XkbSendIndicatorNotify(kbd,XkbIndicatorStateNotify,&in); } if (pChanges->names.changed) { xkbNamesNotify nn; + memset(&nn, 0, sizeof(xkbNamesNotify)); nn.changed= pChanges->names.changed; nn.firstType= pChanges->names.first_type; nn.nTypes= pChanges->names.num_types; @@ -801,6 +902,7 @@ XkbSrvLedInfoPtr sli; } if ((pChanges->compat.changed_groups)||(pChanges->compat.num_si>0)) { xkbCompatMapNotify cmn; + memset(&cmn, 0, sizeof(xkbCompatMapNotify)); cmn.changedGroups= pChanges->compat.changed_groups; cmn.firstSI= pChanges->compat.first_si; cmn.nSI= pChanges->compat.num_si; @@ -812,151 +914,104 @@ XkbSrvLedInfoPtr sli; /***====================================================================***/ -Bool -XkbFilterEvents(ClientPtr pClient,int nEvents,xEvent *xE) +void +XkbFilterEvents(ClientPtr client,int nEvents,xEvent *xE) { -int i, button_mask; -DeviceIntPtr pXDev = inputInfo.keyboard; -XkbSrvInfoPtr xkbi; + DeviceIntPtr dev = NULL; + XkbSrvInfoPtr xkbi; + CARD8 type = xE[0].u.u.type; if (xE->u.u.type & EXTENSION_EVENT_BASE) - { - pXDev = XIGetDevice(xE); - if (!pXDev) - pXDev = inputInfo.keyboard; - } + dev = XIGetDevice(xE); - xkbi= (pXDev->key) ? pXDev->key->xkbInfo : NULL; + if (!dev) + dev = PickKeyboard(client); - if ( pClient->xkbClientFlags & _XkbClientInitialized ) { - if ((xkbDebugFlags&0x10)&& - ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)|| - (xE[0].u.u.type==DeviceKeyPress)|| - (xE[0].u.u.type == DeviceKeyRelease))) { - DebugF("[xkb] XKbFilterWriteEvents:\n"); - DebugF("[xkb] Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); - DebugF("[xkb] XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n", - XkbLastRepeatEvent,xE, - ((XkbLastRepeatEvent!=(pointer)xE)?"True":"False")); - DebugF("[xkb] (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n", - pClient->xkbClientFlags, - (_XkbWantsDetectableAutoRepeat(pClient)?"True":"False")); - DebugF("[xkb] !IsRelease(%d) %s\n",xE[0].u.u.type, - (!_XkbIsReleaseEvent(xE[0].u.u.type))?"True":"False"); - } - if ( (XkbLastRepeatEvent==(pointer)xE) && - (_XkbWantsDetectableAutoRepeat(pClient)) && - (_XkbIsReleaseEvent(xE[0].u.u.type)) ) { - return False; - } - - if (!xkbi) - return True; + if (!dev->key) + return; - if ((pXDev->deviceGrab.grab != NullGrab) - && pXDev->deviceGrab.fromPassiveGrab && - ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)|| - (xE[0].u.u.type==DeviceKeyPress)|| - (xE[0].u.u.type == DeviceKeyRelease))) { - register unsigned state,flags; + xkbi = dev->key->xkbInfo; - flags= pClient->xkbClientFlags; - state= xkbi->state.compat_grab_mods; + if (client->xkbClientFlags & _XkbClientInitialized) { + if ((xkbDebugFlags&0x10)&& + (type == KeyPress || type == KeyRelease || + type == DeviceKeyPress || type == DeviceKeyRelease)) + DebugF("[xkb] XkbFilterWriteEvents (XKB client): state 0x%04x\n", + xE[0].u.keyButtonPointer.state); + + if (dev->deviceGrab.grab != NullGrab && dev->deviceGrab.fromPassiveGrab && + (type == KeyPress || type == KeyRelease || + type == DeviceKeyPress || type == DeviceKeyRelease)) { + unsigned int state, flags; + + flags = client->xkbClientFlags; + state = xkbi->state.compat_grab_mods; if (flags & XkbPCF_GrabsUseXKBStateMask) { int group; - if (flags&XkbPCF_LookupStateWhenGrabbed) { - group= xkbi->state.group; - state= xkbi->state.lookup_mods; + if (flags & XkbPCF_LookupStateWhenGrabbed) { + group = xkbi->state.group; + state = xkbi->state.lookup_mods; } else { - state= xkbi->state.grab_mods; - group= xkbi->state.base_group+xkbi->state.latched_group; - if ((group<0)||(group>=xkbi->desc->ctrls->num_groups)) { - group= XkbAdjustGroup(group,xkbi->desc->ctrls); - } + state = xkbi->state.grab_mods; + group = xkbi->state.base_group + xkbi->state.latched_group; + if (group < 0 || group >= xkbi->desc->ctrls->num_groups) + group = XkbAdjustGroup(group, xkbi->desc->ctrls); } state = XkbBuildCoreState(state, group); } - else if (flags&XkbPCF_LookupStateWhenGrabbed) - state= xkbi->state.compat_lookup_mods; - xE[0].u.keyButtonPointer.state= state; + else if (flags & XkbPCF_LookupStateWhenGrabbed) { + state = xkbi->state.compat_lookup_mods; + } + xE[0].u.keyButtonPointer.state = state; } - button_mask = 1 << xE[0].u.u.detail; - if (xE[0].u.u.type == ButtonPress && - ((xE[0].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && - (xkbi->lockedPtrButtons & button_mask) == button_mask) { - /* If the MouseKeys is pressed, and the "real" mouse is also pressed - * when the mouse is released, the server does not behave properly. - * Faking a release of the button here solves the problem. - */ - DebugF("[xkb] Faking release of button %d\n", xE[0].u.u.detail); - XkbDDXFakeDeviceButton(xkbi->device, 0, xE[0].u.u.detail); - } } else { - register CARD8 type; - - if (!xkbi) - return True; - - for (i=0;istate.lookup_mods, - xkbi->state.grab_mods); - DebugF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n", - xkbi->state.compat_lookup_mods, - xkbi->state.compat_grab_mods); - } - if ( (type>=KeyPress)&&(type<=MotionNotify) ) { - CARD16 old,new; + if ((xkbDebugFlags & 0x4) && + (xE[0].u.u.type == KeyPress || xE[0].u.u.type==KeyRelease || + xE[0].u.u.type == DeviceKeyPress || + xE[0].u.u.type == DeviceKeyRelease)) { + DebugF("[xkb] XKbFilterWriteEvents (non-XKB):\n"); + DebugF("[xkb] event= 0x%04x\n",xE[0].u.keyButtonPointer.state); + DebugF("[xkb] lookup= 0x%02x, grab= 0x%02x\n", + xkbi->state.lookup_mods, xkbi->state.grab_mods); + DebugF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n", + xkbi->state.compat_lookup_mods, xkbi->state.compat_grab_mods); + } + if (type >= KeyPress && type <= MotionNotify) { + CARD16 old, new; - old= xE[i].u.keyButtonPointer.state&(~0x1f00); - new= xE[i].u.keyButtonPointer.state&0x1F00; + old = xE[0].u.keyButtonPointer.state & ~0x1f00; + new = xE[0].u.keyButtonPointer.state & 0x1F00; - if (old==XkbStateFieldFromRec(&xkbi->state)) - new|= xkbi->state.compat_lookup_mods; - else new|= xkbi->state.compat_grab_mods; - xE[i].u.keyButtonPointer.state= new; - } - else if ((type==EnterNotify)||(type==LeaveNotify)) { - xE[i].u.enterLeave.state&= 0x1F00; - xE[i].u.enterLeave.state|= xkbi->state.compat_grab_mods; - } else if ((type>=DeviceKeyPress)&&(type<=DeviceMotionNotify)) { - CARD16 old, new; - deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer*)&xE[i]; - old= kbp->state&(~0x1F00); - new= kbp->state&0x1F00; - if (old==XkbStateFieldFromRec(&xkbi->state)) - new|= xkbi->state.compat_lookup_mods; - else new|= xkbi->state.compat_grab_mods; - kbp->state= new; - } - button_mask = 1 << xE[i].u.u.detail; - if (type == ButtonPress && - ((xE[i].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && - (xkbi->lockedPtrButtons & button_mask) == button_mask) { - DebugF("[xkb] Faking release of button %d\n", xE[i].u.u.detail); - XkbDDXFakeDeviceButton(xkbi->device, 0, xE[i].u.u.detail); - } else if (type == DeviceButtonPress && - ((((deviceKeyButtonPointer*)&xE[i])->state >> 7) & button_mask) == button_mask && - (xkbi->lockedPtrButtons & button_mask) == button_mask) { - DebugF("[xkb] Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state); - XkbDDXFakeDeviceButton(xkbi->device, 0, ((deviceKeyButtonPointer*)&xE[i])->state); - } + if (old == XkbStateFieldFromRec(&xkbi->state)) + new |= xkbi->state.compat_lookup_mods; + else + new |= xkbi->state.compat_grab_mods; + xE[0].u.keyButtonPointer.state = new; } + else if (type == EnterNotify || type == LeaveNotify) { + xE[0].u.enterLeave.state &= 0x1F00; + xE[0].u.enterLeave.state |= xkbi->state.compat_grab_mods; + } + else if (type >= DeviceKeyPress && type <= DeviceMotionNotify) { + CARD16 old, new; + deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer*) &xE[0]; + + old = kbp->state & ~0x1F00; + new = kbp->state & 0x1F00; + if (old == XkbStateFieldFromRec(&xkbi->state)) + new |= xkbi->state.compat_lookup_mods; + else + new |= xkbi->state.compat_grab_mods; + kbp->state = new; + } } - return True; } /***====================================================================***/ -XkbInterestPtr +XkbInterestPtr XkbFindClientResource(DevicePtr inDev,ClientPtr client) { DeviceIntPtr dev = (DeviceIntPtr)inDev; @@ -974,7 +1029,7 @@ XkbInterestPtr interest; return NULL; } -XkbInterestPtr +XkbInterestPtr XkbAddClientResource(DevicePtr inDev,ClientPtr client,XID id) { DeviceIntPtr dev = (DeviceIntPtr)inDev; @@ -1031,7 +1086,7 @@ ClientPtr client = NULL; autoCtrls= interest->autoCtrls; autoValues= interest->autoCtrlValues; client= interest->client; - _XkbFree(interest); + xfree(interest); found= True; } while ((!found)&&(interest->next)) { @@ -1041,7 +1096,7 @@ ClientPtr client = NULL; autoCtrls= victim->autoCtrls; autoValues= victim->autoCtrlValues; client= victim->client; - _XkbFree(victim); + xfree(victim); found= True; } interest = interest->next; diff --git a/xorg-server/xkb/xkbInit.c b/xorg-server/xkb/xkbInit.c index 3a0e375e8..747c913f3 100644 --- a/xorg-server/xkb/xkbInit.c +++ b/xorg-server/xkb/xkbInit.c @@ -37,7 +37,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include -#define NEED_EVENTS 1 #include #include #include @@ -86,30 +85,6 @@ typedef struct _SrvXkmInfo { /***====================================================================***/ -#ifndef XKB_BASE_DIRECTORY -#define XKB_BASE_DIRECTORY "/usr/lib/X11/xkb" -#endif -#ifndef XKB_BIN_DIRECTORY -#define XKB_BIN_DIRECTORY XKB_BASE_DIRECTORY -#endif -#ifndef XKB_DFLT_RULES_FILE -#define XKB_DFLT_RULES_FILE "base" -#endif -#ifndef XKB_DFLT_KB_LAYOUT -#define XKB_DFLT_KB_LAYOUT "us" -#endif -#ifndef XKB_DFLT_KB_MODEL -#define XKB_DFLT_KB_MODEL "dflt" -#endif -#ifndef XKB_DFLT_KB_VARIANT -#define XKB_DFLT_KB_VARIANT NULL -#endif -#ifndef XKB_DFLT_KB_OPTIONS -#define XKB_DFLT_KB_OPTIONS NULL -#endif -#ifndef XKB_DFLT_DISABLED -#define XKB_DFLT_DISABLED True -#endif #ifndef XKB_DFLT_RULES_PROP #define XKB_DFLT_RULES_PROP True #endif @@ -118,37 +93,65 @@ char * XkbBaseDirectory= XKB_BASE_DIRECTORY; char * XkbBinDirectory= XKB_BIN_DIRECTORY; static int XkbWantAccessX= 0; -static Bool rulesDefined= False; -static char * XkbRulesFile= NULL; +static char * XkbRulesDflt= NULL; static char * XkbModelDflt= NULL; static char * XkbLayoutDflt= NULL; static char * XkbVariantDflt= NULL; static char * XkbOptionsDflt= NULL; +static char * XkbRulesUsed= NULL; static char * XkbModelUsed= NULL; static char * XkbLayoutUsed= NULL; static char * XkbVariantUsed= NULL; static char * XkbOptionsUsed= NULL; -static XkbDescPtr xkb_cached_map = NULL; +static XkbDescPtr xkb_cached_map = NULL; -_X_EXPORT Bool noXkbExtension= XKB_DFLT_DISABLED; static Bool XkbWantRulesProp= XKB_DFLT_RULES_PROP; /***====================================================================***/ -static char * -XkbGetRulesDflts(XkbRF_VarDefsPtr defs) +/** + * Get the current default XKB rules. + * Caller must free the data in rmlvo. + */ +void +XkbGetRulesDflts(XkbRMLVOSet *rmlvo) { - if (XkbModelDflt) defs->model= XkbModelDflt; - else defs->model= XKB_DFLT_KB_MODEL; - if (XkbLayoutDflt) defs->layout= XkbLayoutDflt; - else defs->layout= XKB_DFLT_KB_LAYOUT; - if (XkbVariantDflt) defs->variant= XkbVariantDflt; - else defs->variant= XKB_DFLT_KB_VARIANT; - if (XkbOptionsDflt) defs->options= XkbOptionsDflt; - else defs->options= XKB_DFLT_KB_OPTIONS; - return (rulesDefined?XkbRulesFile:XKB_DFLT_RULES_FILE); + if (XkbRulesDflt) rmlvo->rules = XkbRulesDflt; + else rmlvo->rules = XKB_DFLT_RULES; + if (XkbModelDflt) rmlvo->model= XkbModelDflt; + else rmlvo->model= XKB_DFLT_MODEL; + if (XkbLayoutDflt) rmlvo->layout= XkbLayoutDflt; + else rmlvo->layout= XKB_DFLT_LAYOUT; + if (XkbVariantDflt) rmlvo->variant= XkbVariantDflt; + else rmlvo->variant= XKB_DFLT_VARIANT; + if (XkbOptionsDflt) rmlvo->options= XkbOptionsDflt; + else rmlvo->options= XKB_DFLT_OPTIONS; + + rmlvo->rules = strdup(rmlvo->rules); + rmlvo->model = strdup(rmlvo->model); + rmlvo->layout = strdup(rmlvo->layout); + rmlvo->variant = strdup(rmlvo->variant); + rmlvo->options = strdup(rmlvo->options); +} + +void +XkbFreeRMLVOSet(XkbRMLVOSet *rmlvo, Bool freeRMLVO) +{ + if (!rmlvo) + return; + + xfree(rmlvo->rules); + xfree(rmlvo->model); + xfree(rmlvo->layout); + xfree(rmlvo->variant); + xfree(rmlvo->options); + + if (freeRMLVO) + xfree(rmlvo); + else + memset(rmlvo, 0, sizeof(XkbRMLVOSet)); } static Bool @@ -158,9 +161,7 @@ int len,out; Atom name; char * pval; - if (rulesDefined && (!XkbRulesFile)) - return False; - len= (XkbRulesFile?strlen(XkbRulesFile):strlen(XKB_DFLT_RULES_FILE)); + len= (XkbRulesUsed?strlen(XkbRulesUsed):0); len+= (XkbModelUsed?strlen(XkbModelUsed):0); len+= (XkbLayoutUsed?strlen(XkbLayoutUsed):0); len+= (XkbVariantUsed?strlen(XkbVariantUsed):0); @@ -182,12 +183,9 @@ char * pval; return True; } out= 0; - if (XkbRulesFile) { - strcpy(&pval[out],XkbRulesFile); - out+= strlen(XkbRulesFile); - } else { - strcpy(&pval[out],XKB_DFLT_RULES_FILE); - out+= strlen(XKB_DFLT_RULES_FILE); + if (XkbRulesUsed) { + strcpy(&pval[out],XkbRulesUsed); + out+= strlen(XkbRulesUsed); } pval[out++]= '\0'; if (XkbModelUsed) { @@ -221,93 +219,93 @@ char * pval; } static void -XkbSetRulesUsed(XkbRF_VarDefsPtr defs) +XkbSetRulesUsed(XkbRMLVOSet *rmlvo) { + if (XkbRulesUsed) + xfree(XkbRulesUsed); + XkbRulesUsed= (rmlvo->rules?_XkbDupString(rmlvo->rules):NULL); if (XkbModelUsed) - _XkbFree(XkbModelUsed); - XkbModelUsed= (defs->model?_XkbDupString(defs->model):NULL); + xfree(XkbModelUsed); + XkbModelUsed= (rmlvo->model?_XkbDupString(rmlvo->model):NULL); if (XkbLayoutUsed) - _XkbFree(XkbLayoutUsed); - XkbLayoutUsed= (defs->layout?_XkbDupString(defs->layout):NULL); + xfree(XkbLayoutUsed); + XkbLayoutUsed= (rmlvo->layout?_XkbDupString(rmlvo->layout):NULL); if (XkbVariantUsed) - _XkbFree(XkbVariantUsed); - XkbVariantUsed= (defs->variant?_XkbDupString(defs->variant):NULL); + xfree(XkbVariantUsed); + XkbVariantUsed= (rmlvo->variant?_XkbDupString(rmlvo->variant):NULL); if (XkbOptionsUsed) - _XkbFree(XkbOptionsUsed); - XkbOptionsUsed= (defs->options?_XkbDupString(defs->options):NULL); + xfree(XkbOptionsUsed); + XkbOptionsUsed= (rmlvo->options?_XkbDupString(rmlvo->options):NULL); if (XkbWantRulesProp) QueueWorkProc(XkbWriteRulesProp,NULL,NULL); return; } -/** - * Set the default RMLVO for the next device to be initialised. - * If a parameter is NULL, the previous setting will be used. Use empty - * strings if you want to delete a previous setting. - * - * If @rulesFile is NULL and no previous @rulesFile has been set, the - * built-in default is chosen as default. - */ -_X_EXPORT void -XkbSetRulesDflts(char *rulesFile,char *model,char *layout, - char *variant,char *options) +void +XkbSetRulesDflts(XkbRMLVOSet *rmlvo) { - if (!rulesFile && !XkbRulesFile) - { - LogMessage(X_WARNING, "[xkb] No rule given, and no previous rule " - "defined. Defaulting to '%s'.\n", - XKB_DFLT_RULES_FILE); - rulesFile = XKB_DFLT_RULES_FILE; + if (rmlvo->rules) { + if (XkbRulesDflt) + xfree(XkbRulesDflt); + XkbRulesDflt= _XkbDupString(rmlvo->rules); } - - if (rulesFile) { - if (XkbRulesFile) - _XkbFree(XkbRulesFile); - XkbRulesFile= _XkbDupString(rulesFile); - rulesDefined= True; - } - - if (model) { + if (rmlvo->model) { if (XkbModelDflt) - _XkbFree(XkbModelDflt); - XkbModelDflt= _XkbDupString(model); + xfree(XkbModelDflt); + XkbModelDflt= _XkbDupString(rmlvo->model); } - if (layout) { + if (rmlvo->layout) { if (XkbLayoutDflt) - _XkbFree(XkbLayoutDflt); - XkbLayoutDflt= _XkbDupString(layout); + xfree(XkbLayoutDflt); + XkbLayoutDflt= _XkbDupString(rmlvo->layout); } - if (variant) { + if (rmlvo->variant) { if (XkbVariantDflt) - _XkbFree(XkbVariantDflt); - XkbVariantDflt= _XkbDupString(variant); + xfree(XkbVariantDflt); + XkbVariantDflt= _XkbDupString(rmlvo->variant); } - if (options) { + if (rmlvo->options) { if (XkbOptionsDflt) - _XkbFree(XkbOptionsDflt); - XkbOptionsDflt= _XkbDupString(options); + xfree(XkbOptionsDflt); + XkbOptionsDflt= _XkbDupString(rmlvo->options); } return; } void -XkbDeleteRulesDflts() +XkbDeleteRulesDflts(void) { - _XkbFree(XkbRulesFile); - XkbRulesFile = NULL; - _XkbFree(XkbModelDflt); + xfree(XkbRulesDflt); + XkbRulesDflt = NULL; + xfree(XkbModelDflt); XkbModelDflt = NULL; - _XkbFree(XkbLayoutDflt); + xfree(XkbLayoutDflt); XkbLayoutDflt = NULL; - _XkbFree(XkbVariantDflt); + xfree(XkbVariantDflt); XkbVariantDflt = NULL; - _XkbFree(XkbOptionsDflt); + xfree(XkbOptionsDflt); XkbOptionsDflt = NULL; XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, True); xkb_cached_map = NULL; } +#define DIFFERS(a, b) (strcmp((a) ? (a) : "", (b) ? (b) : "") != 0) + +static Bool +XkbCompareUsedRMLVO(XkbRMLVOSet *rmlvo) +{ + if (DIFFERS(rmlvo->rules, XkbRulesUsed) || + DIFFERS(rmlvo->model, XkbModelUsed) || + DIFFERS(rmlvo->layout, XkbLayoutUsed) || + DIFFERS(rmlvo->variant, XkbVariantUsed) || + DIFFERS(rmlvo->options, XkbOptionsUsed)) + return FALSE; + return TRUE; +} + +#undef DIFFERS + /***====================================================================***/ #include "xkbDflts.h" @@ -493,292 +491,151 @@ XkbControlsPtr ctrls; return Success; } -void -XkbInitDevice(DeviceIntPtr pXDev) +_X_EXPORT Bool +InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, + BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func) { -int i; -XkbSrvInfoPtr xkbi; -XkbChangesRec changes; -unsigned check; -XkbEventCauseRec cause; - - bzero(&changes,sizeof(XkbChangesRec)); - pXDev->key->xkbInfo= xkbi= _XkbTypedCalloc(1,XkbSrvInfoRec); - if ( xkbi ) { - XkbDescPtr xkb; + int i; + unsigned int check; + XkbSrvInfoPtr xkbi; + XkbDescPtr xkb; + XkbSrvLedInfoPtr sli; + XkbChangesRec changes; + XkbEventCauseRec cause; + XkbRMLVOSet rmlvo_dflts = { NULL }; + + if (dev->key || dev->kbdfeed) + return FALSE; + + if (!rmlvo) + { + rmlvo = &rmlvo_dflts; + XkbGetRulesDflts(rmlvo); + } - if (xkb_cached_map) { - xkbi->desc = xkb_cached_map; - xkb_cached_map = NULL; - } - else { - xkbi->desc= XkbAllocKeyboard(); - if (!xkbi->desc) - FatalError("Couldn't allocate keyboard description\n"); - xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode; - xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode; + + memset(&changes, 0, sizeof(changes)); + XkbSetCauseUnknown(&cause); + + dev->key = xcalloc(1, sizeof(*dev->key)); + if (!dev->key) { + ErrorF("XKB: Failed to allocate key class\n"); + return False; + } + dev->key->sourceid = dev->id; + + dev->kbdfeed = xcalloc(1, sizeof(*dev->kbdfeed)); + if (!dev->kbdfeed) { + ErrorF("XKB: Failed to allocate key feedback class\n"); + goto unwind_key; + } + + xkbi = xcalloc(1, sizeof(*xkbi)); + if (!xkbi) { + ErrorF("XKB: Failed to allocate XKB info\n"); + goto unwind_kbdfeed; + } + dev->key->xkbInfo = xkbi; + + if (xkb_cached_map && !XkbCompareUsedRMLVO(rmlvo)) { + XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, True); + xkb_cached_map = NULL; + } + + if (xkb_cached_map) + LogMessageVerb(X_INFO, 4, "XKB: Reusing cached keymap\n"); + else { + xkb_cached_map = XkbCompileKeymap(dev, rmlvo); + if (!xkb_cached_map) { + ErrorF("XKB: Failed to compile keymap\n"); + goto unwind_info; } - xkb= xkbi->desc; - if (xkb->min_key_code == 0) - xkb->min_key_code = pXDev->key->curKeySyms.minKeyCode; - if (xkb->max_key_code == 0) - xkb->max_key_code = pXDev->key->curKeySyms.maxKeyCode; - if ((pXDev->key->curKeySyms.minKeyCode!=xkbi->desc->min_key_code)|| - (pXDev->key->curKeySyms.maxKeyCode!=xkbi->desc->max_key_code)) { - /* 12/9/95 (ef) -- XXX! Maybe we should try to fix up one or */ - /* the other here, but for now just complain */ - /* can't just update the core range without */ - /* reallocating the KeySymsRec (pain) */ - ErrorF("[xkb] Internal Error!! XKB and core keymap have different range\n"); - } - if (XkbAllocClientMap(xkb,XkbAllClientInfoMask,0)!=Success) - FatalError("Couldn't allocate client map in XkbInitDevice\n"); - i= XkbNumKeys(xkb)/3+1; - if (XkbAllocServerMap(xkb,XkbAllServerInfoMask,i)!=Success) - FatalError("Couldn't allocate server map in XkbInitDevice\n"); - - xkbi->dfltPtrDelta=1; - xkbi->device = pXDev; - - XkbInitSemantics(xkb); - XkbInitNames(xkbi); - XkbInitRadioGroups(xkbi); - - /* 12/31/94 (ef) -- XXX! Should check if state loaded from file */ - bzero(&xkbi->state,sizeof(XkbStateRec)); - - XkbInitControls(pXDev,xkbi); - - if (xkb->defined & XkmSymbolsMask) - memcpy(pXDev->key->modifierMap, xkb->map->modmap, - xkb->max_key_code + 1); - else - memcpy(xkb->map->modmap, pXDev->key->modifierMap, - xkb->max_key_code + 1); - - XkbInitIndicatorMap(xkbi); - - XkbDDXInitDevice(pXDev); - - if (xkb->defined & XkmSymbolsMask) - XkbUpdateCoreDescription(pXDev, True); - else - XkbUpdateKeyTypesFromCore(pXDev, xkb->min_key_code, - XkbNumKeys(xkb), &changes); - - XkbSetCauseUnknown(&cause); - XkbUpdateActions(pXDev,xkb->min_key_code, XkbNumKeys(xkb),&changes, - &check,&cause); - /* For sanity. The first time the connection - * is opened, the client side min and max are set - * using QueryMinMaxKeyCodes() which grabs them - * from pXDev. - */ - pXDev->key->curKeySyms.minKeyCode = xkb->min_key_code; - pXDev->key->curKeySyms.maxKeyCode = xkb->max_key_code; } - return; -} -#if MAP_LENGTH > XkbMaxKeyCount -#undef XkbMaxKeyCount -#define XkbMaxKeyCount MAP_LENGTH -#endif + xkb = XkbAllocKeyboard(); + if (!xkb) { + ErrorF("XKB: Failed to allocate keyboard description\n"); + goto unwind_info; + } -_X_EXPORT Bool -XkbInitKeyboardDeviceStruct( - DeviceIntPtr dev, - XkbComponentNamesPtr names, - KeySymsPtr pSymsIn, - CARD8 pModsIn[], - void (*bellProc)( - int /*percent*/, - DeviceIntPtr /*device*/, - pointer /*ctrl*/, - int), - void (*ctrlProc)( - DeviceIntPtr /*device*/, - KeybdCtrl * /*ctrl*/)) -{ -KeySymsRec tmpSyms,*pSyms; -CARD8 tmpMods[XkbMaxLegalKeyCode+1],*pMods; -char name[PATH_MAX],*rules; -Bool ok=False; -XkbRF_VarDefsRec defs; -XkbDescPtr xkb; - - if ((dev->key!=NULL)||(dev->kbdfeed!=NULL)) - return False; - pSyms= pSymsIn; - pMods= pModsIn; - bzero(&defs,sizeof(XkbRF_VarDefsRec)); - rules= XkbGetRulesDflts(&defs); - - /* - * The strings are duplicated because it is not guaranteed that - * they are allocated, or that they are allocated for every server - * generation. Eventually they will be freed at the end of this - * function. - */ - names->keymap = NULL; - if (names->keycodes) names->keycodes = _XkbDupString(names->keycodes); - if (names->types) names->types = _XkbDupString(names->types); - if (names->compat) names->compat = _XkbDupString(names->compat); - if (names->geometry) names->geometry = _XkbDupString(names->geometry); - if (names->symbols) names->symbols = _XkbDupString(names->symbols); - - if (defs.model && defs.layout && rules) { - XkbComponentNamesRec rNames; - bzero(&rNames,sizeof(XkbComponentNamesRec)); - if (XkbDDXNamesFromRules(dev,rules,&defs,&rNames)) { - if (rNames.keycodes) { - if (!names->keycodes) - names->keycodes = rNames.keycodes; - else - _XkbFree(rNames.keycodes); - } - if (rNames.types) { - if (!names->types) - names->types = rNames.types; - else _XkbFree(rNames.types); - } - if (rNames.compat) { - if (!names->compat) - names->compat = rNames.compat; - else _XkbFree(rNames.compat); - } - if (rNames.symbols) { - if (!names->symbols) - names->symbols = rNames.symbols; - else _XkbFree(rNames.symbols); - } - if (rNames.geometry) { - if (!names->geometry) - names->geometry = rNames.geometry; - else _XkbFree(rNames.geometry); - } - XkbSetRulesUsed(&defs); - } + if (!XkbCopyKeymap(xkb, xkb_cached_map)) { + ErrorF("XKB: Failed to copy keymap\n"); + goto unwind_desc; } + xkb->defined = xkb_cached_map->defined; + xkb->flags = xkb_cached_map->flags; + xkb->device_spec = xkb_cached_map->device_spec; + xkbi->desc = xkb; - ok = (Bool) XkbDDXLoadKeymapByNames(dev,names,XkmAllIndicesMask,0, - &xkb,name,PATH_MAX); + if (xkb->min_key_code == 0) + xkb->min_key_code = 8; + if (xkb->max_key_code == 0) + xkb->max_key_code = 255; - if (ok && (xkb!=NULL)) { - KeyCode minKC,maxKC; + i = XkbNumKeys(xkb) / 3 + 1; + if (XkbAllocClientMap(xkb, XkbAllClientInfoMask, 0) != Success) + goto unwind_desc; + if (XkbAllocServerMap(xkb, XkbAllServerInfoMask, i) != Success) + goto unwind_desc; - minKC= xkb->min_key_code; - maxKC= xkb->max_key_code; - if (XkbIsLegalKeycode(minKC)&&XkbIsLegalKeycode(maxKC)&&(minKC<=maxKC)&& - ((minKC!=pSyms->minKeyCode)||(maxKC!=pSyms->maxKeyCode))) { - if (xkb->map!=NULL) { - KeySym *inSym,*outSym; - int width= pSymsIn->mapWidth; + xkbi->dfltPtrDelta = 1; + xkbi->device = dev; - tmpSyms.minKeyCode= minKC; - tmpSyms.maxKeyCode= maxKC; + XkbInitSemantics(xkb); + XkbInitNames(xkbi); + XkbInitRadioGroups(xkbi); - if (minKCminKeyCode) - minKC= pSymsIn->minKeyCode; - if (maxKC>pSymsIn->maxKeyCode) - maxKC= pSymsIn->maxKeyCode; + XkbInitControls(dev, xkbi); - tmpSyms.mapWidth= width; - tmpSyms.map= _XkbTypedCalloc(width*XkbNumKeys(xkb),KeySym); - inSym= &pSymsIn->map[(minKC-pSymsIn->minKeyCode)*width]; - outSym= &tmpSyms.map[(minKC-tmpSyms.minKeyCode)*width]; - memcpy(outSym,inSym,((maxKC-minKC+1)*width)*sizeof(KeySym)); - pSyms= &tmpSyms; - } - if ((xkb->map!=NULL)&&(xkb->map->modmap!=NULL)) { - bzero(tmpMods,XkbMaxKeyCount); - memcpy(tmpMods,xkb->map->modmap,maxKC+1); - pMods= tmpMods; - } - } - /* Store the map here so we can pick it back up in XkbInitDevice. - * Sigh. */ - xkb_cached_map = xkb; - } - else { - LogMessage(X_WARNING, "Couldn't load XKB keymap, falling back to pre-XKB keymap\n"); - } - ok= InitKeyboardDeviceStruct((DevicePtr)dev,pSyms,pMods,bellProc,ctrlProc); - xkb_cached_map = NULL; - if ((pSyms==&tmpSyms)&&(pSyms->map!=NULL)) { - _XkbFree(pSyms->map); - pSyms->map= NULL; - } - - if (names->keycodes) _XkbFree(names->keycodes); - names->keycodes = NULL; - if (names->types) _XkbFree(names->types); - names->types = NULL; - if (names->compat) _XkbFree(names->compat); - names->compat = NULL; - if (names->geometry) _XkbFree(names->geometry); - names->geometry = NULL; - if (names->symbols) _XkbFree(names->symbols); - names->symbols = NULL; - - return ok; -} + XkbInitIndicatorMap(xkbi); -/***====================================================================***/ + XkbUpdateActions(dev, xkb->min_key_code, XkbNumKeys(xkb), &changes, + &check, &cause); - /* - * InitKeyClassDeviceStruct initializes the key class before it - * initializes the keyboard feedback class for a device. - * UpdateActions can't set up the correct autorepeat for keyboard - * initialization because the keyboard feedback isn't created yet. - * Instead, UpdateActions notes the "correct" autorepeat in the - * SrvInfo structure and InitKbdFeedbackClass calls UpdateAutoRepeat - * to apply the computed autorepeat once the feedback class exists. - * - * DIX will apply the changed autorepeat, so there's no need to - * do so here. This function returns True if both RepeatKeys and - * the core protocol autorepeat ctrls are set (i.e. should use - * software autorepeat), false otherwise. - * - * This function also computes the autorepeat accelerators for the - * default indicator feedback. - */ -int -XkbFinishDeviceInit(DeviceIntPtr pXDev) -{ -XkbSrvInfoPtr xkbi; -XkbDescPtr xkb; -int softRepeat; -XkbSrvLedInfoPtr sli; + InitFocusClassDeviceStruct(dev); - xkbi = NULL; - if (pXDev && pXDev->key && pXDev->key->xkbInfo && pXDev->kbdfeed) { - xkbi= pXDev->key->xkbInfo; - xkb= xkbi->desc; - /* If we come from DeepCopyDeviceClasses, the CtrlProc was already set - * to XkbDDXKeybdCtrlProc, overwriting it leads to happy recursion. - */ - if (pXDev->kbdfeed && pXDev->kbdfeed->CtrlProc != XkbDDXKeybdCtrlProc) { - xkbi->kbdProc= pXDev->kbdfeed->CtrlProc; - pXDev->kbdfeed->CtrlProc= XkbDDXKeybdCtrlProc; - } - if (pXDev->kbdfeed->ctrl.autoRepeat) - xkb->ctrls->enabled_ctrls|= XkbRepeatKeysMask; - softRepeat= (xkb->ctrls->enabled_ctrls&XkbRepeatKeysMask)!=0; - if (pXDev->kbdfeed) { - memcpy(pXDev->kbdfeed->ctrl.autoRepeats, - xkb->ctrls->per_key_repeat,XkbPerKeyBitArraySize); - softRepeat= softRepeat&&pXDev->kbdfeed->ctrl.autoRepeat; - } - } - else softRepeat= 0; - sli= XkbFindSrvLedInfo(pXDev,XkbDfltXIClass,XkbDfltXIId,0); - if (sli && xkbi) - XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask); - else DebugF("[xkb] No indicator feedback in XkbFinishInit (shouldn't happen)!\n"); - return softRepeat; + xkbi->kbdProc = ctrl_func; + dev->kbdfeed->BellProc = bell_func; + dev->kbdfeed->CtrlProc = XkbDDXKeybdCtrlProc; + + dev->kbdfeed->ctrl = defaultKeyboardControl; + if (dev->kbdfeed->ctrl.autoRepeat) + xkb->ctrls->enabled_ctrls |= XkbRepeatKeysMask; + + memcpy(dev->kbdfeed->ctrl.autoRepeats, xkb->ctrls->per_key_repeat, + XkbPerKeyBitArraySize); + + sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); + if (sli) + XkbCheckIndicatorMaps(dev, sli, XkbAllIndicatorsMask); + else + DebugF("XKB: No indicator feedback in XkbFinishInit!\n"); + + dev->kbdfeed->CtrlProc(dev,&dev->kbdfeed->ctrl); + + XkbSetRulesDflts(rmlvo); + XkbSetRulesUsed(rmlvo); + XkbFreeRMLVOSet(&rmlvo_dflts, FALSE); + + return TRUE; + +unwind_desc: + XkbFreeKeyboard(xkb, 0, TRUE); +unwind_info: + xfree(xkbi); + dev->key->xkbInfo = NULL; +unwind_kbdfeed: + xfree(dev->kbdfeed); + dev->kbdfeed = NULL; +unwind_key: + xfree(dev->key); + dev->key = NULL; + return FALSE; } + +/***====================================================================***/ + /* * Be very careful about what does and doesn't get freed by this * function. To reduce fragmentation, XkbInitDevice allocates a @@ -790,7 +647,7 @@ void XkbFreeInfo(XkbSrvInfoPtr xkbi) { if (xkbi->radioGroups) { - _XkbFree(xkbi->radioGroups); + xfree(xkbi->radioGroups); xkbi->radioGroups= NULL; } if (xkbi->mouseKeyTimer) { @@ -822,7 +679,7 @@ XkbFreeInfo(XkbSrvInfoPtr xkbi) XkbFreeKeyboard(xkbi->desc,XkbAllComponentsMask,True); xkbi->desc= NULL; } - _XkbFree(xkbi); + xfree(xkbi); return; } @@ -839,15 +696,7 @@ extern unsigned char XkbDfltAccessXOptions; int XkbProcessArguments(int argc,char *argv[],int i) { - if (strcmp(argv[i],"-kb")==0) { - noXkbExtension= True; - return 1; - } - else if (strcmp(argv[i],"+kb")==0) { - noXkbExtension= False; - return 1; - } - else if (strncmp(argv[i], "-xkbdir", 7) == 0) { + if (strncmp(argv[i], "-xkbdir", 7) == 0) { if(++i < argc) { #if !defined(WIN32) && !defined(__CYGWIN__) if (getuid() != geteuid()) { @@ -925,8 +774,6 @@ XkbProcessArguments(int argc,char *argv[],int i) void XkbUseMsg(void) { - ErrorF("-kb disable the X Keyboard Extension\n"); - ErrorF("+kb enable the X Keyboard Extension\n"); ErrorF("[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]\n"); ErrorF(" enable/disable accessx key sequences\n"); ErrorF("-ardelay set XKB autorepeat delay\n"); diff --git a/xorg-server/xkb/xkbLEDs.c b/xorg-server/xkb/xkbLEDs.c index edc389f04..59cdba416 100644 --- a/xorg-server/xkb/xkbLEDs.c +++ b/xorg-server/xkb/xkbLEDs.c @@ -31,7 +31,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include -#define NEED_EVENTS 1 #include #include #include "misc.h" @@ -284,7 +283,7 @@ unsigned oldState; ed->ledID= sli->id; ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledState= sli->effectiveState; - ed->unsupported|= XkbXI_IndicatorStateMask; + ed->unsupported= 0; ed->supported= XkbXI_AllFeaturesMask; if (changes!=&my_changes) changes= NULL; @@ -606,12 +605,12 @@ void XkbFreeSrvLedInfo(XkbSrvLedInfoPtr sli) { if ((sli->flags&XkbSLI_IsDefault)==0) { - if (sli->maps) _XkbFree(sli->maps); - if (sli->names) _XkbFree(sli->names); + if (sli->maps) xfree(sli->maps); + if (sli->names) xfree(sli->names); } sli->maps= NULL; sli->names= NULL; - _XkbFree(sli); + xfree(sli); return; } @@ -644,7 +643,7 @@ XkbCopySrvLedInfo( DeviceIntPtr from, else sli_new->fb.lf = lf; - if (sli_new->flags & XkbSLI_IsDefault) { + if (!(sli_new->flags & XkbSLI_IsDefault)) { sli_new->names= _XkbTypedCalloc(XkbNumIndicators,Atom); sli_new->maps= _XkbTypedCalloc(XkbNumIndicators,XkbIndicatorMapRec); } /* else sli_new->names/maps is pointing to @@ -668,7 +667,7 @@ finish: * */ -XkbSrvLedInfoPtr +XkbSrvLedInfoPtr XkbFindSrvLedInfo( DeviceIntPtr dev, unsigned class, unsigned id, @@ -876,7 +875,7 @@ xkbExtensionDeviceNotify my_ed; ed->ledID= sli->id; ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledState= sli->effectiveState; - ed->unsupported|= XkbXI_IndicatorMapsMask; + ed->unsupported= 0; ed->supported= XkbXI_AllFeaturesMask; XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause); @@ -957,7 +956,7 @@ Bool kb_changed; ed->ledID= sli->id; ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledState= sli->effectiveState; - ed->unsupported|= XkbXI_IndicatorStateMask; + ed->unsupported= 0; ed->supported= XkbXI_AllFeaturesMask; } diff --git a/xorg-server/xkb/xkbPrKeyEv.c b/xorg-server/xkb/xkbPrKeyEv.c index a3f715c7d..8f6705f9f 100644 --- a/xorg-server/xkb/xkbPrKeyEv.c +++ b/xorg-server/xkb/xkbPrKeyEv.c @@ -30,132 +30,85 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#define NEED_EVENTS 1 #include #include #include #include "misc.h" #include "inputstr.h" #include "exevents.h" +#include "eventstr.h" #include #include +#include "events.h" /***====================================================================***/ void -XkbProcessKeyboardEvent(xEvent *xE,DeviceIntPtr keybd,int count) +XkbProcessKeyboardEvent(DeviceEvent *event, DeviceIntPtr keybd) { KeyClassPtr keyc = keybd->key; XkbSrvInfoPtr xkbi; int key; XkbBehavior behavior; unsigned ndx; -int xiEvent; - xkbi= keyc->xkbInfo; - key= xE->u.u.detail; - xiEvent= (xE->u.u.type & EXTENSION_EVENT_BASE); - if (xkbDebugFlags&0x8) { - DebugF("[xkb] XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); - } + xkbi = keyc->xkbInfo; + key = event->detail.key; + if (xkbDebugFlags & 0x8) + DebugF("[xkb] XkbPKE: Key %d %s\n",key,(event->type == ET_KeyPress?"down":"up")); - if ( (xkbi->repeatKey==key) && (xE->u.u.type==KeyRelease) && - ((xkbi->desc->ctrls->enabled_ctrls&XkbRepeatKeysMask)==0) ) { - AccessXCancelRepeatKey(xkbi,key); - } + if (xkbi->repeatKey == key && event->type== ET_KeyRelease && + !(xkbi->desc->ctrls->enabled_ctrls & XkbRepeatKeysMask)) + AccessXCancelRepeatKey(xkbi, key); - behavior= xkbi->desc->server->behaviors[key]; + behavior = xkbi->desc->server->behaviors[key]; /* The "permanent" flag indicates a hard-wired behavior that occurs */ /* below XKB, such as a key that physically locks. XKB does not */ /* do anything to implement the behavior, but it *does* report that */ /* key is hardwired */ - if ((behavior.type&XkbKB_Permanent)==0) { + if (!(behavior.type & XkbKB_Permanent)) { switch (behavior.type) { case XkbKB_Default: - if (( xE->u.u.type == KeyPress || - xE->u.u.type == DeviceKeyPress) && - (keyc->down[key>>3] & (1<<(key&7)))) { - XkbLastRepeatEvent= (pointer)xE; - - if (xiEvent) - xE->u.u.type = DeviceKeyRelease; - else - xE->u.u.type = KeyRelease; - XkbHandleActions(keybd,keybd,xE,count); - - if (xiEvent) - xE->u.u.type = DeviceKeyPress; - else - xE->u.u.type = KeyPress; - XkbHandleActions(keybd,keybd,xE,count); - XkbLastRepeatEvent= NULL; - return; - } - else if ((xE->u.u.type==KeyRelease || - xE->u.u.type == DeviceKeyRelease) && - (!(keyc->down[key>>3]&(1<<(key&7))))) { - XkbLastRepeatEvent= (pointer)&xE; - if (xiEvent) - xE->u.u.type = DeviceKeyPress; - else - xE->u.u.type = KeyPress; - XkbHandleActions(keybd,keybd,xE,count); - if (xiEvent) - xE->u.u.type = DeviceKeyRelease; - else - xE->u.u.type = KeyRelease; - XkbHandleActions(keybd,keybd,xE,count); - XkbLastRepeatEvent= NULL; - return; - } + /* Neither of these should happen in practice, but ignore them + anyway. */ + if (event->type == ET_KeyPress && !event->key_repeat && + key_is_down(keybd, key, KEY_PROCESSED)) + return; + else if (event->type == ET_KeyRelease && + !key_is_down(keybd, key, KEY_PROCESSED)) + return; break; case XkbKB_Lock: - if ( xE->u.u.type == KeyRelease || - xE->u.u.type == DeviceKeyRelease) { + if (event->type == ET_KeyRelease) return; - } - else { - int bit= 1<<(key&7); - if ( keyc->down[key>>3]&bit ) { - if (xiEvent) - xE->u.u.type = DeviceKeyRelease; - else - xE->u.u.type= KeyRelease; - } - } + else if (key_is_down(keybd, key, KEY_PROCESSED)) + event->type = ET_KeyRelease; break; case XkbKB_RadioGroup: ndx= (behavior.data&(~XkbKB_RGAllowNone)); if ( ndxnRadioGroups ) { XkbRadioGroupPtr rg; - if ( xE->u.u.type == KeyRelease || - xE->u.u.type == DeviceKeyRelease) + if (event->type == ET_KeyRelease) return; rg = &xkbi->radioGroups[ndx]; - if ( rg->currentDown == xE->u.u.detail ) { + if ( rg->currentDown == event->detail.key) { if (behavior.data&XkbKB_RGAllowNone) { - xE->u.u.type = KeyRelease; - XkbHandleActions(keybd,keybd,xE,count); + event->type = ET_KeyRelease; + XkbHandleActions(keybd, keybd, event); rg->currentDown= 0; } return; } if ( rg->currentDown!=0 ) { - int key = xE->u.u.detail; - if (xiEvent) - xE->u.u.type = DeviceKeyRelease; - else - xE->u.u.type= KeyRelease; - xE->u.u.detail= rg->currentDown; - XkbHandleActions(keybd,keybd,xE,count); - if (xiEvent) - xE->u.u.type = DeviceKeyPress; - else - xE->u.u.type= KeyPress; - xE->u.u.detail= key; + int key = event->detail.key; + event->type = ET_KeyRelease; + event->detail.key = rg->currentDown; + XkbHandleActions(keybd, keybd, event); + event->type = ET_KeyPress; + event->detail.key = key; } rg->currentDown= key; } @@ -170,7 +123,7 @@ int xiEvent; break; if ((behavior.data>=xkbi->desc->min_key_code)&& (behavior.data<=xkbi->desc->max_key_code)) { - xE->u.u.detail= behavior.data; + event->detail.key = behavior.data; /* 9/11/94 (ef) -- XXX! need to match release with */ /* press even if the state of the */ /* corresponding overlay control */ @@ -183,34 +136,33 @@ int xiEvent; break; } } - XkbHandleActions(keybd,keybd,xE,count); + XkbHandleActions(keybd, keybd, event); return; } void -ProcessKeyboardEvent(xEvent *xE,DeviceIntPtr keybd,int count) +ProcessKeyboardEvent(InternalEvent *ev, DeviceIntPtr keybd) { KeyClassPtr keyc = keybd->key; XkbSrvInfoPtr xkbi = NULL; ProcessInputProc backup_proc; xkbDeviceInfoPtr xkb_priv = XKBDEVICEINFO(keybd); - int is_press = (xE->u.u.type == KeyPress || xE->u.u.type == DeviceKeyPress); - int is_release = (xE->u.u.type == KeyRelease || - xE->u.u.type == DeviceKeyRelease); - - if (keyc) - xkbi = keyc->xkbInfo; + DeviceEvent *event = (DeviceEvent*)ev; + int is_press = (event->type == ET_KeyPress); + int is_release = (event->type == ET_KeyRelease); /* We're only interested in key events. */ if (!is_press && !is_release) { UNWRAP_PROCESS_INPUT_PROC(keybd, xkb_priv, backup_proc); - keybd->public.processInputProc(xE, keybd, count); + keybd->public.processInputProc(ev, keybd); COND_WRAP_PROCESS_INPUT_PROC(keybd, xkb_priv, backup_proc, xkbUnwrapProc); return; } + xkbi = keyc->xkbInfo; + /* If AccessX filters are active, then pass it through to * AccessXFilter{Press,Release}Event; else, punt to * XkbProcessKeyboardEvent. @@ -219,13 +171,14 @@ ProcessKeyboardEvent(xEvent *xE,DeviceIntPtr keybd,int count) * they'll punt through XPKE anyway. */ if ((xkbi->desc->ctrls->enabled_ctrls & XkbAllFilteredEventsMask)) { if (is_press) - AccessXFilterPressEvent(xE, keybd, count); + AccessXFilterPressEvent(event, keybd); else if (is_release) - AccessXFilterReleaseEvent(xE, keybd, count); - - } else { - XkbProcessKeyboardEvent(xE, keybd, count); + AccessXFilterReleaseEvent(event, keybd); + return; + } + else { + XkbProcessKeyboardEvent(event, keybd); } - + return; } diff --git a/xorg-server/xkb/xkbSwap.c b/xorg-server/xkb/xkbSwap.c index 1a513b35c..ffd66b563 100644 --- a/xorg-server/xkb/xkbSwap.c +++ b/xorg-server/xkb/xkbSwap.c @@ -30,8 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "stdio.h" #include -#define NEED_EVENTS -#define NEED_REPLIES #include #include "misc.h" #include "inputstr.h" diff --git a/xorg-server/xkb/xkbUtils.c b/xorg-server/xkb/xkbUtils.c index 71b0f6661..63b1e31c7 100644 --- a/xorg-server/xkb/xkbUtils.c +++ b/xorg-server/xkb/xkbUtils.c @@ -56,21 +56,19 @@ DEALINGS IN THE SOFTWARE. #include #include #include -#define NEED_EVENTS 1 #include #include #define XK_CYRILLIC #include #include "misc.h" #include "inputstr.h" +#include "eventstr.h" #define XKBSRV_NEED_FILE_FUNCS #include #include "xkbgeom.h" #include "xkb.h" -int XkbDisableLockActions = 0; - /***====================================================================***/ int @@ -216,13 +214,13 @@ register unsigned mask; void XkbUpdateKeyTypesFromCore( DeviceIntPtr pXDev, + KeySymsPtr pCore, KeyCode first, CARD8 num, XkbChangesPtr changes) { XkbDescPtr xkb; unsigned key,nG,explicit; -KeySymsPtr pCore; int types[XkbNumKbdGroups]; KeySym tsyms[XkbMaxSymsPerKey],*syms; XkbMapChangesPtr mc; @@ -235,8 +233,7 @@ XkbMapChangesPtr mc; mc= (changes?(&changes->map):NULL); - pCore= &pXDev->key->curKeySyms; - syms= &pCore->map[(first-xkb->min_key_code)*pCore->mapWidth]; + syms= &pCore->map[(first - pCore->minKeyCode) * pCore->mapWidth]; for (key=first; key<(first+num); key++,syms+= pCore->mapWidth) { explicit= xkb->server->explicit[key]&XkbExplicitKeyTypesMask; types[XkbGroup1Index]= XkbKeyKeyTypeIndex(xkb,key,XkbGroup1Index); @@ -358,59 +355,24 @@ CARD8 * repeat; return; } -void -XkbUpdateCoreDescription(DeviceIntPtr keybd,Bool resize) +KeySymsPtr +XkbGetCoreMap(DeviceIntPtr keybd) { register int key,tmp; -int maxSymsPerKey,maxKeysPerMod; -int first,last,firstCommon,lastCommon; +int maxSymsPerKey, maxGroup1Width; XkbDescPtr xkb; -KeyClassPtr keyc; -CARD8 keysPerMod[XkbNumModifiers]; +KeySymsPtr syms; +int maxNumberOfGroups; if (!keybd || !keybd->key || !keybd->key->xkbInfo) - return; + return NULL; + xkb= keybd->key->xkbInfo->desc; - keyc= keybd->key; - maxSymsPerKey= maxKeysPerMod= 0; - bzero(keysPerMod,sizeof(keysPerMod)); - memcpy(keyc->modifierMap,xkb->map->modmap,xkb->max_key_code+1); - if ((xkb->min_key_code==keyc->curKeySyms.minKeyCode)&& - (xkb->max_key_code==keyc->curKeySyms.maxKeyCode)) { - first= firstCommon= xkb->min_key_code; - last= lastCommon= xkb->max_key_code; - } - else if (resize) { - keyc->curKeySyms.minKeyCode= xkb->min_key_code; - keyc->curKeySyms.maxKeyCode= xkb->max_key_code; - tmp= keyc->curKeySyms.mapWidth*_XkbCoreNumKeys(keyc); - keyc->curKeySyms.map= _XkbTypedRealloc(keyc->curKeySyms.map,tmp,KeySym); - if (!keyc->curKeySyms.map) - FatalError("Couldn't allocate keysyms\n"); - first= firstCommon= xkb->min_key_code; - last= lastCommon= xkb->max_key_code; - } - else { - if (xkb->min_key_codecurKeySyms.minKeyCode) { - first= xkb->min_key_code; - firstCommon= keyc->curKeySyms.minKeyCode; - } - else { - firstCommon= xkb->min_key_code; - first= keyc->curKeySyms.minKeyCode; - } - if (xkb->max_key_code>keyc->curKeySyms.maxKeyCode) { - lastCommon= keyc->curKeySyms.maxKeyCode; - last= xkb->max_key_code; - } - else { - lastCommon= xkb->max_key_code; - last= keyc->curKeySyms.maxKeyCode; - } - } + maxSymsPerKey= maxGroup1Width= 0; + maxNumberOfGroups = 0; /* determine sizes */ - for (key=first;key<=last;key++) { + for (key=xkb->min_key_code;key<=xkb->max_key_code;key++) { if (XkbKeycodeInRange(xkb,key)) { int nGroups; int w; @@ -420,6 +382,9 @@ CARD8 keysPerMod[XkbNumModifiers]; if ((w=XkbKeyGroupWidth(xkb,key,XkbGroup1Index))<=2) tmp+= 2; else tmp+= w + 2; + /* remember highest G1 width */ + if (w > maxGroup1Width) + maxGroup1Width = w; } if (nGroups>1) { if (tmp <= 2) { @@ -437,141 +402,113 @@ CARD8 keysPerMod[XkbNumModifiers]; tmp+= XkbKeyGroupWidth(xkb,key,XkbGroup4Index); if (tmp>maxSymsPerKey) maxSymsPerKey= tmp; + if (nGroups > maxNumberOfGroups) + maxNumberOfGroups = nGroups; } - if (_XkbCoreKeycodeInRange(keyc,key)) { - if (keyc->modifierMap[key]!=0) { - register unsigned bit,i,mask; - mask= keyc->modifierMap[key]; - for (i=0,bit=1;imaxKeysPerMod) - maxKeysPerMod= keysPerMod[i]; - } - } - } - } - } - - if (maxKeysPerMod>0) { - tmp= maxKeysPerMod*XkbNumModifiers; - if (keyc->modifierKeyMap==NULL) - keyc->modifierKeyMap= (KeyCode *)_XkbCalloc(1, tmp); - else if (keyc->maxKeysPerModifiermodifierKeyMap= (KeyCode *)_XkbRealloc(keyc->modifierKeyMap,tmp); - if (keyc->modifierKeyMap==NULL) - FatalError("Couldn't allocate modifierKeyMap in UpdateCore\n"); - bzero(keyc->modifierKeyMap,tmp); - } - else if ((keyc->maxKeysPerModifier>0)&&(keyc->modifierKeyMap!=NULL)) { - _XkbFree(keyc->modifierKeyMap); - keyc->modifierKeyMap= NULL; } - keyc->maxKeysPerModifier= maxKeysPerMod; - if (maxSymsPerKey>0) { - tmp= maxSymsPerKey*_XkbCoreNumKeys(keyc); - keyc->curKeySyms.map= _XkbTypedRealloc(keyc->curKeySyms.map,tmp,KeySym); - if (keyc->curKeySyms.map==NULL) - FatalError("Couldn't allocate symbols map in UpdateCore\n"); + if (maxSymsPerKey <= 0) + return NULL; + + syms = xcalloc(1, sizeof(*syms)); + if (!syms) + return NULL; + + /* See Section 12.4 of the XKB Protocol spec. Because of the + * single-group distribution for multi-group keyboards, we have to + * have enough symbols for the largest group 1 to replicate across the + * number of groups on the keyboard. e.g. a single-group key with 4 + * symbols on a keyboard that has 3 groups -> 12 syms per key */ + if (maxSymsPerKey < maxNumberOfGroups * maxGroup1Width) + maxSymsPerKey = maxNumberOfGroups * maxGroup1Width; + + syms->mapWidth = maxSymsPerKey; + syms->minKeyCode = xkb->min_key_code; + syms->maxKeyCode = xkb->max_key_code; + + tmp = syms->mapWidth * (xkb->max_key_code - xkb->min_key_code + 1); + syms->map = xcalloc(tmp, sizeof(*syms->map)); + if (!syms->map) { + xfree(syms); + return NULL; } - else if ((keyc->curKeySyms.mapWidth>0)&&(keyc->curKeySyms.map!=NULL)) { - _XkbFree(keyc->curKeySyms.map); - keyc->curKeySyms.map= NULL; - } - keyc->curKeySyms.mapWidth= maxSymsPerKey; - - bzero(keysPerMod,sizeof(keysPerMod)); - for (key=firstCommon;key<=lastCommon;key++) { - if (keyc->curKeySyms.map!=NULL) { - KeySym *pCore,*pXKB; - unsigned nGroups,groupWidth,n,nOut; - nGroups= XkbKeyNumGroups(xkb,key); - n= (key-keyc->curKeySyms.minKeyCode)*maxSymsPerKey; - pCore= &keyc->curKeySyms.map[n]; - bzero(pCore,maxSymsPerKey*sizeof(KeySym)); - pXKB= XkbKeySymsPtr(xkb,key); - nOut= 2; - if (nGroups>0) { - groupWidth= XkbKeyGroupWidth(xkb,key,XkbGroup1Index); - if (groupWidth>0) pCore[0]= pXKB[0]; - if (groupWidth>1) pCore[1]= pXKB[1]; - for (n=2;n2) - nOut= groupWidth; - } + for (key=xkb->min_key_code;key<=xkb->max_key_code;key++) { + KeySym *pCore,*pXKB; + unsigned nGroups,groupWidth,n,nOut; + + nGroups= XkbKeyNumGroups(xkb,key); + n= (key-xkb->min_key_code)*syms->mapWidth; + pCore= &syms->map[n]; + pXKB= XkbKeySymsPtr(xkb,key); + nOut= 2; + if (nGroups>0) { + groupWidth= XkbKeyGroupWidth(xkb,key,XkbGroup1Index); + if (groupWidth>0) pCore[0]= pXKB[0]; + if (groupWidth>1) pCore[1]= pXKB[1]; + for (n=2;n2) + nOut= groupWidth; + } - /* See XKB Protocol Sec, Section 12.4. - A 1-group key with ABCDE on a 2 group keyboard must be - duplicated across all groups as ABABCDECDE. - */ - if (nGroups == 1) + /* See XKB Protocol Sec, Section 12.4. + A 1-group key with ABCDE on a 2 group keyboard must be + duplicated across all groups as ABABCDECDE. + */ + if (nGroups == 1) + { + int idx, j; + + groupWidth = XkbKeyGroupWidth(xkb, key, XkbGroup1Index); + + /* AB..CDE... -> ABABCDE... */ + if (groupWidth > 0 && syms->mapWidth >= 3) + pCore[2] = pCore[0]; + if (groupWidth > 1 && syms->mapWidth >= 4) + pCore[3] = pCore[1]; + + /* ABABCDE... -> ABABCDECDE */ + idx = 2 + groupWidth; + while (groupWidth > 2 && idx < syms->mapWidth && + idx < groupWidth * 2) { - int idx; - - groupWidth = XkbKeyGroupWidth(xkb, key, XkbGroup1Index); - - /* AB..CDE... -> ABABCDE... */ - if (groupWidth > 0 && maxSymsPerKey >= 3) - pCore[2] = pCore[0]; - if (groupWidth > 1 && maxSymsPerKey >= 4) - pCore[3] = pCore[1]; - - /* ABABCDE... -> ABABCDECDE */ - idx = 2 + groupWidth; - while (groupWidth > 2 && - idx < maxSymsPerKey && - idx < groupWidth * 2) - { - pCore[idx] = pCore[idx - groupWidth + 2]; - idx++; - } - idx = 2 * groupWidth; - if (idx < 4) - idx = 4; - /* 3 or more groups: ABABCDECDEABCDEABCDE */ + pCore[idx] = pCore[idx - groupWidth + 2]; + idx++; + } + idx = 2 * groupWidth; + if (idx < 4) + idx = 4; + /* 3 or more groups: ABABCDECDEABCDEABCDE */ + for (j = 3; j <= maxNumberOfGroups; j++) for (n = 0; n < groupWidth && idx < maxSymsPerKey; n++) pCore[idx++] = pXKB[n]; - } + } - pXKB+= XkbKeyGroupsWidth(xkb,key); - nOut+= 2; - if (nGroups>1) { - groupWidth= XkbKeyGroupWidth(xkb,key,XkbGroup2Index); - if (groupWidth>0) pCore[2]= pXKB[0]; - if (groupWidth>1) pCore[3]= pXKB[1]; - for (n=2;n2) - nOut+= (groupWidth-2); - } - pXKB+= XkbKeyGroupsWidth(xkb,key); - for (n=XkbGroup3Index;n1) { + groupWidth= XkbKeyGroupWidth(xkb,key,XkbGroup2Index); + if (groupWidth>0) pCore[2]= pXKB[0]; + if (groupWidth>1) pCore[3]= pXKB[1]; + for (n=2;n2) + nOut+= (groupWidth-2); } - if (keyc->modifierMap[key]!=0) { - register unsigned bit,i,mask; - mask= keyc->modifierMap[key]; - for (i=0,bit=1;imodifierKeyMap[tmp]= key; - keysPerMod[i]++; - } + pXKB+= XkbKeyGroupsWidth(xkb,key); + for (n=XkbGroup3Index;nkey->xkbInfo==NULL) - XkbInitDevice(kbd); - bzero(&changes,sizeof(XkbChangesRec)); - check= 0; - if (request==MappingKeyboard) { - XkbSetCauseCoreReq(&cause,X_ChangeKeyboardMapping,client); - XkbUpdateKeyTypesFromCore(kbd,firstKey,num,&changes); - XkbUpdateActions(kbd,firstKey,num,&changes,&check,&cause); - if (check) - XkbCheckSecondaryEffects(kbd->key->xkbInfo,check,&changes,&cause); - } - else if (request==MappingModifier) { - XkbDescPtr xkb= kbd->key->xkbInfo->desc; + XkbDescPtr xkb = kbd->key->xkbInfo->desc; + XkbEventCauseRec cause; + XkbChangesRec changes; + unsigned int check; + + memset(&changes, 0, sizeof(changes)); + memset(&cause, 0, sizeof(cause)); - XkbSetCauseCoreReq(&cause,X_SetModifierMapping,client); + if (map && first_key && num_keys) { + check = 0; + XkbSetCauseCoreReq(&cause, X_ChangeKeyboardMapping, client); - num = xkb->max_key_code-xkb->min_key_code+1; - memcpy(xkb->map->modmap,kbd->key->modifierMap,xkb->max_key_code+1); + XkbUpdateKeyTypesFromCore(kbd, map, first_key, num_keys, &changes); + XkbUpdateActions(kbd, first_key, num_keys, &changes, &check, &cause); - changes.map.changed|= XkbModifierMapMask; - changes.map.first_modmap_key= xkb->min_key_code; - changes.map.num_modmap_keys= num; - XkbUpdateActions(kbd,xkb->min_key_code,num,&changes,&check,&cause); - if (check) - XkbCheckSecondaryEffects(kbd->key->xkbInfo,check,&changes,&cause); + if (check) + XkbCheckSecondaryEffects(kbd->key->xkbInfo, 1, &changes, &cause); } - /* 3/26/94 (ef) -- XXX! Doesn't deal with input extension requests */ - XkbSendNotification(kbd,&changes,&cause); - return; + + if (modmap) { + /* A keymap change can imply a modmap change, se we prefer the + * former. */ + if (!cause.mjr) + XkbSetCauseCoreReq(&cause,X_SetModifierMapping,client); + + check = 0; + num_keys = xkb->max_key_code - xkb->min_key_code + 1; + changes.map.changed |= XkbModifierMapMask; + changes.map.first_modmap_key = xkb->min_key_code; + changes.map.num_modmap_keys = num_keys; + memcpy(kbd->key->xkbInfo->desc->map->modmap, modmap, MAP_LENGTH); + XkbUpdateActions(kbd, xkb->min_key_code, num_keys, &changes, &check, + &cause); + + if (check) + XkbCheckSecondaryEffects(kbd->key->xkbInfo, 1, &changes, &cause); + } + + XkbSendNotification(kbd, &changes, &cause); } void @@ -751,8 +692,7 @@ unsigned char grp; if (!state || !ctrls) return; - state->mods= (state->base_mods|state->latched_mods); - state->mods|= state->locked_mods; + state->mods= (state->base_mods|state->latched_mods|state->locked_mods); state->lookup_mods= state->mods&(~ctrls->internal.mask); state->grab_mods= state->lookup_mods&(~ctrls->ignore_lock.mask); state->grab_mods|= @@ -842,7 +782,7 @@ XkbSrvLedInfoPtr sli; #define MAX_TOC 16 -XkbGeometryPtr +XkbGeometryPtr XkbLookupNamedGeometry(DeviceIntPtr dev,Atom name,Bool *shouldFree) { XkbSrvInfoPtr xkbi= dev->key->xkbInfo; @@ -2103,97 +2043,44 @@ _XkbCopyControls(XkbDescPtr src, XkbDescPtr dst) */ Bool -XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) +XkbCopyKeymap(XkbDescPtr dst, XkbDescPtr src) { - DeviceIntPtr pDev = NULL, tmpDev = NULL; - xkbMapNotify mn; - xkbNewKeyboardNotify nkn; - if (!src || !dst || src == dst) + if (!src || !dst) { + DebugF("XkbCopyKeymap: src (%p) or dst (%p) is NULL\n", src, dst); return FALSE; + } - if (!_XkbCopyClientMap(src, dst)) - return FALSE; - if (!_XkbCopyServerMap(src, dst)) - return FALSE; - if (!_XkbCopyIndicators(src, dst)) + if (src == dst) + return TRUE; + + if (!_XkbCopyClientMap(src, dst)) { + DebugF("XkbCopyKeymap: failed to copy client map\n"); return FALSE; - if (!_XkbCopyControls(src, dst)) + } + if (!_XkbCopyServerMap(src, dst)) { + DebugF("XkbCopyKeymap: failed to copy server map\n"); return FALSE; - if (!_XkbCopyNames(src, dst)) + } + if (!_XkbCopyIndicators(src, dst)) { + DebugF("XkbCopyKeymap: failed to copy indicators\n"); return FALSE; - if (!_XkbCopyCompat(src, dst)) + } + if (!_XkbCopyControls(src, dst)) { + DebugF("XkbCopyKeymap: failed to copy controls\n"); return FALSE; - if (!_XkbCopyGeom(src, dst)) + } + if (!_XkbCopyNames(src, dst)) { + DebugF("XkbCopyKeymap: failed to copy names\n"); return FALSE; - - if (inputInfo.keyboard->key->xkbInfo && - inputInfo.keyboard->key->xkbInfo->desc == dst) { - pDev = inputInfo.keyboard; } - else { - for (tmpDev = inputInfo.devices; tmpDev && !pDev; - tmpDev = tmpDev->next) { - if (tmpDev->key && tmpDev->key->xkbInfo && - tmpDev->key->xkbInfo->desc == dst) { - pDev = tmpDev; - break; - } - } - for (tmpDev = inputInfo.off_devices; tmpDev && !pDev; - tmpDev = tmpDev->next) { - if (tmpDev->key && tmpDev->key->xkbInfo && - tmpDev->key->xkbInfo->desc == dst) { - pDev = tmpDev; - break; - } - } + if (!_XkbCopyCompat(src, dst)) { + DebugF("XkbCopyKeymap: failed to copy compat map\n"); + return FALSE; } - - if (sendNotifies) { - if (!pDev) { - ErrorF("[xkb] XkbCopyKeymap: asked for notifies, but can't find device!\n"); - } - else { - /* send NewKeyboardNotify if the keycode range changed, else - * just MapNotify. we also need to send NKN if the geometry - * changed (obviously ...). */ - if ((src->min_key_code != dst->min_key_code || - src->max_key_code != dst->max_key_code)) { - nkn.oldMinKeyCode = dst->min_key_code; - nkn.oldMaxKeyCode = dst->max_key_code; - nkn.deviceID = nkn.oldDeviceID = pDev->id; - nkn.minKeyCode = src->min_key_code; - nkn.maxKeyCode = src->max_key_code; - nkn.requestMajor = XkbReqCode; - nkn.requestMinor = X_kbSetMap; /* XXX bare-faced lie */ - nkn.changed = XkbAllNewKeyboardEventsMask; - XkbSendNewKeyboardNotify(pDev, &nkn); - } else - { - mn.deviceID = pDev->id; - mn.minKeyCode = src->min_key_code; - mn.maxKeyCode = src->max_key_code; - mn.firstType = 0; - mn.nTypes = src->map->num_types; - mn.firstKeySym = src->min_key_code; - mn.nKeySyms = XkbNumKeys(src); - mn.firstKeyAct = src->min_key_code; - mn.nKeyActs = XkbNumKeys(src); - /* Cargo-culted from ProcXkbGetMap. */ - mn.firstKeyBehavior = src->min_key_code; - mn.nKeyBehaviors = XkbNumKeys(src); - mn.firstKeyExplicit = src->min_key_code; - mn.nKeyExplicit = XkbNumKeys(src); - mn.firstModMapKey = src->min_key_code; - mn.nModMapKeys = XkbNumKeys(src); - mn.firstVModMapKey = src->min_key_code; - mn.nVModMapKeys = XkbNumKeys(src); - mn.virtualMods = ~0; /* ??? */ - mn.changed = XkbAllMapComponentsMask; - XkbSendMapNotify(pDev, &mn); - } - } + if (!_XkbCopyGeom(src, dst)) { + DebugF("XkbCopyKeymap: failed to copy geometry\n"); + return FALSE; } dst->min_key_code = src->min_key_code; @@ -2201,3 +2088,33 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) return TRUE; } + +Bool +XkbCopyDeviceKeymap(DeviceIntPtr dst, DeviceIntPtr src) +{ + xkbNewKeyboardNotify nkn; + Bool ret; + + if (!dst->key || !src->key) + return FALSE; + + memset(&nkn, 0, sizeof(xkbNewKeyboardNotify)); + nkn.oldMinKeyCode = dst->key->xkbInfo->desc->min_key_code; + nkn.oldMaxKeyCode = dst->key->xkbInfo->desc->max_key_code; + nkn.deviceID = dst->id; + nkn.oldDeviceID = dst->id; /* maybe src->id? */ + nkn.minKeyCode = src->key->xkbInfo->desc->min_key_code; + nkn.maxKeyCode = src->key->xkbInfo->desc->max_key_code; + nkn.requestMajor = XkbReqCode; + nkn.requestMinor = X_kbSetMap; /* Near enough's good enough. */ + nkn.changed = XkbNKN_KeycodesMask; + if (src->key->xkbInfo->desc->geom) + nkn.changed |= XkbNKN_GeometryMask; + + ret = XkbCopyKeymap(dst->key->xkbInfo->desc, src->key->xkbInfo->desc); + if (ret) + XkbSendNewKeyboardNotify(dst, &nkn); + + return ret; +} + diff --git a/xorg-server/xkb/xkbfmisc.c b/xorg-server/xkb/xkbfmisc.c index ae752e945..52ef6362c 100644 --- a/xorg-server/xkb/xkbfmisc.c +++ b/xorg-server/xkb/xkbfmisc.c @@ -34,9 +34,9 @@ #include #include +#include #include -#define NEED_EVENTS #include #include #include "misc.h" @@ -164,14 +164,13 @@ XkbWriteXKBKeymapForNames( FILE * file, unsigned want, unsigned need) { -char * name,*tmp; +const char * tmp; unsigned complete; XkbNamesPtr old_names; int multi_section; unsigned wantNames,wantConfig,wantDflts; complete= 0; - if ((name=names->keymap)==NULL) name= "default"; if (COMPLETE(names->keycodes)) complete|= XkmKeyNamesMask; if (COMPLETE(names->types)) complete|= XkmTypesMask; if (COMPLETE(names->compat)) complete|= XkmCompatMapMask; @@ -293,15 +292,15 @@ unsigned wantNames,wantConfig,wantDflts; multi_section= 1; if (((complete&XkmKeymapRequired)==XkmKeymapRequired)&& ((complete&(~XkmKeymapLegal))==0)) { - fprintf(file,"xkb_keymap \"%s\" {\n",name); + fprintf(file,"xkb_keymap \"default\" {\n"); } else if (((complete&XkmSemanticsRequired)==XkmSemanticsRequired)&& ((complete&(~XkmSemanticsLegal))==0)) { - fprintf(file,"xkb_semantics \"%s\" {\n",name); + fprintf(file,"xkb_semantics \"default\" {\n"); } else if (((complete&XkmLayoutRequired)==XkmLayoutRequired)&& ((complete&(~XkmLayoutLegal))==0)) { - fprintf(file,"xkb_layout \"%s\" {\n",name); + fprintf(file,"xkb_layout \"default\" {\n"); } else if (XkmSingleSection(complete&(~XkmVirtualModsMask))) { multi_section= 0; @@ -311,41 +310,36 @@ unsigned wantNames,wantConfig,wantDflts; } wantNames= complete&(~(wantConfig|wantDflts)); - name= names->keycodes; if (wantConfig&XkmKeyNamesMask) - XkbWriteXKBKeycodes(file,xkb,False,False,_AddIncl,name); + XkbWriteXKBKeycodes(file,xkb,False,False,_AddIncl,names->keycodes); else if (wantDflts&XkmKeyNamesMask) fprintf(stderr,"Default symbols not implemented yet!\n"); else if (wantNames&XkmKeyNamesMask) - XkbWriteSectionFromName(file,"keycodes",name); + XkbWriteSectionFromName(file,"keycodes",names->keycodes); - name= names->types; if (wantConfig&XkmTypesMask) - XkbWriteXKBKeyTypes(file,xkb,False,False,_AddIncl,name); + XkbWriteXKBKeyTypes(file,xkb,False,False,_AddIncl,names->types); else if (wantDflts&XkmTypesMask) fprintf(stderr,"Default types not implemented yet!\n"); else if (wantNames&XkmTypesMask) - XkbWriteSectionFromName(file,"types",name); + XkbWriteSectionFromName(file,"types",names->types); - name= names->compat; if (wantConfig&XkmCompatMapMask) - XkbWriteXKBCompatMap(file,xkb,False,False,_AddIncl,name); + XkbWriteXKBCompatMap(file,xkb,False,False,_AddIncl,names->compat); else if (wantDflts&XkmCompatMapMask) fprintf(stderr,"Default interps not implemented yet!\n"); else if (wantNames&XkmCompatMapMask) - XkbWriteSectionFromName(file,"compatibility",name); + XkbWriteSectionFromName(file,"compatibility",names->compat); - name= names->symbols; if (wantConfig&XkmSymbolsMask) - XkbWriteXKBSymbols(file,xkb,False,False,_AddIncl,name); + XkbWriteXKBSymbols(file,xkb,False,False,_AddIncl,names->symbols); else if (wantNames&XkmSymbolsMask) - XkbWriteSectionFromName(file,"symbols",name); + XkbWriteSectionFromName(file,"symbols",names->symbols); - name= names->geometry; if (wantConfig&XkmGeometryMask) - XkbWriteXKBGeometry(file,xkb,False,False,_AddIncl,name); + XkbWriteXKBGeometry(file,xkb,False,False,_AddIncl,names->geometry); else if (wantNames&XkmGeometryMask) - XkbWriteSectionFromName(file,"geometry",name); + XkbWriteSectionFromName(file,"geometry",names->geometry); if (multi_section) fprintf(file,"};\n"); @@ -413,29 +407,6 @@ unsigned rtrn; return rtrn; } -/* all latin-1 alphanumerics, plus parens, slash, minus, underscore and */ -/* wildcards */ - -static unsigned char componentSpecLegal[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, 0xff, 0x83, - 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff -}; - -void -XkbEnsureSafeMapName(char *name) -{ - if (name==NULL) - return; - while (*name!='\0') { - if ((componentSpecLegal[(*name)/8]&(1<<((*name)%8)))==0) - *name= '_'; - name++; - } - return; -} - /***====================================================================***/ #define UNMATCHABLE(c) (((c)=='(')||((c)==')')||((c)=='/')) diff --git a/xorg-server/xkb/xkbgeom.h b/xorg-server/xkb/xkbgeom.h index 173affee9..fe4da3806 100644 --- a/xorg-server/xkb/xkbgeom.h +++ b/xorg-server/xkb/xkbgeom.h @@ -311,8 +311,6 @@ typedef struct _XkbGeometrySizes { unsigned short num_key_aliases; } XkbGeometrySizesRec,*XkbGeometrySizesPtr; -_XFUNCPROTOBEGIN - extern XkbPropertyPtr XkbAddGeomProperty( XkbGeometryPtr /* geom */, @@ -630,6 +628,4 @@ XkbFindOverlayForKey( char * /* under */ ); -_XFUNCPROTOEND - #endif /* _XKBGEOM_H_ */ diff --git a/xorg-server/xkb/xkbout.c b/xorg-server/xkb/xkbout.c index 229cc9258..b1c30d052 100644 --- a/xorg-server/xkb/xkbout.c +++ b/xorg-server/xkb/xkbout.c @@ -34,9 +34,9 @@ #include #include -#define NEED_EVENTS #include #include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" diff --git a/xorg-server/xkb/xkbtext.c b/xorg-server/xkb/xkbtext.c index d08c91589..95ad01378 100644 --- a/xorg-server/xkb/xkbtext.c +++ b/xorg-server/xkb/xkbtext.c @@ -35,8 +35,8 @@ #include #include -#define NEED_EVENTS #include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" @@ -71,16 +71,17 @@ char *rtrn; char * XkbAtomText(Atom atm,unsigned format) { +const char *atmstr; char *rtrn,*tmp; - tmp= XkbAtomGetString(atm); - if (tmp!=NULL) { + atmstr = XkbAtomGetString(atm); + if (atmstr != NULL) { int len; - len= strlen(tmp)+1; + len= strlen(atmstr)+1; if (len>BUFFER_SIZE) len= BUFFER_SIZE-2; rtrn= tbGetBuffer(len); - strncpy(rtrn,tmp,len); + strncpy(rtrn,atmstr,len); rtrn[len]= '\0'; } else { @@ -105,7 +106,8 @@ XkbVModIndexText(XkbDescPtr xkb,unsigned ndx,unsigned format) { register int len; register Atom *vmodNames; -char *rtrn,*tmp; +char *rtrn; +const char *tmp; char numBuf[20]; if (xkb && xkb->names) @@ -117,8 +119,10 @@ char numBuf[20]; tmp= "illegal"; else if (vmodNames&&(vmodNames[ndx]!=None)) tmp= XkbAtomGetString(vmodNames[ndx]); - if (tmp==NULL) - sprintf(tmp=numBuf,"%d",ndx); + if (tmp==NULL) { + sprintf(numBuf,"%d",ndx); + tmp = numBuf; + } len= strlen(tmp)+1; if (format==XkbCFile) diff --git a/xorg-server/xkb/xkmread.c b/xorg-server/xkb/xkmread.c index b14a5beda..6623d1bf0 100644 --- a/xorg-server/xkb/xkmread.c +++ b/xorg-server/xkb/xkmread.c @@ -34,9 +34,9 @@ #include #include -#define NEED_EVENTS #include #include +#include #include "misc.h" #include "inputstr.h" #include "xkbstr.h" @@ -52,13 +52,13 @@ XkbInternAtom(char *str,Bool only_if_exists) } char * -_XkbDupString(char *str) +_XkbDupString(const char *str) { char *new; if (str==NULL) return NULL; - new= (char *)_XkbCalloc(strlen(str)+1,sizeof(char)); + new= xcalloc(strlen(str)+1,sizeof(char)); if (new) strcpy(new,str); return new; @@ -74,10 +74,10 @@ int newCount= *newCountRtrn; if (oldPtr==NULL) { if (newCount==0) return NULL; - oldPtr= _XkbCalloc(newCount,elemSize); + oldPtr= xcalloc(newCount,elemSize); } else if (oldCountvirtual_mod= wire.virtualMod; interp->flags= wire.flags; interp->act.type= wire.actionType; - interp->act.data[0]= wire.actionData[0]; - interp->act.data[1]= wire.actionData[1]; - interp->act.data[2]= wire.actionData[2]; - interp->act.data[3]= wire.actionData[3]; - interp->act.data[4]= wire.actionData[4]; - interp->act.data[5]= wire.actionData[5]; - interp->act.data[6]= wire.actionData[6]; + act = (XkbAction *) &interp->act; + + switch (interp->act.type) { + case XkbSA_SetMods: + case XkbSA_LatchMods: + case XkbSA_LockMods: + act->mods.flags = wire.actionData[0]; + act->mods.mask = wire.actionData[1]; + act->mods.real_mods = wire.actionData[2]; + act->mods.vmods1 = wire.actionData[3]; + act->mods.vmods2 = wire.actionData[4]; + break; + case XkbSA_SetGroup: + case XkbSA_LatchGroup: + case XkbSA_LockGroup: + act->group.flags = wire.actionData[0]; + act->group.group_XXX = wire.actionData[1]; + break; + case XkbSA_MovePtr: + act->ptr.flags = wire.actionData[0]; + act->ptr.high_XXX = wire.actionData[1]; + act->ptr.low_XXX = wire.actionData[2]; + act->ptr.high_YYY = wire.actionData[3]; + act->ptr.low_YYY = wire.actionData[4]; + break; + case XkbSA_PtrBtn: + case XkbSA_LockPtrBtn: + act->btn.flags = wire.actionData[0]; + act->btn.count = wire.actionData[1]; + act->btn.button = wire.actionData[2]; + break; + case XkbSA_DeviceBtn: + case XkbSA_LockDeviceBtn: + act->devbtn.flags = wire.actionData[0]; + act->devbtn.count = wire.actionData[1]; + act->devbtn.button = wire.actionData[2]; + act->devbtn.device = wire.actionData[3]; + break; + case XkbSA_SetPtrDflt: + act->dflt.flags = wire.actionData[0]; + act->dflt.affect = wire.actionData[1]; + act->dflt.valueXXX = wire.actionData[2]; + break; + case XkbSA_ISOLock: + act->iso.flags = wire.actionData[0]; + act->iso.mask = wire.actionData[1]; + act->iso.real_mods = wire.actionData[2]; + act->iso.group_XXX = wire.actionData[3]; + act->iso.affect = wire.actionData[4]; + act->iso.vmods1 = wire.actionData[5]; + act->iso.vmods2 = wire.actionData[6]; + break; + case XkbSA_SwitchScreen: + act->screen.flags = wire.actionData[0]; + act->screen.screenXXX = wire.actionData[1]; + break; + case XkbSA_SetControls: + case XkbSA_LockControls: + act->ctrls.flags = wire.actionData[0]; + act->ctrls.ctrls3 = wire.actionData[1]; + act->ctrls.ctrls2 = wire.actionData[2]; + act->ctrls.ctrls1 = wire.actionData[3]; + act->ctrls.ctrls0 = wire.actionData[4]; + break; + case XkbSA_RedirectKey: + act->redirect.new_key = wire.actionData[0]; + act->redirect.mods_mask = wire.actionData[1]; + act->redirect.mods = wire.actionData[2]; + act->redirect.vmods_mask0 = wire.actionData[3]; + act->redirect.vmods_mask1 = wire.actionData[4]; + act->redirect.vmods0 = wire.actionData[4]; + act->redirect.vmods1 = wire.actionData[5]; + break; + case XkbSA_DeviceValuator: + act->devval.device = wire.actionData[0]; + act->devval.v1_what = wire.actionData[1]; + act->devval.v1_ndx = wire.actionData[2]; + act->devval.v1_value = wire.actionData[3]; + act->devval.v2_what = wire.actionData[4]; + act->devval.v2_ndx = wire.actionData[5]; + act->devval.v2_what = wire.actionData[6]; + break; + case XkbSA_XFree86Private: + case XkbSA_Terminate: + /* no args, kinda (note: untrue for xfree86). */ + break; + case XkbSA_ActionMessage: + /* unsupported. */ + break; + } } if ((num_si>0)&&(changes)) { changes->compat.first_si= 0; diff --git a/xorg-server/xorg-server.pc.in b/xorg-server/xorg-server.pc.in index 139adf487..3d58dabbf 100644 --- a/xorg-server/xorg-server.pc.in +++ b/xorg-server/xorg-server.pc.in @@ -9,11 +9,10 @@ abi_ansic=@abi_ansic@ abi_videodrv=@abi_videodrv@ abi_xinput=@abi_xinput@ abi_extension=@abi_extension@ -abi_font=@abi_font@ Name: xorg-server Description: Modular X.Org X Server Version: @PACKAGE_VERSION@ Requires: pixman-1 pciaccess -Cflags: -I${sdkdir} +Cflags: -I${sdkdir} @symbol_visibility@ Libs: -L${libdir} -- cgit v1.2.3